From d67702c066499197fdf608c001c85401677b816d Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 22:59:08 +0000 Subject: [PATCH] SDK regeneration --- README.md | 2 +- build.gradle | 4 +- .../com/pipedream/api/core/ClientOptions.java | 4 +- .../actions/types/RunActionOptsStashId.java | 32 +- .../tokens/AsyncRawTokensClient.java | 4 +- .../api/resources/tokens/RawTokensClient.java | 4 +- .../java/com/pipedream/api/types/App.java | 13 - .../com/pipedream/api/types/Component.java | 13 - .../api/types/ConfigurablePropAlert.java | 29 +- ...pe.java => ConfigurablePropAlertType.java} | 4 +- .../api/types/ConfigurePropResponse.java | 133 +++++++- .../api/types/ConnectTokenCreateOpts.java | 301 ------------------ .../api/types/ConnectTokenResponse.java | 183 ----------- .../api/types/CreateBrowserClientOpts.java | 101 ------ .../api/types/CreateTokenResponse.java | 11 - .../api/types/ProjectInfoResponse.java | 14 +- ...sItem.java => ProjectInfoResponseApp.java} | 85 ++--- .../api/types/RunActionResponse.java | 6 - 18 files changed, 210 insertions(+), 733 deletions(-) rename src/main/java/com/pipedream/api/types/{ConfigurablePropAlertAlertType.java => ConfigurablePropAlertType.java} (81%) delete mode 100644 src/main/java/com/pipedream/api/types/ConnectTokenCreateOpts.java delete mode 100644 src/main/java/com/pipedream/api/types/ConnectTokenResponse.java delete mode 100644 src/main/java/com/pipedream/api/types/CreateBrowserClientOpts.java rename src/main/java/com/pipedream/api/types/{ProjectInfoResponseAppsItem.java => ProjectInfoResponseApp.java} (54%) diff --git a/README.md b/README.md index 57b37a1..a52dbc3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file: com.pipedream pipedream - 1.0.1 + 1.0.2 ``` diff --git a/build.gradle b/build.gradle index 61f024a..02bdd26 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ java { group = 'com.pipedream' -version = '1.0.1' +version = '1.0.2' jar { dependsOn(":generatePomFileForMavenPublication") @@ -78,7 +78,7 @@ publishing { maven(MavenPublication) { groupId = 'com.pipedream' artifactId = 'pipedream' - version = '1.0.1' + version = '1.0.2' from components.java pom { name = 'pipedream' diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java index 534a35d..71fa012 100644 --- a/src/main/java/com/pipedream/api/core/ClientOptions.java +++ b/src/main/java/com/pipedream/api/core/ClientOptions.java @@ -35,10 +35,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.pipedream:pipedream/1.0.1"); + put("User-Agent", "com.pipedream:pipedream/1.0.2"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk"); - put("X-Fern-SDK-Version", "1.0.1"); + put("X-Fern-SDK-Version", "1.0.2"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java b/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java index 9da7ae6..e9ba960 100644 --- a/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java +++ b/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java @@ -6,12 +6,14 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.pipedream.api.core.ObjectMappers; import java.io.IOException; import java.util.Objects; +import java.util.Optional; @JsonDeserialize(using = RunActionOptsStashId.Deserializer.class) public final class RunActionOptsStashId { @@ -32,8 +34,10 @@ public Object get() { @SuppressWarnings("unchecked") public T visit(Visitor visitor) { if (this.type == 0) { - return visitor.visit((String) this.value); + return visitor.visit((Optional) this.value); } else if (this.type == 1) { + return visitor.visit((String) this.value); + } else if (this.type == 2) { return visitor.visit((boolean) this.value); } throw new IllegalStateException("Failed to visit value. This should never happen."); @@ -59,15 +63,33 @@ public String toString() { return this.value.toString(); } - public static RunActionOptsStashId of(String value) { + public static RunActionOptsStashId of(Optional value) { return new RunActionOptsStashId(value, 0); } - public static RunActionOptsStashId of(boolean value) { + /** + * @param value must be one of the following: + *
    + *
  • "NEW"
  • + *
+ */ + public static RunActionOptsStashId of(String value) { return new RunActionOptsStashId(value, 1); } + public static RunActionOptsStashId of(boolean value) { + return new RunActionOptsStashId(value, 2); + } + public interface Visitor { + T visit(Optional value); + + /** + * @param value must be one of the following: + *
    + *
  • "NEW"
  • + *
+ */ T visit(String value); T visit(boolean value); @@ -81,6 +103,10 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public RunActionOptsStashId deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); + } catch (IllegalArgumentException e) { + } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); } catch (IllegalArgumentException e) { diff --git a/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java b/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java index e6f7c8c..840f84b 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java @@ -110,9 +110,7 @@ public CompletableFuture> validate String ctok, TokensValidateRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("v1/connect") - .addPathSegment(clientOptions.projectId()) - .addPathSegments("tokens") + .addPathSegments("v1/connect/tokens") .addPathSegment(ctok) .addPathSegments("validate"); if (request.getParams().isPresent()) { diff --git a/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java b/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java index 7b0a9de..e560d15 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java @@ -91,9 +91,7 @@ public BaseClientHttpResponse validate( String ctok, TokensValidateRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("v1/connect") - .addPathSegment(clientOptions.projectId()) - .addPathSegments("tokens") + .addPathSegments("v1/connect/tokens") .addPathSegment(ctok) .addPathSegments("validate"); if (request.getParams().isPresent()) { diff --git a/src/main/java/com/pipedream/api/types/App.java b/src/main/java/com/pipedream/api/types/App.java index 2983820..ea4a85d 100644 --- a/src/main/java/com/pipedream/api/types/App.java +++ b/src/main/java/com/pipedream/api/types/App.java @@ -90,9 +90,6 @@ public String getName() { return name; } - /** - * @return The authentication type used by the app - */ @JsonProperty("auth_type") public Optional getAuthType() { return authType; @@ -224,9 +221,6 @@ public interface _FinalStage { _FinalStage id(String id); - /** - *

The authentication type used by the app

- */ _FinalStage authType(Optional authType); _FinalStage authType(AppAuthType authType); @@ -414,19 +408,12 @@ public _FinalStage description(Optional description) { return this; } - /** - *

The authentication type used by the app

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

The authentication type used by the app

- */ @java.lang.Override @JsonSetter(value = "auth_type", nulls = Nulls.SKIP) public _FinalStage authType(Optional authType) { diff --git a/src/main/java/com/pipedream/api/types/Component.java b/src/main/java/com/pipedream/api/types/Component.java index 95cbe86..ff06b8e 100644 --- a/src/main/java/com/pipedream/api/types/Component.java +++ b/src/main/java/com/pipedream/api/types/Component.java @@ -103,9 +103,6 @@ public Optional getComponentType() { return componentType; } - /** - * @return Indicates if a File Stash ID is optional or required to run the component - */ @JsonProperty("stash") public Optional getStash() { return stash; @@ -199,9 +196,6 @@ public interface _FinalStage { _FinalStage componentType(String componentType); - /** - *

Indicates if a File Stash ID is optional or required to run the component

- */ _FinalStage stash(Optional stash); _FinalStage stash(ComponentStash stash); @@ -276,19 +270,12 @@ public _FinalStage version(@NotNull String version) { return this; } - /** - *

Indicates if a File Stash ID is optional or required to run the component

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

Indicates if a File Stash ID is optional or required to run the component

- */ @java.lang.Override @JsonSetter(value = "stash", nulls = Nulls.SKIP) public _FinalStage stash(Optional stash) { diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java index 7a9ccb6..23b4bb3 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java @@ -23,7 +23,7 @@ public final class ConfigurablePropAlert { private final Optional type; - private final Optional alertType; + private final Optional alertType; private final Optional content; @@ -51,7 +51,7 @@ public final class ConfigurablePropAlert { private ConfigurablePropAlert( Optional type, - Optional alertType, + Optional alertType, Optional content, String name, Optional label, @@ -85,11 +85,8 @@ public Optional getType() { return type; } - /** - * @return The severity level of the alert. - */ @JsonProperty("alertType") - public Optional getAlertType() { + public Optional getAlertType() { return alertType; } @@ -251,12 +248,9 @@ public interface _FinalStage { _FinalStage type(String type); - /** - *

The severity level of the alert.

- */ - _FinalStage alertType(Optional alertType); + _FinalStage alertType(Optional alertType); - _FinalStage alertType(ConfigurablePropAlertAlertType alertType); + _FinalStage alertType(ConfigurablePropAlertType alertType); /** *

The content of the alert, which can include HTML or plain text.

@@ -353,7 +347,7 @@ public static final class Builder implements NameStage, _FinalStage { private Optional content = Optional.empty(); - private Optional alertType = Optional.empty(); + private Optional alertType = Optional.empty(); private Optional type = Optional.empty(); @@ -592,22 +586,15 @@ public _FinalStage content(Optional content) { return this; } - /** - *

The severity level of the alert.

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

The severity level of the alert.

- */ @java.lang.Override @JsonSetter(value = "alertType", nulls = Nulls.SKIP) - public _FinalStage alertType(Optional alertType) { + public _FinalStage alertType(Optional alertType) { this.alertType = alertType; return this; } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAlertAlertType.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAlertType.java similarity index 81% rename from src/main/java/com/pipedream/api/types/ConfigurablePropAlertAlertType.java rename to src/main/java/com/pipedream/api/types/ConfigurablePropAlertType.java index 539ca52..33b65bd 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAlertAlertType.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAlertType.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonValue; -public enum ConfigurablePropAlertAlertType { +public enum ConfigurablePropAlertType { INFO("info"), NEUTRAL("neutral"), @@ -16,7 +16,7 @@ public enum ConfigurablePropAlertAlertType { private final String value; - ConfigurablePropAlertAlertType(String value) { + ConfigurablePropAlertType(String value) { this.value = value; } diff --git a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java index 6c1a6af..a70aad0 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java +++ b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java @@ -23,27 +23,75 @@ public final class ConfigurePropResponse { private final Optional> options; + private final Optional> stringOptions; + + private final Optional> observations; + + private final Optional asyncHandle; + + private final Optional> context; + private final Optional> errors; private final Map additionalProperties; 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; } /** - * @return Available options for the configured prop + * @return Available options (with labels) for the configured prop */ @JsonProperty("options") public Optional> getOptions() { return options; } + /** + * @return Available options for the configured prop + */ + @JsonProperty("string_options") + public Optional> getStringOptions() { + return stringOptions; + } + + /** + * @return Any logs produced during the configuration of the prop + */ + @JsonProperty("observations") + 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 + */ + @JsonProperty("context") + public Optional> getContext() { + return context; + } + /** * @return Any errors that occurred during configuration */ @@ -64,12 +112,18 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurePropResponse other) { - return options.equals(other.options) && errors.equals(other.errors); + 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.errors); + return Objects.hash( + this.options, this.stringOptions, this.observations, this.asyncHandle, this.context, this.errors); } @java.lang.Override @@ -85,6 +139,14 @@ public static Builder builder() { public static final class Builder { private Optional> options = Optional.empty(); + private Optional> stringOptions = Optional.empty(); + + private Optional> observations = Optional.empty(); + + private Optional asyncHandle = Optional.empty(); + + private Optional> context = Optional.empty(); + private Optional> errors = Optional.empty(); @JsonAnySetter @@ -94,12 +156,16 @@ private Builder() {} 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; } /** - *

Available options for the configured prop

+ *

Available options (with labels) for the configured prop

*/ @JsonSetter(value = "options", nulls = Nulls.SKIP) public Builder options(Optional> options) { @@ -112,6 +178,62 @@ public Builder options(List options) { return this; } + /** + *

Available options for the configured prop

+ */ + @JsonSetter(value = "string_options", nulls = Nulls.SKIP) + public Builder stringOptions(Optional> stringOptions) { + this.stringOptions = stringOptions; + return this; + } + + public Builder stringOptions(List stringOptions) { + this.stringOptions = Optional.ofNullable(stringOptions); + return this; + } + + /** + *

Any logs produced during the configuration of the prop

+ */ + @JsonSetter(value = "observations", nulls = Nulls.SKIP) + public Builder observations(Optional> observations) { + this.observations = observations; + return this; + } + + public Builder observations(Map observations) { + this.observations = Optional.ofNullable(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

+ */ + @JsonSetter(value = "context", nulls = Nulls.SKIP) + public Builder context(Optional> context) { + this.context = context; + return this; + } + + public Builder context(Map context) { + this.context = Optional.ofNullable(context); + return this; + } + /** *

Any errors that occurred during configuration

*/ @@ -127,7 +249,8 @@ public Builder errors(List errors) { } public ConfigurePropResponse build() { - return new ConfigurePropResponse(options, errors, additionalProperties); + return new ConfigurePropResponse( + options, stringOptions, observations, asyncHandle, context, errors, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/types/ConnectTokenCreateOpts.java b/src/main/java/com/pipedream/api/types/ConnectTokenCreateOpts.java deleted file mode 100644 index fa61409..0000000 --- a/src/main/java/com/pipedream/api/types/ConnectTokenCreateOpts.java +++ /dev/null @@ -1,301 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.pipedream.api.core.ObjectMappers; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectTokenCreateOpts.Builder.class) -public final class ConnectTokenCreateOpts { - private final String externalUserId; - - private final Optional> allowedOrigins; - - private final Optional errorRedirectUri; - - private final Optional successRedirectUri; - - private final Optional webhookUri; - - private final Map additionalProperties; - - private ConnectTokenCreateOpts( - String externalUserId, - Optional> allowedOrigins, - Optional errorRedirectUri, - Optional successRedirectUri, - Optional webhookUri, - Map additionalProperties) { - this.externalUserId = externalUserId; - this.allowedOrigins = allowedOrigins; - this.errorRedirectUri = errorRedirectUri; - this.successRedirectUri = successRedirectUri; - this.webhookUri = webhookUri; - this.additionalProperties = additionalProperties; - } - - /** - * @return Your end user ID, for whom you're creating the token - */ - @JsonProperty("external_user_id") - public String getExternalUserId() { - return externalUserId; - } - - /** - * @return List of allowed origins for CORS - */ - @JsonProperty("allowed_origins") - public Optional> getAllowedOrigins() { - return allowedOrigins; - } - - /** - * @return URI to redirect to on error - */ - @JsonProperty("error_redirect_uri") - public Optional getErrorRedirectUri() { - return errorRedirectUri; - } - - /** - * @return URI to redirect to on success - */ - @JsonProperty("success_redirect_uri") - public Optional getSuccessRedirectUri() { - return successRedirectUri; - } - - /** - * @return Webhook URI for notifications - */ - @JsonProperty("webhook_uri") - public Optional getWebhookUri() { - return webhookUri; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectTokenCreateOpts && equalTo((ConnectTokenCreateOpts) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectTokenCreateOpts other) { - return externalUserId.equals(other.externalUserId) - && allowedOrigins.equals(other.allowedOrigins) - && errorRedirectUri.equals(other.errorRedirectUri) - && successRedirectUri.equals(other.successRedirectUri) - && webhookUri.equals(other.webhookUri); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.externalUserId, - this.allowedOrigins, - this.errorRedirectUri, - this.successRedirectUri, - this.webhookUri); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ExternalUserIdStage builder() { - return new Builder(); - } - - public interface ExternalUserIdStage { - /** - *

Your end user ID, for whom you're creating the token

- */ - _FinalStage externalUserId(@NotNull String externalUserId); - - Builder from(ConnectTokenCreateOpts other); - } - - public interface _FinalStage { - ConnectTokenCreateOpts build(); - - /** - *

List of allowed origins for CORS

- */ - _FinalStage allowedOrigins(Optional> allowedOrigins); - - _FinalStage allowedOrigins(List allowedOrigins); - - /** - *

URI to redirect to on error

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

URI to redirect to on success

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

Webhook URI for notifications

- */ - _FinalStage webhookUri(Optional webhookUri); - - _FinalStage webhookUri(String webhookUri); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ExternalUserIdStage, _FinalStage { - private String externalUserId; - - private Optional webhookUri = Optional.empty(); - - private Optional successRedirectUri = Optional.empty(); - - private Optional errorRedirectUri = Optional.empty(); - - private Optional> allowedOrigins = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectTokenCreateOpts other) { - externalUserId(other.getExternalUserId()); - allowedOrigins(other.getAllowedOrigins()); - errorRedirectUri(other.getErrorRedirectUri()); - successRedirectUri(other.getSuccessRedirectUri()); - webhookUri(other.getWebhookUri()); - return this; - } - - /** - *

Your end user ID, for whom you're creating the token

- *

Your end user ID, for whom you're creating the token

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("external_user_id") - public _FinalStage externalUserId(@NotNull String externalUserId) { - this.externalUserId = Objects.requireNonNull(externalUserId, "externalUserId must not be null"); - return this; - } - - /** - *

Webhook URI for notifications

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

Webhook URI for notifications

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

URI to redirect to on success

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

URI to redirect to on success

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

URI to redirect to on error

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

URI to redirect to on error

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

List of allowed origins for CORS

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

List of allowed origins for CORS

- */ - @java.lang.Override - @JsonSetter(value = "allowed_origins", nulls = Nulls.SKIP) - public _FinalStage allowedOrigins(Optional> allowedOrigins) { - this.allowedOrigins = allowedOrigins; - return this; - } - - @java.lang.Override - public ConnectTokenCreateOpts build() { - return new ConnectTokenCreateOpts( - externalUserId, - allowedOrigins, - errorRedirectUri, - successRedirectUri, - webhookUri, - additionalProperties); - } - } -} diff --git a/src/main/java/com/pipedream/api/types/ConnectTokenResponse.java b/src/main/java/com/pipedream/api/types/ConnectTokenResponse.java deleted file mode 100644 index 76aac12..0000000 --- a/src/main/java/com/pipedream/api/types/ConnectTokenResponse.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.pipedream.api.core.ObjectMappers; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectTokenResponse.Builder.class) -public final class ConnectTokenResponse { - private final String connectLinkUrl; - - private final OffsetDateTime expiresAt; - - private final String token; - - private final Map additionalProperties; - - private ConnectTokenResponse( - String connectLinkUrl, OffsetDateTime expiresAt, String token, Map additionalProperties) { - this.connectLinkUrl = connectLinkUrl; - this.expiresAt = expiresAt; - this.token = token; - this.additionalProperties = additionalProperties; - } - - /** - * @return The Connect Link URL - */ - @JsonProperty("connect_link_url") - public String getConnectLinkUrl() { - return connectLinkUrl; - } - - /** - * @return The expiration time of the token in ISO 8601 format - */ - @JsonProperty("expires_at") - public OffsetDateTime getExpiresAt() { - return expiresAt; - } - - /** - * @return The generated token - */ - @JsonProperty("token") - public String getToken() { - return token; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectTokenResponse && equalTo((ConnectTokenResponse) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectTokenResponse other) { - return connectLinkUrl.equals(other.connectLinkUrl) - && expiresAt.equals(other.expiresAt) - && token.equals(other.token); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectLinkUrl, this.expiresAt, this.token); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectLinkUrlStage builder() { - return new Builder(); - } - - public interface ConnectLinkUrlStage { - /** - *

The Connect Link URL

- */ - ExpiresAtStage connectLinkUrl(@NotNull String connectLinkUrl); - - Builder from(ConnectTokenResponse other); - } - - public interface ExpiresAtStage { - /** - *

The expiration time of the token in ISO 8601 format

- */ - TokenStage expiresAt(@NotNull OffsetDateTime expiresAt); - } - - public interface TokenStage { - /** - *

The generated token

- */ - _FinalStage token(@NotNull String token); - } - - public interface _FinalStage { - ConnectTokenResponse build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectLinkUrlStage, ExpiresAtStage, TokenStage, _FinalStage { - private String connectLinkUrl; - - private OffsetDateTime expiresAt; - - private String token; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectTokenResponse other) { - connectLinkUrl(other.getConnectLinkUrl()); - expiresAt(other.getExpiresAt()); - token(other.getToken()); - return this; - } - - /** - *

The Connect Link URL

- *

The Connect Link URL

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("connect_link_url") - public ExpiresAtStage connectLinkUrl(@NotNull String connectLinkUrl) { - this.connectLinkUrl = Objects.requireNonNull(connectLinkUrl, "connectLinkUrl must not be null"); - return this; - } - - /** - *

The expiration time of the token in ISO 8601 format

- *

The expiration time of the token in ISO 8601 format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("expires_at") - public TokenStage expiresAt(@NotNull OffsetDateTime expiresAt) { - this.expiresAt = Objects.requireNonNull(expiresAt, "expiresAt must not be null"); - return this; - } - - /** - *

The generated token

- *

The generated token

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("token") - public _FinalStage token(@NotNull String token) { - this.token = Objects.requireNonNull(token, "token must not be null"); - return this; - } - - @java.lang.Override - public ConnectTokenResponse build() { - return new ConnectTokenResponse(connectLinkUrl, expiresAt, token, additionalProperties); - } - } -} diff --git a/src/main/java/com/pipedream/api/types/CreateBrowserClientOpts.java b/src/main/java/com/pipedream/api/types/CreateBrowserClientOpts.java deleted file mode 100644 index 96af1a4..0000000 --- a/src/main/java/com/pipedream/api/types/CreateBrowserClientOpts.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.pipedream.api.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateBrowserClientOpts.Builder.class) -public final class CreateBrowserClientOpts { - private final Optional apiUrl; - - private final Map additionalProperties; - - private CreateBrowserClientOpts(Optional apiUrl, Map additionalProperties) { - this.apiUrl = apiUrl; - this.additionalProperties = additionalProperties; - } - - /** - * @return The API URL to use - */ - @JsonProperty("api_url") - public Optional getApiUrl() { - return apiUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateBrowserClientOpts && equalTo((CreateBrowserClientOpts) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateBrowserClientOpts other) { - return apiUrl.equals(other.apiUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.apiUrl); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional apiUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateBrowserClientOpts other) { - apiUrl(other.getApiUrl()); - return this; - } - - /** - *

The API URL to use

- */ - @JsonSetter(value = "api_url", nulls = Nulls.SKIP) - public Builder apiUrl(Optional apiUrl) { - this.apiUrl = apiUrl; - return this; - } - - public Builder apiUrl(String apiUrl) { - this.apiUrl = Optional.ofNullable(apiUrl); - return this; - } - - public CreateBrowserClientOpts build() { - return new CreateBrowserClientOpts(apiUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/pipedream/api/types/CreateTokenResponse.java b/src/main/java/com/pipedream/api/types/CreateTokenResponse.java index 4ce6161..ea87232 100644 --- a/src/main/java/com/pipedream/api/types/CreateTokenResponse.java +++ b/src/main/java/com/pipedream/api/types/CreateTokenResponse.java @@ -52,9 +52,6 @@ public OffsetDateTime getExpiresAt() { return expiresAt; } - /** - * @return The generated token - */ @JsonProperty("token") public String getToken() { return token; @@ -108,9 +105,6 @@ public interface ExpiresAtStage { } public interface TokenStage { - /** - *

The generated token

- */ _FinalStage token(@NotNull String token); } @@ -163,11 +157,6 @@ public TokenStage expiresAt(@NotNull OffsetDateTime expiresAt) { return this; } - /** - *

The generated token

- *

The generated token

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("token") public _FinalStage token(@NotNull String token) { diff --git a/src/main/java/com/pipedream/api/types/ProjectInfoResponse.java b/src/main/java/com/pipedream/api/types/ProjectInfoResponse.java index c3f66ca..1ffa323 100644 --- a/src/main/java/com/pipedream/api/types/ProjectInfoResponse.java +++ b/src/main/java/com/pipedream/api/types/ProjectInfoResponse.java @@ -21,17 +21,17 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ProjectInfoResponse.Builder.class) public final class ProjectInfoResponse { - private final List apps; + private final List apps; private final Map additionalProperties; - private ProjectInfoResponse(List apps, Map additionalProperties) { + private ProjectInfoResponse(List apps, Map additionalProperties) { this.apps = apps; this.additionalProperties = additionalProperties; } @JsonProperty("apps") - public List getApps() { + public List getApps() { return apps; } @@ -66,7 +66,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private List apps = new ArrayList<>(); + private List apps = new ArrayList<>(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -79,18 +79,18 @@ public Builder from(ProjectInfoResponse other) { } @JsonSetter(value = "apps", nulls = Nulls.SKIP) - public Builder apps(List apps) { + public Builder apps(List apps) { this.apps.clear(); this.apps.addAll(apps); return this; } - public Builder addApps(ProjectInfoResponseAppsItem apps) { + public Builder addApps(ProjectInfoResponseApp apps) { this.apps.add(apps); return this; } - public Builder addAllApps(List apps) { + public Builder addAllApps(List apps) { this.apps.addAll(apps); return this; } diff --git a/src/main/java/com/pipedream/api/types/ProjectInfoResponseAppsItem.java b/src/main/java/com/pipedream/api/types/ProjectInfoResponseApp.java similarity index 54% rename from src/main/java/com/pipedream/api/types/ProjectInfoResponseAppsItem.java rename to src/main/java/com/pipedream/api/types/ProjectInfoResponseApp.java index 1b6412a..81eff17 100644 --- a/src/main/java/com/pipedream/api/types/ProjectInfoResponseAppsItem.java +++ b/src/main/java/com/pipedream/api/types/ProjectInfoResponseApp.java @@ -16,19 +16,18 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ProjectInfoResponseAppsItem.Builder.class) -public final class ProjectInfoResponseAppsItem { +@JsonDeserialize(builder = ProjectInfoResponseApp.Builder.class) +public final class ProjectInfoResponseApp { private final Optional id; - private final String nameSlug; + private final Optional nameSlug; private final Map additionalProperties; - private ProjectInfoResponseAppsItem( - Optional id, String nameSlug, Map additionalProperties) { + private ProjectInfoResponseApp( + Optional id, Optional nameSlug, Map additionalProperties) { this.id = id; this.nameSlug = nameSlug; this.additionalProperties = additionalProperties; @@ -46,14 +45,14 @@ public Optional getId() { * @return The name slug of the target app */ @JsonProperty("name_slug") - public String getNameSlug() { + public Optional getNameSlug() { return nameSlug; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof ProjectInfoResponseAppsItem && equalTo((ProjectInfoResponseAppsItem) other); + return other instanceof ProjectInfoResponseApp && equalTo((ProjectInfoResponseApp) other); } @JsonAnyGetter @@ -61,7 +60,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(ProjectInfoResponseAppsItem other) { + private boolean equalTo(ProjectInfoResponseApp other) { return id.equals(other.id) && nameSlug.equals(other.nameSlug); } @@ -75,83 +74,57 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameSlugStage builder() { + public static Builder builder() { return new Builder(); } - public interface NameSlugStage { - /** - *

The name slug of the target app

- */ - _FinalStage nameSlug(@NotNull String nameSlug); - - Builder from(ProjectInfoResponseAppsItem other); - } - - public interface _FinalStage { - ProjectInfoResponseAppsItem build(); - - /** - *

ID of the app. Only applies for OAuth apps.

- */ - _FinalStage id(Optional id); - - _FinalStage id(String id); - } - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameSlugStage, _FinalStage { - private String nameSlug; - + public static final class Builder { private Optional id = Optional.empty(); + private Optional nameSlug = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override - public Builder from(ProjectInfoResponseAppsItem other) { + public Builder from(ProjectInfoResponseApp other) { id(other.getId()); nameSlug(other.getNameSlug()); return this; } /** - *

The name slug of the target app

- *

The name slug of the target app

- * @return Reference to {@code this} so that method calls can be chained together. + *

ID of the app. Only applies for OAuth apps.

*/ - @java.lang.Override - @JsonSetter("name_slug") - public _FinalStage nameSlug(@NotNull String nameSlug) { - this.nameSlug = Objects.requireNonNull(nameSlug, "nameSlug must not be null"); + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public Builder id(Optional id) { + this.id = id; return this; } - /** - *

ID of the app. Only applies for OAuth apps.

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

ID of the app. Only applies for OAuth apps.

+ *

The name slug of the target app

*/ - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; + @JsonSetter(value = "name_slug", nulls = Nulls.SKIP) + public Builder nameSlug(Optional nameSlug) { + this.nameSlug = nameSlug; + return this; + } + + public Builder nameSlug(String nameSlug) { + this.nameSlug = Optional.ofNullable(nameSlug); return this; } - @java.lang.Override - public ProjectInfoResponseAppsItem build() { - return new ProjectInfoResponseAppsItem(id, nameSlug, additionalProperties); + public ProjectInfoResponseApp build() { + return new ProjectInfoResponseApp(id, nameSlug, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/types/RunActionResponse.java b/src/main/java/com/pipedream/api/types/RunActionResponse.java index 585a35a..416bdbc 100644 --- a/src/main/java/com/pipedream/api/types/RunActionResponse.java +++ b/src/main/java/com/pipedream/api/types/RunActionResponse.java @@ -58,9 +58,6 @@ public Optional getRet() { return ret; } - /** - * @return The ID of the File Stash that was used to sync the action's /tmp directory - */ @JsonProperty("stash_id") public Optional getStashId() { return stashId; @@ -154,9 +151,6 @@ public Builder ret(Object ret) { return this; } - /** - *

The ID of the File Stash that was used to sync the action's /tmp directory

- */ @JsonSetter(value = "stash_id", nulls = Nulls.SKIP) public Builder stashId(Optional stashId) { this.stashId = stashId;