Skip to content

Commit ef90bb2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5de07024 of spec repo
1 parent 6e6bebf commit ef90bb2

File tree

5 files changed

+84
-7
lines changed

5 files changed

+84
-7
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-06-23 07:59:25.891159",
8-
"spec_repo_commit": "74866a53"
7+
"regenerated": "2025-06-23 13:00:09.035815",
8+
"spec_repo_commit": "5de07024"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-23 07:59:25.906930",
13-
"spec_repo_commit": "74866a53"
12+
"regenerated": "2025-06-23 13:00:09.052235",
13+
"spec_repo_commit": "5de07024"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17198,8 +17198,8 @@ components:
1719817198
encoded.
1719917199
type: string
1720017200
dnsServer:
17201+
$ref: '#/components/schemas/SyntheticsTestRequestDNSServerPort'
1720117202
description: DNS server to use for DNS tests.
17202-
type: string
1720317203
dnsServerPort:
1720417204
description: DNS server port to use for DNS tests.
1720517205
type: string
@@ -17356,6 +17356,15 @@ components:
1735617356
description: Date of update of the certificate or key, ISO format.
1735717357
type: string
1735817358
type: object
17359+
SyntheticsTestRequestDNSServerPort:
17360+
description: DNS server port to use for DNS tests.
17361+
oneOf:
17362+
- $ref: '#/components/schemas/SyntheticsTestRequestNumericalDNSServerPort'
17363+
- $ref: '#/components/schemas/SyntheticsTestRequestVariableDNSServerPort'
17364+
SyntheticsTestRequestNumericalDNSServerPort:
17365+
description: Integer DNS server port number to use when performing the test.
17366+
format: int64
17367+
type: integer
1735917368
SyntheticsTestRequestNumericalPort:
1736017369
description: Integer Port number to use when performing the test.
1736117370
format: int64
@@ -17377,6 +17386,10 @@ components:
1737717386
required:
1737817387
- url
1737917388
type: object
17389+
SyntheticsTestRequestVariableDNSServerPort:
17390+
description: String DNS server port number to use when performing the test.
17391+
Supports templated variables.
17392+
type: string
1738017393
SyntheticsTestRequestVariablePort:
1738117394
description: String Port number to use when performing the test. Supports templated
1738217395
variables.

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ def overrides
711711
"v1.synthetics_test_request_body_type" => "SyntheticsTestRequestBodyType",
712712
"v1.synthetics_test_request_certificate" => "SyntheticsTestRequestCertificate",
713713
"v1.synthetics_test_request_certificate_item" => "SyntheticsTestRequestCertificateItem",
714+
"v1.synthetics_test_request_dns_server_port" => "SyntheticsTestRequestDNSServerPort",
714715
"v1.synthetics_test_request_port" => "SyntheticsTestRequestPort",
715716
"v1.synthetics_test_request_proxy" => "SyntheticsTestRequestProxy",
716717
"v1.synthetics_test_restriction_policy_binding" => "SyntheticsTestRestrictionPolicyBinding",

lib/datadog_api_client/v1/models/synthetics_test_request.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class SyntheticsTestRequest
5151
# A protobuf file that needs to be gzipped first then base64 encoded.
5252
attr_accessor :compressed_proto_file
5353

54-
# DNS server to use for DNS tests.
54+
# DNS server port to use for DNS tests.
5555
attr_accessor :dns_server
5656

5757
# DNS server port to use for DNS tests.
@@ -178,7 +178,7 @@ def self.openapi_types
178178
:'check_certificate_revocation' => :'Boolean',
179179
:'compressed_json_descriptor' => :'String',
180180
:'compressed_proto_file' => :'String',
181-
:'dns_server' => :'String',
181+
:'dns_server' => :'SyntheticsTestRequestDNSServerPort',
182182
:'dns_server_port' => :'String',
183183
:'files' => :'Array<SyntheticsTestRequestBodyFile>',
184184
:'follow_redirects' => :'Boolean',
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
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+
# DNS server port to use for DNS tests.
21+
module SyntheticsTestRequestDNSServerPort
22+
class << self
23+
include BaseOneOfModel
24+
include BaseOneOfModelNoDiscriminator
25+
26+
# List of class defined in oneOf (OpenAPI v3)
27+
def openapi_one_of
28+
[
29+
:'Integer',
30+
:'String'
31+
]
32+
end
33+
# Builds the object
34+
# @param data [Mixed] Data to be matched against the list of oneOf items
35+
# @return [Object] Returns the model or the data itself
36+
def build(data)
37+
# Go through the list of oneOf items and attempt to identify the appropriate one.
38+
# Note:
39+
# - We do not attempt to check whether exactly one item matches.
40+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
42+
# - TODO: scalar values are de facto behaving as if they were nullable.
43+
# - TODO: logging when debugging is set.
44+
openapi_one_of.each do |klass|
45+
begin
46+
next if klass == :AnyType # "nullable: true"
47+
typed_data = find_and_cast_into_type(klass, data)
48+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
49+
return typed_data if typed_data
50+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
51+
end
52+
end
53+
54+
if openapi_one_of.include?(:AnyType)
55+
data
56+
else
57+
self._unparsed = true
58+
DatadogAPIClient::UnparsedObject.new(data)
59+
end
60+
end
61+
end
62+
end
63+
end

0 commit comments

Comments
 (0)