datadog_api_client 2.0.2 → 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 +6 -6
- data/.generator/poetry.lock +21 -14
- data/.generator/pyproject.toml +1 -1
- data/.generator/schemas/v1/openapi.yaml +840 -908
- data/.generator/schemas/v2/openapi.yaml +1304 -913
- data/.generator/src/generator/formatter.py +1 -1
- data/.generator/src/generator/templates/api_client.j2 +5 -1
- data/.generator/src/generator/templates/configuration.j2 +17 -0
- data/.github/workflows/test.yml +4 -1
- data/.github/workflows/test_integration.yml +5 -0
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +49 -0
- data/README.md +11 -0
- data/examples/v1/dashboards/CreateDashboard_1094917386.rb +37 -0
- data/examples/v1/dashboards/CreateDashboard_1307120899.rb +61 -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/monitors/ValidateExistingMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor_4247196452.rb +38 -0
- data/examples/v1/synthetics/CreateGlobalVariable.rb +1 -0
- data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +23 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +10 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +6 -0
- data/examples/v1/synthetics/EditGlobalVariable.rb +1 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
- data/examples/v1/usage-metering/GetDailyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetMonthlyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -3
- 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/metrics/SubmitMetrics_1762007427.rb +23 -0
- data/examples/v2/roles/UpdateRole.rb +13 -0
- data/examples/v2/rum/CreateRUMApplication.rb +15 -0
- data/examples/v2/rum/DeleteRUMApplication.rb +8 -0
- data/examples/v2/rum/GetRUMApplication.rb +8 -0
- data/examples/v2/rum/GetRUMApplications.rb +5 -0
- data/examples/v2/rum/UpdateRUMApplication.rb +16 -0
- 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/examples/v2/usage-metering/GetHourlyUsage.rb +5 -0
- data/generate.sh +30 -0
- data/lib/datadog_api_client/api_client.rb +5 -1
- data/lib/datadog_api_client/configuration.rb +20 -6
- data/lib/datadog_api_client/inflector.rb +67 -1
- data/lib/datadog_api_client/v1/api/metrics_api.rb +1 -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 +42 -62
- 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/formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/list_stream_query.rb +14 -4
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +28 -1
- data/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb +13 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/on_missing_data_option.rb +33 -0
- 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/synthetics_basic_auth.rb +2 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +155 -0
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb +11 -12
- data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +31 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_process_status.rb +0 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +15 -1
- 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 +4 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +12 -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 +21 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +21 -1
- data/lib/datadog_api_client/v1/models/widget_definition.rb +3 -1
- data/lib/datadog_api_client/v1/models/widget_monitor_summary_sort.rb +2 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +1 -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/logs_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/metrics_api.rb +77 -9
- data/lib/datadog_api_client/v2/api/rum_api.rb +329 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +68 -3
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
- data/lib/datadog_api_client/v2/models/content_encoding.rb +1 -0
- 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_content_encoding.rb +2 -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/role_update_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/rum_application.rb +166 -0
- data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +279 -0
- data/lib/datadog_api_client/v2/models/rum_application_create.rb +145 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/rum_application_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_update.rb +155 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +121 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_applications_response.rb +113 -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 +97 -6
- data/Makefile +0 -7
- data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
|
@@ -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
|
|
@@ -0,0 +1,185 @@
|
|
|
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
|
+
# Use the SLO List widget to track your SLOs (Service Level Objectives) on dashboards.
|
|
21
|
+
class SLOListWidgetDefinition
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Array of one request object to display in the widget.
|
|
29
|
+
attr_accessor :requests
|
|
30
|
+
|
|
31
|
+
# Title of the widget.
|
|
32
|
+
attr_accessor :title
|
|
33
|
+
|
|
34
|
+
# How to align the text on the widget.
|
|
35
|
+
attr_accessor :title_align
|
|
36
|
+
|
|
37
|
+
# Size of the title.
|
|
38
|
+
attr_accessor :title_size
|
|
39
|
+
|
|
40
|
+
# Type of the SLO List widget.
|
|
41
|
+
attr_accessor :type
|
|
42
|
+
|
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
|
+
# @!visibility private
|
|
45
|
+
def self.attribute_map
|
|
46
|
+
{
|
|
47
|
+
:'requests' => :'requests',
|
|
48
|
+
:'title' => :'title',
|
|
49
|
+
:'title_align' => :'title_align',
|
|
50
|
+
:'title_size' => :'title_size',
|
|
51
|
+
:'type' => :'type'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
|
56
|
+
# @!visibility private
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
# @!visibility private
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'requests' => :'Array<SLOListWidgetRequest>',
|
|
66
|
+
:'title' => :'String',
|
|
67
|
+
:'title_align' => :'WidgetTextAlign',
|
|
68
|
+
:'title_size' => :'String',
|
|
69
|
+
:'type' => :'SLOListWidgetDefinitionType'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# List of attributes with nullable: true
|
|
74
|
+
# @!visibility private
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
82
|
+
# @!visibility private
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListWidgetDefinition` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'requests')
|
|
97
|
+
if (value = attributes[:'requests']).is_a?(Array)
|
|
98
|
+
self.requests = value
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'title')
|
|
103
|
+
self.title = attributes[:'title']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'title_align')
|
|
107
|
+
self.title_align = attributes[:'title_align']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'title_size')
|
|
111
|
+
self.title_size = attributes[:'title_size']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'type')
|
|
115
|
+
self.type = attributes[:'type']
|
|
116
|
+
else
|
|
117
|
+
self.type = 'slo_list'
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Check to see if the all the properties in the model are valid
|
|
122
|
+
# @return true if the model is valid
|
|
123
|
+
# @!visibility private
|
|
124
|
+
def valid?
|
|
125
|
+
return false if @requests.nil?
|
|
126
|
+
return false if @requests.length > 1
|
|
127
|
+
return false if @requests.length < 1
|
|
128
|
+
return false if @type.nil?
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Custom attribute writer method with validation
|
|
133
|
+
# @param requests [Object] Object to be assigned
|
|
134
|
+
# @!visibility private
|
|
135
|
+
def requests=(requests)
|
|
136
|
+
if requests.nil?
|
|
137
|
+
fail ArgumentError, 'invalid value for "requests", requests cannot be nil.'
|
|
138
|
+
end
|
|
139
|
+
if requests.length > 1
|
|
140
|
+
fail ArgumentError, 'invalid value for "requests", number of items must be less than or equal to 1.'
|
|
141
|
+
end
|
|
142
|
+
if requests.length < 1
|
|
143
|
+
fail ArgumentError, 'invalid value for "requests", number of items must be greater than or equal to 1.'
|
|
144
|
+
end
|
|
145
|
+
@requests = requests
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param type [Object] Object to be assigned
|
|
150
|
+
# @!visibility private
|
|
151
|
+
def type=(type)
|
|
152
|
+
if type.nil?
|
|
153
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
|
154
|
+
end
|
|
155
|
+
@type = type
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Checks equality by comparing each attribute.
|
|
159
|
+
# @param o [Object] Object to be compared
|
|
160
|
+
# @!visibility private
|
|
161
|
+
def ==(o)
|
|
162
|
+
return true if self.equal?(o)
|
|
163
|
+
self.class == o.class &&
|
|
164
|
+
requests == o.requests &&
|
|
165
|
+
title == o.title &&
|
|
166
|
+
title_align == o.title_align &&
|
|
167
|
+
title_size == o.title_size &&
|
|
168
|
+
type == o.type
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# @see the `==` method
|
|
172
|
+
# @param o [Object] Object to be compared
|
|
173
|
+
# @!visibility private
|
|
174
|
+
def eql?(o)
|
|
175
|
+
self == o
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Calculates hash code according to all attributes.
|
|
179
|
+
# @return [Integer] Hash code
|
|
180
|
+
# @!visibility private
|
|
181
|
+
def hash
|
|
182
|
+
[requests, title, title_align, title_size, type].hash
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
# Type of the SLO List widget.
|
|
21
|
+
class SLOListWidgetDefinitionType
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
SLO_LIST = "slo_list".freeze
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,149 @@
|
|
|
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
|
+
# Updated SLO List widget.
|
|
21
|
+
class SLOListWidgetQuery
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Maximum number of results to display in the table.
|
|
29
|
+
attr_accessor :limit
|
|
30
|
+
|
|
31
|
+
# Widget query.
|
|
32
|
+
attr_accessor :query_string
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
# @!visibility private
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'limit' => :'limit',
|
|
39
|
+
:'query_string' => :'query_string'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
# @!visibility private
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
# @!visibility private
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'limit' => :'Integer',
|
|
54
|
+
:'query_string' => :'String'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List of attributes with nullable: true
|
|
59
|
+
# @!visibility private
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
67
|
+
# @!visibility private
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOListWidgetQuery` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SLOListWidgetQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'limit')
|
|
82
|
+
self.limit = attributes[:'limit']
|
|
83
|
+
else
|
|
84
|
+
self.limit = 100
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'query_string')
|
|
88
|
+
self.query_string = attributes[:'query_string']
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Check to see if the all the properties in the model are valid
|
|
93
|
+
# @return true if the model is valid
|
|
94
|
+
# @!visibility private
|
|
95
|
+
def valid?
|
|
96
|
+
return false if !@limit.nil? && @limit > 100
|
|
97
|
+
return false if !@limit.nil? && @limit < 1
|
|
98
|
+
return false if @query_string.nil?
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Custom attribute writer method with validation
|
|
103
|
+
# @param limit [Object] Object to be assigned
|
|
104
|
+
# @!visibility private
|
|
105
|
+
def limit=(limit)
|
|
106
|
+
if !limit.nil? && limit > 100
|
|
107
|
+
fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 100.'
|
|
108
|
+
end
|
|
109
|
+
if !limit.nil? && limit < 1
|
|
110
|
+
fail ArgumentError, 'invalid value for "limit", must be greater than or equal to 1.'
|
|
111
|
+
end
|
|
112
|
+
@limit = limit
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Custom attribute writer method with validation
|
|
116
|
+
# @param query_string [Object] Object to be assigned
|
|
117
|
+
# @!visibility private
|
|
118
|
+
def query_string=(query_string)
|
|
119
|
+
if query_string.nil?
|
|
120
|
+
fail ArgumentError, 'invalid value for "query_string", query_string cannot be nil.'
|
|
121
|
+
end
|
|
122
|
+
@query_string = query_string
|
|
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
|
+
limit == o.limit &&
|
|
132
|
+
query_string == o.query_string
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# @see the `==` method
|
|
136
|
+
# @param o [Object] Object to be compared
|
|
137
|
+
# @!visibility private
|
|
138
|
+
def eql?(o)
|
|
139
|
+
self == o
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Calculates hash code according to all attributes.
|
|
143
|
+
# @return [Integer] Hash code
|
|
144
|
+
# @!visibility private
|
|
145
|
+
def hash
|
|
146
|
+
[limit, query_string].hash
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|