From cee39bae1b6273cd8cfc43919991863f9f6a0822 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 20:45:03 +0000 Subject: [PATCH] SDK regeneration --- README.md | 2 +- build.gradle | 4 +- .../com/pipedream/api/core/ClientOptions.java | 4 +- .../actions/AsyncRawActionsClient.java | 3 - .../resources/actions/RawActionsClient.java | 3 - .../actions/requests/RunActionOpts.java | 56 +-- .../actions/types/RunActionOptsStashId.java | 94 ----- .../pipedream/api/types/ConfigurableProp.java | 303 ++++----------- .../api/types/ConfigurablePropAlert.java | 359 +++++------------- .../api/types/ConfigurablePropAny.java | 303 ++++----------- .../api/types/ConfigurablePropApp.java | 328 +++++----------- .../api/types/ConfigurablePropBoolean.java | 303 ++++----------- .../api/types/ConfigurablePropDiscord.java | 303 ++++----------- .../api/types/ConfigurablePropInteger.java | 359 +++++------------- .../api/types/ConfigurablePropObject.java | 303 ++++----------- .../api/types/ConfigurablePropString.java | 328 +++++----------- .../types/ConfigurablePropStringArray.java | 328 +++++----------- 17 files changed, 886 insertions(+), 2497 deletions(-) delete mode 100644 src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java diff --git a/README.md b/README.md index 57b37a1..a52dbc3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file: com.pipedream pipedream - 1.0.1 + 1.0.2 ``` diff --git a/build.gradle b/build.gradle index 61f024a..02bdd26 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ java { group = 'com.pipedream' -version = '1.0.1' +version = '1.0.2' jar { dependsOn(":generatePomFileForMavenPublication") @@ -78,7 +78,7 @@ publishing { maven(MavenPublication) { groupId = 'com.pipedream' artifactId = 'pipedream' - version = '1.0.1' + version = '1.0.2' from components.java pom { name = 'pipedream' diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java index 534a35d..71fa012 100644 --- a/src/main/java/com/pipedream/api/core/ClientOptions.java +++ b/src/main/java/com/pipedream/api/core/ClientOptions.java @@ -35,10 +35,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.pipedream:pipedream/1.0.1"); + put("User-Agent", "com.pipedream:pipedream/1.0.2"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk"); - put("X-Fern-SDK-Version", "1.0.1"); + put("X-Fern-SDK-Version", "1.0.2"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java b/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java index d285454..8b1ab94 100644 --- a/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java +++ b/src/main/java/com/pipedream/api/resources/actions/AsyncRawActionsClient.java @@ -343,9 +343,6 @@ public CompletableFuture> run( if (request.getDynamicPropsId().isPresent()) { properties.put("dynamic_props_id", request.getDynamicPropsId()); } - if (request.getStashId().isPresent()) { - properties.put("stash_id", request.getStashId()); - } RequestBody body; try { body = RequestBody.create( diff --git a/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java b/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java index d36c7d2..1dbf30b 100644 --- a/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java +++ b/src/main/java/com/pipedream/api/resources/actions/RawActionsClient.java @@ -275,9 +275,6 @@ public BaseClientHttpResponse run(RunActionOpts request, Requ if (request.getDynamicPropsId().isPresent()) { properties.put("dynamic_props_id", request.getDynamicPropsId()); } - if (request.getStashId().isPresent()) { - properties.put("stash_id", request.getStashId()); - } RequestBody body; try { body = RequestBody.create( 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 8f6cf9a..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.resources.actions.types.RunActionOptsStashId; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -32,8 +31,6 @@ public final class RunActionOpts { private final Optional dynamicPropsId; - private final Optional stashId; - private final Map additionalProperties; private RunActionOpts( @@ -42,14 +39,12 @@ private RunActionOpts( 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; } @@ -90,14 +85,6 @@ public Optional getDynamicPropsId() { return dynamicPropsId; } - /** - * @return The ID of the File Stash to use for syncing the action's /tmp directory - */ - @JsonProperty("stash_id") - public Optional getStashId() { - return stashId; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -114,19 +101,12 @@ private boolean equalTo(RunActionOpts other) { && 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.asyncHandle, - 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 @@ -174,13 +154,6 @@ public interface _FinalStage { _FinalStage dynamicPropsId(Optional dynamicPropsId); _FinalStage dynamicPropsId(String dynamicPropsId); - - /** - *

The ID of the File Stash to use for syncing the action's /tmp directory

- */ - _FinalStage stashId(Optional stashId); - - _FinalStage stashId(RunActionOptsStashId stashId); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -189,8 +162,6 @@ 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(); @@ -209,7 +180,6 @@ public Builder from(RunActionOpts other) { externalUserId(other.getExternalUserId()); configuredProps(other.getConfiguredProps()); dynamicPropsId(other.getDynamicPropsId()); - stashId(other.getStashId()); return this; } @@ -237,26 +207,6 @@ public _FinalStage externalUserId(@NotNull String externalUserId) { return this; } - /** - *

The ID of the File Stash to use for syncing the action's /tmp directory

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

The ID of the File Stash to use for syncing the action's /tmp directory

- */ - @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. @@ -313,7 +263,7 @@ public _FinalStage asyncHandle(Optional asyncHandle) { @java.lang.Override public RunActionOpts build() { return new RunActionOpts( - asyncHandle, id, externalUserId, configuredProps, dynamicPropsId, stashId, additionalProperties); + asyncHandle, id, externalUserId, configuredProps, dynamicPropsId, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java b/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java deleted file mode 100644 index 9da7ae6..0000000 --- a/src/main/java/com/pipedream/api/resources/actions/types/RunActionOptsStashId.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.resources.actions.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 = 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((String) this.value); - } else if (this.type == 1) { - 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(String value) { - return new RunActionOptsStashId(value, 0); - } - - public static RunActionOptsStashId of(boolean value) { - return new RunActionOptsStashId(value, 1); - } - - public interface Visitor { - 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, 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/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/ConfigurablePropAlert.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java index 7a9ccb6..782303c 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.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 = ConfigurablePropAlert.Builder.class) @@ -27,7 +26,7 @@ public final class ConfigurablePropAlert { private final Optional content; - private final String name; + private final Optional name; private final Optional label; @@ -53,7 +52,7 @@ private ConfigurablePropAlert( Optional type, Optional alertType, Optional content, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -105,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; } @@ -231,138 +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); - - /** - *

The severity level of the alert.

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

The severity level of the alert.

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

The severity level of the alert.

+ *

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 = "alertType", nulls = Nulls.SKIP) - public _FinalStage alertType(Optional alertType) { - this.alertType = alertType; - 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 ConfigurablePropAlert build() { return new ConfigurablePropAlert( type, 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/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/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/ConfigurablePropInteger.java b/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java index 730b67f..ddbdf76 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.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 = ConfigurablePropInteger.Builder.class) @@ -27,7 +26,7 @@ public final class ConfigurablePropInteger { private final Optional max; - private final String name; + private final Optional name; private final Optional label; @@ -53,7 +52,7 @@ private ConfigurablePropInteger( Optional type, Optional min, Optional max, - String name, + Optional name, Optional label, Optional description, Optional optional, @@ -105,7 +104,7 @@ public Optional getMax() { * @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; } @@ -231,138 +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(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); - - /** - *

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 disabled = Optional.empty(); - private Optional label = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional max = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional min = 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(ConfigurablePropInteger other) { type(other.getType()); min(other.getMin()); @@ -380,252 +284,185 @@ 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"); + @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 minimum value for this integer prop.

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

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