From 87bc66820bbcaf5e8a8e2bc1b059671e39972fb6 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 18:13:43 +0000 Subject: [PATCH] SDK regeneration --- .../api/resources/actions/ActionsClient.java | 12 +- .../resources/actions/AsyncActionsClient.java | 13 +- .../actions/AsyncRawActionsClient.java | 74 +- .../resources/actions/RawActionsClient.java | 72 +- .../requests/ActionsConfigurePropRequest.java | 134 ---- .../requests/ActionsReloadPropsRequest.java | 134 ---- .../actions/requests/RunActionOpts.java | 42 +- .../components/AsyncComponentsClient.java | 13 +- .../components/AsyncRawComponentsClient.java | 45 +- .../components/ComponentsClient.java | 12 +- .../components/RawComponentsClient.java | 43 +- .../ComponentsConfigurePropRequest.java | 134 ---- .../ComponentsReloadPropsRequest.java | 134 ---- .../tokens/AsyncRawTokensClient.java | 9 +- .../resources/tokens/AsyncTokensClient.java | 4 - .../api/resources/tokens/RawTokensClient.java | 9 +- .../api/resources/tokens/TokensClient.java | 4 - .../requests/TokensValidateRequest.java | 98 ++- .../triggers/AsyncRawTriggersClient.java | 44 +- .../triggers/AsyncTriggersClient.java | 13 +- .../resources/triggers/RawTriggersClient.java | 42 +- .../resources/triggers/TriggersClient.java | 12 +- .../TriggersConfigurePropRequest.java | 134 ---- .../requests/TriggersReloadPropsRequest.java | 134 ---- .../types/ConfigurablePropAirtableBaseId.java | 602 ++++++++++++++ .../ConfigurablePropAirtableFieldId.java | 602 ++++++++++++++ .../ConfigurablePropAirtableTableId.java | 602 ++++++++++++++ .../types/ConfigurablePropAirtableViewId.java | 602 ++++++++++++++ .../api/types/ConfigurablePropApphook.java | 738 ++++++++++++++++++ .../api/types/ConfigurablePropDb.java | 557 +++++++++++++ .../types/ConfigurablePropDiscordChannel.java | 602 ++++++++++++++ .../ConfigurablePropDiscordChannelArray.java | 603 ++++++++++++++ .../api/types/ConfigurablePropHttp.java | 602 ++++++++++++++ .../api/types/ConfigurablePropInteger.java | 91 +++ .../types/ConfigurablePropIntegerArray.java | 738 ++++++++++++++++++ .../api/types/ConfigurablePropSql.java | 634 +++++++++++++++ .../api/types/ConfigurablePropSqlAuth.java | 101 +++ .../api/types/ConfigurablePropTimer.java | 667 ++++++++++++++++ .../types/ConfigurablePropTimerDefault.java | 96 +++ .../types/ConfigurablePropTimerOption.java | 96 +++ .../types/ConfigurablePropTimerStatic.java | 96 +++ .../com/pipedream/api/types/TimerCron.java | 113 +++ .../pipedream/api/types/TimerInterval.java | 112 +++ .../api/types/ValidateTokenParams.java | 156 ---- 44 files changed, 8502 insertions(+), 1273 deletions(-) delete mode 100644 src/main/java/com/pipedream/api/resources/actions/requests/ActionsConfigurePropRequest.java delete mode 100644 src/main/java/com/pipedream/api/resources/actions/requests/ActionsReloadPropsRequest.java delete mode 100644 src/main/java/com/pipedream/api/resources/components/requests/ComponentsConfigurePropRequest.java delete mode 100644 src/main/java/com/pipedream/api/resources/components/requests/ComponentsReloadPropsRequest.java delete mode 100644 src/main/java/com/pipedream/api/resources/triggers/requests/TriggersConfigurePropRequest.java delete mode 100644 src/main/java/com/pipedream/api/resources/triggers/requests/TriggersReloadPropsRequest.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropDb.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropSql.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropSqlAuth.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropTimerOption.java create mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropTimerStatic.java create mode 100644 src/main/java/com/pipedream/api/types/TimerCron.java create mode 100644 src/main/java/com/pipedream/api/types/TimerInterval.java delete mode 100644 src/main/java/com/pipedream/api/types/ValidateTokenParams.java diff --git a/src/main/java/com/pipedream/api/resources/actions/ActionsClient.java b/src/main/java/com/pipedream/api/resources/actions/ActionsClient.java index 52efedb..c9dce61 100644 --- a/src/main/java/com/pipedream/api/resources/actions/ActionsClient.java +++ b/src/main/java/com/pipedream/api/resources/actions/ActionsClient.java @@ -6,12 +6,12 @@ import com.pipedream.api.core.ClientOptions; import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; -import com.pipedream.api.resources.actions.requests.ActionsConfigurePropRequest; import com.pipedream.api.resources.actions.requests.ActionsListRequest; -import com.pipedream.api.resources.actions.requests.ActionsReloadPropsRequest; import com.pipedream.api.resources.actions.requests.RunActionOpts; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import com.pipedream.api.types.RunActionResponse; @@ -52,19 +52,19 @@ public Component retrieve(String componentId, RequestOptions requestOptions) { return this.rawClient.retrieve(componentId, requestOptions).body(); } - public ConfigurePropResponse configureProp(ActionsConfigurePropRequest request) { + public ConfigurePropResponse configureProp(ConfigurePropOpts request) { return this.rawClient.configureProp(request).body(); } - public ConfigurePropResponse configureProp(ActionsConfigurePropRequest request, RequestOptions requestOptions) { + public ConfigurePropResponse configureProp(ConfigurePropOpts request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).body(); } - public ReloadPropsResponse reloadProps(ActionsReloadPropsRequest request) { + public ReloadPropsResponse reloadProps(ReloadPropsOpts request) { return this.rawClient.reloadProps(request).body(); } - public ReloadPropsResponse reloadProps(ActionsReloadPropsRequest request, RequestOptions requestOptions) { + public ReloadPropsResponse reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { return this.rawClient.reloadProps(request, requestOptions).body(); } diff --git a/src/main/java/com/pipedream/api/resources/actions/AsyncActionsClient.java b/src/main/java/com/pipedream/api/resources/actions/AsyncActionsClient.java index 19ff8e7..94509c9 100644 --- a/src/main/java/com/pipedream/api/resources/actions/AsyncActionsClient.java +++ b/src/main/java/com/pipedream/api/resources/actions/AsyncActionsClient.java @@ -6,12 +6,12 @@ import com.pipedream.api.core.ClientOptions; import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; -import com.pipedream.api.resources.actions.requests.ActionsConfigurePropRequest; import com.pipedream.api.resources.actions.requests.ActionsListRequest; -import com.pipedream.api.resources.actions.requests.ActionsReloadPropsRequest; import com.pipedream.api.resources.actions.requests.RunActionOpts; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import com.pipedream.api.types.RunActionResponse; import java.util.concurrent.CompletableFuture; @@ -54,21 +54,20 @@ public CompletableFuture retrieve(String componentId, RequestOptions return this.rawClient.retrieve(componentId, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture configureProp(ActionsConfigurePropRequest request) { + public CompletableFuture configureProp(ConfigurePropOpts request) { return this.rawClient.configureProp(request).thenApply(response -> response.body()); } public CompletableFuture configureProp( - ActionsConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(ActionsReloadPropsRequest request) { + public CompletableFuture reloadProps(ReloadPropsOpts request) { return this.rawClient.reloadProps(request).thenApply(response -> response.body()); } - public CompletableFuture reloadProps( - ActionsReloadPropsRequest request, RequestOptions requestOptions) { + public CompletableFuture reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { return this.rawClient.reloadProps(request, requestOptions).thenApply(response -> response.body()); } diff --git a/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java b/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java index d285454..57e3dce 100644 --- a/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java +++ b/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java @@ -3,6 +3,7 @@ */ package com.pipedream.api.resources.actions; +import com.fasterxml.jackson.core.JsonProcessingException; import com.pipedream.api.core.BaseClientApiException; import com.pipedream.api.core.BaseClientException; import com.pipedream.api.core.BaseClientHttpResponse; @@ -12,20 +13,18 @@ import com.pipedream.api.core.QueryStringMapper; import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; -import com.pipedream.api.resources.actions.requests.ActionsConfigurePropRequest; import com.pipedream.api.resources.actions.requests.ActionsListRequest; -import com.pipedream.api.resources.actions.requests.ActionsReloadPropsRequest; import com.pipedream.api.resources.actions.requests.RunActionOpts; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; import com.pipedream.api.types.GetComponentResponse; import com.pipedream.api.types.GetComponentsResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import com.pipedream.api.types.RunActionResponse; import java.io.IOException; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -192,13 +191,12 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> configureProp( - ActionsConfigurePropRequest request) { + public CompletableFuture> configureProp(ConfigurePropOpts request) { return configureProp(request, null); } public CompletableFuture> configureProp( - ActionsConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -208,20 +206,17 @@ public CompletableFuture> configur RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -257,13 +252,12 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> reloadProps( - ActionsReloadPropsRequest request) { + public CompletableFuture> reloadProps(ReloadPropsOpts request) { return reloadProps(request, null); } public CompletableFuture> reloadProps( - ActionsReloadPropsRequest request, RequestOptions requestOptions) { + ReloadPropsOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -273,20 +267,17 @@ public CompletableFuture> reloadProp RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -334,35 +325,20 @@ public CompletableFuture> run( .addPathSegment(clientOptions.projectId()) .addPathSegments("actions/run") .build(); - Map properties = new HashMap<>(); - properties.put("id", request.getId()); - properties.put("external_user_id", request.getExternalUserId()); - if (request.getConfiguredProps().isPresent()) { - properties.put("configured_props", request.getConfiguredProps()); - } - if (request.getDynamicPropsId().isPresent()) { - properties.put("dynamic_props_id", request.getDynamicPropsId()); - } - if (request.getStashId().isPresent()) { - properties.put("stash_id", request.getStashId()); - } RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); diff --git a/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java b/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java index d36c7d2..2906f84 100644 --- a/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java +++ b/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java @@ -3,6 +3,7 @@ */ package com.pipedream.api.resources.actions; +import com.fasterxml.jackson.core.JsonProcessingException; import com.pipedream.api.core.BaseClientApiException; import com.pipedream.api.core.BaseClientException; import com.pipedream.api.core.BaseClientHttpResponse; @@ -12,20 +13,18 @@ import com.pipedream.api.core.QueryStringMapper; import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; -import com.pipedream.api.resources.actions.requests.ActionsConfigurePropRequest; import com.pipedream.api.resources.actions.requests.ActionsListRequest; -import com.pipedream.api.resources.actions.requests.ActionsReloadPropsRequest; import com.pipedream.api.resources.actions.requests.RunActionOpts; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; import com.pipedream.api.types.GetComponentResponse; import com.pipedream.api.types.GetComponentsResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import com.pipedream.api.types.RunActionResponse; import java.io.IOException; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; @@ -153,12 +152,12 @@ public BaseClientHttpResponse retrieve(String componentId, RequestOpt } } - public BaseClientHttpResponse configureProp(ActionsConfigurePropRequest request) { + public BaseClientHttpResponse configureProp(ConfigurePropOpts request) { return configureProp(request, null); } public BaseClientHttpResponse configureProp( - ActionsConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -168,20 +167,17 @@ public BaseClientHttpResponse configureProp( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -204,12 +200,12 @@ public BaseClientHttpResponse configureProp( } } - public BaseClientHttpResponse reloadProps(ActionsReloadPropsRequest request) { + public BaseClientHttpResponse reloadProps(ReloadPropsOpts request) { return reloadProps(request, null); } public BaseClientHttpResponse reloadProps( - ActionsReloadPropsRequest request, RequestOptions requestOptions) { + ReloadPropsOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -219,20 +215,17 @@ public BaseClientHttpResponse reloadProps( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -266,35 +259,20 @@ public BaseClientHttpResponse run(RunActionOpts request, Requ .addPathSegment(clientOptions.projectId()) .addPathSegments("actions/run") .build(); - Map properties = new HashMap<>(); - properties.put("id", request.getId()); - properties.put("external_user_id", request.getExternalUserId()); - if (request.getConfiguredProps().isPresent()) { - properties.put("configured_props", request.getConfiguredProps()); - } - if (request.getDynamicPropsId().isPresent()) { - properties.put("dynamic_props_id", request.getDynamicPropsId()); - } - if (request.getStashId().isPresent()) { - properties.put("stash_id", request.getStashId()); - } RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); diff --git a/src/main/java/com/pipedream/api/resources/actions/requests/ActionsConfigurePropRequest.java b/src/main/java/com/pipedream/api/resources/actions/requests/ActionsConfigurePropRequest.java deleted file mode 100644 index 5da951b..0000000 --- a/src/main/java/com/pipedream/api/resources/actions/requests/ActionsConfigurePropRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.resources.actions.requests; - -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 com.pipedream.api.types.ConfigurePropOpts; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ActionsConfigurePropRequest.Builder.class) -public final class ActionsConfigurePropRequest { - private final Optional asyncHandle; - - private final ConfigurePropOpts body; - - private final Map additionalProperties; - - private ActionsConfigurePropRequest( - Optional asyncHandle, ConfigurePropOpts body, Map additionalProperties) { - this.asyncHandle = asyncHandle; - this.body = body; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x-async-handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - - @JsonProperty("body") - public ConfigurePropOpts getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionsConfigurePropRequest && equalTo((ActionsConfigurePropRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionsConfigurePropRequest other) { - return asyncHandle.equals(other.asyncHandle) && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.asyncHandle, this.body); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BodyStage builder() { - return new Builder(); - } - - public interface BodyStage { - _FinalStage body(@NotNull ConfigurePropOpts body); - - Builder from(ActionsConfigurePropRequest other); - } - - public interface _FinalStage { - ActionsConfigurePropRequest build(); - - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BodyStage, _FinalStage { - private ConfigurePropOpts body; - - private Optional asyncHandle = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ActionsConfigurePropRequest other) { - asyncHandle(other.getAsyncHandle()); - body(other.getBody()); - return this; - } - - @java.lang.Override - @JsonSetter("body") - public _FinalStage body(@NotNull ConfigurePropOpts body) { - this.body = Objects.requireNonNull(body, "body must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - @java.lang.Override - @JsonSetter(value = "x-async-handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - - @java.lang.Override - public ActionsConfigurePropRequest build() { - return new ActionsConfigurePropRequest(asyncHandle, body, additionalProperties); - } - } -} diff --git a/src/main/java/com/pipedream/api/resources/actions/requests/ActionsReloadPropsRequest.java b/src/main/java/com/pipedream/api/resources/actions/requests/ActionsReloadPropsRequest.java deleted file mode 100644 index afefa8a..0000000 --- a/src/main/java/com/pipedream/api/resources/actions/requests/ActionsReloadPropsRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.resources.actions.requests; - -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 com.pipedream.api.types.ReloadPropsOpts; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ActionsReloadPropsRequest.Builder.class) -public final class ActionsReloadPropsRequest { - private final Optional asyncHandle; - - private final ReloadPropsOpts body; - - private final Map additionalProperties; - - private ActionsReloadPropsRequest( - Optional asyncHandle, ReloadPropsOpts body, Map additionalProperties) { - this.asyncHandle = asyncHandle; - this.body = body; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x-async-handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - - @JsonProperty("body") - public ReloadPropsOpts getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionsReloadPropsRequest && equalTo((ActionsReloadPropsRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionsReloadPropsRequest other) { - return asyncHandle.equals(other.asyncHandle) && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.asyncHandle, this.body); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BodyStage builder() { - return new Builder(); - } - - public interface BodyStage { - _FinalStage body(@NotNull ReloadPropsOpts body); - - Builder from(ActionsReloadPropsRequest other); - } - - public interface _FinalStage { - ActionsReloadPropsRequest build(); - - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BodyStage, _FinalStage { - private ReloadPropsOpts body; - - private Optional asyncHandle = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ActionsReloadPropsRequest other) { - asyncHandle(other.getAsyncHandle()); - body(other.getBody()); - return this; - } - - @java.lang.Override - @JsonSetter("body") - public _FinalStage body(@NotNull ReloadPropsOpts body) { - this.body = Objects.requireNonNull(body, "body must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - @java.lang.Override - @JsonSetter(value = "x-async-handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - - @java.lang.Override - public ActionsReloadPropsRequest build() { - return new ActionsReloadPropsRequest(asyncHandle, body, additionalProperties); - } - } -} diff --git a/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java b/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java index 990fa92..afbc0ee 100644 --- a/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java +++ b/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java @@ -22,8 +22,6 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RunActionOpts.Builder.class) public final class RunActionOpts { - private final Optional asyncHandle; - private final String id; private final String externalUserId; @@ -37,14 +35,12 @@ public final class RunActionOpts { private final Map additionalProperties; private RunActionOpts( - Optional asyncHandle, String id, String externalUserId, Optional> configuredProps, Optional dynamicPropsId, Optional stashId, Map additionalProperties) { - this.asyncHandle = asyncHandle; this.id = id; this.externalUserId = externalUserId; this.configuredProps = configuredProps; @@ -53,11 +49,6 @@ private RunActionOpts( this.additionalProperties = additionalProperties; } - @JsonProperty("x-async-handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - /** * @return The action component ID */ @@ -107,8 +98,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(RunActionOpts other) { - return asyncHandle.equals(other.asyncHandle) - && id.equals(other.id) + return id.equals(other.id) && externalUserId.equals(other.externalUserId) && configuredProps.equals(other.configuredProps) && dynamicPropsId.equals(other.dynamicPropsId) @@ -117,13 +107,7 @@ private boolean equalTo(RunActionOpts other) { @java.lang.Override public int hashCode() { - return Objects.hash( - this.asyncHandle, - this.id, - this.externalUserId, - this.configuredProps, - this.dynamicPropsId, - this.stashId); + return Objects.hash(this.id, this.externalUserId, this.configuredProps, this.dynamicPropsId, this.stashId); } @java.lang.Override @@ -154,10 +138,6 @@ public interface ExternalUserIdStage { public interface _FinalStage { RunActionOpts build(); - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); - /** *

The configured properties for the action

*/ @@ -189,8 +169,6 @@ public static final class Builder implements IdStage, ExternalUserIdStage, _Fina private Optional> configuredProps = Optional.empty(); - private Optional asyncHandle = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -198,7 +176,6 @@ private Builder() {} @java.lang.Override public Builder from(RunActionOpts other) { - asyncHandle(other.getAsyncHandle()); id(other.getId()); externalUserId(other.getExternalUserId()); configuredProps(other.getConfiguredProps()); @@ -284,23 +261,10 @@ public _FinalStage configuredProps(Optional> configuredProps return this; } - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - @java.lang.Override - @JsonSetter(value = "x-async-handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - @java.lang.Override public RunActionOpts build() { return new RunActionOpts( - asyncHandle, id, externalUserId, configuredProps, dynamicPropsId, stashId, additionalProperties); + id, externalUserId, configuredProps, dynamicPropsId, stashId, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/resources/components/AsyncComponentsClient.java b/src/main/java/com/pipedream/api/resources/components/AsyncComponentsClient.java index c5934f3..4c9ba6d 100644 --- a/src/main/java/com/pipedream/api/resources/components/AsyncComponentsClient.java +++ b/src/main/java/com/pipedream/api/resources/components/AsyncComponentsClient.java @@ -6,11 +6,11 @@ import com.pipedream.api.core.ClientOptions; import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; -import com.pipedream.api.resources.components.requests.ComponentsConfigurePropRequest; import com.pipedream.api.resources.components.requests.ComponentsListRequest; -import com.pipedream.api.resources.components.requests.ComponentsReloadPropsRequest; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import java.util.concurrent.CompletableFuture; @@ -52,21 +52,20 @@ public CompletableFuture retrieve(String componentId, RequestOptions return this.rawClient.retrieve(componentId, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture configureProp(ComponentsConfigurePropRequest request) { + public CompletableFuture configureProp(ConfigurePropOpts request) { return this.rawClient.configureProp(request).thenApply(response -> response.body()); } public CompletableFuture configureProp( - ComponentsConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(ComponentsReloadPropsRequest request) { + public CompletableFuture reloadProps(ReloadPropsOpts request) { return this.rawClient.reloadProps(request).thenApply(response -> response.body()); } - public CompletableFuture reloadProps( - ComponentsReloadPropsRequest request, RequestOptions requestOptions) { + public CompletableFuture reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { return this.rawClient.reloadProps(request, requestOptions).thenApply(response -> response.body()); } } diff --git a/src/main/java/com/pipedream/api/resources/components/AsyncRawComponentsClient.java b/src/main/java/com/pipedream/api/resources/components/AsyncRawComponentsClient.java index f0e05a6..8d72783 100644 --- a/src/main/java/com/pipedream/api/resources/components/AsyncRawComponentsClient.java +++ b/src/main/java/com/pipedream/api/resources/components/AsyncRawComponentsClient.java @@ -3,6 +3,7 @@ */ package com.pipedream.api.resources.components; +import com.fasterxml.jackson.core.JsonProcessingException; import com.pipedream.api.core.BaseClientApiException; import com.pipedream.api.core.BaseClientException; import com.pipedream.api.core.BaseClientHttpResponse; @@ -12,13 +13,13 @@ import com.pipedream.api.core.QueryStringMapper; import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; -import com.pipedream.api.resources.components.requests.ComponentsConfigurePropRequest; import com.pipedream.api.resources.components.requests.ComponentsListRequest; -import com.pipedream.api.resources.components.requests.ComponentsReloadPropsRequest; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; import com.pipedream.api.types.GetComponentResponse; import com.pipedream.api.types.GetComponentsResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import java.io.IOException; import java.util.List; @@ -189,13 +190,12 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> configureProp( - ComponentsConfigurePropRequest request) { + public CompletableFuture> configureProp(ConfigurePropOpts request) { return configureProp(request, null); } public CompletableFuture> configureProp( - ComponentsConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -205,20 +205,17 @@ public CompletableFuture> configur RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -254,13 +251,12 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> reloadProps( - ComponentsReloadPropsRequest request) { + public CompletableFuture> reloadProps(ReloadPropsOpts request) { return reloadProps(request, null); } public CompletableFuture> reloadProps( - ComponentsReloadPropsRequest request, RequestOptions requestOptions) { + ReloadPropsOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -270,20 +266,17 @@ public CompletableFuture> reloadProp RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); diff --git a/src/main/java/com/pipedream/api/resources/components/ComponentsClient.java b/src/main/java/com/pipedream/api/resources/components/ComponentsClient.java index f273dcb..9c103ff 100644 --- a/src/main/java/com/pipedream/api/resources/components/ComponentsClient.java +++ b/src/main/java/com/pipedream/api/resources/components/ComponentsClient.java @@ -6,11 +6,11 @@ import com.pipedream.api.core.ClientOptions; import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; -import com.pipedream.api.resources.components.requests.ComponentsConfigurePropRequest; import com.pipedream.api.resources.components.requests.ComponentsListRequest; -import com.pipedream.api.resources.components.requests.ComponentsReloadPropsRequest; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; public class ComponentsClient { @@ -50,19 +50,19 @@ public Component retrieve(String componentId, RequestOptions requestOptions) { return this.rawClient.retrieve(componentId, requestOptions).body(); } - public ConfigurePropResponse configureProp(ComponentsConfigurePropRequest request) { + public ConfigurePropResponse configureProp(ConfigurePropOpts request) { return this.rawClient.configureProp(request).body(); } - public ConfigurePropResponse configureProp(ComponentsConfigurePropRequest request, RequestOptions requestOptions) { + public ConfigurePropResponse configureProp(ConfigurePropOpts request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).body(); } - public ReloadPropsResponse reloadProps(ComponentsReloadPropsRequest request) { + public ReloadPropsResponse reloadProps(ReloadPropsOpts request) { return this.rawClient.reloadProps(request).body(); } - public ReloadPropsResponse reloadProps(ComponentsReloadPropsRequest request, RequestOptions requestOptions) { + public ReloadPropsResponse reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { return this.rawClient.reloadProps(request, requestOptions).body(); } } diff --git a/src/main/java/com/pipedream/api/resources/components/RawComponentsClient.java b/src/main/java/com/pipedream/api/resources/components/RawComponentsClient.java index 9cd5a6f..48cfd19 100644 --- a/src/main/java/com/pipedream/api/resources/components/RawComponentsClient.java +++ b/src/main/java/com/pipedream/api/resources/components/RawComponentsClient.java @@ -3,6 +3,7 @@ */ package com.pipedream.api.resources.components; +import com.fasterxml.jackson.core.JsonProcessingException; import com.pipedream.api.core.BaseClientApiException; import com.pipedream.api.core.BaseClientException; import com.pipedream.api.core.BaseClientHttpResponse; @@ -12,13 +13,13 @@ import com.pipedream.api.core.QueryStringMapper; import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; -import com.pipedream.api.resources.components.requests.ComponentsConfigurePropRequest; import com.pipedream.api.resources.components.requests.ComponentsListRequest; -import com.pipedream.api.resources.components.requests.ComponentsReloadPropsRequest; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; import com.pipedream.api.types.GetComponentResponse; import com.pipedream.api.types.GetComponentsResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import java.io.IOException; import java.util.List; @@ -149,12 +150,12 @@ public BaseClientHttpResponse retrieve(String componentId, RequestOpt } } - public BaseClientHttpResponse configureProp(ComponentsConfigurePropRequest request) { + public BaseClientHttpResponse configureProp(ConfigurePropOpts request) { return configureProp(request, null); } public BaseClientHttpResponse configureProp( - ComponentsConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -164,20 +165,17 @@ public BaseClientHttpResponse configureProp( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -200,12 +198,12 @@ public BaseClientHttpResponse configureProp( } } - public BaseClientHttpResponse reloadProps(ComponentsReloadPropsRequest request) { + public BaseClientHttpResponse reloadProps(ReloadPropsOpts request) { return reloadProps(request, null); } public BaseClientHttpResponse reloadProps( - ComponentsReloadPropsRequest request, RequestOptions requestOptions) { + ReloadPropsOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -215,20 +213,17 @@ public BaseClientHttpResponse reloadProps( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); diff --git a/src/main/java/com/pipedream/api/resources/components/requests/ComponentsConfigurePropRequest.java b/src/main/java/com/pipedream/api/resources/components/requests/ComponentsConfigurePropRequest.java deleted file mode 100644 index 541a93e..0000000 --- a/src/main/java/com/pipedream/api/resources/components/requests/ComponentsConfigurePropRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.resources.components.requests; - -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 com.pipedream.api.types.ConfigurePropOpts; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ComponentsConfigurePropRequest.Builder.class) -public final class ComponentsConfigurePropRequest { - private final Optional asyncHandle; - - private final ConfigurePropOpts body; - - private final Map additionalProperties; - - private ComponentsConfigurePropRequest( - Optional asyncHandle, ConfigurePropOpts body, Map additionalProperties) { - this.asyncHandle = asyncHandle; - this.body = body; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x-async-handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - - @JsonProperty("body") - public ConfigurePropOpts getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ComponentsConfigurePropRequest && equalTo((ComponentsConfigurePropRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ComponentsConfigurePropRequest other) { - return asyncHandle.equals(other.asyncHandle) && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.asyncHandle, this.body); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BodyStage builder() { - return new Builder(); - } - - public interface BodyStage { - _FinalStage body(@NotNull ConfigurePropOpts body); - - Builder from(ComponentsConfigurePropRequest other); - } - - public interface _FinalStage { - ComponentsConfigurePropRequest build(); - - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BodyStage, _FinalStage { - private ConfigurePropOpts body; - - private Optional asyncHandle = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ComponentsConfigurePropRequest other) { - asyncHandle(other.getAsyncHandle()); - body(other.getBody()); - return this; - } - - @java.lang.Override - @JsonSetter("body") - public _FinalStage body(@NotNull ConfigurePropOpts body) { - this.body = Objects.requireNonNull(body, "body must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - @java.lang.Override - @JsonSetter(value = "x-async-handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - - @java.lang.Override - public ComponentsConfigurePropRequest build() { - return new ComponentsConfigurePropRequest(asyncHandle, body, additionalProperties); - } - } -} diff --git a/src/main/java/com/pipedream/api/resources/components/requests/ComponentsReloadPropsRequest.java b/src/main/java/com/pipedream/api/resources/components/requests/ComponentsReloadPropsRequest.java deleted file mode 100644 index 960dc66..0000000 --- a/src/main/java/com/pipedream/api/resources/components/requests/ComponentsReloadPropsRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.resources.components.requests; - -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 com.pipedream.api.types.ReloadPropsOpts; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ComponentsReloadPropsRequest.Builder.class) -public final class ComponentsReloadPropsRequest { - private final Optional asyncHandle; - - private final ReloadPropsOpts body; - - private final Map additionalProperties; - - private ComponentsReloadPropsRequest( - Optional asyncHandle, ReloadPropsOpts body, Map additionalProperties) { - this.asyncHandle = asyncHandle; - this.body = body; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x-async-handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - - @JsonProperty("body") - public ReloadPropsOpts getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ComponentsReloadPropsRequest && equalTo((ComponentsReloadPropsRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ComponentsReloadPropsRequest other) { - return asyncHandle.equals(other.asyncHandle) && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.asyncHandle, this.body); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BodyStage builder() { - return new Builder(); - } - - public interface BodyStage { - _FinalStage body(@NotNull ReloadPropsOpts body); - - Builder from(ComponentsReloadPropsRequest other); - } - - public interface _FinalStage { - ComponentsReloadPropsRequest build(); - - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BodyStage, _FinalStage { - private ReloadPropsOpts body; - - private Optional asyncHandle = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ComponentsReloadPropsRequest other) { - asyncHandle(other.getAsyncHandle()); - body(other.getBody()); - return this; - } - - @java.lang.Override - @JsonSetter("body") - public _FinalStage body(@NotNull ReloadPropsOpts body) { - this.body = Objects.requireNonNull(body, "body must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - @java.lang.Override - @JsonSetter(value = "x-async-handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - - @java.lang.Override - public ComponentsReloadPropsRequest build() { - return new ComponentsReloadPropsRequest(asyncHandle, body, additionalProperties); - } - } -} 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 840f84b..81b744c 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java @@ -97,10 +97,6 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> validate(String ctok) { - return validate(ctok, TokensValidateRequest.builder().build()); - } - public CompletableFuture> validate( String ctok, TokensValidateRequest request) { return validate(ctok, request, null); @@ -113,9 +109,10 @@ public CompletableFuture> validate .addPathSegments("v1/connect/tokens") .addPathSegment(ctok) .addPathSegments("validate"); - if (request.getParams().isPresent()) { + QueryStringMapper.addQueryParameter(httpUrl, "app_id", request.getAppId(), false); + if (request.getOauthAppId().isPresent()) { QueryStringMapper.addQueryParameter( - httpUrl, "params", request.getParams().get(), false); + httpUrl, "oauth_app_id", request.getOauthAppId().get(), false); } Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl.build()) diff --git a/src/main/java/com/pipedream/api/resources/tokens/AsyncTokensClient.java b/src/main/java/com/pipedream/api/resources/tokens/AsyncTokensClient.java index e918132..2b6b6bb 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/AsyncTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/AsyncTokensClient.java @@ -36,10 +36,6 @@ public CompletableFuture create(CreateTokenOpts request, Re return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture validate(String ctok) { - return this.rawClient.validate(ctok).thenApply(response -> response.body()); - } - public CompletableFuture validate(String ctok, TokensValidateRequest request) { return this.rawClient.validate(ctok, request).thenApply(response -> response.body()); } 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 e560d15..9fb4642 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java @@ -79,10 +79,6 @@ public BaseClientHttpResponse create(CreateTokenOpts reques } } - public BaseClientHttpResponse validate(String ctok) { - return validate(ctok, TokensValidateRequest.builder().build()); - } - public BaseClientHttpResponse validate(String ctok, TokensValidateRequest request) { return validate(ctok, request, null); } @@ -94,9 +90,10 @@ public BaseClientHttpResponse validate( .addPathSegments("v1/connect/tokens") .addPathSegment(ctok) .addPathSegments("validate"); - if (request.getParams().isPresent()) { + QueryStringMapper.addQueryParameter(httpUrl, "app_id", request.getAppId(), false); + if (request.getOauthAppId().isPresent()) { QueryStringMapper.addQueryParameter( - httpUrl, "params", request.getParams().get(), false); + httpUrl, "oauth_app_id", request.getOauthAppId().get(), false); } Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl.build()) diff --git a/src/main/java/com/pipedream/api/resources/tokens/TokensClient.java b/src/main/java/com/pipedream/api/resources/tokens/TokensClient.java index 39c90ad..3446ef4 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/TokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/TokensClient.java @@ -35,10 +35,6 @@ public CreateTokenResponse create(CreateTokenOpts request, RequestOptions reques return this.rawClient.create(request, requestOptions).body(); } - public ValidateTokenResponse validate(String ctok) { - return this.rawClient.validate(ctok).body(); - } - public ValidateTokenResponse validate(String ctok, TokensValidateRequest request) { return this.rawClient.validate(ctok, request).body(); } diff --git a/src/main/java/com/pipedream/api/resources/tokens/requests/TokensValidateRequest.java b/src/main/java/com/pipedream/api/resources/tokens/requests/TokensValidateRequest.java index 1479f3c..dd18fed 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/requests/TokensValidateRequest.java +++ b/src/main/java/com/pipedream/api/resources/tokens/requests/TokensValidateRequest.java @@ -12,27 +12,41 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.pipedream.api.core.ObjectMappers; -import com.pipedream.api.types.ValidateTokenParams; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TokensValidateRequest.Builder.class) public final class TokensValidateRequest { - private final Optional params; + private final String appId; + + private final Optional oauthAppId; private final Map additionalProperties; - private TokensValidateRequest(Optional params, Map additionalProperties) { - this.params = params; + private TokensValidateRequest(String appId, Optional oauthAppId, Map additionalProperties) { + this.appId = appId; + this.oauthAppId = oauthAppId; this.additionalProperties = additionalProperties; } - @JsonProperty("params") - public Optional getParams() { - return params; + /** + * @return The app ID to validate against + */ + @JsonProperty("app_id") + public String getAppId() { + return appId; + } + + /** + * @return The OAuth app ID to validate against (if the token is for an OAuth app) + */ + @JsonProperty("oauth_app_id") + public Optional getOauthAppId() { + return oauthAppId; } @java.lang.Override @@ -47,12 +61,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(TokensValidateRequest other) { - return params.equals(other.params); + return appId.equals(other.appId) && oauthAppId.equals(other.oauthAppId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.params); + return Objects.hash(this.appId, this.oauthAppId); } @java.lang.Override @@ -60,37 +74,83 @@ public String toString() { return ObjectMappers.stringify(this); } - public static Builder builder() { + public static AppIdStage builder() { return new Builder(); } + public interface AppIdStage { + /** + *

The app ID to validate against

+ */ + _FinalStage appId(@NotNull String appId); + + Builder from(TokensValidateRequest other); + } + + public interface _FinalStage { + TokensValidateRequest build(); + + /** + *

The OAuth app ID to validate against (if the token is for an OAuth app)

+ */ + _FinalStage oauthAppId(Optional oauthAppId); + + _FinalStage oauthAppId(String oauthAppId); + } + @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional params = Optional.empty(); + public static final class Builder implements AppIdStage, _FinalStage { + private String appId; + + private Optional oauthAppId = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} + @java.lang.Override public Builder from(TokensValidateRequest other) { - params(other.getParams()); + appId(other.getAppId()); + oauthAppId(other.getOauthAppId()); + return this; + } + + /** + *

The app ID to validate against

+ *

The app ID to validate against

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

The OAuth app ID to validate against (if the token is for an OAuth app)

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

The OAuth app ID to validate against (if the token is for an OAuth app)

+ */ + @java.lang.Override + @JsonSetter(value = "oauth_app_id", nulls = Nulls.SKIP) + public _FinalStage oauthAppId(Optional oauthAppId) { + this.oauthAppId = oauthAppId; return this; } + @java.lang.Override public TokensValidateRequest build() { - return new TokensValidateRequest(params, additionalProperties); + return new TokensValidateRequest(appId, oauthAppId, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/resources/triggers/AsyncRawTriggersClient.java b/src/main/java/com/pipedream/api/resources/triggers/AsyncRawTriggersClient.java index ddc9aff..ee92f93 100644 --- a/src/main/java/com/pipedream/api/resources/triggers/AsyncRawTriggersClient.java +++ b/src/main/java/com/pipedream/api/resources/triggers/AsyncRawTriggersClient.java @@ -14,15 +14,15 @@ import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; import com.pipedream.api.resources.triggers.requests.DeployTriggerOpts; -import com.pipedream.api.resources.triggers.requests.TriggersConfigurePropRequest; import com.pipedream.api.resources.triggers.requests.TriggersListRequest; -import com.pipedream.api.resources.triggers.requests.TriggersReloadPropsRequest; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; import com.pipedream.api.types.DeployTriggerResponse; import com.pipedream.api.types.DeployedComponent; import com.pipedream.api.types.GetComponentResponse; import com.pipedream.api.types.GetComponentsResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import java.io.IOException; import java.util.List; @@ -192,13 +192,12 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> configureProp( - TriggersConfigurePropRequest request) { + public CompletableFuture> configureProp(ConfigurePropOpts request) { return configureProp(request, null); } public CompletableFuture> configureProp( - TriggersConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -208,20 +207,17 @@ public CompletableFuture> configur RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -257,13 +253,12 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> reloadProps( - TriggersReloadPropsRequest request) { + public CompletableFuture> reloadProps(ReloadPropsOpts request) { return reloadProps(request, null); } public CompletableFuture> reloadProps( - TriggersReloadPropsRequest request, RequestOptions requestOptions) { + ReloadPropsOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -273,20 +268,17 @@ public CompletableFuture> reloadProp RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); diff --git a/src/main/java/com/pipedream/api/resources/triggers/AsyncTriggersClient.java b/src/main/java/com/pipedream/api/resources/triggers/AsyncTriggersClient.java index 2f3361f..e930281 100644 --- a/src/main/java/com/pipedream/api/resources/triggers/AsyncTriggersClient.java +++ b/src/main/java/com/pipedream/api/resources/triggers/AsyncTriggersClient.java @@ -7,12 +7,12 @@ import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; import com.pipedream.api.resources.triggers.requests.DeployTriggerOpts; -import com.pipedream.api.resources.triggers.requests.TriggersConfigurePropRequest; import com.pipedream.api.resources.triggers.requests.TriggersListRequest; -import com.pipedream.api.resources.triggers.requests.TriggersReloadPropsRequest; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; import com.pipedream.api.types.DeployedComponent; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import java.util.concurrent.CompletableFuture; @@ -54,21 +54,20 @@ public CompletableFuture retrieve(String componentId, RequestOptions return this.rawClient.retrieve(componentId, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture configureProp(TriggersConfigurePropRequest request) { + public CompletableFuture configureProp(ConfigurePropOpts request) { return this.rawClient.configureProp(request).thenApply(response -> response.body()); } public CompletableFuture configureProp( - TriggersConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(TriggersReloadPropsRequest request) { + public CompletableFuture reloadProps(ReloadPropsOpts request) { return this.rawClient.reloadProps(request).thenApply(response -> response.body()); } - public CompletableFuture reloadProps( - TriggersReloadPropsRequest request, RequestOptions requestOptions) { + public CompletableFuture reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { return this.rawClient.reloadProps(request, requestOptions).thenApply(response -> response.body()); } diff --git a/src/main/java/com/pipedream/api/resources/triggers/RawTriggersClient.java b/src/main/java/com/pipedream/api/resources/triggers/RawTriggersClient.java index 192686d..fe6e140 100644 --- a/src/main/java/com/pipedream/api/resources/triggers/RawTriggersClient.java +++ b/src/main/java/com/pipedream/api/resources/triggers/RawTriggersClient.java @@ -14,15 +14,15 @@ import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; import com.pipedream.api.resources.triggers.requests.DeployTriggerOpts; -import com.pipedream.api.resources.triggers.requests.TriggersConfigurePropRequest; import com.pipedream.api.resources.triggers.requests.TriggersListRequest; -import com.pipedream.api.resources.triggers.requests.TriggersReloadPropsRequest; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; import com.pipedream.api.types.DeployTriggerResponse; import com.pipedream.api.types.DeployedComponent; import com.pipedream.api.types.GetComponentResponse; import com.pipedream.api.types.GetComponentsResponse; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; import java.io.IOException; import java.util.List; @@ -153,12 +153,12 @@ public BaseClientHttpResponse retrieve(String componentId, RequestOpt } } - public BaseClientHttpResponse configureProp(TriggersConfigurePropRequest request) { + public BaseClientHttpResponse configureProp(ConfigurePropOpts request) { return configureProp(request, null); } public BaseClientHttpResponse configureProp( - TriggersConfigurePropRequest request, RequestOptions requestOptions) { + ConfigurePropOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -168,20 +168,17 @@ public BaseClientHttpResponse configureProp( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -204,12 +201,12 @@ public BaseClientHttpResponse configureProp( } } - public BaseClientHttpResponse reloadProps(TriggersReloadPropsRequest request) { + public BaseClientHttpResponse reloadProps(ReloadPropsOpts request) { return reloadProps(request, null); } public BaseClientHttpResponse reloadProps( - TriggersReloadPropsRequest request, RequestOptions requestOptions) { + ReloadPropsOpts request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -219,20 +216,17 @@ public BaseClientHttpResponse reloadProps( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); - } catch (Exception e) { - throw new RuntimeException(e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BaseClientException("Failed to serialize request", e); } - Request.Builder _requestBuilder = new Request.Builder() + Request okhttpRequest = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json"); - if (request.getAsyncHandle().isPresent()) { - _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); - } - Request okhttpRequest = _requestBuilder.build(); + .addHeader("Accept", "application/json") + .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); diff --git a/src/main/java/com/pipedream/api/resources/triggers/TriggersClient.java b/src/main/java/com/pipedream/api/resources/triggers/TriggersClient.java index d16a37b..06f0f49 100644 --- a/src/main/java/com/pipedream/api/resources/triggers/TriggersClient.java +++ b/src/main/java/com/pipedream/api/resources/triggers/TriggersClient.java @@ -7,12 +7,12 @@ import com.pipedream.api.core.RequestOptions; import com.pipedream.api.core.pagination.SyncPagingIterable; import com.pipedream.api.resources.triggers.requests.DeployTriggerOpts; -import com.pipedream.api.resources.triggers.requests.TriggersConfigurePropRequest; import com.pipedream.api.resources.triggers.requests.TriggersListRequest; -import com.pipedream.api.resources.triggers.requests.TriggersReloadPropsRequest; import com.pipedream.api.types.Component; +import com.pipedream.api.types.ConfigurePropOpts; import com.pipedream.api.types.ConfigurePropResponse; import com.pipedream.api.types.DeployedComponent; +import com.pipedream.api.types.ReloadPropsOpts; import com.pipedream.api.types.ReloadPropsResponse; public class TriggersClient { @@ -52,19 +52,19 @@ public Component retrieve(String componentId, RequestOptions requestOptions) { return this.rawClient.retrieve(componentId, requestOptions).body(); } - public ConfigurePropResponse configureProp(TriggersConfigurePropRequest request) { + public ConfigurePropResponse configureProp(ConfigurePropOpts request) { return this.rawClient.configureProp(request).body(); } - public ConfigurePropResponse configureProp(TriggersConfigurePropRequest request, RequestOptions requestOptions) { + public ConfigurePropResponse configureProp(ConfigurePropOpts request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).body(); } - public ReloadPropsResponse reloadProps(TriggersReloadPropsRequest request) { + public ReloadPropsResponse reloadProps(ReloadPropsOpts request) { return this.rawClient.reloadProps(request).body(); } - public ReloadPropsResponse reloadProps(TriggersReloadPropsRequest request, RequestOptions requestOptions) { + public ReloadPropsResponse reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { return this.rawClient.reloadProps(request, requestOptions).body(); } diff --git a/src/main/java/com/pipedream/api/resources/triggers/requests/TriggersConfigurePropRequest.java b/src/main/java/com/pipedream/api/resources/triggers/requests/TriggersConfigurePropRequest.java deleted file mode 100644 index dda960b..0000000 --- a/src/main/java/com/pipedream/api/resources/triggers/requests/TriggersConfigurePropRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.resources.triggers.requests; - -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 com.pipedream.api.types.ConfigurePropOpts; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = TriggersConfigurePropRequest.Builder.class) -public final class TriggersConfigurePropRequest { - private final Optional asyncHandle; - - private final ConfigurePropOpts body; - - private final Map additionalProperties; - - private TriggersConfigurePropRequest( - Optional asyncHandle, ConfigurePropOpts body, Map additionalProperties) { - this.asyncHandle = asyncHandle; - this.body = body; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x-async-handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - - @JsonProperty("body") - public ConfigurePropOpts getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TriggersConfigurePropRequest && equalTo((TriggersConfigurePropRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TriggersConfigurePropRequest other) { - return asyncHandle.equals(other.asyncHandle) && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.asyncHandle, this.body); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BodyStage builder() { - return new Builder(); - } - - public interface BodyStage { - _FinalStage body(@NotNull ConfigurePropOpts body); - - Builder from(TriggersConfigurePropRequest other); - } - - public interface _FinalStage { - TriggersConfigurePropRequest build(); - - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BodyStage, _FinalStage { - private ConfigurePropOpts body; - - private Optional asyncHandle = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(TriggersConfigurePropRequest other) { - asyncHandle(other.getAsyncHandle()); - body(other.getBody()); - return this; - } - - @java.lang.Override - @JsonSetter("body") - public _FinalStage body(@NotNull ConfigurePropOpts body) { - this.body = Objects.requireNonNull(body, "body must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - @java.lang.Override - @JsonSetter(value = "x-async-handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - - @java.lang.Override - public TriggersConfigurePropRequest build() { - return new TriggersConfigurePropRequest(asyncHandle, body, additionalProperties); - } - } -} diff --git a/src/main/java/com/pipedream/api/resources/triggers/requests/TriggersReloadPropsRequest.java b/src/main/java/com/pipedream/api/resources/triggers/requests/TriggersReloadPropsRequest.java deleted file mode 100644 index b40b8ca..0000000 --- a/src/main/java/com/pipedream/api/resources/triggers/requests/TriggersReloadPropsRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.resources.triggers.requests; - -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 com.pipedream.api.types.ReloadPropsOpts; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = TriggersReloadPropsRequest.Builder.class) -public final class TriggersReloadPropsRequest { - private final Optional asyncHandle; - - private final ReloadPropsOpts body; - - private final Map additionalProperties; - - private TriggersReloadPropsRequest( - Optional asyncHandle, ReloadPropsOpts body, Map additionalProperties) { - this.asyncHandle = asyncHandle; - this.body = body; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x-async-handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - - @JsonProperty("body") - public ReloadPropsOpts getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TriggersReloadPropsRequest && equalTo((TriggersReloadPropsRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TriggersReloadPropsRequest other) { - return asyncHandle.equals(other.asyncHandle) && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.asyncHandle, this.body); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BodyStage builder() { - return new Builder(); - } - - public interface BodyStage { - _FinalStage body(@NotNull ReloadPropsOpts body); - - Builder from(TriggersReloadPropsRequest other); - } - - public interface _FinalStage { - TriggersReloadPropsRequest build(); - - _FinalStage asyncHandle(Optional asyncHandle); - - _FinalStage asyncHandle(String asyncHandle); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BodyStage, _FinalStage { - private ReloadPropsOpts body; - - private Optional asyncHandle = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(TriggersReloadPropsRequest other) { - asyncHandle(other.getAsyncHandle()); - body(other.getBody()); - return this; - } - - @java.lang.Override - @JsonSetter("body") - public _FinalStage body(@NotNull ReloadPropsOpts body) { - this.body = Objects.requireNonNull(body, "body must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage asyncHandle(String asyncHandle) { - this.asyncHandle = Optional.ofNullable(asyncHandle); - return this; - } - - @java.lang.Override - @JsonSetter(value = "x-async-handle", nulls = Nulls.SKIP) - public _FinalStage asyncHandle(Optional asyncHandle) { - this.asyncHandle = asyncHandle; - return this; - } - - @java.lang.Override - public TriggersReloadPropsRequest build() { - return new TriggersReloadPropsRequest(asyncHandle, body, additionalProperties); - } - } -} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java new file mode 100644 index 0000000..df43432 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java @@ -0,0 +1,602 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropAirtableBaseId.Builder.class) +public final class ConfigurablePropAirtableBaseId { + private final Optional type; + + private final Optional appProp; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropAirtableBaseId( + Optional type, + Optional appProp, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.appProp = appProp; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The name of the app prop that provides Airtable authentication + */ + @JsonProperty("appProp") + public Optional getAppProp() { + return appProp; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropAirtableBaseId && equalTo((ConfigurablePropAirtableBaseId) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropAirtableBaseId other) { + return type.equals(other.type) + && appProp.equals(other.appProp) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.appProp, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropAirtableBaseId other); + } + + public interface _FinalStage { + ConfigurablePropAirtableBaseId build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

The name of the app prop that provides Airtable authentication

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional appProp = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropAirtableBaseId other) { + type(other.getType()); + appProp(other.getAppProp()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

The name of the app prop that provides Airtable authentication

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

The name of the app prop that provides Airtable authentication

+ */ + @java.lang.Override + @JsonSetter(value = "appProp", nulls = Nulls.SKIP) + public _FinalStage appProp(Optional appProp) { + this.appProp = appProp; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropAirtableBaseId build() { + return new ConfigurablePropAirtableBaseId( + type, + appProp, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java new file mode 100644 index 0000000..aef7374 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java @@ -0,0 +1,602 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropAirtableFieldId.Builder.class) +public final class ConfigurablePropAirtableFieldId { + private final Optional type; + + private final Optional tableIdProp; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropAirtableFieldId( + Optional type, + Optional tableIdProp, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.tableIdProp = tableIdProp; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The name of the prop that provides the Airtable table ID + */ + @JsonProperty("tableIdProp") + public Optional getTableIdProp() { + return tableIdProp; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropAirtableFieldId && equalTo((ConfigurablePropAirtableFieldId) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropAirtableFieldId other) { + return type.equals(other.type) + && tableIdProp.equals(other.tableIdProp) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.tableIdProp, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropAirtableFieldId other); + } + + public interface _FinalStage { + ConfigurablePropAirtableFieldId build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

The name of the prop that provides the Airtable table ID

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional tableIdProp = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropAirtableFieldId other) { + type(other.getType()); + tableIdProp(other.getTableIdProp()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

The name of the prop that provides the Airtable table ID

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

The name of the prop that provides the Airtable table ID

+ */ + @java.lang.Override + @JsonSetter(value = "tableIdProp", nulls = Nulls.SKIP) + public _FinalStage tableIdProp(Optional tableIdProp) { + this.tableIdProp = tableIdProp; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropAirtableFieldId build() { + return new ConfigurablePropAirtableFieldId( + type, + tableIdProp, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java new file mode 100644 index 0000000..be315c4 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java @@ -0,0 +1,602 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropAirtableTableId.Builder.class) +public final class ConfigurablePropAirtableTableId { + private final Optional type; + + private final Optional baseIdProp; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropAirtableTableId( + Optional type, + Optional baseIdProp, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.baseIdProp = baseIdProp; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The name of the prop that provides the Airtable base ID + */ + @JsonProperty("baseIdProp") + public Optional getBaseIdProp() { + return baseIdProp; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropAirtableTableId && equalTo((ConfigurablePropAirtableTableId) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropAirtableTableId other) { + return type.equals(other.type) + && baseIdProp.equals(other.baseIdProp) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.baseIdProp, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropAirtableTableId other); + } + + public interface _FinalStage { + ConfigurablePropAirtableTableId build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

The name of the prop that provides the Airtable base ID

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional baseIdProp = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropAirtableTableId other) { + type(other.getType()); + baseIdProp(other.getBaseIdProp()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

The name of the prop that provides the Airtable base ID

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

The name of the prop that provides the Airtable base ID

+ */ + @java.lang.Override + @JsonSetter(value = "baseIdProp", nulls = Nulls.SKIP) + public _FinalStage baseIdProp(Optional baseIdProp) { + this.baseIdProp = baseIdProp; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropAirtableTableId build() { + return new ConfigurablePropAirtableTableId( + type, + baseIdProp, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java new file mode 100644 index 0000000..3a29b7a --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java @@ -0,0 +1,602 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropAirtableViewId.Builder.class) +public final class ConfigurablePropAirtableViewId { + private final Optional type; + + private final Optional tableIdProp; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropAirtableViewId( + Optional type, + Optional tableIdProp, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.tableIdProp = tableIdProp; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The name of the prop that provides the Airtable table ID + */ + @JsonProperty("tableIdProp") + public Optional getTableIdProp() { + return tableIdProp; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropAirtableViewId && equalTo((ConfigurablePropAirtableViewId) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropAirtableViewId other) { + return type.equals(other.type) + && tableIdProp.equals(other.tableIdProp) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.tableIdProp, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropAirtableViewId other); + } + + public interface _FinalStage { + ConfigurablePropAirtableViewId build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

The name of the prop that provides the Airtable table ID

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional tableIdProp = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropAirtableViewId other) { + type(other.getType()); + tableIdProp(other.getTableIdProp()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

The name of the prop that provides the Airtable table ID

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

The name of the prop that provides the Airtable table ID

+ */ + @java.lang.Override + @JsonSetter(value = "tableIdProp", nulls = Nulls.SKIP) + public _FinalStage tableIdProp(Optional tableIdProp) { + this.tableIdProp = tableIdProp; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropAirtableViewId build() { + return new ConfigurablePropAirtableViewId( + type, + tableIdProp, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java b/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java new file mode 100644 index 0000000..1c0f74c --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java @@ -0,0 +1,738 @@ +/** + * 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 = ConfigurablePropApphook.Builder.class) +public final class ConfigurablePropApphook { + private final Optional type; + + private final Optional appProp; + + private final Optional> eventNames; + + private final Optional remote; + + private final Optional> static_; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropApphook( + Optional type, + Optional appProp, + Optional> eventNames, + Optional remote, + Optional> static_, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.appProp = appProp; + this.eventNames = eventNames; + this.remote = remote; + this.static_ = static_; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The name of the app prop that this apphook depends on + */ + @JsonProperty("appProp") + public Optional getAppProp() { + return appProp; + } + + /** + * @return List of event names to listen for + */ + @JsonProperty("eventNames") + public Optional> getEventNames() { + return eventNames; + } + + /** + * @return Whether this apphook is remote + */ + @JsonProperty("remote") + public Optional getRemote() { + return remote; + } + + /** + * @return Static configuration for the apphook + */ + @JsonProperty("static") + public Optional> getStatic() { + return static_; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropApphook && equalTo((ConfigurablePropApphook) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropApphook other) { + return type.equals(other.type) + && appProp.equals(other.appProp) + && eventNames.equals(other.eventNames) + && remote.equals(other.remote) + && static_.equals(other.static_) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.appProp, + this.eventNames, + this.remote, + this.static_, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropApphook other); + } + + public interface _FinalStage { + ConfigurablePropApphook build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

The name of the app prop that this apphook depends on

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

List of event names to listen for

+ */ + _FinalStage eventNames(Optional> eventNames); + + _FinalStage eventNames(List eventNames); + + /** + *

Whether this apphook is remote

+ */ + _FinalStage remote(Optional remote); + + _FinalStage remote(Boolean remote); + + /** + *

Static configuration for the apphook

+ */ + _FinalStage static_(Optional> static_); + + _FinalStage static_(List static_); + + /** + *

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional> static_ = Optional.empty(); + + private Optional remote = Optional.empty(); + + private Optional> eventNames = Optional.empty(); + + private Optional appProp = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropApphook other) { + type(other.getType()); + appProp(other.getAppProp()); + eventNames(other.getEventNames()); + remote(other.getRemote()); + static_(other.getStatic()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Static configuration for the apphook

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

Static configuration for the apphook

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

Whether this apphook is remote

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

Whether this apphook is remote

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

List of event names to listen for

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

List of event names to listen for

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

The name of the app prop that this apphook depends on

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

The name of the app prop that this apphook depends on

+ */ + @java.lang.Override + @JsonSetter(value = "appProp", nulls = Nulls.SKIP) + public _FinalStage appProp(Optional appProp) { + this.appProp = appProp; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropApphook build() { + return new ConfigurablePropApphook( + type, + appProp, + eventNames, + remote, + static_, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java new file mode 100644 index 0000000..355010f --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java @@ -0,0 +1,557 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropDb.Builder.class) +public final class ConfigurablePropDb { + private final Optional type; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropDb( + Optional type, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropDb && equalTo((ConfigurablePropDb) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropDb other) { + return type.equals(other.type) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropDb other); + } + + public interface _FinalStage { + ConfigurablePropDb build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropDb other) { + type(other.getType()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

+ */ + @java.lang.Override + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public _FinalStage label(Optional label) { + this.label = label; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropDb build() { + return new ConfigurablePropDb( + type, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java new file mode 100644 index 0000000..3eb0836 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java @@ -0,0 +1,602 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropDiscordChannel.Builder.class) +public final class ConfigurablePropDiscordChannel { + private final Optional type; + + private final Optional appProp; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropDiscordChannel( + Optional type, + Optional appProp, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.appProp = appProp; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The name of the app prop that provides Discord authentication + */ + @JsonProperty("appProp") + public Optional getAppProp() { + return appProp; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropDiscordChannel && equalTo((ConfigurablePropDiscordChannel) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropDiscordChannel other) { + return type.equals(other.type) + && appProp.equals(other.appProp) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.appProp, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropDiscordChannel other); + } + + public interface _FinalStage { + ConfigurablePropDiscordChannel build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

The name of the app prop that provides Discord authentication

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional appProp = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropDiscordChannel other) { + type(other.getType()); + appProp(other.getAppProp()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

The name of the app prop that provides Discord authentication

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

The name of the app prop that provides Discord authentication

+ */ + @java.lang.Override + @JsonSetter(value = "appProp", nulls = Nulls.SKIP) + public _FinalStage appProp(Optional appProp) { + this.appProp = appProp; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropDiscordChannel build() { + return new ConfigurablePropDiscordChannel( + type, + appProp, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java new file mode 100644 index 0000000..d2d6eaf --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java @@ -0,0 +1,603 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropDiscordChannelArray.Builder.class) +public final class ConfigurablePropDiscordChannelArray { + private final Optional type; + + private final Optional appProp; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropDiscordChannelArray( + Optional type, + Optional appProp, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.appProp = appProp; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The name of the app prop that provides Discord authentication + */ + @JsonProperty("appProp") + public Optional getAppProp() { + return appProp; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropDiscordChannelArray + && equalTo((ConfigurablePropDiscordChannelArray) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropDiscordChannelArray other) { + return type.equals(other.type) + && appProp.equals(other.appProp) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.appProp, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropDiscordChannelArray other); + } + + public interface _FinalStage { + ConfigurablePropDiscordChannelArray build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

The name of the app prop that provides Discord authentication

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional appProp = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropDiscordChannelArray other) { + type(other.getType()); + appProp(other.getAppProp()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

The name of the app prop that provides Discord authentication

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

The name of the app prop that provides Discord authentication

+ */ + @java.lang.Override + @JsonSetter(value = "appProp", nulls = Nulls.SKIP) + public _FinalStage appProp(Optional appProp) { + this.appProp = appProp; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropDiscordChannelArray build() { + return new ConfigurablePropDiscordChannelArray( + type, + appProp, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java b/src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java new file mode 100644 index 0000000..44dc3ba --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java @@ -0,0 +1,602 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropHttp.Builder.class) +public final class ConfigurablePropHttp { + private final Optional type; + + private final Optional customResponse; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropHttp( + Optional type, + Optional customResponse, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.customResponse = customResponse; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return Whether this HTTP interface allows custom responses + */ + @JsonProperty("customResponse") + public Optional getCustomResponse() { + return customResponse; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropHttp && equalTo((ConfigurablePropHttp) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropHttp other) { + return type.equals(other.type) + && customResponse.equals(other.customResponse) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.customResponse, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropHttp other); + } + + public interface _FinalStage { + ConfigurablePropHttp build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

Whether this HTTP interface allows custom responses

+ */ + _FinalStage customResponse(Optional customResponse); + + _FinalStage customResponse(Boolean customResponse); + + /** + *

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional customResponse = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropHttp other) { + type(other.getType()); + customResponse(other.getCustomResponse()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Whether this HTTP interface allows custom responses

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

Whether this HTTP interface allows custom responses

+ */ + @java.lang.Override + @JsonSetter(value = "customResponse", nulls = Nulls.SKIP) + public _FinalStage customResponse(Optional customResponse) { + this.customResponse = customResponse; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropHttp build() { + return new ConfigurablePropHttp( + type, + customResponse, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java b/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java index 730b67f..9d99f7e 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java @@ -13,6 +13,7 @@ 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; @@ -27,6 +28,10 @@ public final class ConfigurablePropInteger { private final Optional max; + private final Optional default_; + + private final Optional> options; + private final String name; private final Optional label; @@ -53,6 +58,8 @@ private ConfigurablePropInteger( Optional type, Optional min, Optional max, + Optional default_, + Optional> options, String name, Optional label, Optional description, @@ -67,6 +74,8 @@ private ConfigurablePropInteger( this.type = type; this.min = min; this.max = max; + this.default_ = default_; + this.options = options; this.name = name; this.label = label; this.description = description; @@ -101,6 +110,22 @@ public Optional getMax() { return max; } + /** + * @return Default integer value + */ + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + /** + * @return Available integer options + */ + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @@ -196,6 +221,8 @@ private boolean equalTo(ConfigurablePropInteger other) { return type.equals(other.type) && min.equals(other.min) && max.equals(other.max) + && default_.equals(other.default_) + && options.equals(other.options) && name.equals(other.name) && label.equals(other.label) && description.equals(other.description) @@ -214,6 +241,8 @@ public int hashCode() { this.type, this.min, this.max, + this.default_, + this.options, this.name, this.label, this.description, @@ -265,6 +294,20 @@ public interface _FinalStage { _FinalStage max(Integer max); + /** + *

Default integer value

+ */ + _FinalStage default_(Optional default_); + + _FinalStage default_(Integer default_); + + /** + *

Available integer options

+ */ + _FinalStage options(Optional> options); + + _FinalStage options(List options); + /** *

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

*/ @@ -351,6 +394,10 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); + private Optional> options = Optional.empty(); + + private Optional default_ = Optional.empty(); + private Optional max = Optional.empty(); private Optional min = Optional.empty(); @@ -367,6 +414,8 @@ public Builder from(ConfigurablePropInteger other) { type(other.getType()); min(other.getMin()); max(other.getMax()); + default_(other.getDefault()); + options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -572,6 +621,46 @@ public _FinalStage label(Optional label) { return this; } + /** + *

Available integer options

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

Available integer options

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

Default integer value

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

Default integer value

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

The maximum value for this integer prop.

* @return Reference to {@code this} so that method calls can be chained together. @@ -631,6 +720,8 @@ public ConfigurablePropInteger build() { type, min, max, + default_, + options, name, label, description, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java b/src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java new file mode 100644 index 0000000..1584e9e --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java @@ -0,0 +1,738 @@ +/** + * 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 = ConfigurablePropIntegerArray.Builder.class) +public final class ConfigurablePropIntegerArray { + private final Optional type; + + private final Optional min; + + private final Optional max; + + private final Optional> default_; + + private final Optional> options; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropIntegerArray( + Optional type, + Optional min, + Optional max, + Optional> default_, + Optional> options, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.min = min; + this.max = max; + this.default_ = default_; + this.options = options; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The minimum value for integers in this array + */ + @JsonProperty("min") + public Optional getMin() { + return min; + } + + /** + * @return The maximum value for integers in this array + */ + @JsonProperty("max") + public Optional getMax() { + return max; + } + + /** + * @return Default array of integers + */ + @JsonProperty("default") + public Optional> getDefault() { + return default_; + } + + /** + * @return Available options for the integer array + */ + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropIntegerArray && equalTo((ConfigurablePropIntegerArray) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropIntegerArray other) { + return type.equals(other.type) + && min.equals(other.min) + && max.equals(other.max) + && default_.equals(other.default_) + && options.equals(other.options) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.min, + this.max, + this.default_, + this.options, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropIntegerArray other); + } + + public interface _FinalStage { + ConfigurablePropIntegerArray build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + /** + *

The minimum value for integers in this array

+ */ + _FinalStage min(Optional min); + + _FinalStage min(Integer min); + + /** + *

The maximum value for integers in this array

+ */ + _FinalStage max(Optional max); + + _FinalStage max(Integer max); + + /** + *

Default array of integers

+ */ + _FinalStage default_(Optional> default_); + + _FinalStage default_(List default_); + + /** + *

Available options for the integer array

+ */ + _FinalStage options(Optional> options); + + _FinalStage options(List options); + + /** + *

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional> options = Optional.empty(); + + private Optional> default_ = Optional.empty(); + + private Optional max = Optional.empty(); + + private Optional min = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropIntegerArray other) { + type(other.getType()); + min(other.getMin()); + max(other.getMax()); + default_(other.getDefault()); + options(other.getOptions()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Available options for the integer array

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

Available options for the integer array

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

Default array of integers

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

Default array of integers

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

The maximum value for integers in this array

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

The maximum value for integers in this array

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

The minimum value for integers in this array

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

The minimum value for integers in this array

+ */ + @java.lang.Override + @JsonSetter(value = "min", nulls = Nulls.SKIP) + public _FinalStage min(Optional min) { + this.min = min; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropIntegerArray build() { + return new ConfigurablePropIntegerArray( + type, + min, + max, + default_, + options, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java b/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java new file mode 100644 index 0000000..94fccd1 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java @@ -0,0 +1,634 @@ +/** + * 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; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfigurablePropSql.Builder.class) +public final class ConfigurablePropSql { + private final Optional type; + + private final Optional auth; + + private final Optional default_; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropSql( + Optional type, + Optional auth, + Optional default_, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.auth = auth; + this.default_ = default_; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @JsonProperty("auth") + public Optional getAuth() { + return auth; + } + + /** + * @return Default SQL query + */ + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropSql && equalTo((ConfigurablePropSql) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropSql other) { + return type.equals(other.type) + && auth.equals(other.auth) + && default_.equals(other.default_) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.auth, + this.default_, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropSql other); + } + + public interface _FinalStage { + ConfigurablePropSql build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + _FinalStage auth(Optional auth); + + _FinalStage auth(ConfigurablePropSqlAuth auth); + + /** + *

Default SQL query

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional auth = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropSql other) { + type(other.getType()); + auth(other.getAuth()); + default_(other.getDefault()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Default SQL query

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

Default SQL query

+ */ + @java.lang.Override + @JsonSetter(value = "default", nulls = Nulls.SKIP) + public _FinalStage default_(Optional default_) { + this.default_ = default_; + return this; + } + + @java.lang.Override + public _FinalStage auth(ConfigurablePropSqlAuth auth) { + this.auth = Optional.ofNullable(auth); + return this; + } + + @java.lang.Override + @JsonSetter(value = "auth", nulls = Nulls.SKIP) + public _FinalStage auth(Optional auth) { + this.auth = auth; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropSql build() { + return new ConfigurablePropSql( + type, + auth, + default_, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropSqlAuth.java b/src/main/java/com/pipedream/api/types/ConfigurablePropSqlAuth.java new file mode 100644 index 0000000..7a37914 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropSqlAuth.java @@ -0,0 +1,101 @@ +/** + * 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 = ConfigurablePropSqlAuth.Builder.class) +public final class ConfigurablePropSqlAuth { + private final Optional app; + + private final Map additionalProperties; + + private ConfigurablePropSqlAuth(Optional app, Map additionalProperties) { + this.app = app; + this.additionalProperties = additionalProperties; + } + + /** + * @return The app that provides SQL authentication + */ + @JsonProperty("app") + public Optional getApp() { + return app; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropSqlAuth && equalTo((ConfigurablePropSqlAuth) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropSqlAuth other) { + return app.equals(other.app); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.app); + } + + @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 app = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ConfigurablePropSqlAuth other) { + app(other.getApp()); + return this; + } + + /** + *

The app that provides SQL authentication

+ */ + @JsonSetter(value = "app", nulls = Nulls.SKIP) + public Builder app(Optional app) { + this.app = app; + return this; + } + + public Builder app(String app) { + this.app = Optional.ofNullable(app); + return this; + } + + public ConfigurablePropSqlAuth build() { + return new ConfigurablePropSqlAuth(app, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java b/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java new file mode 100644 index 0000000..ebd8329 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java @@ -0,0 +1,667 @@ +/** + * 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 = ConfigurablePropTimer.Builder.class) +public final class ConfigurablePropTimer { + private final Optional type; + + private final Optional static_; + + private final Optional default_; + + private final Optional>> options; + + private final String name; + + private final Optional label; + + private final Optional description; + + private final Optional optional; + + private final Optional disabled; + + private final Optional hidden; + + private final Optional remoteOptions; + + private final Optional useQuery; + + private final Optional reloadProps; + + private final Optional withLabel; + + private final Map additionalProperties; + + private ConfigurablePropTimer( + Optional type, + Optional static_, + Optional default_, + Optional>> options, + String name, + Optional label, + Optional description, + Optional optional, + Optional disabled, + Optional hidden, + Optional remoteOptions, + Optional useQuery, + Optional reloadProps, + Optional withLabel, + Map additionalProperties) { + this.type = type; + this.static_ = static_; + this.default_ = default_; + this.options = options; + this.name = name; + this.label = label; + this.description = description; + this.optional = optional; + this.disabled = disabled; + this.hidden = hidden; + this.remoteOptions = remoteOptions; + this.useQuery = useQuery; + this.reloadProps = reloadProps; + this.withLabel = withLabel; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public Optional getType() { + return type; + } + + @JsonProperty("static") + public Optional getStatic() { + return static_; + } + + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + /** + * @return Available timer configuration options + */ + @JsonProperty("options") + public Optional>> getOptions() { + return options; + } + + /** + * @return When building configuredProps, make sure to use this field as the key when setting the prop value + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. + */ + @JsonProperty("label") + public Optional getLabel() { + return label; + } + + /** + * @return A description of the prop, shown to the user when configuring the component. + */ + @JsonProperty("description") + public Optional getDescription() { + return description; + } + + /** + * @return If true, this prop does not need to be specified. + */ + @JsonProperty("optional") + public Optional getOptional() { + return optional; + } + + /** + * @return If true, this prop will be ignored. + */ + @JsonProperty("disabled") + public Optional getDisabled() { + return disabled; + } + + /** + * @return If true, should not expose this prop to the user + */ + @JsonProperty("hidden") + public Optional getHidden() { + return hidden; + } + + /** + * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options + */ + @JsonProperty("remoteOptions") + public Optional getRemoteOptions() { + return remoteOptions; + } + + /** + * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options + */ + @JsonProperty("useQuery") + public Optional getUseQuery() { + return useQuery; + } + + /** + * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one + */ + @JsonProperty("reloadProps") + public Optional getReloadProps() { + return reloadProps; + } + + /** + * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label + */ + @JsonProperty("withLabel") + public Optional getWithLabel() { + return withLabel; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropTimer && equalTo((ConfigurablePropTimer) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfigurablePropTimer other) { + return type.equals(other.type) + && static_.equals(other.static_) + && default_.equals(other.default_) + && options.equals(other.options) + && name.equals(other.name) + && label.equals(other.label) + && description.equals(other.description) + && optional.equals(other.optional) + && disabled.equals(other.disabled) + && hidden.equals(other.hidden) + && remoteOptions.equals(other.remoteOptions) + && useQuery.equals(other.useQuery) + && reloadProps.equals(other.reloadProps) + && withLabel.equals(other.withLabel); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.type, + this.static_, + this.default_, + this.options, + this.name, + this.label, + this.description, + this.optional, + this.disabled, + this.hidden, + this.remoteOptions, + this.useQuery, + this.reloadProps, + this.withLabel); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ */ + _FinalStage name(@NotNull String name); + + Builder from(ConfigurablePropTimer other); + } + + public interface _FinalStage { + ConfigurablePropTimer build(); + + _FinalStage type(Optional type); + + _FinalStage type(String type); + + _FinalStage static_(Optional static_); + + _FinalStage static_(ConfigurablePropTimerStatic static_); + + _FinalStage default_(Optional default_); + + _FinalStage default_(ConfigurablePropTimerDefault default_); + + /** + *

Available timer configuration options

+ */ + _FinalStage options(Optional>> options); + + _FinalStage options(List> options); + + /** + *

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

A description of the prop, shown to the user when configuring the component.

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

If true, this prop does not need to be specified.

+ */ + _FinalStage optional(Optional optional); + + _FinalStage optional(Boolean optional); + + /** + *

If true, this prop will be ignored.

+ */ + _FinalStage disabled(Optional disabled); + + _FinalStage disabled(Boolean disabled); + + /** + *

If true, should not expose this prop to the user

+ */ + _FinalStage hidden(Optional hidden); + + _FinalStage hidden(Boolean hidden); + + /** + *

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

+ */ + _FinalStage remoteOptions(Optional remoteOptions); + + _FinalStage remoteOptions(Boolean remoteOptions); + + /** + *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

+ */ + _FinalStage useQuery(Optional useQuery); + + _FinalStage useQuery(Boolean useQuery); + + /** + *

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

+ */ + _FinalStage reloadProps(Optional reloadProps); + + _FinalStage reloadProps(Boolean reloadProps); + + /** + *

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

+ */ + _FinalStage withLabel(Optional withLabel); + + _FinalStage withLabel(Boolean withLabel); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional withLabel = Optional.empty(); + + private Optional reloadProps = Optional.empty(); + + private Optional useQuery = Optional.empty(); + + private Optional remoteOptions = Optional.empty(); + + private Optional hidden = Optional.empty(); + + private Optional disabled = Optional.empty(); + + private Optional optional = Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional label = Optional.empty(); + + private Optional>> options = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional static_ = Optional.empty(); + + private Optional type = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfigurablePropTimer other) { + type(other.getType()); + static_(other.getStatic()); + default_(other.getDefault()); + options(other.getOptions()); + name(other.getName()); + label(other.getLabel()); + description(other.getDescription()); + optional(other.getOptional()); + disabled(other.getDisabled()); + hidden(other.getHidden()); + remoteOptions(other.getRemoteOptions()); + useQuery(other.getUseQuery()); + reloadProps(other.getReloadProps()); + withLabel(other.getWithLabel()); + return this; + } + + /** + *

When building configuredProps, make sure to use this field as the key when setting the prop value

+ *

When building configuredProps, make sure to use this field as the key when setting the prop value

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

If true, this prop does not need to be specified.

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

If true, this prop does not need to be specified.

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

A description of the prop, shown to the user when configuring the component.

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

A description of the prop, shown to the user when configuring the component.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead.

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

Available timer configuration options

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

Available timer configuration options

+ */ + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional>> options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage default_(ConfigurablePropTimerDefault default_) { + this.default_ = Optional.ofNullable(default_); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default", nulls = Nulls.SKIP) + public _FinalStage default_(Optional default_) { + this.default_ = default_; + return this; + } + + @java.lang.Override + public _FinalStage static_(ConfigurablePropTimerStatic static_) { + this.static_ = Optional.ofNullable(static_); + return this; + } + + @java.lang.Override + @JsonSetter(value = "static", nulls = Nulls.SKIP) + public _FinalStage static_(Optional static_) { + this.static_ = static_; + return this; + } + + @java.lang.Override + public _FinalStage type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + + @java.lang.Override + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public _FinalStage type(Optional type) { + this.type = type; + return this; + } + + @java.lang.Override + public ConfigurablePropTimer build() { + return new ConfigurablePropTimer( + type, + static_, + default_, + options, + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java new file mode 100644 index 0000000..fb06fd0 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +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; + +@JsonDeserialize(using = ConfigurablePropTimerDefault.Deserializer.class) +public final class ConfigurablePropTimerDefault { + private final Object value; + + private final int type; + + private ConfigurablePropTimerDefault(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TimerInterval) this.value); + } else if (this.type == 1) { + return visitor.visit((TimerCron) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropTimerDefault && equalTo((ConfigurablePropTimerDefault) other); + } + + private boolean equalTo(ConfigurablePropTimerDefault other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ConfigurablePropTimerDefault of(TimerInterval value) { + return new ConfigurablePropTimerDefault(value, 0); + } + + public static ConfigurablePropTimerDefault of(TimerCron value) { + return new ConfigurablePropTimerDefault(value, 1); + } + + public interface Visitor { + T visit(TimerInterval value); + + T visit(TimerCron value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ConfigurablePropTimerDefault.class); + } + + @java.lang.Override + public ConfigurablePropTimerDefault deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerInterval.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerCron.class)); + } catch (IllegalArgumentException 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 new file mode 100644 index 0000000..fd35583 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerOption.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +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; + +@JsonDeserialize(using = ConfigurablePropTimerOption.Deserializer.class) +public final class ConfigurablePropTimerOption { + private final Object value; + + private final int type; + + private ConfigurablePropTimerOption(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TimerInterval) this.value); + } else if (this.type == 1) { + return visitor.visit((TimerCron) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropTimerOption && equalTo((ConfigurablePropTimerOption) other); + } + + private boolean equalTo(ConfigurablePropTimerOption other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ConfigurablePropTimerOption of(TimerInterval value) { + return new ConfigurablePropTimerOption(value, 0); + } + + public static ConfigurablePropTimerOption of(TimerCron value) { + return new ConfigurablePropTimerOption(value, 1); + } + + public interface Visitor { + T visit(TimerInterval value); + + T visit(TimerCron value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ConfigurablePropTimerOption.class); + } + + @java.lang.Override + public ConfigurablePropTimerOption deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerInterval.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerCron.class)); + } catch (IllegalArgumentException 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 new file mode 100644 index 0000000..40f66ad --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropTimerStatic.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +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; + +@JsonDeserialize(using = ConfigurablePropTimerStatic.Deserializer.class) +public final class ConfigurablePropTimerStatic { + private final Object value; + + private final int type; + + private ConfigurablePropTimerStatic(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TimerInterval) this.value); + } else if (this.type == 1) { + return visitor.visit((TimerCron) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurablePropTimerStatic && equalTo((ConfigurablePropTimerStatic) other); + } + + private boolean equalTo(ConfigurablePropTimerStatic other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ConfigurablePropTimerStatic of(TimerInterval value) { + return new ConfigurablePropTimerStatic(value, 0); + } + + public static ConfigurablePropTimerStatic of(TimerCron value) { + return new ConfigurablePropTimerStatic(value, 1); + } + + public interface Visitor { + T visit(TimerInterval value); + + T visit(TimerCron value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ConfigurablePropTimerStatic.class); + } + + @java.lang.Override + public ConfigurablePropTimerStatic deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerInterval.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimerCron.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/TimerCron.java b/src/main/java/com/pipedream/api/types/TimerCron.java new file mode 100644 index 0000000..e8a2905 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/TimerCron.java @@ -0,0 +1,113 @@ +/** + * 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.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = TimerCron.Builder.class) +public final class TimerCron { + private final String cron; + + private final Map additionalProperties; + + private TimerCron(String cron, Map additionalProperties) { + this.cron = cron; + this.additionalProperties = additionalProperties; + } + + /** + * @return Cron expression for timer execution + */ + @JsonProperty("cron") + public String getCron() { + return cron; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimerCron && equalTo((TimerCron) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(TimerCron other) { + return cron.equals(other.cron); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.cron); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static CronStage builder() { + return new Builder(); + } + + public interface CronStage { + /** + *

Cron expression for timer execution

+ */ + _FinalStage cron(@NotNull String cron); + + Builder from(TimerCron other); + } + + public interface _FinalStage { + TimerCron build(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements CronStage, _FinalStage { + private String cron; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(TimerCron other) { + cron(other.getCron()); + return this; + } + + /** + *

Cron expression for timer execution

+ *

Cron expression for timer execution

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("cron") + public _FinalStage cron(@NotNull String cron) { + this.cron = Objects.requireNonNull(cron, "cron must not be null"); + return this; + } + + @java.lang.Override + public TimerCron build() { + return new TimerCron(cron, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/TimerInterval.java b/src/main/java/com/pipedream/api/types/TimerInterval.java new file mode 100644 index 0000000..8a2d74b --- /dev/null +++ b/src/main/java/com/pipedream/api/types/TimerInterval.java @@ -0,0 +1,112 @@ +/** + * 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.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = TimerInterval.Builder.class) +public final class TimerInterval { + private final int intervalSeconds; + + private final Map additionalProperties; + + private TimerInterval(int intervalSeconds, Map additionalProperties) { + this.intervalSeconds = intervalSeconds; + this.additionalProperties = additionalProperties; + } + + /** + * @return Interval in seconds for timer execution + */ + @JsonProperty("intervalSeconds") + public int getIntervalSeconds() { + return intervalSeconds; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimerInterval && equalTo((TimerInterval) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(TimerInterval other) { + return intervalSeconds == other.intervalSeconds; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.intervalSeconds); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IntervalSecondsStage builder() { + return new Builder(); + } + + public interface IntervalSecondsStage { + /** + *

Interval in seconds for timer execution

+ */ + _FinalStage intervalSeconds(int intervalSeconds); + + Builder from(TimerInterval other); + } + + public interface _FinalStage { + TimerInterval build(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IntervalSecondsStage, _FinalStage { + private int intervalSeconds; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(TimerInterval other) { + intervalSeconds(other.getIntervalSeconds()); + return this; + } + + /** + *

Interval in seconds for timer execution

+ *

Interval in seconds for timer execution

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("intervalSeconds") + public _FinalStage intervalSeconds(int intervalSeconds) { + this.intervalSeconds = intervalSeconds; + return this; + } + + @java.lang.Override + public TimerInterval build() { + return new TimerInterval(intervalSeconds, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ValidateTokenParams.java b/src/main/java/com/pipedream/api/types/ValidateTokenParams.java deleted file mode 100644 index 26f43cb..0000000 --- a/src/main/java/com/pipedream/api/types/ValidateTokenParams.java +++ /dev/null @@ -1,156 +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; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ValidateTokenParams.Builder.class) -public final class ValidateTokenParams { - private final String appId; - - private final Optional oauthAppId; - - private final Map additionalProperties; - - private ValidateTokenParams(String appId, Optional oauthAppId, Map additionalProperties) { - this.appId = appId; - this.oauthAppId = oauthAppId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The app ID to validate against - */ - @JsonProperty("app_id") - public String getAppId() { - return appId; - } - - /** - * @return The OAuth app ID - */ - @JsonProperty("oauth_app_id") - public Optional getOauthAppId() { - return oauthAppId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ValidateTokenParams && equalTo((ValidateTokenParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ValidateTokenParams other) { - return appId.equals(other.appId) && oauthAppId.equals(other.oauthAppId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.appId, this.oauthAppId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AppIdStage builder() { - return new Builder(); - } - - public interface AppIdStage { - /** - *

The app ID to validate against

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

The OAuth app ID

- */ - _FinalStage oauthAppId(Optional oauthAppId); - - _FinalStage oauthAppId(String oauthAppId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AppIdStage, _FinalStage { - private String appId; - - private Optional oauthAppId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ValidateTokenParams other) { - appId(other.getAppId()); - oauthAppId(other.getOauthAppId()); - return this; - } - - /** - *

The app ID to validate against

- *

The app ID to validate against

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

The OAuth app ID

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

The OAuth app ID

- */ - @java.lang.Override - @JsonSetter(value = "oauth_app_id", nulls = Nulls.SKIP) - public _FinalStage oauthAppId(Optional oauthAppId) { - this.oauthAppId = oauthAppId; - return this; - } - - @java.lang.Override - public ValidateTokenParams build() { - return new ValidateTokenParams(appId, oauthAppId, additionalProperties); - } - } -}