datadog_api_client 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/poetry.lock +21 -14
- data/.generator/pyproject.toml +1 -1
- data/.generator/schemas/v1/openapi.yaml +558 -8
- data/.generator/schemas/v2/openapi.yaml +973 -253
- data/.generator/src/generator/templates/api_client.j2 +5 -1
- data/.generator/src/generator/templates/configuration.j2 +17 -0
- data/.github/workflows/test.yml +3 -0
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +26 -0
- data/README.md +11 -0
- data/examples/v1/dashboards/CreateDashboard_1423904722.rb +38 -0
- data/examples/v1/dashboards/CreateDashboard_2652180930.rb +43 -0
- data/examples/v1/dashboards/CreateDashboard_2850365602.rb +55 -0
- data/examples/v1/dashboards/CreateDashboard_3117424216.rb +33 -0
- data/examples/v1/dashboards/CreateDashboard_3669695268.rb +50 -0
- data/examples/v1/dashboards/CreateDashboard_858397694.rb +41 -0
- data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +1 -1
- data/examples/v2/incidents/ListIncidentAttachments.rb +8 -0
- data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +11 -0
- data/examples/v2/incidents/UpdateIncidentAttachments.rb +38 -0
- data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +26 -0
- data/examples/v2/metrics/ListActiveMetricConfigurations.rb +5 -0
- data/examples/v2/metrics/ListTagConfigurations.rb +1 -1
- data/examples/v2/metrics/ListTagConfigurations_265033704.rb +8 -0
- data/examples/v2/metrics/{ListTagConfigurations_103226315.rb → ListTagConfigurations_2739018321.rb} +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +3 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +50 -0
- data/examples/v2/security-monitoring/GetSecurityMonitoringSignal.rb +5 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +2 -1
- data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +1 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +2 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +2 -4
- data/examples/v2/usage-metering/GetHistoricalCostByOrg.rb +8 -0
- data/generate.sh +30 -0
- data/lib/datadog_api_client/api_client.rb +5 -1
- data/lib/datadog_api_client/configuration.rb +20 -1
- data/lib/datadog_api_client/inflector.rb +51 -1
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
- data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -2
- data/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +28 -5
- data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +14 -4
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/list_stream_query.rb +14 -4
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/search_service_level_objective.rb +111 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +286 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +134 -0
- data/lib/datadog_api_client/v1/models/search_slo_query.rb +137 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +8 -8
- data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +2 -0
- data/lib/datadog_api_client/v1/models/search_slo_threshold.rb +184 -0
- data/lib/datadog_api_client/v1/models/search_slo_timeframe.rb +28 -0
- data/lib/datadog_api_client/v1/models/slo_creator.rb +131 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +185 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +149 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +143 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +174 -0
- data/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +121 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_operator.rb +1 -0
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +193 -0
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/topology_query.rb +144 -0
- data/lib/datadog_api_client/v1/models/topology_query_data_source.rb +27 -0
- data/lib/datadog_api_client/v1/models/topology_request.rb +121 -0
- data/lib/datadog_api_client/v1/models/topology_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
- data/lib/datadog_api_client/v1/models/widget_definition.rb +3 -1
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incident_teams_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incidents_api.rb +155 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +76 -8
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +65 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
- data/lib/datadog_api_client/v2/models/incident_attachment_attachment_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_data.rb +187 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_related_object.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +111 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +127 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +137 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response.rb +136 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/incident_related_object.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -11
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +2 -1
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +14 -14
- data/lib/datadog_api_client/v2/models/metric_active_configuration_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +124 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +145 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +36 -248
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +36 -151
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +37 -253
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +187 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +279 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/{security_monitoring_rule_query_create.rb → security_monitoring_standard_rule_query.rb} +3 -3
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +279 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +70 -6
- data/Makefile +0 -7
- data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V1
|
|
20
|
+
# A metric-based SLO. **Required if type is `metric`**. Note that Datadog only allows the sum by aggregator
|
|
21
|
+
# to be used because this will sum up all request counts instead of averaging them, or taking the max or
|
|
22
|
+
# min of all of those requests.
|
|
23
|
+
class SearchSLOQuery
|
|
24
|
+
include BaseGenericModel
|
|
25
|
+
|
|
26
|
+
# Whether the object has unparsed attributes
|
|
27
|
+
# @!visibility private
|
|
28
|
+
attr_accessor :_unparsed
|
|
29
|
+
|
|
30
|
+
# A Datadog metric query for total (valid) events.
|
|
31
|
+
attr_accessor :denominator
|
|
32
|
+
|
|
33
|
+
# Metric names used in the query's numerator and denominator.
|
|
34
|
+
# This field will return null and will be implemented in the next version of this endpoint.
|
|
35
|
+
attr_accessor :metrics
|
|
36
|
+
|
|
37
|
+
# A Datadog metric query for good events.
|
|
38
|
+
attr_accessor :numerator
|
|
39
|
+
|
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
|
+
# @!visibility private
|
|
42
|
+
def self.attribute_map
|
|
43
|
+
{
|
|
44
|
+
:'denominator' => :'denominator',
|
|
45
|
+
:'metrics' => :'metrics',
|
|
46
|
+
:'numerator' => :'numerator'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
# @!visibility private
|
|
52
|
+
def self.acceptable_attributes
|
|
53
|
+
attribute_map.values
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
# @!visibility private
|
|
58
|
+
def self.openapi_types
|
|
59
|
+
{
|
|
60
|
+
:'denominator' => :'String',
|
|
61
|
+
:'metrics' => :'Array<String>',
|
|
62
|
+
:'numerator' => :'String'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
# @!visibility private
|
|
68
|
+
def self.openapi_nullable
|
|
69
|
+
Set.new([
|
|
70
|
+
:'metrics',
|
|
71
|
+
])
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Initializes the object
|
|
75
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
76
|
+
# @!visibility private
|
|
77
|
+
def initialize(attributes = {})
|
|
78
|
+
if (!attributes.is_a?(Hash))
|
|
79
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOQuery` initialize method"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
86
|
+
end
|
|
87
|
+
h[k.to_sym] = v
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'denominator')
|
|
91
|
+
self.denominator = attributes[:'denominator']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'metrics')
|
|
95
|
+
if (value = attributes[:'metrics']).is_a?(Array)
|
|
96
|
+
self.metrics = value
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'numerator')
|
|
101
|
+
self.numerator = attributes[:'numerator']
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Check to see if the all the properties in the model are valid
|
|
106
|
+
# @return true if the model is valid
|
|
107
|
+
# @!visibility private
|
|
108
|
+
def valid?
|
|
109
|
+
true
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param o [Object] Object to be compared
|
|
114
|
+
# @!visibility private
|
|
115
|
+
def ==(o)
|
|
116
|
+
return true if self.equal?(o)
|
|
117
|
+
self.class == o.class &&
|
|
118
|
+
denominator == o.denominator &&
|
|
119
|
+
metrics == o.metrics &&
|
|
120
|
+
numerator == o.numerator
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param o [Object] Object to be compared
|
|
125
|
+
# @!visibility private
|
|
126
|
+
def eql?(o)
|
|
127
|
+
self == o
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Calculates hash code according to all attributes.
|
|
131
|
+
# @return [Integer] Hash code
|
|
132
|
+
# @!visibility private
|
|
133
|
+
def hash
|
|
134
|
+
[denominator, metrics, numerator].hash
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
@@ -29,14 +29,14 @@ module DatadogAPIClient::V1
|
|
|
29
29
|
attr_accessor :facets
|
|
30
30
|
|
|
31
31
|
# SLOs
|
|
32
|
-
attr_accessor :
|
|
32
|
+
attr_accessor :slos
|
|
33
33
|
|
|
34
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
35
|
# @!visibility private
|
|
36
36
|
def self.attribute_map
|
|
37
37
|
{
|
|
38
38
|
:'facets' => :'facets',
|
|
39
|
-
:'
|
|
39
|
+
:'slos' => :'slos'
|
|
40
40
|
}
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -51,7 +51,7 @@ module DatadogAPIClient::V1
|
|
|
51
51
|
def self.openapi_types
|
|
52
52
|
{
|
|
53
53
|
:'facets' => :'SearchSLOResponseDataAttributesFacets',
|
|
54
|
-
:'
|
|
54
|
+
:'slos' => :'Array<SearchServiceLevelObjective>'
|
|
55
55
|
}
|
|
56
56
|
end
|
|
57
57
|
|
|
@@ -82,9 +82,9 @@ module DatadogAPIClient::V1
|
|
|
82
82
|
self.facets = attributes[:'facets']
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
-
if attributes.key?(:'
|
|
86
|
-
if (value = attributes[:'
|
|
87
|
-
self.
|
|
85
|
+
if attributes.key?(:'slos')
|
|
86
|
+
if (value = attributes[:'slos']).is_a?(Array)
|
|
87
|
+
self.slos = value
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
end
|
|
@@ -103,7 +103,7 @@ module DatadogAPIClient::V1
|
|
|
103
103
|
return true if self.equal?(o)
|
|
104
104
|
self.class == o.class &&
|
|
105
105
|
facets == o.facets &&
|
|
106
|
-
|
|
106
|
+
slos == o.slos
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
# @see the `==` method
|
|
@@ -117,7 +117,7 @@ module DatadogAPIClient::V1
|
|
|
117
117
|
# @return [Integer] Hash code
|
|
118
118
|
# @!visibility private
|
|
119
119
|
def hash
|
|
120
|
-
[facets,
|
|
120
|
+
[facets, slos].hash
|
|
121
121
|
end
|
|
122
122
|
end
|
|
123
123
|
end
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V1
|
|
20
|
+
# SLO thresholds (target and optionally warning) for a single time window.
|
|
21
|
+
class SearchSLOThreshold
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# The target value for the service level indicator within the corresponding
|
|
29
|
+
# timeframe.
|
|
30
|
+
attr_accessor :target
|
|
31
|
+
|
|
32
|
+
# A string representation of the target that indicates its precision.
|
|
33
|
+
# It uses trailing zeros to show significant decimal places (for example `98.00`).
|
|
34
|
+
#
|
|
35
|
+
# Always included in service level objective responses. Ignored in
|
|
36
|
+
# create/update requests.
|
|
37
|
+
attr_accessor :target_display
|
|
38
|
+
|
|
39
|
+
# The SLO time window options.
|
|
40
|
+
attr_accessor :timeframe
|
|
41
|
+
|
|
42
|
+
# The warning value for the service level objective.
|
|
43
|
+
attr_accessor :warning
|
|
44
|
+
|
|
45
|
+
# A string representation of the warning target (see the description of
|
|
46
|
+
# the `target_display` field for details).
|
|
47
|
+
#
|
|
48
|
+
# Included in service level objective responses if a warning target exists.
|
|
49
|
+
# Ignored in create/update requests.
|
|
50
|
+
attr_accessor :warning_display
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
# @!visibility private
|
|
54
|
+
def self.attribute_map
|
|
55
|
+
{
|
|
56
|
+
:'target' => :'target',
|
|
57
|
+
:'target_display' => :'target_display',
|
|
58
|
+
:'timeframe' => :'timeframe',
|
|
59
|
+
:'warning' => :'warning',
|
|
60
|
+
:'warning_display' => :'warning_display'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Returns all the JSON keys this model knows about
|
|
65
|
+
# @!visibility private
|
|
66
|
+
def self.acceptable_attributes
|
|
67
|
+
attribute_map.values
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Attribute type mapping.
|
|
71
|
+
# @!visibility private
|
|
72
|
+
def self.openapi_types
|
|
73
|
+
{
|
|
74
|
+
:'target' => :'Float',
|
|
75
|
+
:'target_display' => :'String',
|
|
76
|
+
:'timeframe' => :'SearchSLOTimeframe',
|
|
77
|
+
:'warning' => :'Float',
|
|
78
|
+
:'warning_display' => :'String'
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# List of attributes with nullable: true
|
|
83
|
+
# @!visibility private
|
|
84
|
+
def self.openapi_nullable
|
|
85
|
+
Set.new([
|
|
86
|
+
:'warning',
|
|
87
|
+
:'warning_display',
|
|
88
|
+
])
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Initializes the object
|
|
92
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
93
|
+
# @!visibility private
|
|
94
|
+
def initialize(attributes = {})
|
|
95
|
+
if (!attributes.is_a?(Hash))
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchSLOThreshold` initialize method"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
101
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchSLOThreshold`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
103
|
+
end
|
|
104
|
+
h[k.to_sym] = v
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'target')
|
|
108
|
+
self.target = attributes[:'target']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'target_display')
|
|
112
|
+
self.target_display = attributes[:'target_display']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'timeframe')
|
|
116
|
+
self.timeframe = attributes[:'timeframe']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'warning')
|
|
120
|
+
self.warning = attributes[:'warning']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'warning_display')
|
|
124
|
+
self.warning_display = attributes[:'warning_display']
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Check to see if the all the properties in the model are valid
|
|
129
|
+
# @return true if the model is valid
|
|
130
|
+
# @!visibility private
|
|
131
|
+
def valid?
|
|
132
|
+
return false if @target.nil?
|
|
133
|
+
return false if @timeframe.nil?
|
|
134
|
+
true
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Custom attribute writer method with validation
|
|
138
|
+
# @param target [Object] Object to be assigned
|
|
139
|
+
# @!visibility private
|
|
140
|
+
def target=(target)
|
|
141
|
+
if target.nil?
|
|
142
|
+
fail ArgumentError, 'invalid value for "target", target cannot be nil.'
|
|
143
|
+
end
|
|
144
|
+
@target = target
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method with validation
|
|
148
|
+
# @param timeframe [Object] Object to be assigned
|
|
149
|
+
# @!visibility private
|
|
150
|
+
def timeframe=(timeframe)
|
|
151
|
+
if timeframe.nil?
|
|
152
|
+
fail ArgumentError, 'invalid value for "timeframe", timeframe cannot be nil.'
|
|
153
|
+
end
|
|
154
|
+
@timeframe = timeframe
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Checks equality by comparing each attribute.
|
|
158
|
+
# @param o [Object] Object to be compared
|
|
159
|
+
# @!visibility private
|
|
160
|
+
def ==(o)
|
|
161
|
+
return true if self.equal?(o)
|
|
162
|
+
self.class == o.class &&
|
|
163
|
+
target == o.target &&
|
|
164
|
+
target_display == o.target_display &&
|
|
165
|
+
timeframe == o.timeframe &&
|
|
166
|
+
warning == o.warning &&
|
|
167
|
+
warning_display == o.warning_display
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @see the `==` method
|
|
171
|
+
# @param o [Object] Object to be compared
|
|
172
|
+
# @!visibility private
|
|
173
|
+
def eql?(o)
|
|
174
|
+
self == o
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Calculates hash code according to all attributes.
|
|
178
|
+
# @return [Integer] Hash code
|
|
179
|
+
# @!visibility private
|
|
180
|
+
def hash
|
|
181
|
+
[target, target_display, timeframe, warning, warning_display].hash
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V1
|
|
20
|
+
# The SLO time window options.
|
|
21
|
+
class SearchSLOTimeframe
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
SEVEN_DAYS = "7d".freeze
|
|
25
|
+
THIRTY_DAYS = "30d".freeze
|
|
26
|
+
NINETY_DAYS = "90d".freeze
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V1
|
|
20
|
+
# The creator of the SLO
|
|
21
|
+
class SLOCreator
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Email of the creator.
|
|
29
|
+
attr_accessor :email
|
|
30
|
+
|
|
31
|
+
# User ID of the creator.
|
|
32
|
+
attr_accessor :id
|
|
33
|
+
|
|
34
|
+
# Name of the creator.
|
|
35
|
+
attr_accessor :name
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
# @!visibility private
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'email' => :'email',
|
|
42
|
+
:'id' => :'id',
|
|
43
|
+
:'name' => :'name'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Returns all the JSON keys this model knows about
|
|
48
|
+
# @!visibility private
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
# @!visibility private
|
|
55
|
+
def self.openapi_types
|
|
56
|
+
{
|
|
57
|
+
:'email' => :'String',
|
|
58
|
+
:'id' => :'Integer',
|
|
59
|
+
:'name' => :'String'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# List of attributes with nullable: true
|
|
64
|
+
# @!visibility private
|
|
65
|
+
def self.openapi_nullable
|
|
66
|
+
Set.new([
|
|
67
|
+
])
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
72
|
+
# @!visibility private
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOCreator` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOCreator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'email')
|
|
87
|
+
self.email = attributes[:'email']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'id')
|
|
91
|
+
self.id = attributes[:'id']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'name')
|
|
95
|
+
self.name = attributes[:'name']
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
# @!visibility private
|
|
102
|
+
def valid?
|
|
103
|
+
true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Checks equality by comparing each attribute.
|
|
107
|
+
# @param o [Object] Object to be compared
|
|
108
|
+
# @!visibility private
|
|
109
|
+
def ==(o)
|
|
110
|
+
return true if self.equal?(o)
|
|
111
|
+
self.class == o.class &&
|
|
112
|
+
email == o.email &&
|
|
113
|
+
id == o.id &&
|
|
114
|
+
name == o.name
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# @see the `==` method
|
|
118
|
+
# @param o [Object] Object to be compared
|
|
119
|
+
# @!visibility private
|
|
120
|
+
def eql?(o)
|
|
121
|
+
self == o
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Calculates hash code according to all attributes.
|
|
125
|
+
# @return [Integer] Hash code
|
|
126
|
+
# @!visibility private
|
|
127
|
+
def hash
|
|
128
|
+
[email, id, name].hash
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|