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
@@ -0,0 +1,110 @@
|
|
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 data.
|
21
|
+
class DowntimeResponseData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Downtime details.
|
25
|
+
attr_accessor :attributes
|
26
|
+
|
27
|
+
# The downtime ID.
|
28
|
+
attr_accessor :id
|
29
|
+
|
30
|
+
# All relationships associated with downtime.
|
31
|
+
attr_accessor :relationships
|
32
|
+
|
33
|
+
# Downtime resource type.
|
34
|
+
attr_accessor :type
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
# @!visibility private
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'attributes' => :'attributes',
|
41
|
+
:'id' => :'id',
|
42
|
+
:'relationships' => :'relationships',
|
43
|
+
:'type' => :'type'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
# @!visibility private
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'attributes' => :'DowntimeResponseAttributes',
|
52
|
+
:'id' => :'String',
|
53
|
+
:'relationships' => :'DowntimeRelationships',
|
54
|
+
:'type' => :'DowntimeResourceType'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
60
|
+
# @!visibility private
|
61
|
+
def initialize(attributes = {})
|
62
|
+
if (!attributes.is_a?(Hash))
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeResponseData` initialize method"
|
64
|
+
end
|
65
|
+
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
|
+
end
|
71
|
+
h[k.to_sym] = v
|
72
|
+
}
|
73
|
+
|
74
|
+
if attributes.key?(:'attributes')
|
75
|
+
self.attributes = attributes[:'attributes']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'id')
|
79
|
+
self.id = attributes[:'id']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'relationships')
|
83
|
+
self.relationships = attributes[:'relationships']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'type')
|
87
|
+
self.type = attributes[:'type']
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Checks equality by comparing each attribute.
|
92
|
+
# @param o [Object] Object to be compared
|
93
|
+
# @!visibility private
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
attributes == o.attributes &&
|
98
|
+
id == o.id &&
|
99
|
+
relationships == o.relationships &&
|
100
|
+
type == o.type
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
# @!visibility private
|
106
|
+
def hash
|
107
|
+
[attributes, id, relationships, type].hash
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,63 @@
|
|
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
|
+
# An object related to a downtime.
|
21
|
+
module DowntimeResponseIncludedItem
|
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
|
+
:'User',
|
30
|
+
:'DowntimeMonitorIncludedItem'
|
31
|
+
]
|
32
|
+
end
|
33
|
+
# Builds the object
|
34
|
+
# @param data [Mixed] Data to be matched against the list of oneOf items
|
35
|
+
# @return [Object] Returns the model or the data itself
|
36
|
+
def build(data)
|
37
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
38
|
+
# Note:
|
39
|
+
# - We do not attempt to check whether exactly one item matches.
|
40
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
41
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
42
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
43
|
+
# - TODO: logging when debugging is set.
|
44
|
+
openapi_one_of.each do |klass|
|
45
|
+
begin
|
46
|
+
next if klass == :AnyType # "nullable: true"
|
47
|
+
typed_data = find_and_cast_into_type(klass, data)
|
48
|
+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
|
49
|
+
return typed_data if typed_data
|
50
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
if openapi_one_of.include?(:AnyType)
|
55
|
+
data
|
56
|
+
else
|
57
|
+
self._unparsed = true
|
58
|
+
DatadogAPIClient::UnparsedObject.new(data)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,63 @@
|
|
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
|
+
# Schedule for the downtime.
|
21
|
+
module DowntimeScheduleCreateRequest
|
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
|
+
:'DowntimeScheduleRecurrencesCreateRequest',
|
30
|
+
:'DowntimeScheduleOneTimeCreateUpdateRequest'
|
31
|
+
]
|
32
|
+
end
|
33
|
+
# Builds the object
|
34
|
+
# @param data [Mixed] Data to be matched against the list of oneOf items
|
35
|
+
# @return [Object] Returns the model or the data itself
|
36
|
+
def build(data)
|
37
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
38
|
+
# Note:
|
39
|
+
# - We do not attempt to check whether exactly one item matches.
|
40
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
41
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
42
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
43
|
+
# - TODO: logging when debugging is set.
|
44
|
+
openapi_one_of.each do |klass|
|
45
|
+
begin
|
46
|
+
next if klass == :AnyType # "nullable: true"
|
47
|
+
typed_data = find_and_cast_into_type(klass, data)
|
48
|
+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
|
49
|
+
return typed_data if typed_data
|
50
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
if openapi_one_of.include?(:AnyType)
|
55
|
+
data
|
56
|
+
else
|
57
|
+
self._unparsed = true
|
58
|
+
DatadogAPIClient::UnparsedObject.new(data)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
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
|
+
# The most recent actual start and end dates for a recurring downtime. For a canceled downtime,
|
21
|
+
# this is the previously occurring downtime. For active downtimes, this is the ongoing downtime, and for scheduled
|
22
|
+
# downtimes it is the upcoming downtime.
|
23
|
+
class DowntimeScheduleCurrentDowntimeResponse
|
24
|
+
include BaseGenericModel
|
25
|
+
|
26
|
+
# The end of the current downtime.
|
27
|
+
attr_accessor :_end
|
28
|
+
|
29
|
+
# The start of the current downtime.
|
30
|
+
attr_accessor :start
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
# @!visibility private
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'_end' => :'end',
|
37
|
+
:'start' => :'start'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'_end' => :'Time',
|
46
|
+
:'start' => :'Time'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# List of attributes with nullable: true
|
51
|
+
# @!visibility private
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
:'_end',
|
55
|
+
])
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
60
|
+
# @!visibility private
|
61
|
+
def initialize(attributes = {})
|
62
|
+
if (!attributes.is_a?(Hash))
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleCurrentDowntimeResponse` initialize method"
|
64
|
+
end
|
65
|
+
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleCurrentDowntimeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
|
+
end
|
71
|
+
h[k.to_sym] = v
|
72
|
+
}
|
73
|
+
|
74
|
+
if attributes.key?(:'_end')
|
75
|
+
self._end = attributes[:'_end']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'start')
|
79
|
+
self.start = attributes[:'start']
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param o [Object] Object to be compared
|
85
|
+
# @!visibility private
|
86
|
+
def ==(o)
|
87
|
+
return true if self.equal?(o)
|
88
|
+
self.class == o.class &&
|
89
|
+
_end == o._end &&
|
90
|
+
start == o.start
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
# @!visibility private
|
96
|
+
def hash
|
97
|
+
[_end, start].hash
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,101 @@
|
|
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 one-time downtime definition.
|
21
|
+
class DowntimeScheduleOneTimeCreateUpdateRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# ISO-8601 Datetime to end the downtime. Must include a UTC offset of zero. If not provided, the
|
25
|
+
# downtime continues forever.
|
26
|
+
attr_accessor :_end
|
27
|
+
|
28
|
+
# ISO-8601 Datetime to start the downtime. Must include a UTC offset of zero. If not provided, the
|
29
|
+
# downtime starts the moment it is created.
|
30
|
+
attr_accessor :start
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
# @!visibility private
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'_end' => :'end',
|
37
|
+
:'start' => :'start'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'_end' => :'Time',
|
46
|
+
:'start' => :'Time'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# List of attributes with nullable: true
|
51
|
+
# @!visibility private
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
:'_end',
|
55
|
+
:'start',
|
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::DowntimeScheduleOneTimeCreateUpdateRequest` 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::DowntimeScheduleOneTimeCreateUpdateRequest`. 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?(:'_end')
|
76
|
+
self._end = attributes[:'_end']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'start')
|
80
|
+
self.start = attributes[:'start']
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param o [Object] Object to be compared
|
86
|
+
# @!visibility private
|
87
|
+
def ==(o)
|
88
|
+
return true if self.equal?(o)
|
89
|
+
self.class == o.class &&
|
90
|
+
_end == o._end &&
|
91
|
+
start == o.start
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Integer] Hash code
|
96
|
+
# @!visibility private
|
97
|
+
def hash
|
98
|
+
[_end, start].hash
|
99
|
+
end
|
100
|
+
end
|
101
|
+
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
|
+
# A one-time downtime definition.
|
21
|
+
class DowntimeScheduleOneTimeResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# ISO-8601 Datetime to end the downtime.
|
25
|
+
attr_accessor :_end
|
26
|
+
|
27
|
+
# ISO-8601 Datetime to start the downtime.
|
28
|
+
attr_accessor :start
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
# @!visibility private
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'_end' => :'end',
|
35
|
+
:'start' => :'start'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'_end' => :'Time',
|
44
|
+
:'start' => :'Time'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# List of attributes with nullable: true
|
49
|
+
# @!visibility private
|
50
|
+
def self.openapi_nullable
|
51
|
+
Set.new([
|
52
|
+
:'_end',
|
53
|
+
])
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
58
|
+
# @!visibility private
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleOneTimeResponse` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleOneTimeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'_end')
|
73
|
+
self._end = attributes[:'_end']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'start')
|
77
|
+
self.start = attributes[:'start']
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Checks equality by comparing each attribute.
|
82
|
+
# @param o [Object] Object to be compared
|
83
|
+
# @!visibility private
|
84
|
+
def ==(o)
|
85
|
+
return true if self.equal?(o)
|
86
|
+
self.class == o.class &&
|
87
|
+
_end == o._end &&
|
88
|
+
start == o.start
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
# @!visibility private
|
94
|
+
def hash
|
95
|
+
[_end, start].hash
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,143 @@
|
|
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
|
+
# An object defining the recurrence of the downtime.
|
21
|
+
class DowntimeScheduleRecurrenceCreateUpdateRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The length of the downtime. Must begin with an integer and end with one of 'm', 'h', d', or 'w'.
|
25
|
+
attr_reader :duration
|
26
|
+
|
27
|
+
# The `RRULE` standard for defining recurring events.
|
28
|
+
# For example, to have a recurring event on the first day of each month, set the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`.
|
29
|
+
# Most common `rrule` options from the [iCalendar Spec](https://tools.ietf.org/html/rfc5545) are supported.
|
30
|
+
#
|
31
|
+
# **Note**: Attributes specifying the duration in `RRULE` are not supported (for example, `DTSTART`, `DTEND`, `DURATION`).
|
32
|
+
# More examples available in this [downtime guide](https://docs.datadoghq.com/monitors/guide/suppress-alert-with-downtimes/?tab=api).
|
33
|
+
attr_reader :rrule
|
34
|
+
|
35
|
+
# ISO-8601 Datetime to start the downtime. Must not include a UTC offset. If not provided, the
|
36
|
+
# downtime starts the moment it is created.
|
37
|
+
attr_accessor :start
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
# @!visibility private
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'duration' => :'duration',
|
44
|
+
:'rrule' => :'rrule',
|
45
|
+
:'start' => :'start'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
# @!visibility private
|
51
|
+
def self.openapi_types
|
52
|
+
{
|
53
|
+
:'duration' => :'String',
|
54
|
+
:'rrule' => :'String',
|
55
|
+
:'start' => :'String'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# List of attributes with nullable: true
|
60
|
+
# @!visibility private
|
61
|
+
def self.openapi_nullable
|
62
|
+
Set.new([
|
63
|
+
:'start',
|
64
|
+
])
|
65
|
+
end
|
66
|
+
|
67
|
+
# Initializes the object
|
68
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
69
|
+
# @!visibility private
|
70
|
+
def initialize(attributes = {})
|
71
|
+
if (!attributes.is_a?(Hash))
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DowntimeScheduleRecurrenceCreateUpdateRequest` initialize method"
|
73
|
+
end
|
74
|
+
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
77
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DowntimeScheduleRecurrenceCreateUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
79
|
+
end
|
80
|
+
h[k.to_sym] = v
|
81
|
+
}
|
82
|
+
|
83
|
+
if attributes.key?(:'duration')
|
84
|
+
self.duration = attributes[:'duration']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'rrule')
|
88
|
+
self.rrule = attributes[:'rrule']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'start')
|
92
|
+
self.start = attributes[:'start']
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check to see if the all the properties in the model are valid
|
97
|
+
# @return true if the model is valid
|
98
|
+
# @!visibility private
|
99
|
+
def valid?
|
100
|
+
return false if @duration.nil?
|
101
|
+
return false if @rrule.nil?
|
102
|
+
true
|
103
|
+
end
|
104
|
+
|
105
|
+
# Custom attribute writer method with validation
|
106
|
+
# @param duration [Object] Object to be assigned
|
107
|
+
# @!visibility private
|
108
|
+
def duration=(duration)
|
109
|
+
if duration.nil?
|
110
|
+
fail ArgumentError, 'invalid value for "duration", duration cannot be nil.'
|
111
|
+
end
|
112
|
+
@duration = duration
|
113
|
+
end
|
114
|
+
|
115
|
+
# Custom attribute writer method with validation
|
116
|
+
# @param rrule [Object] Object to be assigned
|
117
|
+
# @!visibility private
|
118
|
+
def rrule=(rrule)
|
119
|
+
if rrule.nil?
|
120
|
+
fail ArgumentError, 'invalid value for "rrule", rrule cannot be nil.'
|
121
|
+
end
|
122
|
+
@rrule = rrule
|
123
|
+
end
|
124
|
+
|
125
|
+
# Checks equality by comparing each attribute.
|
126
|
+
# @param o [Object] Object to be compared
|
127
|
+
# @!visibility private
|
128
|
+
def ==(o)
|
129
|
+
return true if self.equal?(o)
|
130
|
+
self.class == o.class &&
|
131
|
+
duration == o.duration &&
|
132
|
+
rrule == o.rrule &&
|
133
|
+
start == o.start
|
134
|
+
end
|
135
|
+
|
136
|
+
# Calculates hash code according to all attributes.
|
137
|
+
# @return [Integer] Hash code
|
138
|
+
# @!visibility private
|
139
|
+
def hash
|
140
|
+
[duration, rrule, start].hash
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|