Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "dc49df4",
"generated": "2025-07-18 13:58:47.478"
"spec_repo_commit": "0f24b8e",
"generated": "2025-07-18 16:54:34.251"
}
99 changes: 99 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2016,11 +2016,13 @@ components:
description: The definition of `ActionConnectionIntegration` object.
oneOf:
- $ref: '#/components/schemas/AWSIntegration'
- $ref: '#/components/schemas/DatadogIntegration'
- $ref: '#/components/schemas/HTTPIntegration'
ActionConnectionIntegrationUpdate:
description: The definition of `ActionConnectionIntegrationUpdate` object.
oneOf:
- $ref: '#/components/schemas/AWSIntegrationUpdate'
- $ref: '#/components/schemas/DatadogIntegrationUpdate'
- $ref: '#/components/schemas/HTTPIntegrationUpdate'
ActionQuery:
description: An action query. This query type is used to trigger an action,
Expand Down Expand Up @@ -12378,6 +12380,103 @@ components:
required:
- databaseMonitoringTrigger
type: object
DatadogAPIKey:
description: The definition of the `DatadogAPIKey` object.
properties:
api_key:
description: The `DatadogAPIKey` `api_key`.
example: ''
type: string
app_key:
description: The `DatadogAPIKey` `app_key`.
example: ''
type: string
datacenter:
description: The `DatadogAPIKey` `datacenter`.
example: ''
type: string
subdomain:
description: 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)).
type: string
type:
$ref: '#/components/schemas/DatadogAPIKeyType'
required:
- type
- datacenter
- api_key
- app_key
type: object
DatadogAPIKeyType:
description: The definition of the `DatadogAPIKey` object.
enum:
- DatadogAPIKey
example: DatadogAPIKey
type: string
x-enum-varnames:
- DATADOGAPIKEY
DatadogAPIKeyUpdate:
description: The definition of the `DatadogAPIKey` object.
properties:
api_key:
description: The `DatadogAPIKeyUpdate` `api_key`.
type: string
app_key:
description: The `DatadogAPIKeyUpdate` `app_key`.
type: string
datacenter:
description: The `DatadogAPIKeyUpdate` `datacenter`.
type: string
subdomain:
description: 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)).
type: string
type:
$ref: '#/components/schemas/DatadogAPIKeyType'
required:
- type
type: object
DatadogCredentials:
description: The definition of the `DatadogCredentials` object.
oneOf:
- $ref: '#/components/schemas/DatadogAPIKey'
DatadogCredentialsUpdate:
description: The definition of the `DatadogCredentialsUpdate` object.
oneOf:
- $ref: '#/components/schemas/DatadogAPIKeyUpdate'
DatadogIntegration:
description: The definition of the `DatadogIntegration` object.
properties:
credentials:
$ref: '#/components/schemas/DatadogCredentials'
type:
$ref: '#/components/schemas/DatadogIntegrationType'
required:
- type
- credentials
type: object
DatadogIntegrationType:
description: The definition of the `DatadogIntegrationType` object.
enum:
- Datadog
example: Datadog
type: string
x-enum-varnames:
- DATADOG
DatadogIntegrationUpdate:
description: The definition of the `DatadogIntegrationUpdate` object.
properties:
credentials:
$ref: '#/components/schemas/DatadogCredentialsUpdate'
type:
$ref: '#/components/schemas/DatadogIntegrationType'
required:
- type
type: object
Dataset:
description: Dataset object.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,50 @@ public ActionConnectionIntegration deserialize(JsonParser jp, DeserializationCon
log.log(Level.FINER, "Input data does not match schema 'AWSIntegration'", e);
}

