Skip to content

Commit b01d27d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d3bc2b1 of spec repo
1 parent ed07de5 commit b01d27d

11 files changed

+662
-2
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "d93d991",
3-
"generated": "2025-07-15 09:31:41.973"
2+
"spec_repo_commit": "d3bc2b1",
3+
"generated": "2025-07-16 14:16:49.985"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,11 +2016,13 @@ components:
20162016
description: The definition of `ActionConnectionIntegration` object.
20172017
oneOf:
20182018
- $ref: '#/components/schemas/AWSIntegration'
2019+
- $ref: '#/components/schemas/DatadogIntegration'
20192020
- $ref: '#/components/schemas/HTTPIntegration'
20202021
ActionConnectionIntegrationUpdate:
20212022
description: The definition of `ActionConnectionIntegrationUpdate` object.
20222023
oneOf:
20232024
- $ref: '#/components/schemas/AWSIntegrationUpdate'
2025+
- $ref: '#/components/schemas/DatadogIntegrationUpdate'
20242026
- $ref: '#/components/schemas/HTTPIntegrationUpdate'
20252027
ActionQuery:
20262028
description: An action query. This query type is used to trigger an action,
@@ -12186,6 +12188,77 @@ components:
1218612188
required:
1218712189
- databaseMonitoringTrigger
1218812190
type: object
12191+
DatadogCredentials:
12192+
description: The definition of `DatadogCredentials` object.
12193+
oneOf:
12194+
- $ref: '#/components/schemas/DatadogDatadogAPIKey'
12195+
DatadogDatadogAPIKey:
12196+
description: The definition of `DatadogDatadogAPIKey` object.
12197+
properties:
12198+
api_key:
12199+
description: The `DatadogDatadogAPIKey` `api_key`.
12200+
example: ''
12201+
type: string
12202+
app_key:
12203+
description: The `DatadogDatadogAPIKey` `app_key`.
12204+
example: ''
12205+
type: string
12206+
datacenter:
12207+
description: The `DatadogDatadogAPIKey` `datacenter`.
12208+
example: ''
12209+
type: string
12210+
subdomain:
12211+
description: Custom subdomain used for Datadog URLs generated with this
12212+
Connection. For example, if this org uses https://acme.datadoghq.com to
12213+
access Datadog, set this field to `acme`. If this field is omitted, generated
12214+
URLs will use the default site URL for its datacenter (see [https://docs.datadoghq.com/getting_started/site](https://docs.datadoghq.com/getting_started/site)).
12215+
type: string
12216+
type:
12217+
$ref: '#/components/schemas/DatadogDatadogAPIKeyType'
12218+
required:
12219+
- type
12220+
- datacenter
12221+
- api_key
12222+
- app_key
12223+
type: object
12224+
DatadogDatadogAPIKeyType:
12225+
description: The credential type
12226+
enum:
12227+
- DATADOG_APP_API_KEY
12228+
example: DATADOG_APP_API_KEY
12229+
type: string
12230+
x-enum-varnames:
12231+
- DATADOG_APP_API_KEY
12232+
DatadogIntegration:
12233+
description: The definition of `DatadogIntegration` object.
12234+
properties:
12235+
credentials:
12236+
$ref: '#/components/schemas/DatadogCredentials'
12237+
type:
12238+
$ref: '#/components/schemas/DatadogIntegrationType'
12239+
required:
12240+
- type
12241+
- credentials
12242+
type: object
12243+
DatadogIntegrationType:
12244+
description: The definition of `DatadogIntegrationType` object.
12245+
enum:
12246+
- Datadog
12247+
example: Datadog
12248+
type: string
12249+
x-enum-varnames:
12250+
- DATADOG
12251+
DatadogIntegrationUpdate:
12252+
description: The definition of `DatadogIntegrationUpdate` object.
12253+
properties:
12254+
credentials:
12255+
$ref: '#/components/schemas/DatadogCredentials'
12256+
deleted:
12257+
description: Whether the integration should be deleted
12258+
type: boolean
12259+
type:
12260+
$ref: '#/components/schemas/DatadogIntegrationType'
12261+
type: object
1218912262
Dataset:
1219012263
description: Dataset object.
1219112264
properties:

lib/datadog_api_client/inflector.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,12 @@ def overrides
15901590
"v2.data_deletion_response_item" => "DataDeletionResponseItem",
15911591
"v2.data_deletion_response_item_attributes" => "DataDeletionResponseItemAttributes",
15921592
"v2.data_deletion_response_meta" => "DataDeletionResponseMeta",
1593+
"v2.datadog_credentials" => "DatadogCredentials",
1594+
"v2.datadog_datadog_api_key" => "DatadogDatadogAPIKey",
1595+
"v2.datadog_datadog_api_key_type" => "DatadogDatadogAPIKeyType",
1596+
"v2.datadog_integration" => "DatadogIntegration",
1597+
"v2.datadog_integration_type" => "DatadogIntegrationType",
1598+
"v2.datadog_integration_update" => "DatadogIntegrationUpdate",
15931599
"v2.data_relationships_teams" => "DataRelationshipsTeams",
15941600
"v2.data_relationships_teams_data_items" => "DataRelationshipsTeamsDataItems",
15951601
"v2.data_relationships_teams_data_items_type" => "DataRelationshipsTeamsDataItemsType",

lib/datadog_api_client/v2/models/action_connection_integration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class << self
2727
def openapi_one_of
2828
[
2929
:'AWSIntegration',
30+
:'DatadogIntegration',
3031
:'HTTPIntegration'
3132
]
3233
end

lib/datadog_api_client/v2/models/action_connection_integration_update.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class << self
2727
def openapi_one_of
2828
[
2929
:'AWSIntegrationUpdate',
30+
:'DatadogIntegrationUpdate',
3031
:'HTTPIntegrationUpdate'
3132
]
3233
end
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# The definition of `DatadogCredentials` object.
21+
module DatadogCredentials
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+
:'DatadogDatadogAPIKey'
30+
]
31+
end
32+
# Builds the object
33+
# @param data [Mixed] Data to be matched against the list of oneOf items
34+
# @return [Object] Returns the model or the data itself
35+
def build(data)
36+
# Go through the list of oneOf items and attempt to identify the appropriate one.
37+
# Note:
38+
# - We do not attempt to check whether exactly one item matches.
39+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
40+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
41+
# - TODO: scalar values are de facto behaving as if they were nullable.
42+
# - TODO: logging when debugging is set.
43+
openapi_one_of.each do |klass|
44+
begin
45+
next if klass == :AnyType # "nullable: true"
46+
typed_data = find_and_cast_into_type(klass, data)
47+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
48+
return typed_data if typed_data
49+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
50+
end
51+
end
52+
53+
if openapi_one_of.include?(:AnyType)
54+
data
55+
else
56+
self._unparsed = true
57+
DatadogAPIClient::UnparsedObject.new(data)
58+
end
59+
end
60+
end
61+
end
62+
end
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# The definition of `DatadogDatadogAPIKey` object.
21+
class DatadogDatadogAPIKey
22+
include BaseGenericModel
23+
24+
# The `DatadogDatadogAPIKey` `api_key`.
25+
attr_reader :api_key
26+
27+
# The `DatadogDatadogAPIKey` `app_key`.
28+
attr_reader :app_key
29+
30+
# The `DatadogDatadogAPIKey` `datacenter`.
31+
attr_reader :datacenter
32+
33+
# Custom subdomain used for Datadog URLs generated with this Connection. For example, if this org uses https://acme.datadoghq.com to access Datadog, set this field to `acme`. If this field is omitted, generated URLs will use the default site URL for its datacenter (see [https://docs.datadoghq.com/getting_started/site](https://docs.datadoghq.com/getting_started/site)).
34+
attr_accessor :subdomain
35+
36+
# The credential type
37+
attr_reader :type
38+
39+
attr_accessor :additional_properties
40+
41+
# Attribute mapping from ruby-style variable name to JSON key.
42+
# @!visibility private
43+
def self.attribute_map
44+
{
45+
:'api_key' => :'api_key',
46+
:'app_key' => :'app_key',
47+
:'datacenter' => :'datacenter',
48+
:'subdomain' => :'subdomain',
49+
:'type' => :'type'
50+
}
51+
end
52+
53+
# Attribute type mapping.
54+
# @!visibility private
55+
def self.openapi_types
56+
{
57+
:'api_key' => :'String',
58+
:'app_key' => :'String',
59+
:'datacenter' => :'String',
60+
:'subdomain' => :'String',
61+
:'type' => :'DatadogDatadogAPIKeyType'
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::V2::DatadogDatadogAPIKey` initialize method"
71+
end
72+
73+
self.additional_properties = {}
74+
# check to see if the attribute exists and convert string to symbol for hash key
75+
attributes = attributes.each_with_object({}) { |(k, v), h|
76+
if (!self.class.attribute_map.key?(k.to_sym))
77+
self.additional_properties[k.to_sym] = v
78+
else
79+
h[k.to_sym] = v
80+
end
81+
}
82+
83+
if attributes.key?(:'api_key')
84+
self.api_key = attributes[:'api_key']
85+
end
86+
87+
if attributes.key?(:'app_key')
88+
self.app_key = attributes[:'app_key']
89+
end
90+
91+
if attributes.key?(:'datacenter')
92+
self.datacenter = attributes[:'datacenter']
93+
end
94+
95+
if attributes.key?(:'subdomain')
96+
self.subdomain = attributes[:'subdomain']
97+
end
98+
99+
if attributes.key?(:'type')
100+
self.type = attributes[:'type']
101+
end
102+
end
103+
104+
# Check to see if the all the properties in the model are valid
105+
# @return true if the model is valid
106+
# @!visibility private
107+
def valid?
108+
return false if @api_key.nil?
109+
return false if @app_key.nil?
110+
return false if @datacenter.nil?
111+
return false if @type.nil?
112+
true
113+
end
114+
115+
# Custom attribute writer method with validation
116+
# @param api_key [Object] Object to be assigned
117+
# @!visibility private
118+
def api_key=(api_key)
119+
if api_key.nil?
120+
fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.'
121+
end
122+
@api_key = api_key
123+
end
124+
125+
# Custom attribute writer method with validation
126+
# @param app_key [Object] Object to be assigned
127+
# @!visibility private
128+
def app_key=(app_key)
129+
if app_key.nil?
130+
fail ArgumentError, 'invalid value for "app_key", app_key cannot be nil.'
131+
end
132+
@app_key = app_key
133+
end
134+
135+
# Custom attribute writer method with validation
136+
# @param datacenter [Object] Object to be assigned
137+
# @!visibility private
138+
def datacenter=(datacenter)
139+
if datacenter.nil?
140+
fail ArgumentError, 'invalid value for "datacenter", datacenter cannot be nil.'
141+
end
142+
@datacenter = datacenter
143+
end
144+
145+
# Custom attribute writer method with validation
146+
# @param type [Object] Object to be assigned
147+
# @!visibility private
148+
def type=(type)
149+
if type.nil?
150+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
151+
end
152+
@type = type
153+
end
154+
155+
# Returns the object in the form of hash, with additionalProperties support.
156+
# @return [Hash] Returns the object in the form of hash
157+
# @!visibility private
158+
def to_hash
159+
hash = {}
160+
self.class.attribute_map.each_pair do |attr, param|
161+
value = self.send(attr)
162+
if value.nil?
163+
is_nullable = self.class.openapi_nullable.include?(attr)
164+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165+
end
166+
167+
hash[param] = _to_hash(value)
168+
end
169+
self.additional_properties.each_pair do |attr, value|
170+
hash[attr] = value
171+
end
172+
hash
173+
end
174+
175+
# Checks equality by comparing each attribute.
176+
# @param o [Object] Object to be compared
177+
# @!visibility private
178+
def ==(o)
179+
return true if self.equal?(o)
180+
self.class == o.class &&
181+
api_key == o.api_key &&
182+
app_key == o.app_key &&
183+
datacenter == o.datacenter &&
184+
subdomain == o.subdomain &&
185+
type == o.type &&
186+
additional_properties == o.additional_properties
187+
end
188+
189+
# Calculates hash code according to all attributes.
190+
# @return [Integer] Hash code
191+
# @!visibility private
192+
def hash
193+
[api_key, app_key, datacenter, subdomain, type, additional_properties].hash
194+
end
195+
end
196+
end

0 commit comments

Comments
 (0)