datadog_api_client 1.3.0 → 1.4.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/templates/api.mustache +2 -2
- data/.generator/templates/api_client.mustache +7 -0
- data/.generator/templates/api_client_typhoeus_partial.mustache +7 -0
- data/.generator/templates/configuration.mustache +4 -0
- data/.openapi-generator/VERSION +1 -1
- data/CHANGELOG.md +27 -0
- data/README.md +12 -1
- data/data/v1/openapi.yaml +866 -119
- data/data/v2/openapi.yaml +113 -0
- data/docs/v1/AWSAccount.md +6 -0
- data/docs/v1/DowntimeRecurrence.md +1 -1
- data/docs/v1/Event.md +1 -1
- data/docs/v1/FormulaAndFunctionApmDependencyStatName.md +15 -0
- data/docs/v1/FormulaAndFunctionApmDependencyStatsDataSource.md +15 -0
- data/docs/v1/FormulaAndFunctionApmDependencyStatsQueryDefinition.md +36 -0
- data/docs/v1/FormulaAndFunctionApmResourceStatName.md +15 -0
- data/docs/v1/FormulaAndFunctionApmResourceStatsDataSource.md +15 -0
- data/docs/v1/FormulaAndFunctionApmResourceStatsQueryDefinition.md +36 -0
- data/docs/v1/FormulaAndFunctionQueryDefinition.md +5 -1
- data/docs/v1/FunnelQuery.md +22 -0
- data/docs/v1/FunnelRequestType.md +15 -0
- data/docs/v1/FunnelSource.md +15 -0
- data/docs/v1/FunnelWidgetDefinition.md +28 -0
- data/docs/v1/FunnelWidgetDefinitionType.md +15 -0
- data/docs/v1/FunnelWidgetRequest.md +20 -0
- data/docs/v1/LogsAPI.md +1 -1
- data/docs/v1/MetricContentEncoding.md +15 -0
- data/docs/v1/MetricsAPI.md +10 -6
- data/docs/v1/MetricsPayload.md +1 -1
- data/docs/v1/MonitorOptions.md +5 -1
- data/docs/v1/MonitorRenotifyStatusType.md +15 -0
- data/docs/v1/MonitorsAPI.md +9 -9
- data/docs/v1/NotebookCreateDataAttributes.md +2 -0
- data/docs/v1/NotebookMetadata.md +22 -0
- data/docs/v1/NotebookMetadataType.md +15 -0
- data/docs/v1/NotebookResponseDataAttributes.md +2 -0
- data/docs/v1/NotebookUpdateDataAttributes.md +2 -0
- data/docs/v1/NotebooksAPI.md +7 -3
- data/docs/v1/NotebooksResponseDataAttributes.md +2 -0
- data/docs/v1/ProcessQueryDefinition.md +1 -1
- data/docs/v1/README.md +31 -3
- data/docs/v1/SLOCorrection.md +1 -1
- data/docs/v1/SLOCorrectionCreateData.md +1 -1
- data/docs/v1/SLOCorrectionCreateRequestAttributes.md +4 -4
- data/docs/v1/SLOCorrectionListResponse.md +1 -1
- data/docs/v1/SLOCorrectionResponseAttributes.md +4 -4
- data/docs/v1/SLOCorrectionUpdateRequestAttributes.md +3 -3
- data/docs/v1/ScatterPlotWidgetDefinitionRequests.md +4 -2
- data/docs/v1/ScatterplotDimension.md +15 -0
- data/docs/v1/ScatterplotTableRequest.md +22 -0
- data/docs/v1/ScatterplotWidgetFormula.md +22 -0
- data/docs/v1/Series.md +1 -1
- data/docs/v1/ServiceChecksAPI.md +1 -1
- data/docs/v1/ServiceLevelObjectiveCorrectionsAPI.md +11 -11
- data/docs/v1/SyntheticsAPI.md +61 -0
- data/docs/v1/SyntheticsAPIStep.md +1 -1
- data/docs/v1/SyntheticsBatchDetails.md +18 -0
- data/docs/v1/SyntheticsBatchDetailsData.md +22 -0
- data/docs/v1/SyntheticsBatchResult.md +36 -0
- data/docs/v1/SyntheticsBrowserError.md +3 -3
- data/docs/v1/SyntheticsCIBatchMetadata.md +20 -0
- data/docs/v1/{SyntheticsCITestMetadataCi.md → SyntheticsCIBatchMetadataCI.md} +2 -2
- data/docs/v1/SyntheticsCIBatchMetadataGit.md +20 -0
- data/docs/v1/SyntheticsCITest.md +1 -1
- data/docs/v1/SyntheticsStatus.md +15 -0
- data/docs/v1/SyntheticsTestDetails.md +2 -0
- data/docs/v1/SyntheticsTestExecutionRule.md +15 -0
- data/docs/v1/SyntheticsTestRequest.md +2 -0
- data/docs/v1/UsageAttributionValues.md +4 -4
- data/docs/v1/UsageMeteringAPI.md +65 -0
- data/docs/v1/UsageSDSHour.md +22 -0
- data/docs/v1/UsageSDSResponse.md +18 -0
- data/docs/v1/UsageSummaryDate.md +4 -0
- data/docs/v1/UsageSummaryDateOrg.md +6 -2
- data/docs/v1/UsageSummaryResponse.md +6 -2
- data/docs/v1/UsageTimeseriesHour.md +1 -1
- data/docs/v1/WebhooksIntegration.md +1 -1
- data/docs/v1/WebhooksIntegrationUpdateRequest.md +1 -1
- data/docs/v1/WidgetDefinition.md +2 -0
- data/docs/v2/IncidentServicesAPI.md +5 -5
- data/docs/v2/IncidentTeamsAPI.md +5 -5
- data/docs/v2/IncidentsAPI.md +5 -5
- data/docs/v2/README.md +5 -0
- data/docs/v2/SecurityMonitoringAPI.md +5 -5
- data/examples/v1/metrics/SubmitMetrics.rbbeta +14 -0
- data/extract-code-blocks.awk +4 -0
- data/lib/datadog_api_client/v1/api/logs_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/metrics_api.rb +5 -2
- data/lib/datadog_api_client/v1/api/monitors_api.rb +9 -9
- data/lib/datadog_api_client/v1/api/notebooks_api.rb +8 -2
- data/lib/datadog_api_client/v1/api/service_checks_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +16 -16
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +73 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +77 -0
- data/lib/datadog_api_client/v1/api_client.rb +14 -0
- data/lib/datadog_api_client/v1/configuration.rb +7 -0
- data/lib/datadog_api_client/v1/models/aws_account.rb +37 -1
- data/lib/datadog_api_client/v1/models/content_encoding.rb +2 -2
- data/lib/datadog_api_client/v1/models/creator.rb +1 -0
- data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +1 -0
- data/lib/datadog_api_client/v1/models/downtime_recurrence.rb +1 -1
- data/lib/datadog_api_client/v1/models/event.rb +1 -16
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stat_name.rb +44 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_data_source.rb +38 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb +356 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stat_name.rb +47 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_data_source.rb +38 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb +348 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +2 -0
- data/lib/datadog_api_client/v1/models/funnel_query.rb +271 -0
- data/lib/datadog_api_client/v1/models/funnel_request_type.rb +38 -0
- data/lib/datadog_api_client/v1/models/funnel_source.rb +38 -0
- data/lib/datadog_api_client/v1/models/funnel_widget_definition.rb +322 -0
- data/lib/datadog_api_client/v1/models/funnel_widget_definition_type.rb +38 -0
- data/lib/datadog_api_client/v1/models/funnel_widget_request.rb +251 -0
- data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +38 -0
- data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor.rb +2 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +26 -2
- data/lib/datadog_api_client/v1/models/monitor_renotify_status_type.rb +40 -0
- data/lib/datadog_api_client/v1/models/notebook_author.rb +2 -0
- data/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb +10 -1
- data/lib/datadog_api_client/v1/models/notebook_metadata.rb +259 -0
- data/lib/datadog_api_client/v1/models/notebook_metadata_type.rb +42 -0
- data/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb +10 -1
- data/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb +10 -1
- data/lib/datadog_api_client/v1/models/notebooks_response_data_attributes.rb +10 -1
- data/lib/datadog_api_client/v1/models/notebooks_response_meta.rb +1 -1
- data/lib/datadog_api_client/v1/models/scatter_plot_widget_definition_requests.rb +10 -11
- data/lib/datadog_api_client/v1/models/scatterplot_dimension.rb +41 -0
- data/lib/datadog_api_client/v1/models/scatterplot_table_request.rb +256 -0
- data/lib/datadog_api_client/v1/models/scatterplot_widget_formula.rb +262 -0
- data/lib/datadog_api_client/v1/models/slo_correction.rb +2 -2
- data/lib/datadog_api_client/v1/models/slo_correction_create_data.rb +6 -1
- data/lib/datadog_api_client/v1/models/slo_correction_create_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +5 -5
- data/lib/datadog_api_client/v1/models/slo_correction_list_response.rb +2 -2
- data/lib/datadog_api_client/v1/models/slo_correction_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +5 -5
- data/lib/datadog_api_client/v1/models/slo_correction_update_data.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_update_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +4 -4
- data/lib/datadog_api_client/v1/models/synthetics_batch_details.rb +232 -0
- data/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb +253 -0
- data/lib/datadog_api_client/v1/models/synthetics_batch_result.rb +319 -0
- data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata.rb → synthetics_ci_batch_metadata.rb} +6 -6
- data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata_ci.rb → synthetics_ci_batch_metadata_ci.rb} +4 -4
- data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata_git.rb → synthetics_ci_batch_metadata_git.rb} +5 -5
- data/lib/datadog_api_client/v1/models/synthetics_ci_test.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_status.rb +40 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +10 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_execution_rule.rb +40 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +13 -13
- data/lib/datadog_api_client/v1/models/usage_sds_hour.rb +253 -0
- data/lib/datadog_api_client/v1/models/usage_sds_response.rb +235 -0
- 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 +28 -8
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +29 -9
- data/lib/datadog_api_client/v1/models/usage_timeseries_hour.rb +1 -1
- data/lib/datadog_api_client/v1/models/webhooks_integration.rb +1 -1
- data/lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
- data/lib/datadog_api_client/v1.rb +29 -3
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +5 -5
- data/lib/datadog_api_client/v2/api/incident_teams_api.rb +5 -5
- data/lib/datadog_api_client/v2/api/incidents_api.rb +5 -5
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +5 -5
- data/lib/datadog_api_client/v2/api_client.rb +14 -0
- data/lib/datadog_api_client/v2/configuration.rb +5 -0
- data/lib/datadog_api_client/v2/models/incident_field_attributes_multiple_value.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_field_attributes_single_value.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -0
- data/lib/datadog_api_client/v2/models/user_attributes.rb +2 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/spec/v1/models/formula_and_function_apm_dependency_stat_name_spec.rb +31 -0
- data/spec/v1/models/formula_and_function_apm_dependency_stats_data_source_spec.rb +31 -0
- data/spec/v1/models/formula_and_function_apm_dependency_stats_query_definition_spec.rb +91 -0
- data/spec/v1/models/formula_and_function_apm_resource_stat_name_spec.rb +31 -0
- data/spec/v1/models/formula_and_function_apm_resource_stats_data_source_spec.rb +31 -0
- data/spec/v1/models/formula_and_function_apm_resource_stats_query_definition_spec.rb +91 -0
- data/spec/v1/models/funnel_query_spec.rb +49 -0
- data/spec/v1/models/funnel_request_type_spec.rb +31 -0
- data/spec/v1/models/funnel_source_spec.rb +31 -0
- data/spec/v1/models/funnel_widget_definition_spec.rb +67 -0
- data/spec/v1/models/funnel_widget_definition_type_spec.rb +31 -0
- data/spec/v1/models/funnel_widget_request_spec.rb +43 -0
- data/spec/v1/models/metric_content_encoding_spec.rb +31 -0
- data/spec/v1/models/monitor_renotify_status_type_spec.rb +31 -0
- data/spec/v1/models/notebook_metadata_spec.rb +49 -0
- data/spec/v1/models/notebook_metadata_type_spec.rb +31 -0
- data/spec/v1/models/scatterplot_dimension_spec.rb +31 -0
- data/spec/v1/models/scatterplot_table_request_spec.rb +49 -0
- data/spec/v1/models/scatterplot_widget_formula_spec.rb +49 -0
- data/spec/v1/models/synthetics_batch_details_data_spec.rb +49 -0
- data/spec/v1/models/synthetics_batch_details_spec.rb +37 -0
- data/spec/v1/models/synthetics_batch_result_spec.rb +91 -0
- data/spec/v1/models/{synthetics_ci_test_metadata_ci_spec.rb → synthetics_ci_batch_metadata_ci_spec.rb} +6 -6
- data/spec/v1/models/{synthetics_ci_test_metadata_git_spec.rb → synthetics_ci_batch_metadata_git_spec.rb} +6 -6
- data/spec/v1/models/{synthetics_ci_test_metadata_spec.rb → synthetics_ci_batch_metadata_spec.rb} +6 -6
- data/spec/v1/models/synthetics_status_spec.rb +31 -0
- data/spec/v1/models/synthetics_test_execution_rule_spec.rb +31 -0
- data/spec/v1/models/usage_sds_hour_spec.rb +49 -0
- data/spec/v1/models/usage_sds_response_spec.rb +37 -0
- metadata +119 -14
- data/docs/v1/SyntheticsCITestMetadata.md +0 -20
- data/docs/v1/SyntheticsCITestMetadataGit.md +0 -20
@@ -0,0 +1,319 @@
|
|
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://openapi-generator.tech
|
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
|
+
# Object with the results of a Synthetics batch.
|
21
|
+
class SyntheticsBatchResult
|
22
|
+
# whether the object has unparsed attributes
|
23
|
+
attr_accessor :_unparsed
|
24
|
+
|
25
|
+
attr_accessor :device
|
26
|
+
|
27
|
+
# Total duration in millisecond of the test.
|
28
|
+
attr_accessor :duration
|
29
|
+
|
30
|
+
attr_accessor :execution_rule
|
31
|
+
|
32
|
+
# Name of the location.
|
33
|
+
attr_accessor :location
|
34
|
+
|
35
|
+
# The ID of the result to get.
|
36
|
+
attr_accessor :result_id
|
37
|
+
|
38
|
+
# Total duration in millisecond of the test.
|
39
|
+
attr_accessor :retries
|
40
|
+
|
41
|
+
attr_accessor :status
|
42
|
+
|
43
|
+
# Name of the test.
|
44
|
+
attr_accessor :test_name
|
45
|
+
|
46
|
+
# The public ID of the Synthetic test.
|
47
|
+
attr_accessor :test_public_id
|
48
|
+
|
49
|
+
attr_accessor :test_type
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'device' => :'device',
|
55
|
+
:'duration' => :'duration',
|
56
|
+
:'execution_rule' => :'execution_rule',
|
57
|
+
:'location' => :'location',
|
58
|
+
:'result_id' => :'result_id',
|
59
|
+
:'retries' => :'retries',
|
60
|
+
:'status' => :'status',
|
61
|
+
:'test_name' => :'test_name',
|
62
|
+
:'test_public_id' => :'test_public_id',
|
63
|
+
:'test_type' => :'test_type'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
# Returns all the JSON keys this model knows about
|
68
|
+
def self.acceptable_attributes
|
69
|
+
attribute_map.values
|
70
|
+
end
|
71
|
+
|
72
|
+
# Attribute type mapping.
|
73
|
+
def self.openapi_types
|
74
|
+
{
|
75
|
+
:'device' => :'SyntheticsDeviceID',
|
76
|
+
:'duration' => :'Float',
|
77
|
+
:'execution_rule' => :'SyntheticsTestExecutionRule',
|
78
|
+
:'location' => :'String',
|
79
|
+
:'result_id' => :'String',
|
80
|
+
:'retries' => :'Float',
|
81
|
+
:'status' => :'SyntheticsStatus',
|
82
|
+
:'test_name' => :'String',
|
83
|
+
:'test_public_id' => :'String',
|
84
|
+
:'test_type' => :'SyntheticsTestDetailsType'
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
# List of attributes with nullable: true
|
89
|
+
def self.openapi_nullable
|
90
|
+
Set.new([
|
91
|
+
])
|
92
|
+
end
|
93
|
+
|
94
|
+
# Initializes the object
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
def initialize(attributes = {})
|
97
|
+
if (!attributes.is_a?(Hash))
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsBatchResult` initialize method"
|
99
|
+
end
|
100
|
+
|
101
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
103
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsBatchResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
105
|
+
end
|
106
|
+
h[k.to_sym] = v
|
107
|
+
}
|
108
|
+
|
109
|
+
if attributes.key?(:'device')
|
110
|
+
self.device = attributes[:'device']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'duration')
|
114
|
+
self.duration = attributes[:'duration']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'execution_rule')
|
118
|
+
self.execution_rule = attributes[:'execution_rule']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'location')
|
122
|
+
self.location = attributes[:'location']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'result_id')
|
126
|
+
self.result_id = attributes[:'result_id']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'retries')
|
130
|
+
self.retries = attributes[:'retries']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'status')
|
134
|
+
self.status = attributes[:'status']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'test_name')
|
138
|
+
self.test_name = attributes[:'test_name']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'test_public_id')
|
142
|
+
self.test_public_id = attributes[:'test_public_id']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'test_type')
|
146
|
+
self.test_type = attributes[:'test_type']
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
151
|
+
# @return Array for valid properties with the reasons
|
152
|
+
def list_invalid_properties
|
153
|
+
invalid_properties = Array.new
|
154
|
+
invalid_properties
|
155
|
+
end
|
156
|
+
|
157
|
+
# Check to see if the all the properties in the model are valid
|
158
|
+
# @return true if the model is valid
|
159
|
+
def valid?
|
160
|
+
true
|
161
|
+
end
|
162
|
+
|
163
|
+
# Checks equality by comparing each attribute.
|
164
|
+
# @param [Object] Object to be compared
|
165
|
+
def ==(o)
|
166
|
+
return true if self.equal?(o)
|
167
|
+
self.class == o.class &&
|
168
|
+
device == o.device &&
|
169
|
+
duration == o.duration &&
|
170
|
+
execution_rule == o.execution_rule &&
|
171
|
+
location == o.location &&
|
172
|
+
result_id == o.result_id &&
|
173
|
+
retries == o.retries &&
|
174
|
+
status == o.status &&
|
175
|
+
test_name == o.test_name &&
|
176
|
+
test_public_id == o.test_public_id &&
|
177
|
+
test_type == o.test_type
|
178
|
+
end
|
179
|
+
|
180
|
+
# @see the `==` method
|
181
|
+
# @param [Object] Object to be compared
|
182
|
+
def eql?(o)
|
183
|
+
self == o
|
184
|
+
end
|
185
|
+
|
186
|
+
# Calculates hash code according to all attributes.
|
187
|
+
# @return [Integer] Hash code
|
188
|
+
def hash
|
189
|
+
[device, duration, execution_rule, location, result_id, retries, status, test_name, test_public_id, test_type].hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Builds the object from hash
|
193
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
194
|
+
# @return [Object] Returns the model itself
|
195
|
+
def self.build_from_hash(attributes)
|
196
|
+
new.build_from_hash(attributes)
|
197
|
+
end
|
198
|
+
|
199
|
+
# Builds the object from hash
|
200
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
201
|
+
# @return [Object] Returns the model itself
|
202
|
+
def build_from_hash(attributes)
|
203
|
+
return nil unless attributes.is_a?(Hash)
|
204
|
+
self.class.openapi_types.each_pair do |key, type|
|
205
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
206
|
+
self.send("#{key}=", nil)
|
207
|
+
elsif type =~ /\AArray<(.*)>/i
|
208
|
+
# check to ensure the input is an array given that the attribute
|
209
|
+
# is documented as an array but the input is not
|
210
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
211
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
212
|
+
end
|
213
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
214
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
self
|
219
|
+
end
|
220
|
+
|
221
|
+
# Deserializes the data based on type
|
222
|
+
# @param string type Data type
|
223
|
+
# @param string value Value to be deserialized
|
224
|
+
# @return [Object] Deserialized data
|
225
|
+
def _deserialize(type, value)
|
226
|
+
case type.to_sym
|
227
|
+
when :Time
|
228
|
+
Time.parse(value)
|
229
|
+
when :Date
|
230
|
+
Date.parse(value)
|
231
|
+
when :String
|
232
|
+
value.to_s
|
233
|
+
when :Integer
|
234
|
+
value.to_i
|
235
|
+
when :Float
|
236
|
+
value.to_f
|
237
|
+
when :Boolean
|
238
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
239
|
+
true
|
240
|
+
else
|
241
|
+
false
|
242
|
+
end
|
243
|
+
when :Object
|
244
|
+
# generic object (usually a Hash), return directly
|
245
|
+
value
|
246
|
+
when :Array
|
247
|
+
# generic array, return directly
|
248
|
+
value
|
249
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
250
|
+
inner_type = Regexp.last_match[:inner_type]
|
251
|
+
value.map { |v| _deserialize(inner_type, v) }
|
252
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
253
|
+
k_type = Regexp.last_match[:k_type]
|
254
|
+
v_type = Regexp.last_match[:v_type]
|
255
|
+
{}.tap do |hash|
|
256
|
+
value.each do |k, v|
|
257
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
else # model
|
261
|
+
# models (e.g. Pet) or oneOf
|
262
|
+
klass = DatadogAPIClient::V1.const_get(type)
|
263
|
+
res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
264
|
+
if res.instance_of? DatadogAPIClient::V1::UnparsedObject
|
265
|
+
self._unparsed = true
|
266
|
+
end
|
267
|
+
res
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
# Returns the string representation of the object
|
272
|
+
# @return [String] String presentation of the object
|
273
|
+
def to_s
|
274
|
+
to_hash.to_s
|
275
|
+
end
|
276
|
+
|
277
|
+
# to_body is an alias to to_hash (backward compatibility)
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
279
|
+
def to_body
|
280
|
+
to_hash
|
281
|
+
end
|
282
|
+
|
283
|
+
# Returns the object in the form of hash
|
284
|
+
# @return [Hash] Returns the object in the form of hash
|
285
|
+
def to_hash
|
286
|
+
hash = {}
|
287
|
+
self.class.attribute_map.each_pair do |attr, param|
|
288
|
+
value = self.send(attr)
|
289
|
+
if value.nil?
|
290
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
291
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
292
|
+
end
|
293
|
+
|
294
|
+
hash[param] = _to_hash(value)
|
295
|
+
end
|
296
|
+
hash
|
297
|
+
end
|
298
|
+
|
299
|
+
# Outputs non-array value in the form of hash
|
300
|
+
# For object, use to_hash. Otherwise, just return the value
|
301
|
+
# @param [Object] value Any valid value
|
302
|
+
# @return [Hash] Returns the value in the form of hash
|
303
|
+
def _to_hash(value)
|
304
|
+
if value.is_a?(Array)
|
305
|
+
value.compact.map { |v| _to_hash(v) }
|
306
|
+
elsif value.is_a?(Hash)
|
307
|
+
{}.tap do |hash|
|
308
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
309
|
+
end
|
310
|
+
elsif value.respond_to? :to_hash
|
311
|
+
value.to_hash
|
312
|
+
else
|
313
|
+
value
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
end
|
318
|
+
|
319
|
+
end
|
@@ -17,8 +17,8 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V1
|
20
|
-
# Metadata for the Synthetics tests run
|
21
|
-
class
|
20
|
+
# Metadata for the Synthetics tests run.
|
21
|
+
class SyntheticsCIBatchMetadata
|
22
22
|
# whether the object has unparsed attributes
|
23
23
|
attr_accessor :_unparsed
|
24
24
|
|
@@ -42,8 +42,8 @@ module DatadogAPIClient::V1
|
|
42
42
|
# Attribute type mapping.
|
43
43
|
def self.openapi_types
|
44
44
|
{
|
45
|
-
:'ci' => :'
|
46
|
-
:'git' => :'
|
45
|
+
:'ci' => :'SyntheticsCIBatchMetadataCI',
|
46
|
+
:'git' => :'SyntheticsCIBatchMetadataGit'
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -57,13 +57,13 @@ module DatadogAPIClient::V1
|
|
57
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
58
|
def initialize(attributes = {})
|
59
59
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCIBatchMetadata` initialize method"
|
61
61
|
end
|
62
62
|
|
63
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCIBatchMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
67
|
end
|
68
68
|
h[k.to_sym] = v
|
69
69
|
}
|
@@ -17,8 +17,8 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V1
|
20
|
-
#
|
21
|
-
class
|
20
|
+
# Description of the CI provider.
|
21
|
+
class SyntheticsCIBatchMetadataCI
|
22
22
|
# whether the object has unparsed attributes
|
23
23
|
attr_accessor :_unparsed
|
24
24
|
|
@@ -59,13 +59,13 @@ module DatadogAPIClient::V1
|
|
59
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
60
60
|
def initialize(attributes = {})
|
61
61
|
if (!attributes.is_a?(Hash))
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataCI` initialize method"
|
63
63
|
end
|
64
64
|
|
65
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
66
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
67
|
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataCI`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
69
|
end
|
70
70
|
h[k.to_sym] = v
|
71
71
|
}
|
@@ -18,14 +18,14 @@ require 'time'
|
|
18
18
|
|
19
19
|
module DatadogAPIClient::V1
|
20
20
|
# Git information.
|
21
|
-
class
|
21
|
+
class SyntheticsCIBatchMetadataGit
|
22
22
|
# whether the object has unparsed attributes
|
23
23
|
attr_accessor :_unparsed
|
24
24
|
|
25
|
-
#
|
25
|
+
# The branch name.
|
26
26
|
attr_accessor :branch
|
27
27
|
|
28
|
-
#
|
28
|
+
# The commit SHA.
|
29
29
|
attr_accessor :commit_sha
|
30
30
|
|
31
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -59,13 +59,13 @@ module DatadogAPIClient::V1
|
|
59
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
60
60
|
def initialize(attributes = {})
|
61
61
|
if (!attributes.is_a?(Hash))
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataGit` initialize method"
|
63
63
|
end
|
64
64
|
|
65
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
66
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
67
|
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsCIBatchMetadataGit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
69
|
end
|
70
70
|
h[k.to_sym] = v
|
71
71
|
}
|
@@ -98,7 +98,7 @@ module DatadogAPIClient::V1
|
|
98
98
|
:'follow_redirects' => :'Boolean',
|
99
99
|
:'headers' => :'Hash<String, String>',
|
100
100
|
:'locations' => :'Array<String>',
|
101
|
-
:'metadata' => :'
|
101
|
+
:'metadata' => :'SyntheticsCIBatchMetadata',
|
102
102
|
:'public_id' => :'String',
|
103
103
|
:'_retry' => :'SyntheticsTestOptionsRetry',
|
104
104
|
:'start_url' => :'String',
|
@@ -0,0 +1,40 @@
|
|
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://openapi-generator.tech
|
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
|
+
class SyntheticsStatus
|
21
|
+
PASSED = "passed".freeze
|
22
|
+
skipped = "skipped".freeze
|
23
|
+
failed = "failed".freeze
|
24
|
+
|
25
|
+
# Builds the enum from string
|
26
|
+
# @param [String] The enum value in the form of the string
|
27
|
+
# @return [String] The enum value
|
28
|
+
def self.build_from_hash(value)
|
29
|
+
new.build_from_hash(value)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Builds the enum from string
|
33
|
+
# @param [String] The enum value in the form of the string
|
34
|
+
# @return [String] The enum value
|
35
|
+
def build_from_hash(value)
|
36
|
+
constantValues = SyntheticsStatus.constants.select { |c| SyntheticsStatus::const_get(c) == value }
|
37
|
+
constantValues.empty? ? DatadogAPIClient::V1::UnparsedObject.new(value) : value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -24,6 +24,8 @@ module DatadogAPIClient::V1
|
|
24
24
|
|
25
25
|
attr_accessor :config
|
26
26
|
|
27
|
+
attr_accessor :creator
|
28
|
+
|
27
29
|
# Array of locations used to run the test.
|
28
30
|
attr_accessor :locations
|
29
31
|
|
@@ -57,6 +59,7 @@ module DatadogAPIClient::V1
|
|
57
59
|
def self.attribute_map
|
58
60
|
{
|
59
61
|
:'config' => :'config',
|
62
|
+
:'creator' => :'creator',
|
60
63
|
:'locations' => :'locations',
|
61
64
|
:'message' => :'message',
|
62
65
|
:'monitor_id' => :'monitor_id',
|
@@ -80,6 +83,7 @@ module DatadogAPIClient::V1
|
|
80
83
|
def self.openapi_types
|
81
84
|
{
|
82
85
|
:'config' => :'SyntheticsTestConfig',
|
86
|
+
:'creator' => :'Creator',
|
83
87
|
:'locations' => :'Array<String>',
|
84
88
|
:'message' => :'String',
|
85
89
|
:'monitor_id' => :'Integer',
|
@@ -119,6 +123,10 @@ module DatadogAPIClient::V1
|
|
119
123
|
self.config = attributes[:'config']
|
120
124
|
end
|
121
125
|
|
126
|
+
if attributes.key?(:'creator')
|
127
|
+
self.creator = attributes[:'creator']
|
128
|
+
end
|
129
|
+
|
122
130
|
if attributes.key?(:'locations')
|
123
131
|
if (value = attributes[:'locations']).is_a?(Array)
|
124
132
|
self.locations = value
|
@@ -189,6 +197,7 @@ module DatadogAPIClient::V1
|
|
189
197
|
return true if self.equal?(o)
|
190
198
|
self.class == o.class &&
|
191
199
|
config == o.config &&
|
200
|
+
creator == o.creator &&
|
192
201
|
locations == o.locations &&
|
193
202
|
message == o.message &&
|
194
203
|
monitor_id == o.monitor_id &&
|
@@ -211,7 +220,7 @@ module DatadogAPIClient::V1
|
|
211
220
|
# Calculates hash code according to all attributes.
|
212
221
|
# @return [Integer] Hash code
|
213
222
|
def hash
|
214
|
-
[config, locations, message, monitor_id, name, options, public_id, status, steps, subtype, tags, type].hash
|
223
|
+
[config, creator, locations, message, monitor_id, name, options, public_id, status, steps, subtype, tags, type].hash
|
215
224
|
end
|
216
225
|
|
217
226
|
# Builds the object from hash
|
@@ -0,0 +1,40 @@
|
|
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://openapi-generator.tech
|
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
|
+
class SyntheticsTestExecutionRule
|
21
|
+
BLOCKING = "blocking".freeze
|
22
|
+
NON_BLOCKING = "non_blocking".freeze
|
23
|
+
SKIPPED = "skipped".freeze
|
24
|
+
|
25
|
+
# Builds the enum from string
|
26
|
+
# @param [String] The enum value in the form of the string
|
27
|
+
# @return [String] The enum value
|
28
|
+
def self.build_from_hash(value)
|
29
|
+
new.build_from_hash(value)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Builds the enum from string
|
33
|
+
# @param [String] The enum value in the form of the string
|
34
|
+
# @return [String] The enum value
|
35
|
+
def build_from_hash(value)
|
36
|
+
constantValues = SyntheticsTestExecutionRule.constants.select { |c| SyntheticsTestExecutionRule::const_get(c) == value }
|
37
|
+
constantValues.empty? ? DatadogAPIClient::V1::UnparsedObject.new(value) : value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -61,6 +61,9 @@ module DatadogAPIClient::V1
|
|
61
61
|
# Query to use for the test.
|
62
62
|
attr_accessor :query
|
63
63
|
|
64
|
+
# For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.
|
65
|
+
attr_accessor :servername
|
66
|
+
|
64
67
|
# Turns on a traceroute probe to discover all gateways along the path to the host destination.
|
65
68
|
attr_accessor :should_track_hops
|
66
69
|
|
@@ -87,6 +90,7 @@ module DatadogAPIClient::V1
|
|
87
90
|
:'number_of_packets' => :'numberOfPackets',
|
88
91
|
:'port' => :'port',
|
89
92
|
:'query' => :'query',
|
93
|
+
:'servername' => :'servername',
|
90
94
|
:'should_track_hops' => :'shouldTrackHops',
|
91
95
|
:'timeout' => :'timeout',
|
92
96
|
:'url' => :'url'
|
@@ -115,6 +119,7 @@ module DatadogAPIClient::V1
|
|
115
119
|
:'number_of_packets' => :'Integer',
|
116
120
|
:'port' => :'Integer',
|
117
121
|
:'query' => :'Object',
|
122
|
+
:'servername' => :'String',
|
118
123
|
:'should_track_hops' => :'Boolean',
|
119
124
|
:'timeout' => :'Float',
|
120
125
|
:'url' => :'String'
|
@@ -200,6 +205,10 @@ module DatadogAPIClient::V1
|
|
200
205
|
self.query = attributes[:'query']
|
201
206
|
end
|
202
207
|
|
208
|
+
if attributes.key?(:'servername')
|
209
|
+
self.servername = attributes[:'servername']
|
210
|
+
end
|
211
|
+
|
203
212
|
if attributes.key?(:'should_track_hops')
|
204
213
|
self.should_track_hops = attributes[:'should_track_hops']
|
205
214
|
end
|
@@ -293,6 +302,7 @@ module DatadogAPIClient::V1
|
|
293
302
|
number_of_packets == o.number_of_packets &&
|
294
303
|
port == o.port &&
|
295
304
|
query == o.query &&
|
305
|
+
servername == o.servername &&
|
296
306
|
should_track_hops == o.should_track_hops &&
|
297
307
|
timeout == o.timeout &&
|
298
308
|
url == o.url
|
@@ -307,7 +317,7 @@ module DatadogAPIClient::V1
|
|
307
317
|
# Calculates hash code according to all attributes.
|
308
318
|
# @return [Integer] Hash code
|
309
319
|
def hash
|
310
|
-
[allow_insecure, basic_auth, body, certificate, dns_server, dns_server_port, follow_redirects, headers, host, method, no_saving_response_body, number_of_packets, port, query, should_track_hops, timeout, url].hash
|
320
|
+
[allow_insecure, basic_auth, body, certificate, dns_server, dns_server_port, follow_redirects, headers, host, method, no_saving_response_body, number_of_packets, port, query, servername, should_track_hops, timeout, url].hash
|
311
321
|
end
|
312
322
|
|
313
323
|
# Builds the object from hash
|