// deserialize DatadogIntegration
try {
boolean attemptParsing = true;
// ensure that we respect type coercion as set on the client ObjectMapper
if (DatadogIntegration.class.equals(Integer.class)
|| DatadogIntegration.class.equals(Long.class)
|| DatadogIntegration.class.equals(Float.class)
|| DatadogIntegration.class.equals(Double.class)
|| DatadogIntegration.class.equals(Boolean.class)
|| DatadogIntegration.class.equals(String.class)) {
attemptParsing = typeCoercion;
if (!attemptParsing) {
attemptParsing |=
((DatadogIntegration.class.equals(Integer.class)
|| DatadogIntegration.class.equals(Long.class))
&& token == JsonToken.VALUE_NUMBER_INT);
attemptParsing |=
((DatadogIntegration.class.equals(Float.class)
|| DatadogIntegration.class.equals(Double.class))
&& (token == JsonToken.VALUE_NUMBER_FLOAT
|| token == JsonToken.VALUE_NUMBER_INT));
attemptParsing |=
(DatadogIntegration.class.equals(Boolean.class)
&& (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
attemptParsing |=
(DatadogIntegration.class.equals(String.class) && token == JsonToken.VALUE_STRING);
}
}
if (attemptParsing) {
tmp = tree.traverse(jp.getCodec()).readValueAs(DatadogIntegration.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
if (!((DatadogIntegration) tmp).unparsed) {
deserialized = tmp;
match++;
}
log.log(Level.FINER, "Input data matches schema 'DatadogIntegration'");
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'DatadogIntegration'", e);
}

// deserialize HTTPIntegration
try {
boolean attemptParsing = true;
Expand Down Expand Up @@ -203,13 +247,19 @@ public ActionConnectionIntegration(AWSIntegration o) {
setActualInstance(o);
}

public ActionConnectionIntegration(DatadogIntegration o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

public ActionConnectionIntegration(HTTPIntegration o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

static {
schemas.put("AWSIntegration", new GenericType<AWSIntegration>() {});
schemas.put("DatadogIntegration", new GenericType<DatadogIntegration>() {});
schemas.put("HTTPIntegration", new GenericType<HTTPIntegration>() {});
JSON.registerDescendants(
ActionConnectionIntegration.class, Collections.unmodifiableMap(schemas));
Expand All @@ -222,7 +272,7 @@ public Map<String, GenericType> getSchemas() {

/**
* Set the instance that matches the oneOf child schema, check the instance parameter is valid
* against the oneOf child schemas: AWSIntegration, HTTPIntegration
* against the oneOf child schemas: AWSIntegration, DatadogIntegration, HTTPIntegration
*
* <p>It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a
* composed schema (allOf, anyOf, oneOf).
Expand All @@ -233,6 +283,10 @@ public void setActualInstance(Object instance) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(DatadogIntegration.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(HTTPIntegration.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
Expand All @@ -242,13 +296,15 @@ public void setActualInstance(Object instance) {
super.setActualInstance(instance);
return;
}
throw new RuntimeException("Invalid instance type. Must be AWSIntegration, HTTPIntegration");
throw new RuntimeException(
"Invalid instance type. Must be AWSIntegration, DatadogIntegration, HTTPIntegration");
}

/**
* Get the actual instance, which can be the following: AWSIntegration, HTTPIntegration
* Get the actual instance, which can be the following: AWSIntegration, DatadogIntegration,
* HTTPIntegration
*
* @return The actual instance (AWSIntegration, HTTPIntegration)
* @return The actual instance (AWSIntegration, DatadogIntegration, HTTPIntegration)
*/
@Override
public Object getActualInstance() {
Expand All @@ -266,6 +322,17 @@ public AWSIntegration getAWSIntegration() throws ClassCastException {
return (AWSIntegration) super.getActualInstance();
}

/**
* Get the actual instance of `DatadogIntegration`. If the actual instance is not
* `DatadogIntegration`, the ClassCastException will be thrown.
*
* @return The actual instance of `DatadogIntegration`
* @throws ClassCastException if the instance is not `DatadogIntegration`
*/
public DatadogIntegration getDatadogIntegration() throws ClassCastException {
return (DatadogIntegration) super.getActualInstance();
}

/**
* Get the actual instance of `HTTPIntegration`. If the actual instance is not `HTTPIntegration`,
* the ClassCastException will be thrown.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,51 @@ public ActionConnectionIntegrationUpdate deserialize(JsonParser jp, Deserializat
log.log(Level.FINER, "Input data does not match schema 'AWSIntegrationUpdate'", e);
}

// deserialize DatadogIntegrationUpdate
try {
boolean attemptParsing = true;
// ensure that we respect type coercion as set on the client ObjectMapper
if (DatadogIntegrationUpdate.class.equals(Integer.class)
|| DatadogIntegrationUpdate.class.equals(Long.class)
|| DatadogIntegrationUpdate.class.equals(Float.class)
|| DatadogIntegrationUpdate.class.equals(Double.class)
|| DatadogIntegrationUpdate.class.equals(Boolean.class)
|| DatadogIntegrationUpdate.class.equals(String.class)) {
attemptParsing = typeCoercion;
if (!attemptParsing) {
attemptParsing |=
((DatadogIntegrationUpdate.class.equals(Integer.class)
|| DatadogIntegrationUpdate.class.equals(Long.class))
&& token == JsonToken.VALUE_NUMBER_INT);
attemptParsing |=
((DatadogIntegrationUpdate.class.equals(Float.class)
|| DatadogIntegrationUpdate.class.equals(Double.class))
&& (token == JsonToken.VALUE_NUMBER_FLOAT
|| token == JsonToken.VALUE_NUMBER_INT));
attemptParsing |=
(DatadogIntegrationUpdate.class.equals(Boolean.class)
&& (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
attemptParsing |=
(DatadogIntegrationUpdate.class.equals(String.class)
&& token == JsonToken.VALUE_STRING);
}
}
if (attemptParsing) {
tmp = tree.traverse(jp.getCodec()).readValueAs(DatadogIntegrationUpdate.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
if (!((DatadogIntegrationUpdate) tmp).unparsed) {
deserialized = tmp;
match++;
}
log.log(Level.FINER, "Input data matches schema 'DatadogIntegrationUpdate'");
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'DatadogIntegrationUpdate'", e);
}

// deserialize HTTPIntegrationUpdate
try {
boolean attemptParsing = true;
Expand Down Expand Up @@ -208,13 +253,19 @@ public ActionConnectionIntegrationUpdate(AWSIntegrationUpdate o) {
setActualInstance(o);
}

public ActionConnectionIntegrationUpdate(DatadogIntegrationUpdate o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

public ActionConnectionIntegrationUpdate(HTTPIntegrationUpdate o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

static {
schemas.put("AWSIntegrationUpdate", new GenericType<AWSIntegrationUpdate>() {});
schemas.put("DatadogIntegrationUpdate", new GenericType<DatadogIntegrationUpdate>() {});
schemas.put("HTTPIntegrationUpdate", new GenericType<HTTPIntegrationUpdate>() {});
JSON.registerDescendants(
ActionConnectionIntegrationUpdate.class, Collections.unmodifiableMap(schemas));
Expand All @@ -227,7 +278,8 @@ public Map<String, GenericType> getSchemas() {

/**
* Set the instance that matches the oneOf child schema, check the instance parameter is valid
* against the oneOf child schemas: AWSIntegrationUpdate, HTTPIntegrationUpdate
* against the oneOf child schemas: AWSIntegrationUpdate, DatadogIntegrationUpdate,
* HTTPIntegrationUpdate
*
* <p>It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a
* composed schema (allOf, anyOf, oneOf).
Expand All @@ -238,6 +290,10 @@ public void setActualInstance(Object instance) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(DatadogIntegrationUpdate.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(HTTPIntegrationUpdate.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
Expand All @@ -248,14 +304,16 @@ public void setActualInstance(Object instance) {
return;
}
throw new RuntimeException(
"Invalid instance type. Must be AWSIntegrationUpdate, HTTPIntegrationUpdate");
"Invalid instance type. Must be AWSIntegrationUpdate, DatadogIntegrationUpdate,"
+ " HTTPIntegrationUpdate");
}

/**
* Get the actual instance, which can be the following: AWSIntegrationUpdate,
* HTTPIntegrationUpdate
* DatadogIntegrationUpdate, HTTPIntegrationUpdate
*
* @return The actual instance (AWSIntegrationUpdate, HTTPIntegrationUpdate)
* @return The actual instance (AWSIntegrationUpdate, DatadogIntegrationUpdate,
* HTTPIntegrationUpdate)
*/
@Override
public Object getActualInstance() {
Expand All @@ -273,6 +331,17 @@ public AWSIntegrationUpdate getAWSIntegrationUpdate() throws ClassCastException
return (AWSIntegrationUpdate) super.getActualInstance();
}

/**
* Get the actual instance of `DatadogIntegrationUpdate`. If the actual instance is not
* `DatadogIntegrationUpdate`, the ClassCastException will be thrown.
*
* @return The actual instance of `DatadogIntegrationUpdate`
* @throws ClassCastException if the instance is not `DatadogIntegrationUpdate`
*/
public DatadogIntegrationUpdate getDatadogIntegrationUpdate() throws ClassCastException {
return (DatadogIntegrationUpdate) super.getActualInstance();
}

/**
* Get the actual instance of `HTTPIntegrationUpdate`. If the actual instance is not
* `HTTPIntegrationUpdate`, the ClassCastException will be thrown.
Expand Down
Loading