Skip to content

Commit cb64c19

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 653cf4a of spec repo
1 parent 53c23e2 commit cb64c19

10 files changed

Lines changed: 1182 additions & 10 deletions

.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:33:00.867"
2+
"spec_repo_commit": "653cf4a",
3+
"generated": "2025-07-16 02:50:49.095"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,11 +2017,13 @@ components:
20172017
oneOf:
20182018
- $ref: '#/components/schemas/AWSIntegration'
20192019
- $ref: '#/components/schemas/HTTPIntegration'
2020+
- $ref: '#/components/schemas/DatadogIntegration'
20202021
ActionConnectionIntegrationUpdate:
20212022
description: The definition of `ActionConnectionIntegrationUpdate` object.
20222023
oneOf:
20232024
- $ref: '#/components/schemas/AWSIntegrationUpdate'
20242025
- $ref: '#/components/schemas/HTTPIntegrationUpdate'
2026+
- $ref: '#/components/schemas/DatadogIntegrationUpdate'
20252027
ActionQuery:
20262028
description: An action query. This query type is used to trigger an action,
20272029
such as sending a HTTP request.
@@ -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:

src/main/java/com/datadog/api/client/v2/model/ActionConnectionIntegration.java

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,50 @@ public ActionConnectionIntegration deserialize(JsonParser jp, DeserializationCon
168168
log.log(Level.FINER, "Input data does not match schema 'HTTPIntegration'", e);
169169
}
170170

