diff --git a/build.gradle b/build.gradle index 02bdd26..8c7bf5a 100644 --- a/build.gradle +++ b/build.gradle @@ -18,9 +18,10 @@ dependencies { api 'com.fasterxml.jackson.core:jackson-databind:2.17.2' api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' - api 'org.apache.commons:commons-text:1.13.1' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' + testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2' + api 'org.apache.commons:commons-text:1.13.1' } diff --git a/src/main/java/com/pipedream/api/types/Account.java b/src/main/java/com/pipedream/api/types/Account.java index 30c5157..695b457 100644 --- a/src/main/java/com/pipedream/api/types/Account.java +++ b/src/main/java/com/pipedream/api/types/Account.java @@ -17,11 +17,12 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Account.Builder.class) public final class Account { - private final Optional id; + private final String id; private final Optional name; @@ -50,7 +51,7 @@ public final class Account { private final Map additionalProperties; private Account( - Optional id, + String id, Optional name, Optional externalId, Optional healthy, @@ -84,7 +85,7 @@ private Account( * @return The unique ID of the account. */ @JsonProperty("id") - public Optional getId() { + public String getId() { return id; } @@ -231,43 +232,138 @@ public String toString() { return ObjectMappers.stringify(this); } - public static Builder builder() { + public static IdStage builder() { return new Builder(); } - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional id = Optional.empty(); + public interface IdStage { + /** + *

The unique ID of the account.

+ */ + _FinalStage id(@NotNull String id); - private Optional name = Optional.empty(); + Builder from(Account other); + } - private Optional externalId = Optional.empty(); + public interface _FinalStage { + Account build(); - private Optional healthy = Optional.empty(); + /** + *

The custom name of the account if set.

+ */ + _FinalStage name(Optional name); - private Optional dead = Optional.empty(); + _FinalStage name(String name); - private Optional app = Optional.empty(); + /** + *

The external ID associated with the account.

+ */ + _FinalStage externalId(Optional externalId); - private Optional createdAt = Optional.empty(); + _FinalStage externalId(String externalId); - private Optional updatedAt = Optional.empty(); + /** + *

Indicates if the account is healthy. Pipedream will periodically retry token refresh and test requests for unhealthy accounts

+ */ + _FinalStage healthy(Optional healthy); - private Optional> credentials = Optional.empty(); + _FinalStage healthy(Boolean healthy); - private Optional expiresAt = Optional.empty(); + /** + *

Indicates if the account is no longer active

+ */ + _FinalStage dead(Optional dead); - private Optional error = Optional.empty(); + _FinalStage dead(Boolean dead); - private Optional lastRefreshedAt = Optional.empty(); + _FinalStage app(Optional app); + + _FinalStage app(App app); + + /** + *

The date and time the account was created, an ISO 8601 formatted string

+ */ + _FinalStage createdAt(Optional createdAt); + + _FinalStage createdAt(OffsetDateTime createdAt); + + /** + *

The date and time the account was last updated, an ISO 8601 formatted string

+ */ + _FinalStage updatedAt(Optional updatedAt); + + _FinalStage updatedAt(OffsetDateTime updatedAt); + + /** + *

The credentials associated with the account, if the include_credentials parameter was set to true in the request

+ */ + _FinalStage credentials(Optional> credentials); + + _FinalStage credentials(Map credentials); + + /** + *

The date and time the account's credentials expiration, an ISO 8601 formatted string

+ */ + _FinalStage expiresAt(Optional expiresAt); + + _FinalStage expiresAt(OffsetDateTime expiresAt); + + /** + *

The error message if the account is unhealthy or dead, null otherwise

+ */ + _FinalStage error(Optional error); + + _FinalStage error(String error); + + /** + *

The date and time the account was last refreshed, an ISO 8601 formatted string

+ */ + _FinalStage lastRefreshedAt(Optional lastRefreshedAt); + + _FinalStage lastRefreshedAt(OffsetDateTime lastRefreshedAt); + + /** + *

The date and time the account will next be refreshed, an ISO 8601 formatted string

+ */ + _FinalStage nextRefreshAt(Optional nextRefreshAt); + + _FinalStage nextRefreshAt(OffsetDateTime nextRefreshAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, _FinalStage { + private String id; private Optional nextRefreshAt = Optional.empty(); + private Optional lastRefreshedAt = Optional.empty(); + + private Optional error = Optional.empty(); + + private Optional expiresAt = Optional.empty(); + + private Optional> credentials = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional app = Optional.empty(); + + private Optional dead = Optional.empty(); + + private Optional healthy = Optional.empty(); + + private Optional externalId = Optional.empty(); + + private Optional name = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} + @java.lang.Override public Builder from(Account other) { id(other.getId()); name(other.getName()); @@ -287,183 +383,250 @@ public Builder from(Account other) { /** *

The unique ID of the account.

+ *

The unique ID of the account.

+ * @return Reference to {@code this} so that method calls can be chained together. */ - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public Builder id(Optional id) { - this.id = id; - return this; - } - - public Builder id(String id) { - this.id = Optional.ofNullable(id); + @java.lang.Override + @JsonSetter("id") + public _FinalStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); return this; } /** - *

The custom name of the account if set.

+ *

The date and time the account will next be refreshed, an ISO 8601 formatted string

+ * @return Reference to {@code this} so that method calls can be chained together. */ - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public Builder name(Optional name) { - this.name = name; - return this; - } - - public Builder name(String name) { - this.name = Optional.ofNullable(name); + @java.lang.Override + public _FinalStage nextRefreshAt(OffsetDateTime nextRefreshAt) { + this.nextRefreshAt = Optional.ofNullable(nextRefreshAt); return this; } /** - *

The external ID associated with the account.

+ *

The date and time the account will next be refreshed, an ISO 8601 formatted string

*/ - @JsonSetter(value = "external_id", nulls = Nulls.SKIP) - public Builder externalId(Optional externalId) { - this.externalId = externalId; + @java.lang.Override + @JsonSetter(value = "next_refresh_at", nulls = Nulls.SKIP) + public _FinalStage nextRefreshAt(Optional nextRefreshAt) { + this.nextRefreshAt = nextRefreshAt; return this; } - public Builder externalId(String externalId) { - this.externalId = Optional.ofNullable(externalId); + /** + *

The date and time the account was last refreshed, an ISO 8601 formatted string

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage lastRefreshedAt(OffsetDateTime lastRefreshedAt) { + this.lastRefreshedAt = Optional.ofNullable(lastRefreshedAt); return this; } /** - *

Indicates if the account is healthy. Pipedream will periodically retry token refresh and test requests for unhealthy accounts

+ *

The date and time the account was last refreshed, an ISO 8601 formatted string

*/ - @JsonSetter(value = "healthy", nulls = Nulls.SKIP) - public Builder healthy(Optional healthy) { - this.healthy = healthy; + @java.lang.Override + @JsonSetter(value = "last_refreshed_at", nulls = Nulls.SKIP) + public _FinalStage lastRefreshedAt(Optional lastRefreshedAt) { + this.lastRefreshedAt = lastRefreshedAt; return this; } - public Builder healthy(Boolean healthy) { - this.healthy = Optional.ofNullable(healthy); + /** + *

The error message if the account is unhealthy or dead, null otherwise

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage error(String error) { + this.error = Optional.ofNullable(error); return this; } /** - *

Indicates if the account is no longer active

+ *

The error message if the account is unhealthy or dead, null otherwise

*/ - @JsonSetter(value = "dead", nulls = Nulls.SKIP) - public Builder dead(Optional dead) { - this.dead = dead; + @java.lang.Override + @JsonSetter(value = "error", nulls = Nulls.SKIP) + public _FinalStage error(Optional error) { + this.error = error; return this; } - public Builder dead(Boolean dead) { - this.dead = Optional.ofNullable(dead); + /** + *

The date and time the account's credentials expiration, an ISO 8601 formatted string

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage expiresAt(OffsetDateTime expiresAt) { + this.expiresAt = Optional.ofNullable(expiresAt); return this; } - @JsonSetter(value = "app", nulls = Nulls.SKIP) - public Builder app(Optional app) { - this.app = app; + /** + *

The date and time the account's credentials expiration, an ISO 8601 formatted string

+ */ + @java.lang.Override + @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) + public _FinalStage expiresAt(Optional expiresAt) { + this.expiresAt = expiresAt; return this; } - public Builder app(App app) { - this.app = Optional.ofNullable(app); + /** + *

The credentials associated with the account, if the include_credentials parameter was set to true in the request

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage credentials(Map credentials) { + this.credentials = Optional.ofNullable(credentials); return this; } /** - *

The date and time the account was created, an ISO 8601 formatted string

+ *

The credentials associated with the account, if the include_credentials parameter was set to true in the request

*/ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; + @java.lang.Override + @JsonSetter(value = "credentials", nulls = Nulls.SKIP) + public _FinalStage credentials(Optional> credentials) { + this.credentials = credentials; return this; } - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.ofNullable(createdAt); + /** + *

The date and time the account was last updated, an ISO 8601 formatted string

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = Optional.ofNullable(updatedAt); return this; } /** *

The date and time the account was last updated, an ISO 8601 formatted string

*/ + @java.lang.Override @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { + public _FinalStage updatedAt(Optional updatedAt) { this.updatedAt = updatedAt; return this; } - public Builder updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); + /** + *

The date and time the account was created, an ISO 8601 formatted string

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); return this; } /** - *

The credentials associated with the account, if the include_credentials parameter was set to true in the request

+ *

The date and time the account was created, an ISO 8601 formatted string

*/ - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(Optional> credentials) { - this.credentials = credentials; + @java.lang.Override + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public _FinalStage createdAt(Optional createdAt) { + this.createdAt = createdAt; return this; } - public Builder credentials(Map credentials) { - this.credentials = Optional.ofNullable(credentials); + @java.lang.Override + public _FinalStage app(App app) { + this.app = Optional.ofNullable(app); + return this; + } + + @java.lang.Override + @JsonSetter(value = "app", nulls = Nulls.SKIP) + public _FinalStage app(Optional app) { + this.app = app; return this; } /** - *

The date and time the account's credentials expiration, an ISO 8601 formatted string

+ *

Indicates if the account is no longer active

+ * @return Reference to {@code this} so that method calls can be chained together. */ - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; + @java.lang.Override + public _FinalStage dead(Boolean dead) { + this.dead = Optional.ofNullable(dead); return this; } - public Builder expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); + /** + *

Indicates if the account is no longer active

+ */ + @java.lang.Override + @JsonSetter(value = "dead", nulls = Nulls.SKIP) + public _FinalStage dead(Optional dead) { + this.dead = dead; return this; } /** - *

The error message if the account is unhealthy or dead, null otherwise

+ *

Indicates if the account is healthy. Pipedream will periodically retry token refresh and test requests for unhealthy accounts

+ * @return Reference to {@code this} so that method calls can be chained together. */ - @JsonSetter(value = "error", nulls = Nulls.SKIP) - public Builder error(Optional error) { - this.error = error; + @java.lang.Override + public _FinalStage healthy(Boolean healthy) { + this.healthy = Optional.ofNullable(healthy); return this; } - public Builder error(String error) { - this.error = Optional.ofNullable(error); + /** + *

Indicates if the account is healthy. Pipedream will periodically retry token refresh and test requests for unhealthy accounts

+ */ + @java.lang.Override + @JsonSetter(value = "healthy", nulls = Nulls.SKIP) + public _FinalStage healthy(Optional healthy) { + this.healthy = healthy; return this; } /** - *

The date and time the account was last refreshed, an ISO 8601 formatted string

+ *

The external ID associated with the account.

+ * @return Reference to {@code this} so that method calls can be chained together. */ - @JsonSetter(value = "last_refreshed_at", nulls = Nulls.SKIP) - public Builder lastRefreshedAt(Optional lastRefreshedAt) { - this.lastRefreshedAt = lastRefreshedAt; + @java.lang.Override + public _FinalStage externalId(String externalId) { + this.externalId = Optional.ofNullable(externalId); return this; } - public Builder lastRefreshedAt(OffsetDateTime lastRefreshedAt) { - this.lastRefreshedAt = Optional.ofNullable(lastRefreshedAt); + /** + *

The external ID associated with the account.

+ */ + @java.lang.Override + @JsonSetter(value = "external_id", nulls = Nulls.SKIP) + public _FinalStage externalId(Optional externalId) { + this.externalId = externalId; return this; } /** - *

The date and time the account will next be refreshed, an ISO 8601 formatted string

+ *

The custom name of the account if set.

+ * @return Reference to {@code this} so that method calls can be chained together. */ - @JsonSetter(value = "next_refresh_at", nulls = Nulls.SKIP) - public Builder nextRefreshAt(Optional nextRefreshAt) { - this.nextRefreshAt = nextRefreshAt; + @java.lang.Override + public _FinalStage name(String name) { + this.name = Optional.ofNullable(name); return this; } - public Builder nextRefreshAt(OffsetDateTime nextRefreshAt) { - this.nextRefreshAt = Optional.ofNullable(nextRefreshAt); + /** + *

The custom name of the account if set.

+ */ + @java.lang.Override + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public _FinalStage name(Optional name) { + this.name = name; return this; } + @java.lang.Override public Account build() { return new Account( id, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java index fb06fd0..0d8bc0e 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java @@ -84,11 +84,11 @@ public ConfigurablePropTimerDefault deserialize(JsonParser p, DeserializationCon Object value = p.readValueAs(Object.class); try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerInterval.class)); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerCron.class)); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerOption.java b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerOption.java index fd35583..c3b5cde 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerOption.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerOption.java @@ -84,11 +84,11 @@ public ConfigurablePropTimerOption deserialize(JsonParser p, DeserializationCont Object value = p.readValueAs(Object.class); try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerInterval.class)); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerCron.class)); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerStatic.java b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerStatic.java index 40f66ad..463398d 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerStatic.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerStatic.java @@ -84,11 +84,11 @@ public ConfigurablePropTimerStatic deserialize(JsonParser p, DeserializationCont Object value = p.readValueAs(Object.class); try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerInterval.class)); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerCron.class)); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { } throw new JsonParseException(p, "Failed to deserialize"); } diff --git a/src/main/java/com/pipedream/api/types/ConfigurePropOpts.java b/src/main/java/com/pipedream/api/types/ConfigurePropOpts.java index 86455a5..5c94b13 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurePropOpts.java +++ b/src/main/java/com/pipedream/api/types/ConfigurePropOpts.java @@ -33,8 +33,6 @@ public final class ConfigurePropOpts { private final Optional dynamicPropsId; - private final Optional asyncHandle; - private final Optional page; private final Optional> prevContext; @@ -50,7 +48,6 @@ private ConfigurePropOpts( Optional blocking, Optional> configuredProps, Optional dynamicPropsId, - Optional asyncHandle, Optional page, Optional> prevContext, Optional query, @@ -61,7 +58,6 @@ private ConfigurePropOpts( this.blocking = blocking; this.configuredProps = configuredProps; this.dynamicPropsId = dynamicPropsId; - this.asyncHandle = asyncHandle; this.page = page; this.prevContext = prevContext; this.query = query; @@ -116,14 +112,6 @@ public Optional getDynamicPropsId() { return dynamicPropsId; } - /** - * @return Handle for async operations - */ - @JsonProperty("async_handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - /** * @return Page number for paginated results */ @@ -166,7 +154,6 @@ private boolean equalTo(ConfigurePropOpts other) { && blocking.equals(other.blocking) && configuredProps.equals(other.configuredProps) && dynamicPropsId.equals(other.dynamicPropsId) - && asyncHandle.equals(other.asyncHandle) && page.equals(other.page) && prevContext.equals(other.prevContext) && query.equals(other.query); @@ -181,7 +168,6 @@ public int hashCode() { this.blocking, this.configuredProps, this.dynamicPropsId, - this.asyncHandle, this.page, this.prevContext, this.query); @@ -243,13 +229,6 @@ public interface _FinalStage { _FinalStage dynamicPropsId(String dynamicPropsId); - /** - *

Handle for async operations

- */ - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); - /** *

Page number for paginated results

*/ @@ -286,8 +265,6 @@ public static final class Builder implements IdStage, ExternalUserIdStage, PropN private Optional page = Optional.empty(); - private Optional asyncHandle = Optional.empty(); - private Optional dynamicPropsId = Optional.empty(); private Optional> configuredProps = Optional.empty(); @@ -307,7 +284,6 @@ public Builder from(ConfigurePropOpts other) { blocking(other.getBlocking()); configuredProps(other.getConfiguredProps()); dynamicPropsId(other.getDynamicPropsId()); - asyncHandle(other.getAsyncHandle()); page(other.getPage()); prevContext(other.getPrevContext()); query(other.getQuery()); @@ -410,26 +386,6 @@ public _FinalStage page(Optional page) { return this; } - /** - *

Handle for async operations

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - /** - *

Handle for async operations

- */ - @java.lang.Override - @JsonSetter(value = "async_handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - /** *

The ID for dynamic props

* @return Reference to {@code this} so that method calls can be chained together. @@ -499,7 +455,6 @@ public ConfigurePropOpts build() { blocking, configuredProps, dynamicPropsId, - asyncHandle, page, prevContext, query, diff --git a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java index a70aad0..51444f7 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java +++ b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java @@ -27,8 +27,6 @@ public final class ConfigurePropResponse { private final Optional> observations; - private final Optional asyncHandle; - private final Optional> context; private final Optional> errors; @@ -39,14 +37,12 @@ private ConfigurePropResponse( Optional> options, Optional> stringOptions, Optional> observations, - Optional asyncHandle, Optional> context, Optional> errors, Map additionalProperties) { this.options = options; this.stringOptions = stringOptions; this.observations = observations; - this.asyncHandle = asyncHandle; this.context = context; this.errors = errors; this.additionalProperties = additionalProperties; @@ -76,14 +72,6 @@ public Optional> getObservations() { return observations; } - /** - * @return Handle for async operations - */ - @JsonProperty("async_handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - /** * @return New context after configuring the prop */ @@ -115,15 +103,13 @@ private boolean equalTo(ConfigurePropResponse other) { return options.equals(other.options) && stringOptions.equals(other.stringOptions) && observations.equals(other.observations) - && asyncHandle.equals(other.asyncHandle) && context.equals(other.context) && errors.equals(other.errors); } @java.lang.Override public int hashCode() { - return Objects.hash( - this.options, this.stringOptions, this.observations, this.asyncHandle, this.context, this.errors); + return Objects.hash(this.options, this.stringOptions, this.observations, this.context, this.errors); } @java.lang.Override @@ -143,8 +129,6 @@ public static final class Builder { private Optional> observations = Optional.empty(); - private Optional asyncHandle = Optional.empty(); - private Optional> context = Optional.empty(); private Optional> errors = Optional.empty(); @@ -158,7 +142,6 @@ public Builder from(ConfigurePropResponse other) { options(other.getOptions()); stringOptions(other.getStringOptions()); observations(other.getObservations()); - asyncHandle(other.getAsyncHandle()); context(other.getContext()); errors(other.getErrors()); return this; @@ -206,20 +189,6 @@ public Builder observations(Map observations) { return this; } - /** - *

Handle for async operations

- */ - @JsonSetter(value = "async_handle", nulls = Nulls.SKIP) - public Builder asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - - public Builder asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - /** *

New context after configuring the prop

*/ @@ -250,7 +219,7 @@ public Builder errors(List errors) { public ConfigurePropResponse build() { return new ConfigurePropResponse( - options, stringOptions, observations, asyncHandle, context, errors, additionalProperties); + options, stringOptions, observations, context, errors, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/types/ReloadPropsOpts.java b/src/main/java/com/pipedream/api/types/ReloadPropsOpts.java index c10ebce..2b06ac8 100644 --- a/src/main/java/com/pipedream/api/types/ReloadPropsOpts.java +++ b/src/main/java/com/pipedream/api/types/ReloadPropsOpts.java @@ -31,8 +31,6 @@ public final class ReloadPropsOpts { private final Optional dynamicPropsId; - private final Optional asyncHandle; - private final Map additionalProperties; private ReloadPropsOpts( @@ -41,14 +39,12 @@ private ReloadPropsOpts( Optional blocking, Optional> configuredProps, Optional dynamicPropsId, - Optional asyncHandle, Map additionalProperties) { this.id = id; this.externalUserId = externalUserId; this.blocking = blocking; this.configuredProps = configuredProps; this.dynamicPropsId = dynamicPropsId; - this.asyncHandle = asyncHandle; this.additionalProperties = additionalProperties; } @@ -92,14 +88,6 @@ public Optional getDynamicPropsId() { return dynamicPropsId; } - /** - * @return Handle for async operations - */ - @JsonProperty("async_handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -116,19 +104,12 @@ private boolean equalTo(ReloadPropsOpts other) { && externalUserId.equals(other.externalUserId) && blocking.equals(other.blocking) && configuredProps.equals(other.configuredProps) - && dynamicPropsId.equals(other.dynamicPropsId) - && asyncHandle.equals(other.asyncHandle); + && dynamicPropsId.equals(other.dynamicPropsId); } @java.lang.Override public int hashCode() { - return Objects.hash( - this.id, - this.externalUserId, - this.blocking, - this.configuredProps, - this.dynamicPropsId, - this.asyncHandle); + return Objects.hash(this.id, this.externalUserId, this.blocking, this.configuredProps, this.dynamicPropsId); } @java.lang.Override @@ -179,13 +160,6 @@ public interface _FinalStage { _FinalStage dynamicPropsId(Optional dynamicPropsId); _FinalStage dynamicPropsId(String dynamicPropsId); - - /** - *

Handle for async operations

- */ - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -194,8 +168,6 @@ public static final class Builder implements IdStage, ExternalUserIdStage, _Fina private String externalUserId; - private Optional asyncHandle = Optional.empty(); - private Optional dynamicPropsId = Optional.empty(); private Optional> configuredProps = Optional.empty(); @@ -214,7 +186,6 @@ public Builder from(ReloadPropsOpts other) { blocking(other.getBlocking()); configuredProps(other.getConfiguredProps()); dynamicPropsId(other.getDynamicPropsId()); - asyncHandle(other.getAsyncHandle()); return this; } @@ -242,26 +213,6 @@ public _FinalStage externalUserId(@NotNull String externalUserId) { return this; } - /** - *

Handle for async operations

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - /** - *

Handle for async operations

- */ - @java.lang.Override - @JsonSetter(value = "async_handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - /** *

The ID for dynamic props

* @return Reference to {@code this} so that method calls can be chained together. @@ -325,7 +276,7 @@ public _FinalStage blocking(Optional blocking) { @java.lang.Override public ReloadPropsOpts build() { return new ReloadPropsOpts( - id, externalUserId, blocking, configuredProps, dynamicPropsId, asyncHandle, additionalProperties); + id, externalUserId, blocking, configuredProps, dynamicPropsId, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/types/RunActionOptsStashId.java b/src/main/java/com/pipedream/api/types/RunActionOptsStashId.java index 438705f..8a85ab9 100644 --- a/src/main/java/com/pipedream/api/types/RunActionOptsStashId.java +++ b/src/main/java/com/pipedream/api/types/RunActionOptsStashId.java @@ -105,11 +105,11 @@ public RunActionOptsStashId deserialize(JsonParser p, DeserializationContext con Object value = p.readValueAs(Object.class); try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (IllegalArgumentException e) { + } catch (RuntimeException e) { } if (value instanceof Boolean) { return of((Boolean) value);