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 990fa92..6a16af8 100644 --- a/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java +++ b/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java @@ -12,7 +12,6 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.pipedream.api.core.ObjectMappers; -import com.pipedream.api.types.RunActionOptsStashId; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -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,11 +85,6 @@ public Optional getDynamicPropsId() { return dynamicPropsId; } - @JsonProperty("stash_id") - public Optional getStashId() { - return stashId; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -111,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 @@ -171,10 +154,6 @@ public interface _FinalStage { _FinalStage dynamicPropsId(Optional dynamicPropsId); _FinalStage dynamicPropsId(String dynamicPropsId); - - _FinalStage stashId(Optional stashId); - - _FinalStage stashId(RunActionOptsStashId stashId); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -183,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(); @@ -203,7 +180,6 @@ public Builder from(RunActionOpts other) { externalUserId(other.getExternalUserId()); configuredProps(other.getConfiguredProps()); dynamicPropsId(other.getDynamicPropsId()); - stashId(other.getStashId()); return this; } @@ -231,19 +207,6 @@ public _FinalStage externalUserId(@NotNull String externalUserId) { return this; } - @java.lang.Override - public _FinalStage stashId(RunActionOptsStashId stashId) { - this.stashId = Optional.ofNullable(stashId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "stash_id", nulls = Nulls.SKIP) - public _FinalStage stashId(Optional stashId) { - this.stashId = stashId; - return this; - } - /** *

The ID for dynamic props

* @return Reference to {@code this} so that method calls can be chained together. @@ -300,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/tokens/AsyncRawTokensClient.java b/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java index 840f84b..e6f7c8c 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java @@ -110,7 +110,9 @@ public CompletableFuture> validate String ctok, TokensValidateRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("v1/connect/tokens") + .addPathSegments("v1/connect") + .addPathSegment(clientOptions.projectId()) + .addPathSegments("tokens") .addPathSegment(ctok) .addPathSegments("validate"); if (request.getParams().isPresent()) { diff --git a/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java b/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java index e560d15..7b0a9de 100644 --- a/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java +++ b/src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java @@ -91,7 +91,9 @@ public BaseClientHttpResponse validate( String ctok, TokensValidateRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("v1/connect/tokens") + .addPathSegments("v1/connect") + .addPathSegment(clientOptions.projectId()) + .addPathSegments("tokens") .addPathSegment(ctok) .addPathSegments("validate"); if (request.getParams().isPresent()) { diff --git a/src/main/java/com/pipedream/api/types/App.java b/src/main/java/com/pipedream/api/types/App.java index ea4a85d..2983820 100644 --- a/src/main/java/com/pipedream/api/types/App.java +++ b/src/main/java/com/pipedream/api/types/App.java @@ -90,6 +90,9 @@ public String getName() { return name; } + /** + * @return The authentication type used by the app + */ @JsonProperty("auth_type") public Optional getAuthType() { return authType; @@ -221,6 +224,9 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

The authentication type used by the app

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

The authentication type used by the app

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

The authentication type used by the app

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

If true, this prop will be ignored.

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

If true, should not expose this prop to the user

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

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

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

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

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

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

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

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

- */ - _FinalStage withLabel(Optional withLabel); - - _FinalStage withLabel(Boolean withLabel); - } - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; + public static final class Builder { + private Optional name = Optional.empty(); - private Optional withLabel = Optional.empty(); - - private Optional reloadProps = Optional.empty(); + private Optional type = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurableProp other) { name(other.getName()); type(other.getType()); @@ -334,210 +252,155 @@ public Builder from(ConfigurableProp other) { /** *

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

- *

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

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

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

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

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

- */ - _FinalStage name(@NotNull String name); - - Builder from(ConfigurablePropAlert other); - } - - public interface _FinalStage { - ConfigurablePropAlert build(); - - _FinalStage type(Optional type); - - _FinalStage type(String type); - - _FinalStage alertType(Optional alertType); - - _FinalStage alertType(ConfigurablePropAlertType alertType); - - /** - *

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

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

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

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

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

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

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

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

If true, this prop will be ignored.

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

If true, should not expose this prop to the user

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

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

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

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

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

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

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

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

- */ - _FinalStage withLabel(Optional withLabel); - - _FinalStage withLabel(Boolean withLabel); - } - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional withLabel = Optional.empty(); + public static final class Builder { + private Optional type = Optional.empty(); - private Optional reloadProps = Optional.empty(); + private Optional alertType = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional content = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional name = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional label = Optional.empty(); - private Optional disabled = Optional.empty(); + private Optional description = Optional.empty(); private Optional optional = Optional.empty(); - private Optional description = Optional.empty(); + private Optional disabled = Optional.empty(); - private Optional label = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional content = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional alertType = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropAlert other) { type(other.getType()); alertType(other.getAlertType()); @@ -374,245 +284,185 @@ public Builder from(ConfigurablePropAlert other) { return this; } - /** - *

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

- *

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

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

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

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

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

+ *

The severity level of the alert.

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

+ *

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

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

If true, this prop will be ignored.

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

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

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

If true, this prop will be ignored.

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

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

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

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

+ *

If true, should not expose this prop to the user

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

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

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

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

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

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

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

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

If true, this prop will be ignored.

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

If true, should not expose this prop to the user

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

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

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

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

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

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

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

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

- */ - _FinalStage withLabel(Optional withLabel); - - _FinalStage withLabel(Boolean withLabel); - } - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional name = Optional.empty(); - private Optional reloadProps = Optional.empty(); - - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional type = Optional.empty(); + private Optional reloadProps = Optional.empty(); + + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropAny other) { type(other.getType()); name(other.getName()); @@ -332,212 +250,157 @@ public Builder from(ConfigurablePropAny other) { return this; } + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(String type) { + this.type = Optional.ofNullable(type); + return this; + } + /** *

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

- *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

If true, this prop will be ignored.

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

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

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

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

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

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

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

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

If true, this prop will be ignored.

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

If true, should not expose this prop to the user

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

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

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

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

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

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

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

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

- */ - _FinalStage withLabel(Optional withLabel); - - _FinalStage withLabel(Boolean withLabel); - } - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; + public static final class Builder { + private Optional type = Optional.empty(); - private Optional withLabel = Optional.empty(); + private Optional app = Optional.empty(); - private Optional reloadProps = Optional.empty(); + private Optional name = Optional.empty(); - private Optional useQuery = Optional.empty(); + private Optional label = Optional.empty(); - private Optional remoteOptions = Optional.empty(); + private Optional description = Optional.empty(); - private Optional hidden = Optional.empty(); + private Optional optional = Optional.empty(); private Optional disabled = Optional.empty(); - private Optional optional = Optional.empty(); + private Optional hidden = Optional.empty(); - private Optional description = Optional.empty(); + private Optional remoteOptions = Optional.empty(); - private Optional label = Optional.empty(); + private Optional useQuery = Optional.empty(); - private Optional app = Optional.empty(); + private Optional reloadProps = Optional.empty(); - private Optional type = Optional.empty(); + private Optional withLabel = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - @java.lang.Override public Builder from(ConfigurablePropApp other) { type(other.getType()); app(other.getApp()); @@ -356,232 +267,171 @@ public Builder from(ConfigurablePropApp other) { return this; } - /** - *

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

- *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

+ *

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

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

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

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

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

+ *

If true, should not expose this prop to the user

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

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

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

+ *

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

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

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

+ */ + @JsonSetter(value = "withLabel", nulls = Nulls.SKIP) + public Builder withLabel(Optional withLabel) { + this.withLabel = withLabel; + return this; + } + + public Builder withLabel(Boolean withLabel) { + this.withLabel = Optional.ofNullable(withLabel); return this; } - @java.lang.Override public ConfigurablePropApp build() { return new ConfigurablePropApp( type, diff --git a/src/main/java/com/pipedream/api/types/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, diff --git a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java index a70aad0..6c1a6af 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java +++ b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java @@ -23,75 +23,27 @@ public final class ConfigurePropResponse { private final Optional> options; - private final Optional> stringOptions; - - private final Optional> observations; - - private final Optional asyncHandle; - - private final Optional> context; - private final Optional> errors; private final Map additionalProperties; private ConfigurePropResponse( Optional> options, - Optional> stringOptions, - Optional> observations, - Optional asyncHandle, - Optional> context, Optional> errors, Map additionalProperties) { this.options = options; - this.stringOptions = stringOptions; - this.observations = observations; - this.asyncHandle = asyncHandle; - this.context = context; this.errors = errors; this.additionalProperties = additionalProperties; } /** - * @return Available options (with labels) for the configured prop + * @return Available options for the configured prop */ @JsonProperty("options") public Optional> getOptions() { return options; } - /** - * @return Available options for the configured prop - */ - @JsonProperty("string_options") - public Optional> getStringOptions() { - return stringOptions; - } - - /** - * @return Any logs produced during the configuration of the prop - */ - @JsonProperty("observations") - public Optional> getObservations() { - return observations; - } - - /** - * @return Handle for async operations - */ - @JsonProperty("async_handle") - public Optional getAsyncHandle() { - return asyncHandle; - } - - /** - * @return New context after configuring the prop - */ - @JsonProperty("context") - public Optional> getContext() { - return context; - } - /** * @return Any errors that occurred during configuration */ @@ -112,18 +64,12 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurePropResponse other) { - return options.equals(other.options) - && stringOptions.equals(other.stringOptions) - && observations.equals(other.observations) - && asyncHandle.equals(other.asyncHandle) - && context.equals(other.context) - && errors.equals(other.errors); + return options.equals(other.options) && errors.equals(other.errors); } @java.lang.Override public int hashCode() { - return Objects.hash( - this.options, this.stringOptions, this.observations, this.asyncHandle, this.context, this.errors); + return Objects.hash(this.options, this.errors); } @java.lang.Override @@ -139,14 +85,6 @@ public static Builder builder() { public static final class Builder { private Optional> options = Optional.empty(); - private Optional> stringOptions = Optional.empty(); - - private Optional> observations = Optional.empty(); - - private Optional asyncHandle = Optional.empty(); - - private Optional> context = Optional.empty(); - private Optional> errors = Optional.empty(); @JsonAnySetter @@ -156,16 +94,12 @@ private Builder() {} public Builder from(ConfigurePropResponse other) { options(other.getOptions()); - stringOptions(other.getStringOptions()); - observations(other.getObservations()); - asyncHandle(other.getAsyncHandle()); - context(other.getContext()); errors(other.getErrors()); return this; } /** - *

Available options (with labels) for the configured prop

+ *

Available options for the configured prop

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

Available options for the configured prop

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

Any logs produced during the configuration of the prop

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

Handle for async operations

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

New context after configuring the prop

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

Any errors that occurred during configuration

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

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

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

List of allowed origins for CORS

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

URI to redirect to on error

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

URI to redirect to on success

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

Webhook URI for notifications

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

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

+ *

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

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

Webhook URI for notifications

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

Webhook URI for notifications

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

URI to redirect to on success

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

URI to redirect to on success

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

URI to redirect to on error

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

URI to redirect to on error

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

List of allowed origins for CORS

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

List of allowed origins for CORS

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

The Connect Link URL

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

The expiration time of the token in ISO 8601 format

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

The generated token

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

The Connect Link URL

+ *

The Connect Link URL

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

The expiration time of the token in ISO 8601 format

+ *

The expiration time of the token in ISO 8601 format

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

The generated token

+ *

The generated token

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

The API URL to use

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

The generated token

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

The generated token

+ *

The generated token

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

The name slug of the target app

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

ID of the app. Only applies for OAuth apps.

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

ID of the app. Only applies for OAuth apps.

+ *

The name slug of the target app

+ *

The name slug of the target app

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

ID of the app. Only applies for OAuth apps.

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

The name slug of the target app

+ *

ID of the app. Only applies for OAuth apps.

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

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

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