171+
// deserialize DatadogIntegration
172+
try {
173+
boolean attemptParsing = true;
174+
// ensure that we respect type coercion as set on the client ObjectMapper
175+
if (DatadogIntegration.class.equals(Integer.class)
176+
|| DatadogIntegration.class.equals(Long.class)
177+
|| DatadogIntegration.class.equals(Float.class)
178+
|| DatadogIntegration.class.equals(Double.class)
179+
|| DatadogIntegration.class.equals(Boolean.class)
180+
|| DatadogIntegration.class.equals(String.class)) {
181+
attemptParsing = typeCoercion;
182+
if (!attemptParsing) {
183+
attemptParsing |=
184+
((DatadogIntegration.class.equals(Integer.class)
185+
|| DatadogIntegration.class.equals(Long.class))
186+
&& token == JsonToken.VALUE_NUMBER_INT);
187+
attemptParsing |=
188+
((DatadogIntegration.class.equals(Float.class)
189+
|| DatadogIntegration.class.equals(Double.class))
190+
&& (token == JsonToken.VALUE_NUMBER_FLOAT
191+
|| token == JsonToken.VALUE_NUMBER_INT));
192+
attemptParsing |=
193+
(DatadogIntegration.class.equals(Boolean.class)
194+
&& (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
195+
attemptParsing |=
196+
(DatadogIntegration.class.equals(String.class) && token == JsonToken.VALUE_STRING);
197+
}
198+
}
199+
if (attemptParsing) {
200+
tmp = tree.traverse(jp.getCodec()).readValueAs(DatadogIntegration.class);
201+
// TODO: there is no validation against JSON schema constraints
202+
// (min, max, enum, pattern...), this does not perform a strict JSON
203+
// validation, which means the 'match' count may be higher than it should be.
204+
if (!((DatadogIntegration) tmp).unparsed) {
205+
deserialized = tmp;
206+
match++;
207+
}
208+
log.log(Level.FINER, "Input data matches schema 'DatadogIntegration'");
209+
}
210+
} catch (Exception e) {
211+
// deserialization failed, continue
212+
log.log(Level.FINER, "Input data does not match schema 'DatadogIntegration'", e);
213+
}
214+
171215
ActionConnectionIntegration ret = new ActionConnectionIntegration();
172216
if (match == 1) {
173217
ret.setActualInstance(deserialized);
@@ -208,9 +252,15 @@ public ActionConnectionIntegration(HTTPIntegration o) {
208252
setActualInstance(o);
209253
}
210254

255+
public ActionConnectionIntegration(DatadogIntegration o) {
256+
super("oneOf", Boolean.FALSE);
257+
setActualInstance(o);
258+
}
259+
211260
static {
212261
schemas.put("AWSIntegration", new GenericType<AWSIntegration>() {});
213262
schemas.put("HTTPIntegration", new GenericType<HTTPIntegration>() {});
263+
schemas.put("DatadogIntegration", new GenericType<DatadogIntegration>() {});
214264
JSON.registerDescendants(
215265
ActionConnectionIntegration.class, Collections.unmodifiableMap(schemas));
216266
}
@@ -222,7 +272,7 @@ public Map<String, GenericType> getSchemas() {
222272

223273
/**
224274
* Set the instance that matches the oneOf child schema, check the instance parameter is valid
225-
* against the oneOf child schemas: AWSIntegration, HTTPIntegration
275+
* against the oneOf child schemas: AWSIntegration, HTTPIntegration, DatadogIntegration
226276
*
227277
* <p>It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a
228278
* composed schema (allOf, anyOf, oneOf).
@@ -237,18 +287,24 @@ public void setActualInstance(Object instance) {
237287
super.setActualInstance(instance);
238288
return;
239289
}
290+
if (JSON.isInstanceOf(DatadogIntegration.class, instance, new HashSet<Class<?>>())) {
291+
super.setActualInstance(instance);
292+
return;
293+
}
240294

241295
if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet<Class<?>>())) {
242296
super.setActualInstance(instance);
243297
return;
244298
}
245-
throw new RuntimeException("Invalid instance type. Must be AWSIntegration, HTTPIntegration");
299+
throw new RuntimeException(
300+
"Invalid instance type. Must be AWSIntegration, HTTPIntegration, DatadogIntegration");
246301
}
247302

248303
/**
249-
* Get the actual instance, which can be the following: AWSIntegration, HTTPIntegration
304+
* Get the actual instance, which can be the following: AWSIntegration, HTTPIntegration,
305+
* DatadogIntegration
250306
*
251-
* @return The actual instance (AWSIntegration, HTTPIntegration)
307+
* @return The actual instance (AWSIntegration, HTTPIntegration, DatadogIntegration)
252308
*/
253309
@Override
254310
public Object getActualInstance() {
@@ -276,4 +332,15 @@ public AWSIntegration getAWSIntegration() throws ClassCastException {
276332
public HTTPIntegration getHTTPIntegration() throws ClassCastException {
277333
return (HTTPIntegration) super.getActualInstance();
278334
}
335+
336+
/**
337+
* Get the actual instance of `DatadogIntegration`. If the actual instance is not
338+
* `DatadogIntegration`, the ClassCastException will be thrown.
339+
*
340+
* @return The actual instance of `DatadogIntegration`
341+
* @throws ClassCastException if the instance is not `DatadogIntegration`
342+
*/
343+
public DatadogIntegration getDatadogIntegration() throws ClassCastException {
344+
return (DatadogIntegration) super.getActualInstance();
345+
}
279346
}

src/main/java/com/datadog/api/client/v2/model/ActionConnectionIntegrationUpdate.java

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,51 @@ public ActionConnectionIntegrationUpdate deserialize(JsonParser jp, Deserializat
173173
log.log(Level.FINER, "Input data does not match schema 'HTTPIntegrationUpdate'", e);
174174
}
175175

176+
// deserialize DatadogIntegrationUpdate
177+
try {
178+
boolean attemptParsing = true;
179+
// ensure that we respect type coercion as set on the client ObjectMapper
180+
if (DatadogIntegrationUpdate.class.equals(Integer.class)
181+
|| DatadogIntegrationUpdate.class.equals(Long.class)
182+
|| DatadogIntegrationUpdate.class.equals(Float.class)
183+
|| DatadogIntegrationUpdate.class.equals(Double.class)
184+
|| DatadogIntegrationUpdate.class.equals(Boolean.class)
185+
|| DatadogIntegrationUpdate.class.equals(String.class)) {
186+
attemptParsing = typeCoercion;
187+
if (!attemptParsing) {
188+
attemptParsing |=
189+
((DatadogIntegrationUpdate.class.equals(Integer.class)
190+
|| DatadogIntegrationUpdate.class.equals(Long.class))
191+
&& token == JsonToken.VALUE_NUMBER_INT);
192+
attemptParsing |=
193+
((DatadogIntegrationUpdate.class.equals(Float.class)
194+
|| DatadogIntegrationUpdate.class.equals(Double.class))
195+
&& (token == JsonToken.VALUE_NUMBER_FLOAT
196+
|| token == JsonToken.VALUE_NUMBER_INT));
197+
attemptParsing |=
198+
(DatadogIntegrationUpdate.class.equals(Boolean.class)
199+
&& (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
200+
attemptParsing |=
201+
(DatadogIntegrationUpdate.class.equals(String.class)
202+
&& token == JsonToken.VALUE_STRING);
203+
}
204+
}
205+
if (attemptParsing) {
206+
tmp = tree.traverse(jp.getCodec()).readValueAs(DatadogIntegrationUpdate.class);
207+
// TODO: there is no validation against JSON schema constraints
208+
// (min, max, enum, pattern...), this does not perform a strict JSON
209+
// validation, which means the 'match' count may be higher than it should be.
210+
if (!((DatadogIntegrationUpdate) tmp).unparsed) {
211+
deserialized = tmp;
212+
match++;
213+
}
214+
log.log(Level.FINER, "Input data matches schema 'DatadogIntegrationUpdate'");
215+
}
216+
} catch (Exception e) {
217+
// deserialization failed, continue
218+
log.log(Level.FINER, "Input data does not match schema 'DatadogIntegrationUpdate'", e);
219+
}
220+
176221
ActionConnectionIntegrationUpdate ret = new ActionConnectionIntegrationUpdate();
177222
if (match == 1) {
178223
ret.setActualInstance(deserialized);
@@ -213,9 +258,15 @@ public ActionConnectionIntegrationUpdate(HTTPIntegrationUpdate o) {
213258
setActualInstance(o);
214259
}
215260

261+
public ActionConnectionIntegrationUpdate(DatadogIntegrationUpdate o) {
262+
super("oneOf", Boolean.FALSE);
263+
setActualInstance(o);
264+
}
265+
216266
static {
217267
schemas.put("AWSIntegrationUpdate", new GenericType<AWSIntegrationUpdate>() {});
218268
schemas.put("HTTPIntegrationUpdate", new GenericType<HTTPIntegrationUpdate>() {});
269+
schemas.put("DatadogIntegrationUpdate", new GenericType<DatadogIntegrationUpdate>() {});
219270
JSON.registerDescendants(
220271
ActionConnectionIntegrationUpdate.class, Collections.unmodifiableMap(schemas));
221272
}
@@ -227,7 +278,8 @@ public Map<String, GenericType> getSchemas() {
227278

228279
/**
229280
* Set the instance that matches the oneOf child schema, check the instance parameter is valid
230-
* against the oneOf child schemas: AWSIntegrationUpdate, HTTPIntegrationUpdate
281+
* against the oneOf child schemas: AWSIntegrationUpdate, HTTPIntegrationUpdate,
282+
* DatadogIntegrationUpdate
231283
*
232284
* <p>It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a
233285
* composed schema (allOf, anyOf, oneOf).
@@ -242,20 +294,26 @@ public void setActualInstance(Object instance) {
242294
super.setActualInstance(instance);
243295
return;
244296
}
297+
if (JSON.isInstanceOf(DatadogIntegrationUpdate.class, instance, new HashSet<Class<?>>())) {
298+
super.setActualInstance(instance);
299+
return;
300+
}
245301

246302
if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet<Class<?>>())) {
247303
super.setActualInstance(instance);
248304
return;
249305
}
250306
throw new RuntimeException(
251-
"Invalid instance type. Must be AWSIntegrationUpdate, HTTPIntegrationUpdate");
307+
"Invalid instance type. Must be AWSIntegrationUpdate, HTTPIntegrationUpdate,"
308+
+ " DatadogIntegrationUpdate");
252309
}
253310

254311
/**
255312
* Get the actual instance, which can be the following: AWSIntegrationUpdate,
256-
* HTTPIntegrationUpdate
313+
* HTTPIntegrationUpdate, DatadogIntegrationUpdate
257314
*
258-
* @return The actual instance (AWSIntegrationUpdate, HTTPIntegrationUpdate)
315+
* @return The actual instance (AWSIntegrationUpdate, HTTPIntegrationUpdate,
316+
* DatadogIntegrationUpdate)
259317
*/
260318
@Override
261319
public Object getActualInstance() {
@@ -283,4 +341,15 @@ public AWSIntegrationUpdate getAWSIntegrationUpdate() throws ClassCastException
283341
public HTTPIntegrationUpdate getHTTPIntegrationUpdate() throws ClassCastException {
284342
return (HTTPIntegrationUpdate) super.getActualInstance();
285343
}
344+
345+
/**
346+
* Get the actual instance of `DatadogIntegrationUpdate`. If the actual instance is not
347+
* `DatadogIntegrationUpdate`, the ClassCastException will be thrown.
348+
*
349+
* @return The actual instance of `DatadogIntegrationUpdate`
350+
* @throws ClassCastException if the instance is not `DatadogIntegrationUpdate`
351+
*/
352+
public DatadogIntegrationUpdate getDatadogIntegrationUpdate() throws ClassCastException {
353+
return (DatadogIntegrationUpdate) super.getActualInstance();
354+
}
286355
}

0 commit comments

Comments
 (0)