From 85ec36f19e6a7c3799038a69762079802cdc3d3c Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 21:48:08 +0000 Subject: [PATCH] SDK regeneration --- .../api/resources/actions/ActionsClient.java | 12 +- .../resources/actions/AsyncActionsClient.java | 13 +- .../actions/AsyncRawActionsClient.java | 71 +- .../resources/actions/RawActionsClient.java | 69 +- .../requests/ActionsConfigurePropRequest.java | 134 ++++ .../requests/ActionsReloadPropsRequest.java | 134 ++++ .../actions/requests/RunActionOpts.java | 69 +- .../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 | 13 +- .../resources/tokens/AsyncTokensClient.java | 4 + .../api/resources/tokens/RawTokensClient.java | 13 +- .../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 ++++ .../java/com/pipedream/api/types/App.java | 13 + .../com/pipedream/api/types/Component.java | 13 + .../pipedream/api/types/ConfigurableProp.java | 303 ++----- .../types/ConfigurablePropAirtableBaseId.java | 602 -------------- .../ConfigurablePropAirtableFieldId.java | 602 -------------- .../ConfigurablePropAirtableTableId.java | 602 -------------- .../types/ConfigurablePropAirtableViewId.java | 602 -------------- .../api/types/ConfigurablePropAlert.java | 362 +++------ ...va => ConfigurablePropAlertAlertType.java} | 4 +- .../api/types/ConfigurablePropAny.java | 303 ++----- .../api/types/ConfigurablePropApp.java | 328 +++----- .../api/types/ConfigurablePropApphook.java | 738 ------------------ .../api/types/ConfigurablePropBoolean.java | 303 ++----- .../api/types/ConfigurablePropDb.java | 557 ------------- .../api/types/ConfigurablePropDiscord.java | 303 ++----- .../types/ConfigurablePropDiscordChannel.java | 602 -------------- .../ConfigurablePropDiscordChannelArray.java | 603 -------------- .../api/types/ConfigurablePropHttp.java | 602 -------------- .../api/types/ConfigurablePropInteger.java | 436 +++-------- .../types/ConfigurablePropIntegerArray.java | 738 ------------------ .../api/types/ConfigurablePropObject.java | 303 ++----- .../api/types/ConfigurablePropSql.java | 634 --------------- .../api/types/ConfigurablePropString.java | 328 +++----- .../types/ConfigurablePropStringArray.java | 328 +++----- .../api/types/ConfigurablePropTimer.java | 667 ---------------- .../types/ConfigurablePropTimerDefault.java | 96 --- .../types/ConfigurablePropTimerOption.java | 96 --- .../types/ConfigurablePropTimerStatic.java | 96 --- .../api/types/ConfigurePropResponse.java | 133 +--- .../api/types/ConnectTokenCreateOpts.java | 301 +++++++ .../api/types/ConnectTokenResponse.java | 183 +++++ ...Auth.java => CreateBrowserClientOpts.java} | 48 +- .../api/types/CreateTokenResponse.java | 11 + .../api/types/ProjectInfoResponse.java | 14 +- ....java => ProjectInfoResponseAppsItem.java} | 85 +- .../api/types/RunActionOptsStashId.java | 120 --- .../api/types/RunActionResponse.java | 6 + .../com/pipedream/api/types/TimerCron.java | 113 --- .../pipedream/api/types/TimerInterval.java | 112 --- .../api/types/ValidateTokenParams.java | 156 ++++ 64 files changed, 2768 insertions(+), 11072 deletions(-) create mode 100644 src/main/java/com/pipedream/api/resources/actions/requests/ActionsConfigurePropRequest.java create mode 100644 src/main/java/com/pipedream/api/resources/actions/requests/ActionsReloadPropsRequest.java create mode 100644 src/main/java/com/pipedream/api/resources/components/requests/ComponentsConfigurePropRequest.java create mode 100644 src/main/java/com/pipedream/api/resources/components/requests/ComponentsReloadPropsRequest.java create mode 100644 src/main/java/com/pipedream/api/resources/triggers/requests/TriggersConfigurePropRequest.java create mode 100644 src/main/java/com/pipedream/api/resources/triggers/requests/TriggersReloadPropsRequest.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java rename src/main/java/com/pipedream/api/types/{ConfigurablePropAlertType.java => ConfigurablePropAlertAlertType.java} (81%) delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropDb.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropSql.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropTimerOption.java delete mode 100644 src/main/java/com/pipedream/api/types/ConfigurablePropTimerStatic.java create mode 100644 src/main/java/com/pipedream/api/types/ConnectTokenCreateOpts.java create mode 100644 src/main/java/com/pipedream/api/types/ConnectTokenResponse.java rename src/main/java/com/pipedream/api/types/{ConfigurablePropSqlAuth.java => CreateBrowserClientOpts.java} (58%) rename src/main/java/com/pipedream/api/types/{ProjectInfoResponseApp.java => ProjectInfoResponseAppsItem.java} (54%) delete mode 100644 src/main/java/com/pipedream/api/types/RunActionOptsStashId.java delete mode 100644 src/main/java/com/pipedream/api/types/TimerCron.java delete mode 100644 src/main/java/com/pipedream/api/types/TimerInterval.java create 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 c9dce61..52efedb 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(ConfigurePropOpts request) { + public ConfigurePropResponse configureProp(ActionsConfigurePropRequest request) { return this.rawClient.configureProp(request).body(); } - public ConfigurePropResponse configureProp(ConfigurePropOpts request, RequestOptions requestOptions) { + public ConfigurePropResponse configureProp(ActionsConfigurePropRequest request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).body(); } - public ReloadPropsResponse reloadProps(ReloadPropsOpts request) { + public ReloadPropsResponse reloadProps(ActionsReloadPropsRequest request) { return this.rawClient.reloadProps(request).body(); } - public ReloadPropsResponse reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { + public ReloadPropsResponse reloadProps(ActionsReloadPropsRequest 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 94509c9..19ff8e7 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,20 +54,21 @@ public CompletableFuture retrieve(String componentId, RequestOptions return this.rawClient.retrieve(componentId, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture configureProp(ConfigurePropOpts request) { + public CompletableFuture configureProp(ActionsConfigurePropRequest request) { return this.rawClient.configureProp(request).thenApply(response -> response.body()); } public CompletableFuture configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + ActionsConfigurePropRequest request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(ReloadPropsOpts request) { + public CompletableFuture reloadProps(ActionsReloadPropsRequest request) { return this.rawClient.reloadProps(request).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { + public CompletableFuture reloadProps( + ActionsReloadPropsRequest 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 57e3dce..8b1ab94 100644 --- a/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java +++ b/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java @@ -3,7 +3,6 @@ */ 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; @@ -13,18 +12,20 @@ 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; @@ -191,12 +192,13 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> configureProp(ConfigurePropOpts request) { + public CompletableFuture> configureProp( + ActionsConfigurePropRequest request) { return configureProp(request, null); } public CompletableFuture> configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + ActionsConfigurePropRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -206,17 +208,20 @@ public CompletableFuture> configur RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -252,12 +257,13 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> reloadProps(ReloadPropsOpts request) { + public CompletableFuture> reloadProps( + ActionsReloadPropsRequest request) { return reloadProps(request, null); } public CompletableFuture> reloadProps( - ReloadPropsOpts request, RequestOptions requestOptions) { + ActionsReloadPropsRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -267,17 +273,20 @@ public CompletableFuture> reloadProp RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -325,20 +334,32 @@ 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()); + } RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.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 2906f84..1dbf30b 100644 --- a/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java +++ b/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java @@ -3,7 +3,6 @@ */ 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; @@ -13,18 +12,20 @@ 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; @@ -152,12 +153,12 @@ public BaseClientHttpResponse retrieve(String componentId, RequestOpt } } - public BaseClientHttpResponse configureProp(ConfigurePropOpts request) { + public BaseClientHttpResponse configureProp(ActionsConfigurePropRequest request) { return configureProp(request, null); } public BaseClientHttpResponse configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + ActionsConfigurePropRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -167,17 +168,20 @@ public BaseClientHttpResponse configureProp( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -200,12 +204,12 @@ public BaseClientHttpResponse configureProp( } } - public BaseClientHttpResponse reloadProps(ReloadPropsOpts request) { + public BaseClientHttpResponse reloadProps(ActionsReloadPropsRequest request) { return reloadProps(request, null); } public BaseClientHttpResponse reloadProps( - ReloadPropsOpts request, RequestOptions requestOptions) { + ActionsReloadPropsRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -215,17 +219,20 @@ public BaseClientHttpResponse reloadProps( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -259,20 +266,32 @@ 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()); + } RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.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 new file mode 100644 index 0000000..5da951b --- /dev/null +++ b/src/main/java/com/pipedream/api/resources/actions/requests/ActionsConfigurePropRequest.java @@ -0,0 +1,134 @@ +/** + * 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 new file mode 100644 index 0000000..afefa8a --- /dev/null +++ b/src/main/java/com/pipedream/api/resources/actions/requests/ActionsReloadPropsRequest.java @@ -0,0 +1,134 @@ +/** + * 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 afbc0ee..6a16af8 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 @@ -12,7 +12,6 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.pipedream.api.core.ObjectMappers; -import com.pipedream.api.types.RunActionOptsStashId; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -22,6 +21,8 @@ @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; @@ -30,25 +31,28 @@ public final class RunActionOpts { private final Optional dynamicPropsId; - private final Optional stashId; - 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; this.dynamicPropsId = dynamicPropsId; - this.stashId = stashId; this.additionalProperties = additionalProperties; } + @JsonProperty("x-async-handle") + public Optional getAsyncHandle() { + return asyncHandle; + } + /** * @return The action component ID */ @@ -81,11 +85,6 @@ public Optional getDynamicPropsId() { return dynamicPropsId; } - @JsonProperty("stash_id") - public Optional getStashId() { - return stashId; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -98,16 +97,16 @@ public Map getAdditionalProperties() { } private boolean equalTo(RunActionOpts other) { - return id.equals(other.id) + return asyncHandle.equals(other.asyncHandle) + && id.equals(other.id) && externalUserId.equals(other.externalUserId) && configuredProps.equals(other.configuredProps) - && dynamicPropsId.equals(other.dynamicPropsId) - && stashId.equals(other.stashId); + && dynamicPropsId.equals(other.dynamicPropsId); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.externalUserId, this.configuredProps, this.dynamicPropsId, this.stashId); + return Objects.hash(this.asyncHandle, this.id, this.externalUserId, this.configuredProps, this.dynamicPropsId); } @java.lang.Override @@ -138,6 +137,10 @@ public interface ExternalUserIdStage { public interface _FinalStage { RunActionOpts build(); + _FinalStage asyncHandle(Optional asyncHandle); + + _FinalStage asyncHandle(String asyncHandle); + /** *

The configured properties for the action

*/ @@ -151,10 +154,6 @@ public interface _FinalStage { _FinalStage dynamicPropsId(Optional dynamicPropsId); _FinalStage dynamicPropsId(String dynamicPropsId); - - _FinalStage stashId(Optional stashId); - - _FinalStage stashId(RunActionOptsStashId stashId); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -163,12 +162,12 @@ public static final class Builder implements IdStage, ExternalUserIdStage, _Fina private String externalUserId; - private Optional stashId = Optional.empty(); - private Optional dynamicPropsId = Optional.empty(); private Optional> configuredProps = Optional.empty(); + private Optional asyncHandle = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -176,11 +175,11 @@ private Builder() {} @java.lang.Override public Builder from(RunActionOpts other) { + asyncHandle(other.getAsyncHandle()); id(other.getId()); externalUserId(other.getExternalUserId()); configuredProps(other.getConfiguredProps()); dynamicPropsId(other.getDynamicPropsId()); - stashId(other.getStashId()); return this; } @@ -208,19 +207,6 @@ public _FinalStage externalUserId(@NotNull String externalUserId) { return this; } - @java.lang.Override - public _FinalStage stashId(RunActionOptsStashId stashId) { - this.stashId = Optional.ofNullable(stashId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "stash_id", nulls = Nulls.SKIP) - public _FinalStage stashId(Optional stashId) { - this.stashId = stashId; - return this; - } - /** *

The ID for dynamic props

* @return Reference to {@code this} so that method calls can be chained together. @@ -261,10 +247,23 @@ 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( - id, externalUserId, configuredProps, dynamicPropsId, stashId, additionalProperties); + asyncHandle, id, externalUserId, configuredProps, dynamicPropsId, 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 4c9ba6d..c5934f3 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,20 +52,21 @@ public CompletableFuture retrieve(String componentId, RequestOptions return this.rawClient.retrieve(componentId, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture configureProp(ConfigurePropOpts request) { + public CompletableFuture configureProp(ComponentsConfigurePropRequest request) { return this.rawClient.configureProp(request).thenApply(response -> response.body()); } public CompletableFuture configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + ComponentsConfigurePropRequest request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(ReloadPropsOpts request) { + public CompletableFuture reloadProps(ComponentsReloadPropsRequest request) { return this.rawClient.reloadProps(request).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { + public CompletableFuture reloadProps( + ComponentsReloadPropsRequest 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 8d72783..f0e05a6 100644 --- a/src/main/java/com/pipedream/api/resources/components/AsyncRawComponentsClient.java +++ b/src/main/java/com/pipedream/api/resources/components/AsyncRawComponentsClient.java @@ -3,7 +3,6 @@ */ 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; @@ -13,13 +12,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; @@ -190,12 +189,13 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> configureProp(ConfigurePropOpts request) { + public CompletableFuture> configureProp( + ComponentsConfigurePropRequest request) { return configureProp(request, null); } public CompletableFuture> configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + ComponentsConfigurePropRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -205,17 +205,20 @@ public CompletableFuture> configur RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -251,12 +254,13 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> reloadProps(ReloadPropsOpts request) { + public CompletableFuture> reloadProps( + ComponentsReloadPropsRequest request) { return reloadProps(request, null); } public CompletableFuture> reloadProps( - ReloadPropsOpts request, RequestOptions requestOptions) { + ComponentsReloadPropsRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -266,17 +270,20 @@ public CompletableFuture> reloadProp RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.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 9c103ff..f273dcb 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(ConfigurePropOpts request) { + public ConfigurePropResponse configureProp(ComponentsConfigurePropRequest request) { return this.rawClient.configureProp(request).body(); } - public ConfigurePropResponse configureProp(ConfigurePropOpts request, RequestOptions requestOptions) { + public ConfigurePropResponse configureProp(ComponentsConfigurePropRequest request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).body(); } - public ReloadPropsResponse reloadProps(ReloadPropsOpts request) { + public ReloadPropsResponse reloadProps(ComponentsReloadPropsRequest request) { return this.rawClient.reloadProps(request).body(); } - public ReloadPropsResponse reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { + public ReloadPropsResponse reloadProps(ComponentsReloadPropsRequest 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 48cfd19..9cd5a6f 100644 --- a/src/main/java/com/pipedream/api/resources/components/RawComponentsClient.java +++ b/src/main/java/com/pipedream/api/resources/components/RawComponentsClient.java @@ -3,7 +3,6 @@ */ 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; @@ -13,13 +12,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; @@ -150,12 +149,12 @@ public BaseClientHttpResponse retrieve(String componentId, RequestOpt } } - public BaseClientHttpResponse configureProp(ConfigurePropOpts request) { + public BaseClientHttpResponse configureProp(ComponentsConfigurePropRequest request) { return configureProp(request, null); } public BaseClientHttpResponse configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + ComponentsConfigurePropRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -165,17 +164,20 @@ public BaseClientHttpResponse configureProp( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -198,12 +200,12 @@ public BaseClientHttpResponse configureProp( } } - public BaseClientHttpResponse reloadProps(ReloadPropsOpts request) { + public BaseClientHttpResponse reloadProps(ComponentsReloadPropsRequest request) { return reloadProps(request, null); } public BaseClientHttpResponse reloadProps( - ReloadPropsOpts request, RequestOptions requestOptions) { + ComponentsReloadPropsRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -213,17 +215,20 @@ public BaseClientHttpResponse reloadProps( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.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 new file mode 100644 index 0000000..541a93e --- /dev/null +++ b/src/main/java/com/pipedream/api/resources/components/requests/ComponentsConfigurePropRequest.java @@ -0,0 +1,134 @@ +/** + * 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 new file mode 100644 index 0000000..960dc66 --- /dev/null +++ b/src/main/java/com/pipedream/api/resources/components/requests/ComponentsReloadPropsRequest.java @@ -0,0 +1,134 @@ +/** + * 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 81b744c..e6f7c8c 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java @@ -97,6 +97,10 @@ 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); @@ -106,13 +110,14 @@ public CompletableFuture> validate String ctok, TokensValidateRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("v1/connect/tokens") + .addPathSegments("v1/connect") + .addPathSegment(clientOptions.projectId()) + .addPathSegments("tokens") .addPathSegment(ctok) .addPathSegments("validate"); - QueryStringMapper.addQueryParameter(httpUrl, "app_id", request.getAppId(), false); - if (request.getOauthAppId().isPresent()) { + if (request.getParams().isPresent()) { QueryStringMapper.addQueryParameter( - httpUrl, "oauth_app_id", request.getOauthAppId().get(), false); + httpUrl, "params", request.getParams().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 2b6b6bb..e918132 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/AsyncTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/AsyncTokensClient.java @@ -36,6 +36,10 @@ 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 9fb4642..7b0a9de 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java @@ -79,6 +79,10 @@ 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); } @@ -87,13 +91,14 @@ public BaseClientHttpResponse validate( String ctok, TokensValidateRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("v1/connect/tokens") + .addPathSegments("v1/connect") + .addPathSegment(clientOptions.projectId()) + .addPathSegments("tokens") .addPathSegment(ctok) .addPathSegments("validate"); - QueryStringMapper.addQueryParameter(httpUrl, "app_id", request.getAppId(), false); - if (request.getOauthAppId().isPresent()) { + if (request.getParams().isPresent()) { QueryStringMapper.addQueryParameter( - httpUrl, "oauth_app_id", request.getOauthAppId().get(), false); + httpUrl, "params", request.getParams().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 3446ef4..39c90ad 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/TokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/TokensClient.java @@ -35,6 +35,10 @@ 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 dd18fed..1479f3c 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,41 +12,27 @@ 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 String appId; - - private final Optional oauthAppId; + private final Optional params; private final Map additionalProperties; - private TokensValidateRequest(String appId, Optional oauthAppId, Map additionalProperties) { - this.appId = appId; - this.oauthAppId = oauthAppId; + private TokensValidateRequest(Optional params, Map additionalProperties) { + this.params = params; this.additionalProperties = additionalProperties; } - /** - * @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; + @JsonProperty("params") + public Optional getParams() { + return params; } @java.lang.Override @@ -61,12 +47,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(TokensValidateRequest other) { - return appId.equals(other.appId) && oauthAppId.equals(other.oauthAppId); + return params.equals(other.params); } @java.lang.Override public int hashCode() { - return Objects.hash(this.appId, this.oauthAppId); + return Objects.hash(this.params); } @java.lang.Override @@ -74,83 +60,37 @@ public String toString() { return ObjectMappers.stringify(this); } - public static AppIdStage builder() { + public static Builder 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 implements AppIdStage, _FinalStage { - private String appId; - - private Optional oauthAppId = Optional.empty(); + public static final class Builder { + private Optional params = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(TokensValidateRequest 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"); + params(other.getParams()); return this; } - /** - *

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

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; + public Builder params(ValidateTokenParams params) { + this.params = Optional.ofNullable(params); return this; } - @java.lang.Override public TokensValidateRequest build() { - return new TokensValidateRequest(appId, oauthAppId, additionalProperties); + return new TokensValidateRequest(params, 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 ee92f93..ddc9aff 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,12 +192,13 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> configureProp(ConfigurePropOpts request) { + public CompletableFuture> configureProp( + TriggersConfigurePropRequest request) { return configureProp(request, null); } public CompletableFuture> configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + TriggersConfigurePropRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -207,17 +208,20 @@ public CompletableFuture> configur RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -253,12 +257,13 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - public CompletableFuture> reloadProps(ReloadPropsOpts request) { + public CompletableFuture> reloadProps( + TriggersReloadPropsRequest request) { return reloadProps(request, null); } public CompletableFuture> reloadProps( - ReloadPropsOpts request, RequestOptions requestOptions) { + TriggersReloadPropsRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -268,17 +273,20 @@ public CompletableFuture> reloadProp RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.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 e930281..2f3361f 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,20 +54,21 @@ public CompletableFuture retrieve(String componentId, RequestOptions return this.rawClient.retrieve(componentId, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture configureProp(ConfigurePropOpts request) { + public CompletableFuture configureProp(TriggersConfigurePropRequest request) { return this.rawClient.configureProp(request).thenApply(response -> response.body()); } public CompletableFuture configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + TriggersConfigurePropRequest request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(ReloadPropsOpts request) { + public CompletableFuture reloadProps(TriggersReloadPropsRequest request) { return this.rawClient.reloadProps(request).thenApply(response -> response.body()); } - public CompletableFuture reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { + public CompletableFuture reloadProps( + TriggersReloadPropsRequest 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 fe6e140..192686d 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(ConfigurePropOpts request) { + public BaseClientHttpResponse configureProp(TriggersConfigurePropRequest request) { return configureProp(request, null); } public BaseClientHttpResponse configureProp( - ConfigurePropOpts request, RequestOptions requestOptions) { + TriggersConfigurePropRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -168,17 +168,20 @@ public BaseClientHttpResponse configureProp( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -201,12 +204,12 @@ public BaseClientHttpResponse configureProp( } } - public BaseClientHttpResponse reloadProps(ReloadPropsOpts request) { + public BaseClientHttpResponse reloadProps(TriggersReloadPropsRequest request) { return reloadProps(request, null); } public BaseClientHttpResponse reloadProps( - ReloadPropsOpts request, RequestOptions requestOptions) { + TriggersReloadPropsRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("v1/connect") @@ -216,17 +219,20 @@ public BaseClientHttpResponse reloadProps( RequestBody body; try { body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new BaseClientException("Failed to serialize request", e); + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request.getBody()), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); } - Request okhttpRequest = new Request.Builder() + Request.Builder _requestBuilder = new Request.Builder() .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + if (request.getAsyncHandle().isPresent()) { + _requestBuilder.addHeader("x-async-handle", request.getAsyncHandle().get()); + } + Request okhttpRequest = _requestBuilder.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 06f0f49..d16a37b 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(ConfigurePropOpts request) { + public ConfigurePropResponse configureProp(TriggersConfigurePropRequest request) { return this.rawClient.configureProp(request).body(); } - public ConfigurePropResponse configureProp(ConfigurePropOpts request, RequestOptions requestOptions) { + public ConfigurePropResponse configureProp(TriggersConfigurePropRequest request, RequestOptions requestOptions) { return this.rawClient.configureProp(request, requestOptions).body(); } - public ReloadPropsResponse reloadProps(ReloadPropsOpts request) { + public ReloadPropsResponse reloadProps(TriggersReloadPropsRequest request) { return this.rawClient.reloadProps(request).body(); } - public ReloadPropsResponse reloadProps(ReloadPropsOpts request, RequestOptions requestOptions) { + public ReloadPropsResponse reloadProps(TriggersReloadPropsRequest 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 new file mode 100644 index 0000000..dda960b --- /dev/null +++ b/src/main/java/com/pipedream/api/resources/triggers/requests/TriggersConfigurePropRequest.java @@ -0,0 +1,134 @@ +/** + * 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 new file mode 100644 index 0000000..b40b8ca --- /dev/null +++ b/src/main/java/com/pipedream/api/resources/triggers/requests/TriggersReloadPropsRequest.java @@ -0,0 +1,134 @@ +/** + * 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/App.java b/src/main/java/com/pipedream/api/types/App.java index ea4a85d..2983820 100644 --- a/src/main/java/com/pipedream/api/types/App.java +++ b/src/main/java/com/pipedream/api/types/App.java @@ -90,6 +90,9 @@ public String getName() { return name; } + /** + * @return The authentication type used by the app + */ @JsonProperty("auth_type") public Optional getAuthType() { return authType; @@ -221,6 +224,9 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

The authentication type used by the app

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

The authentication type used by the app

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

The authentication type used by the app

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

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

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

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

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

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

+ */ @java.lang.Override @JsonSetter(value = "stash", nulls = Nulls.SKIP) public _FinalStage stash(Optional stash) { diff --git a/src/main/java/com/pipedream/api/types/ConfigurableProp.java b/src/main/java/com/pipedream/api/types/ConfigurableProp.java index 014fbe5..9b27278 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurableProp.java +++ b/src/main/java/com/pipedream/api/types/ConfigurableProp.java @@ -16,12 +16,11 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurableProp.Builder.class) public final class ConfigurableProp { - private final String name; + private final Optional name; private final Optional type; @@ -46,7 +45,7 @@ public final class ConfigurableProp { private final Map additionalProperties; private ConfigurableProp( - String name, + Optional name, Optional type, Optional label, Optional description, @@ -76,7 +75,7 @@ private ConfigurableProp( * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -203,120 +202,39 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurableProp other); - } - - public interface _FinalStage { - ConfigurableProp 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; + public static final class Builder { + private Optional name = Optional.empty(); - private Optional withLabel = Optional.empty(); - - private Optional reloadProps = Optional.empty(); + private Optional type = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurableProp other) { name(other.getName()); type(other.getType()); @@ -334,210 +252,155 @@ public Builder from(ConfigurableProp other) { /** *

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"); + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); 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; + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; 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); + public Builder type(String type) { + this.type = Optional.ofNullable(type); 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

+ *

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

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "optional", nulls = Nulls.SKIP) + public Builder optional(Optional optional) { + this.optional = optional; + return this; + } + + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); 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. + *

If true, this prop will be ignored.

*/ - @java.lang.Override - public _FinalStage hidden(Boolean hidden) { - this.hidden = Optional.ofNullable(hidden); + @JsonSetter(value = "disabled", nulls = Nulls.SKIP) + public Builder disabled(Optional disabled) { + this.disabled = disabled; + return this; + } + + public Builder disabled(Boolean disabled) { + this.disabled = Optional.ofNullable(disabled); 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) { + public Builder 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

If true, this prop will be ignored.

+ *

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

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) + public Builder useQuery(Optional useQuery) { + this.useQuery = useQuery; 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); + public Builder useQuery(Boolean useQuery) { + this.useQuery = Optional.ofNullable(useQuery); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; 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); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); 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.

+ *

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 = "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); + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurableProp build() { return new ConfigurableProp( name, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java deleted file mode 100644 index df43432..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java +++ /dev/null @@ -1,602 +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 = 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 deleted file mode 100644 index aef7374..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java +++ /dev/null @@ -1,602 +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 = 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 deleted file mode 100644 index be315c4..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java +++ /dev/null @@ -1,602 +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 = 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 deleted file mode 100644 index 3a29b7a..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java +++ /dev/null @@ -1,602 +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 = 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/ConfigurablePropAlert.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java index 23b4bb3..782303c 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java @@ -16,18 +16,17 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropAlert.Builder.class) public final class ConfigurablePropAlert { private final Optional type; - private final Optional alertType; + private final Optional alertType; private final Optional content; - private final String name; + private final Optional name; private final Optional label; @@ -51,9 +50,9 @@ public final class ConfigurablePropAlert { private ConfigurablePropAlert( Optional type, - Optional alertType, + Optional alertType, Optional content, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -85,8 +84,11 @@ public Optional getType() { return type; } + /** + * @return The severity level of the alert. + */ @JsonProperty("alertType") - public Optional getAlertType() { + public Optional getAlertType() { return alertType; } @@ -102,7 +104,7 @@ public Optional getContent() { * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -228,135 +230,43 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropAlert other); - } - - public interface _FinalStage { - ConfigurablePropAlert build(); - - _FinalStage type(Optional type); - - _FinalStage type(String type); - - _FinalStage alertType(Optional alertType); - - _FinalStage alertType(ConfigurablePropAlertType alertType); - - /** - *

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

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

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(); + public static final class Builder { + private Optional type = Optional.empty(); - private Optional reloadProps = Optional.empty(); + private Optional alertType = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional content = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional name = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional label = Optional.empty(); - private Optional disabled = Optional.empty(); + private Optional description = Optional.empty(); private Optional optional = Optional.empty(); - private Optional description = Optional.empty(); + private Optional disabled = Optional.empty(); - private Optional label = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional content = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional alertType = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropAlert other) { type(other.getType()); alertType(other.getAlertType()); @@ -374,245 +284,185 @@ public Builder from(ConfigurablePropAlert other) { 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"); + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; 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); + public Builder type(String type) { + this.type = Optional.ofNullable(type); 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

+ *

The severity level of the alert.

*/ - @java.lang.Override - @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) - public _FinalStage withLabel(Optional withLabel) { - this.withLabel = withLabel; + @JsonSetter(value = "alertType", nulls = Nulls.SKIP) + public Builder alertType(Optional alertType) { + this.alertType = alertType; 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); + public Builder alertType(ConfigurablePropAlertAlertType alertType) { + this.alertType = Optional.ofNullable(alertType); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "content", nulls = Nulls.SKIP) + public Builder content(Optional content) { + this.content = content; 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); + public Builder content(String content) { + this.content = Optional.ofNullable(content); return this; } /** - *

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); 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

+ *

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

If true, should not expose this prop to the user

+ *

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

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

If true, this prop will be ignored.

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

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

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

If true, this prop will be ignored.

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

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

+ *

If true, should not expose this prop to the user

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "hidden", nulls = Nulls.SKIP) + public Builder hidden(Optional hidden) { + this.hidden = hidden; 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) + public Builder remoteOptions(Optional remoteOptions) { + this.remoteOptions = remoteOptions; 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); + public Builder remoteOptions(Boolean remoteOptions) { + this.remoteOptions = Optional.ofNullable(remoteOptions); 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.

+ *

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

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

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

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

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

+ *

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 = "content", nulls = Nulls.SKIP) - public _FinalStage content(Optional content) { - this.content = content; - return this; - } - - @java.lang.Override - public _FinalStage alertType(ConfigurablePropAlertType alertType) { - this.alertType = Optional.ofNullable(alertType); + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; return this; } - @java.lang.Override - @JsonSetter(value = "alertType", nulls = Nulls.SKIP) - public _FinalStage alertType(Optional alertType) { - this.alertType = alertType; + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); return this; } - @java.lang.Override - public _FinalStage type(String type) { - this.type = Optional.ofNullable(type); + /** + *

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

+ */ + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropAlert build() { return new ConfigurablePropAlert( type, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAlertType.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAlertAlertType.java similarity index 81% rename from src/main/java/com/pipedream/api/types/ConfigurablePropAlertType.java rename to src/main/java/com/pipedream/api/types/ConfigurablePropAlertAlertType.java index 33b65bd..539ca52 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAlertType.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAlertAlertType.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonValue; -public enum ConfigurablePropAlertType { +public enum ConfigurablePropAlertAlertType { INFO("info"), NEUTRAL("neutral"), @@ -16,7 +16,7 @@ public enum ConfigurablePropAlertType { private final String value; - ConfigurablePropAlertType(String value) { + ConfigurablePropAlertAlertType(String value) { this.value = value; } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAny.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAny.java index caff2b5..87824c9 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAny.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAny.java @@ -16,14 +16,13 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropAny.Builder.class) public final class ConfigurablePropAny { private final Optional type; - private final String name; + private final Optional name; private final Optional label; @@ -47,7 +46,7 @@ public final class ConfigurablePropAny { private ConfigurablePropAny( Optional type, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -81,7 +80,7 @@ public Optional getType() { * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -203,120 +202,39 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropAny other); - } - - public interface _FinalStage { - ConfigurablePropAny 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; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional name = Optional.empty(); - private Optional reloadProps = Optional.empty(); - - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropAny other) { type(other.getType()); name(other.getName()); @@ -332,212 +250,157 @@ public Builder from(ConfigurablePropAny other) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(String type) { + this.type = Optional.ofNullable(type); + 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"); + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); 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

+ *

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 = "withLabel", nulls = Nulls.SKIP) - public _FinalStage withLabel(Optional withLabel) { - this.withLabel = withLabel; + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public Builder label(Optional label) { + this.label = label; 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); + public Builder label(String label) { + this.label = Optional.ofNullable(label); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); return this; } /** - *

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "optional", nulls = Nulls.SKIP) + public Builder optional(Optional optional) { + this.optional = optional; 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); + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); 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

+ *

If true, this prop will be ignored.

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "disabled", nulls = Nulls.SKIP) + public Builder disabled(Optional disabled) { + this.disabled = disabled; 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); + public Builder disabled(Boolean disabled) { + this.disabled = Optional.ofNullable(disabled); 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) { + public Builder 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

If true, this prop will be ignored.

+ *

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

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) + public Builder useQuery(Optional useQuery) { + this.useQuery = useQuery; 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); + public Builder useQuery(Boolean useQuery) { + this.useQuery = Optional.ofNullable(useQuery); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; 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); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); 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.

+ *

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 = "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); + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropAny build() { return new ConfigurablePropAny( type, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropApp.java b/src/main/java/com/pipedream/api/types/ConfigurablePropApp.java index abe1111..f6e4246 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropApp.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropApp.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropApp.Builder.class) @@ -25,7 +24,7 @@ public final class ConfigurablePropApp { private final Optional app; - private final String name; + private final Optional name; private final Optional label; @@ -50,7 +49,7 @@ public final class ConfigurablePropApp { private ConfigurablePropApp( Optional type, Optional app, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -93,7 +92,7 @@ public Optional getApp() { * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -217,129 +216,41 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropApp other); - } - - public interface _FinalStage { - ConfigurablePropApp build(); - - _FinalStage type(Optional type); - - _FinalStage type(String type); - - /** - *

The name slug of the app, e.g. 'github', 'slack', etc. This is used to identify the app for which the account is being configured.

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

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; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional app = Optional.empty(); - private Optional reloadProps = Optional.empty(); + private Optional name = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional app = Optional.empty(); + private Optional reloadProps = Optional.empty(); - private Optional type = Optional.empty(); + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropApp other) { type(other.getType()); app(other.getApp()); @@ -356,232 +267,171 @@ public Builder from(ConfigurablePropApp other) { 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"); + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; 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); + public Builder type(String type) { + this.type = Optional.ofNullable(type); 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

+ *

The name slug of the app, e.g. 'github', 'slack', etc. This is used to identify the app for which the account is being configured.

*/ - @java.lang.Override - @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) - public _FinalStage withLabel(Optional withLabel) { - this.withLabel = withLabel; + @JsonSetter(value = "app", nulls = Nulls.SKIP) + public Builder app(Optional app) { + this.app = app; 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); + public Builder app(String app) { + this.app = Optional.ofNullable(app); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); return this; } /** - *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote 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.

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public Builder label(Optional label) { + this.label = label; 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); + public Builder label(String label) { + this.label = Optional.ofNullable(label); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); return this; } /** - *

If true, should not expose this prop to the user

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "hidden", nulls = Nulls.SKIP) - public _FinalStage hidden(Optional hidden) { - this.hidden = hidden; + @JsonSetter(value = "optional", nulls = Nulls.SKIP) + public Builder optional(Optional optional) { + this.optional = optional; 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); + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); return this; } /** *

If true, this prop will be ignored.

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

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

+ *

If true, should not expose this prop to the user

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "hidden", nulls = Nulls.SKIP) + public Builder hidden(Optional hidden) { + this.hidden = hidden; 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) + public Builder remoteOptions(Optional remoteOptions) { + this.remoteOptions = remoteOptions; 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); + public Builder remoteOptions(Boolean remoteOptions) { + this.remoteOptions = Optional.ofNullable(remoteOptions); 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.

+ *

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

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

The name slug of the app, e.g. 'github', 'slack', etc. This is used to identify the app for which the account is being configured.

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

The name slug of the app, e.g. 'github', 'slack', etc. This is used to identify the app for which the account is being configured.

+ *

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 = "app", nulls = Nulls.SKIP) - public _FinalStage app(Optional app) { - this.app = app; + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; return this; } - @java.lang.Override - public _FinalStage type(String type) { - this.type = Optional.ofNullable(type); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + /** + *

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

+ */ + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; + return this; + } + + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropApp build() { return new ConfigurablePropApp( type, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java b/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java deleted file mode 100644 index 1c0f74c..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java +++ /dev/null @@ -1,738 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.pipedream.api.core.ObjectMappers; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = 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/ConfigurablePropBoolean.java b/src/main/java/com/pipedream/api/types/ConfigurablePropBoolean.java index 219b5c7..ad596d0 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropBoolean.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropBoolean.java @@ -16,14 +16,13 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropBoolean.Builder.class) public final class ConfigurablePropBoolean { private final Optional type; - private final String name; + private final Optional name; private final Optional label; @@ -47,7 +46,7 @@ public final class ConfigurablePropBoolean { private ConfigurablePropBoolean( Optional type, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -81,7 +80,7 @@ public Optional getType() { * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -203,120 +202,39 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropBoolean other); - } - - public interface _FinalStage { - ConfigurablePropBoolean 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; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional name = Optional.empty(); - private Optional reloadProps = Optional.empty(); - - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropBoolean other) { type(other.getType()); name(other.getName()); @@ -332,212 +250,157 @@ public Builder from(ConfigurablePropBoolean other) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(String type) { + this.type = Optional.ofNullable(type); + 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"); + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); 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

+ *

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 = "withLabel", nulls = Nulls.SKIP) - public _FinalStage withLabel(Optional withLabel) { - this.withLabel = withLabel; + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public Builder label(Optional label) { + this.label = label; 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); + public Builder label(String label) { + this.label = Optional.ofNullable(label); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); return this; } /** - *

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "optional", nulls = Nulls.SKIP) + public Builder optional(Optional optional) { + this.optional = optional; 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); + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); 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

+ *

If true, this prop will be ignored.

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "disabled", nulls = Nulls.SKIP) + public Builder disabled(Optional disabled) { + this.disabled = disabled; 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); + public Builder disabled(Boolean disabled) { + this.disabled = Optional.ofNullable(disabled); 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) { + public Builder 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

If true, this prop will be ignored.

+ *

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

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) + public Builder useQuery(Optional useQuery) { + this.useQuery = useQuery; 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); + public Builder useQuery(Boolean useQuery) { + this.useQuery = Optional.ofNullable(useQuery); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; 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); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); 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.

+ *

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 = "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); + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropBoolean build() { return new ConfigurablePropBoolean( type, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java deleted file mode 100644 index 355010f..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java +++ /dev/null @@ -1,557 +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 = 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/ConfigurablePropDiscord.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscord.java index 6dbf7ec..91fffbf 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscord.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscord.java @@ -16,14 +16,13 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropDiscord.Builder.class) public final class ConfigurablePropDiscord { private final Optional type; - private final String name; + private final Optional name; private final Optional label; @@ -47,7 +46,7 @@ public final class ConfigurablePropDiscord { private ConfigurablePropDiscord( Optional type, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -81,7 +80,7 @@ public Optional getType() { * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -203,120 +202,39 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropDiscord other); - } - - public interface _FinalStage { - ConfigurablePropDiscord 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; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional name = Optional.empty(); - private Optional reloadProps = Optional.empty(); - - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropDiscord other) { type(other.getType()); name(other.getName()); @@ -332,212 +250,157 @@ public Builder from(ConfigurablePropDiscord other) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(String type) { + this.type = Optional.ofNullable(type); + 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"); + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); 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

+ *

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 = "withLabel", nulls = Nulls.SKIP) - public _FinalStage withLabel(Optional withLabel) { - this.withLabel = withLabel; + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public Builder label(Optional label) { + this.label = label; 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); + public Builder label(String label) { + this.label = Optional.ofNullable(label); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); return this; } /** - *

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "optional", nulls = Nulls.SKIP) + public Builder optional(Optional optional) { + this.optional = optional; 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); + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); 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

+ *

If true, this prop will be ignored.

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "disabled", nulls = Nulls.SKIP) + public Builder disabled(Optional disabled) { + this.disabled = disabled; 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); + public Builder disabled(Boolean disabled) { + this.disabled = Optional.ofNullable(disabled); 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) { + public Builder 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

If true, this prop will be ignored.

+ *

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

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) + public Builder useQuery(Optional useQuery) { + this.useQuery = useQuery; 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); + public Builder useQuery(Boolean useQuery) { + this.useQuery = Optional.ofNullable(useQuery); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; 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); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); 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.

+ *

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 = "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); + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropDiscord build() { return new ConfigurablePropDiscord( type, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java deleted file mode 100644 index 3eb0836..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java +++ /dev/null @@ -1,602 +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 = 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 deleted file mode 100644 index d2d6eaf..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java +++ /dev/null @@ -1,603 +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 = 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 deleted file mode 100644 index 44dc3ba..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java +++ /dev/null @@ -1,602 +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 = 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 9d99f7e..ddbdf76 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java @@ -13,11 +13,9 @@ 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 = ConfigurablePropInteger.Builder.class) @@ -28,11 +26,7 @@ public final class ConfigurablePropInteger { private final Optional max; - private final Optional default_; - - private final Optional> options; - - private final String name; + private final Optional name; private final Optional label; @@ -58,9 +52,7 @@ private ConfigurablePropInteger( Optional type, Optional min, Optional max, - Optional default_, - Optional> options, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -74,8 +66,6 @@ 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; @@ -110,27 +100,11 @@ 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 */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -221,8 +195,6 @@ 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) @@ -241,8 +213,6 @@ public int hashCode() { this.type, this.min, this.max, - this.default_, - this.options, this.name, this.label, this.description, @@ -260,162 +230,47 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropInteger other); - } - - public interface _FinalStage { - ConfigurablePropInteger build(); - - _FinalStage type(Optional type); - - _FinalStage type(String type); - - /** - *

The minimum value for this integer prop.

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

The maximum value for this integer prop.

- */ - _FinalStage max(Optional max); - - _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.

- */ - _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(); + public static final class Builder { + private Optional type = Optional.empty(); - private Optional reloadProps = Optional.empty(); + private Optional min = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional max = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional name = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional label = Optional.empty(); - private Optional disabled = Optional.empty(); + private Optional description = Optional.empty(); private Optional optional = Optional.empty(); - private Optional description = Optional.empty(); - - private Optional label = Optional.empty(); + private Optional disabled = Optional.empty(); - private Optional> options = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional default_ = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional max = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional min = Optional.empty(); + private Optional reloadProps = Optional.empty(); - private Optional type = Optional.empty(); + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override 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()); @@ -429,299 +284,190 @@ public Builder from(ConfigurablePropInteger other) { 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; + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; 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); + public Builder type(String type) { + this.type = Optional.ofNullable(type); 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

+ *

The minimum value for this integer prop.

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "min", nulls = Nulls.SKIP) + public Builder min(Optional min) { + this.min = min; 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); + public Builder min(Integer min) { + this.min = Optional.ofNullable(min); return this; } /** - *

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

+ *

The maximum value for this integer prop.

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "max", nulls = Nulls.SKIP) + public Builder max(Optional max) { + this.max = max; 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); + public Builder max(Integer max) { + this.max = Optional.ofNullable(max); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); return this; } /** - *

If true, should not expose this prop to the user

+ *

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

If true, this prop will be ignored.

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public _FinalStage disabled(Optional disabled) { - this.disabled = disabled; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); 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) { + public Builder 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); + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); return this; } /** - *

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

+ *

If true, this prop will be ignored.

*/ - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "disabled", nulls = Nulls.SKIP) + public Builder disabled(Optional disabled) { + this.disabled = disabled; 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); + public Builder disabled(Boolean disabled) { + this.disabled = Optional.ofNullable(disabled); 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.

+ *

If true, should not expose this prop to the user

*/ - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; + @JsonSetter(value = "hidden", nulls = Nulls.SKIP) + public Builder hidden(Optional hidden) { + this.hidden = hidden; 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

Available integer options

+ *

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

Default integer value

+ *

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

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

The maximum value for this integer prop.

- * @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); + public Builder useQuery(Boolean useQuery) { + this.useQuery = Optional.ofNullable(useQuery); return this; } /** - *

The maximum value for this integer prop.

+ *

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

The minimum value for this integer prop.

- * @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); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); return this; } /** - *

The minimum value for this integer prop.

+ *

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 = "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); + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropInteger build() { return new ConfigurablePropInteger( 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 deleted file mode 100644 index 1584e9e..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java +++ /dev/null @@ -1,738 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.pipedream.api.core.ObjectMappers; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = 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/ConfigurablePropObject.java b/src/main/java/com/pipedream/api/types/ConfigurablePropObject.java index e405fca..0cd6fa0 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropObject.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropObject.java @@ -16,14 +16,13 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropObject.Builder.class) public final class ConfigurablePropObject { private final Optional type; - private final String name; + private final Optional name; private final Optional label; @@ -47,7 +46,7 @@ public final class ConfigurablePropObject { private ConfigurablePropObject( Optional type, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -81,7 +80,7 @@ public Optional getType() { * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -203,120 +202,39 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropObject other); - } - - public interface _FinalStage { - ConfigurablePropObject 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; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional name = Optional.empty(); - private Optional reloadProps = Optional.empty(); - - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropObject other) { type(other.getType()); name(other.getName()); @@ -332,212 +250,157 @@ public Builder from(ConfigurablePropObject other) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(String type) { + this.type = Optional.ofNullable(type); + 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"); + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); 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

+ *

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 = "withLabel", nulls = Nulls.SKIP) - public _FinalStage withLabel(Optional withLabel) { - this.withLabel = withLabel; + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public Builder label(Optional label) { + this.label = label; 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); + public Builder label(String label) { + this.label = Optional.ofNullable(label); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); return this; } /** - *

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "optional", nulls = Nulls.SKIP) + public Builder optional(Optional optional) { + this.optional = optional; 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); + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); 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

+ *

If true, this prop will be ignored.

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "disabled", nulls = Nulls.SKIP) + public Builder disabled(Optional disabled) { + this.disabled = disabled; 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); + public Builder disabled(Boolean disabled) { + this.disabled = Optional.ofNullable(disabled); 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) { + public Builder 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

If true, this prop will be ignored.

+ *

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

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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) + public Builder useQuery(Optional useQuery) { + this.useQuery = useQuery; 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); + public Builder useQuery(Boolean useQuery) { + this.useQuery = Optional.ofNullable(useQuery); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; 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); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); 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.

+ *

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 = "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); + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropObject build() { return new ConfigurablePropObject( type, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java b/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java deleted file mode 100644 index 94fccd1..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java +++ /dev/null @@ -1,634 +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 = 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/ConfigurablePropString.java b/src/main/java/com/pipedream/api/types/ConfigurablePropString.java index 7347504..c85dcf4 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropString.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropString.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropString.Builder.class) @@ -25,7 +24,7 @@ public final class ConfigurablePropString { private final Optional secret; - private final String name; + private final Optional name; private final Optional label; @@ -50,7 +49,7 @@ public final class ConfigurablePropString { private ConfigurablePropString( Optional type, Optional secret, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -93,7 +92,7 @@ public Optional getSecret() { * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -217,129 +216,41 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropString other); - } - - public interface _FinalStage { - ConfigurablePropString build(); - - _FinalStage type(Optional type); - - _FinalStage type(String type); - - /** - *

If true, this prop is a secret and should not be displayed in plain text.

- */ - _FinalStage secret(Optional secret); - - _FinalStage secret(Boolean secret); - - /** - *

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; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional secret = Optional.empty(); - private Optional reloadProps = Optional.empty(); + private Optional name = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional secret = Optional.empty(); + private Optional reloadProps = Optional.empty(); - private Optional type = Optional.empty(); + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropString other) { type(other.getType()); secret(other.getSecret()); @@ -356,232 +267,171 @@ public Builder from(ConfigurablePropString other) { 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"); + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; 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); + public Builder type(String type) { + this.type = Optional.ofNullable(type); 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

+ *

If true, this prop is a secret and should not be displayed in plain text.

*/ - @java.lang.Override - @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) - public _FinalStage withLabel(Optional withLabel) { - this.withLabel = withLabel; + @JsonSetter(value = "secret", nulls = Nulls.SKIP) + public Builder secret(Optional secret) { + this.secret = secret; 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); + public Builder secret(Boolean secret) { + this.secret = Optional.ofNullable(secret); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); return this; } /** - *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote 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.

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public Builder label(Optional label) { + this.label = label; 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); + public Builder label(String label) { + this.label = Optional.ofNullable(label); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); return this; } /** - *

If true, should not expose this prop to the user

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "hidden", nulls = Nulls.SKIP) - public _FinalStage hidden(Optional hidden) { - this.hidden = hidden; + @JsonSetter(value = "optional", nulls = Nulls.SKIP) + public Builder optional(Optional optional) { + this.optional = optional; 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); + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); return this; } /** *

If true, this prop will be ignored.

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

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

+ *

If true, should not expose this prop to the user

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "hidden", nulls = Nulls.SKIP) + public Builder hidden(Optional hidden) { + this.hidden = hidden; 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) + public Builder remoteOptions(Optional remoteOptions) { + this.remoteOptions = remoteOptions; 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); + public Builder remoteOptions(Boolean remoteOptions) { + this.remoteOptions = Optional.ofNullable(remoteOptions); 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.

+ *

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

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

If true, this prop is a secret and should not be displayed in plain text.

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

If true, this prop is a secret and should not be displayed in plain text.

+ *

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 = "secret", nulls = Nulls.SKIP) - public _FinalStage secret(Optional secret) { - this.secret = secret; + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; return this; } - @java.lang.Override - public _FinalStage type(String type) { - this.type = Optional.ofNullable(type); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + /** + *

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

+ */ + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; + return this; + } + + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropString build() { return new ConfigurablePropString( type, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropStringArray.java b/src/main/java/com/pipedream/api/types/ConfigurablePropStringArray.java index 4708211..664fc6a 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropStringArray.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropStringArray.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropStringArray.Builder.class) @@ -25,7 +24,7 @@ public final class ConfigurablePropStringArray { private final Optional secret; - private final String name; + private final Optional name; private final Optional label; @@ -50,7 +49,7 @@ public final class ConfigurablePropStringArray { private ConfigurablePropStringArray( Optional type, Optional secret, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -93,7 +92,7 @@ public Optional getSecret() { * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") - public String getName() { + public Optional getName() { return name; } @@ -217,129 +216,41 @@ public String toString() { return ObjectMappers.stringify(this); } - public static NameStage builder() { + public static Builder 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(ConfigurablePropStringArray other); - } - - public interface _FinalStage { - ConfigurablePropStringArray build(); - - _FinalStage type(Optional type); - - _FinalStage type(String type); - - /** - *

If true, this prop is a secret and should not be displayed in plain text.

- */ - _FinalStage secret(Optional secret); - - _FinalStage secret(Boolean secret); - - /** - *

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; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional secret = Optional.empty(); - private Optional reloadProps = Optional.empty(); + private Optional name = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional secret = Optional.empty(); + private Optional reloadProps = Optional.empty(); - private Optional type = Optional.empty(); + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropStringArray other) { type(other.getType()); secret(other.getSecret()); @@ -356,232 +267,171 @@ public Builder from(ConfigurablePropStringArray other) { 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"); + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; 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); + public Builder type(String type) { + this.type = Optional.ofNullable(type); 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

+ *

If true, this prop is a secret and should not be displayed in plain text.

*/ - @java.lang.Override - @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) - public _FinalStage withLabel(Optional withLabel) { - this.withLabel = withLabel; + @JsonSetter(value = "secret", nulls = Nulls.SKIP) + public Builder secret(Optional secret) { + this.secret = secret; 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); + public Builder secret(Boolean secret) { + this.secret = Optional.ofNullable(secret); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) - public _FinalStage reloadProps(Optional reloadProps) { - this.reloadProps = reloadProps; + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; 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); + public Builder name(String name) { + this.name = Optional.ofNullable(name); return this; } /** - *

If true, calls to configureComponent for this prop support receiving a query parameter to filter remote 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.

*/ - @java.lang.Override - @JsonSetter(value = "useQuery", nulls = Nulls.SKIP) - public _FinalStage useQuery(Optional useQuery) { - this.useQuery = useQuery; + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public Builder label(Optional label) { + this.label = label; 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); + public Builder label(String label) { + this.label = Optional.ofNullable(label); 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

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) - public _FinalStage remoteOptions(Optional remoteOptions) { - this.remoteOptions = remoteOptions; + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public Builder description(Optional description) { + this.description = description; 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); + public Builder description(String description) { + this.description = Optional.ofNullable(description); return this; } /** - *

If true, should not expose this prop to the user

+ *

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

*/ - @java.lang.Override - @JsonSetter(value = "hidden", nulls = Nulls.SKIP) - public _FinalStage hidden(Optional hidden) { - this.hidden = hidden; + @JsonSetter(value = "optional", nulls = Nulls.SKIP) + public Builder optional(Optional optional) { + this.optional = optional; 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); + public Builder optional(Boolean optional) { + this.optional = Optional.ofNullable(optional); return this; } /** *

If true, this prop will be ignored.

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

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

+ *

If true, should not expose this prop to the user

*/ - @java.lang.Override - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public _FinalStage optional(Optional optional) { - this.optional = optional; + @JsonSetter(value = "hidden", nulls = Nulls.SKIP) + public Builder hidden(Optional hidden) { + this.hidden = hidden; 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); + public Builder hidden(Boolean hidden) { + this.hidden = Optional.ofNullable(hidden); return this; } /** - *

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

+ *

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 = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; + @JsonSetter(value = "remoteOptions", nulls = Nulls.SKIP) + public Builder remoteOptions(Optional remoteOptions) { + this.remoteOptions = remoteOptions; 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); + public Builder remoteOptions(Boolean remoteOptions) { + this.remoteOptions = Optional.ofNullable(remoteOptions); 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.

+ *

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

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

If true, this prop is a secret and should not be displayed in plain text.

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

If true, this prop is a secret and should not be displayed in plain text.

+ *

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 = "secret", nulls = Nulls.SKIP) - public _FinalStage secret(Optional secret) { - this.secret = secret; + @JsonSetter(value = "reloadProps", nulls = Nulls.SKIP) + public Builder reloadProps(Optional reloadProps) { + this.reloadProps = reloadProps; return this; } - @java.lang.Override - public _FinalStage type(String type) { - this.type = Optional.ofNullable(type); + public Builder reloadProps(Boolean reloadProps) { + this.reloadProps = Optional.ofNullable(reloadProps); return this; } - @java.lang.Override - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public _FinalStage type(Optional type) { - this.type = type; + /** + *

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

+ */ + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; + return this; + } + + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropStringArray build() { return new ConfigurablePropStringArray( type, diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java b/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java deleted file mode 100644 index ebd8329..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java +++ /dev/null @@ -1,667 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.pipedream.api.core.ObjectMappers; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = 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 deleted file mode 100644 index fb06fd0..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerDefault.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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 deleted file mode 100644 index fd35583..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerOption.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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 deleted file mode 100644 index 40f66ad..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropTimerStatic.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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/ConfigurePropResponse.java b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java index a70aad0..6c1a6af 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java +++ b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java @@ -23,75 +23,27 @@ public final class ConfigurePropResponse { private final Optional> options; - private final Optional> stringOptions; - - private final Optional> observations; - - private final Optional asyncHandle; - - private final Optional> context; - private final Optional> errors; private final Map additionalProperties; private ConfigurePropResponse( Optional> options, - Optional> stringOptions, - Optional> observations, - Optional asyncHandle, - Optional> context, Optional> errors, Map additionalProperties) { this.options = options; - this.stringOptions = stringOptions; - this.observations = observations; - this.asyncHandle = asyncHandle; - this.context = context; this.errors = errors; this.additionalProperties = additionalProperties; } /** - * @return Available options (with labels) for the configured prop + * @return Available options for the configured prop */ @JsonProperty("options") public Optional> getOptions() { return options; } - /** - * @return Available options for the configured prop - */ - @JsonProperty("string_options") - public Optional> getStringOptions() { - return stringOptions; - } - - /** - * @return Any logs produced during the configuration of the prop - */ - @JsonProperty("observations") - public Optional> getObservations() { - return observations; - } - - /** - * @return Handle for async operations - */ - @JsonProperty("async_handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - - /** - * @return New context after configuring the prop - */ - @JsonProperty("context") - public Optional> getContext() { - return context; - } - /** * @return Any errors that occurred during configuration */ @@ -112,18 +64,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurePropResponse other) { - return options.equals(other.options) - && stringOptions.equals(other.stringOptions) - && observations.equals(other.observations) - && asyncHandle.equals(other.asyncHandle) - && context.equals(other.context) - && errors.equals(other.errors); + return options.equals(other.options) && errors.equals(other.errors); } @java.lang.Override public int hashCode() { - return Objects.hash( - this.options, this.stringOptions, this.observations, this.asyncHandle, this.context, this.errors); + return Objects.hash(this.options, this.errors); } @java.lang.Override @@ -139,14 +85,6 @@ public static Builder builder() { public static final class Builder { private Optional> options = Optional.empty(); - private Optional> stringOptions = Optional.empty(); - - private Optional> observations = Optional.empty(); - - private Optional asyncHandle = Optional.empty(); - - private Optional> context = Optional.empty(); - private Optional> errors = Optional.empty(); @JsonAnySetter @@ -156,16 +94,12 @@ private Builder() {} public Builder from(ConfigurePropResponse other) { options(other.getOptions()); - stringOptions(other.getStringOptions()); - observations(other.getObservations()); - asyncHandle(other.getAsyncHandle()); - context(other.getContext()); errors(other.getErrors()); return this; } /** - *

Available options (with labels) for the configured prop

+ *

Available options for the configured prop

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

Available options for the configured prop

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

Any logs produced during the configuration of the prop

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

Handle for async operations

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

New context after configuring the prop

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

Any errors that occurred during configuration

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

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

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

List of allowed origins for CORS

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

URI to redirect to on error

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

URI to redirect to on success

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

Webhook URI for notifications

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

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

+ *

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

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

Webhook URI for notifications

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

Webhook URI for notifications

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

URI to redirect to on success

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

URI to redirect to on success

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

URI to redirect to on error

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

URI to redirect to on error

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

List of allowed origins for CORS

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

List of allowed origins for CORS

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

The Connect Link URL

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

The expiration time of the token in ISO 8601 format

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

The generated token

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

The Connect Link URL

+ *

The Connect Link URL

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

The expiration time of the token in ISO 8601 format

+ *

The expiration time of the token in ISO 8601 format

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

The generated token

+ *

The generated token

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("token") + public _FinalStage token(@NotNull String token) { + this.token = Objects.requireNonNull(token, "token must not be null"); + return this; + } + + @java.lang.Override + public ConnectTokenResponse build() { + return new ConnectTokenResponse(connectLinkUrl, expiresAt, token, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropSqlAuth.java b/src/main/java/com/pipedream/api/types/CreateBrowserClientOpts.java similarity index 58% rename from src/main/java/com/pipedream/api/types/ConfigurablePropSqlAuth.java rename to src/main/java/com/pipedream/api/types/CreateBrowserClientOpts.java index 7a37914..96af1a4 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropSqlAuth.java +++ b/src/main/java/com/pipedream/api/types/CreateBrowserClientOpts.java @@ -18,29 +18,29 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConfigurablePropSqlAuth.Builder.class) -public final class ConfigurablePropSqlAuth { - private final Optional app; +@JsonDeserialize(builder = CreateBrowserClientOpts.Builder.class) +public final class CreateBrowserClientOpts { + private final Optional apiUrl; private final Map additionalProperties; - private ConfigurablePropSqlAuth(Optional app, Map additionalProperties) { - this.app = app; + private CreateBrowserClientOpts(Optional apiUrl, Map additionalProperties) { + this.apiUrl = apiUrl; this.additionalProperties = additionalProperties; } /** - * @return The app that provides SQL authentication + * @return The API URL to use */ - @JsonProperty("app") - public Optional getApp() { - return app; + @JsonProperty("api_url") + public Optional getApiUrl() { + return apiUrl; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof ConfigurablePropSqlAuth && equalTo((ConfigurablePropSqlAuth) other); + return other instanceof CreateBrowserClientOpts && equalTo((CreateBrowserClientOpts) other); } @JsonAnyGetter @@ -48,13 +48,13 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(ConfigurablePropSqlAuth other) { - return app.equals(other.app); + private boolean equalTo(CreateBrowserClientOpts other) { + return apiUrl.equals(other.apiUrl); } @java.lang.Override public int hashCode() { - return Objects.hash(this.app); + return Objects.hash(this.apiUrl); } @java.lang.Override @@ -68,34 +68,34 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional app = Optional.empty(); + private Optional apiUrl = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - public Builder from(ConfigurablePropSqlAuth other) { - app(other.getApp()); + public Builder from(CreateBrowserClientOpts other) { + apiUrl(other.getApiUrl()); return this; } /** - *

The app that provides SQL authentication

+ *

The API URL to use

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

The generated token

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

The generated token

+ *

The generated token

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

The name slug of the target app

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

ID of the app. Only applies for OAuth apps.

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

ID of the app. Only applies for OAuth apps.

+ *

The name slug of the target app

+ *

The name slug of the target app

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

ID of the app. Only applies for OAuth apps.

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

The name slug of the target app

+ *

ID of the app. Only applies for OAuth apps.

*/ - @JsonSetter(value = "name_slug", nulls = Nulls.SKIP) - public Builder nameSlug(Optional nameSlug) { - this.nameSlug = nameSlug; - return this; - } - - public Builder nameSlug(String nameSlug) { - this.nameSlug = Optional.ofNullable(nameSlug); + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; return this; } - public ProjectInfoResponseApp build() { - return new ProjectInfoResponseApp(id, nameSlug, additionalProperties); + @java.lang.Override + public ProjectInfoResponseAppsItem build() { + return new ProjectInfoResponseAppsItem(id, nameSlug, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/types/RunActionOptsStashId.java b/src/main/java/com/pipedream/api/types/RunActionOptsStashId.java deleted file mode 100644 index 438705f..0000000 --- a/src/main/java/com/pipedream/api/types/RunActionOptsStashId.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * 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.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.pipedream.api.core.ObjectMappers; -import java.io.IOException; -import java.util.Objects; -import java.util.Optional; - -@JsonDeserialize(using = RunActionOptsStashId.Deserializer.class) -public final class RunActionOptsStashId { - private final Object value; - - private final int type; - - private RunActionOptsStashId(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((Optional) this.value); - } else if (this.type == 1) { - return visitor.visit((String) this.value); - } else if (this.type == 2) { - return visitor.visit((boolean) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RunActionOptsStashId && equalTo((RunActionOptsStashId) other); - } - - private boolean equalTo(RunActionOptsStashId 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 RunActionOptsStashId of(Optional value) { - return new RunActionOptsStashId(value, 0); - } - - /** - * @param value must be one of the following: - *
    - *
  • "NEW"
  • - *
- */ - public static RunActionOptsStashId of(String value) { - return new RunActionOptsStashId(value, 1); - } - - public static RunActionOptsStashId of(boolean value) { - return new RunActionOptsStashId(value, 2); - } - - public interface Visitor { - T visit(Optional value); - - /** - * @param value must be one of the following: - *
    - *
  • "NEW"
  • - *
- */ - T visit(String value); - - T visit(boolean value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(RunActionOptsStashId.class); - } - - @java.lang.Override - public RunActionOptsStashId deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); - } catch (IllegalArgumentException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (IllegalArgumentException e) { - } - if (value instanceof Boolean) { - return of((Boolean) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/pipedream/api/types/RunActionResponse.java b/src/main/java/com/pipedream/api/types/RunActionResponse.java index 416bdbc..585a35a 100644 --- a/src/main/java/com/pipedream/api/types/RunActionResponse.java +++ b/src/main/java/com/pipedream/api/types/RunActionResponse.java @@ -58,6 +58,9 @@ public Optional getRet() { return ret; } + /** + * @return The ID of the File Stash that was used to sync the action's /tmp directory + */ @JsonProperty("stash_id") public Optional getStashId() { return stashId; @@ -151,6 +154,9 @@ public Builder ret(Object ret) { return this; } + /** + *

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

+ */ @JsonSetter(value = "stash_id", nulls = Nulls.SKIP) public Builder stashId(Optional stashId) { this.stashId = stashId; diff --git a/src/main/java/com/pipedream/api/types/TimerCron.java b/src/main/java/com/pipedream/api/types/TimerCron.java deleted file mode 100644 index e8a2905..0000000 --- a/src/main/java/com/pipedream/api/types/TimerCron.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.pipedream.api.core.ObjectMappers; -import java.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 deleted file mode 100644 index 8a2d74b..0000000 --- a/src/main/java/com/pipedream/api/types/TimerInterval.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.pipedream.api.core.ObjectMappers; -import java.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 new file mode 100644 index 0000000..26f43cb --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ValidateTokenParams.java @@ -0,0 +1,156 @@ +/** + * 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); + } + } +}