diff --git a/README.md b/README.md index 06d55b9..571a78f 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,21 @@ The Pipedream Java library provides convenient access to the Pipedream APIs from Java. +## Table of Contents + +- [Installation](#installation) +- [Usage](#usage) +- [Environments](#environments) +- [Base Url](#base-url) +- [Exception Handling](#exception-handling) +- [Advanced](#advanced) + - [Custom Client](#custom-client) + - [Retries](#retries) + - [Timeouts](#timeouts) + - [Custom Headers](#custom-headers) +- [Contributing](#contributing) +- [Reference](#reference) + ## Installation ### Gradle @@ -25,7 +40,7 @@ Add the dependency in your `pom.xml` file: com.pipedream pipedream - 1.1.0 + 1.1.1 ``` diff --git a/build.gradle b/build.gradle index 0db3646..9eb1cf9 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ java { group = 'com.pipedream' -version = '1.1.0' +version = '1.1.1' jar { dependsOn(":generatePomFileForMavenPublication") @@ -80,7 +80,7 @@ publishing { maven(MavenPublication) { groupId = 'com.pipedream' artifactId = 'pipedream' - version = '1.1.0' + version = '1.1.1' from components.java pom { name = 'pipedream' diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java index 8132d65..8efc87b 100644 --- a/src/main/java/com/pipedream/api/core/ClientOptions.java +++ b/src/main/java/com/pipedream/api/core/ClientOptions.java @@ -35,10 +35,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.pipedream:pipedream/1.1.0"); + put("User-Agent", "com.pipedream:pipedream/1.1.1"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk"); - put("X-Fern-SDK-Version", "1.1.0"); + put("X-Fern-SDK-Version", "1.1.1"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/pipedream/api/resources/deployedtriggers/requests/UpdateTriggerOpts.java b/src/main/java/com/pipedream/api/resources/deployedtriggers/requests/UpdateTriggerOpts.java index b7b613b..0bef6e9 100644 --- a/src/main/java/com/pipedream/api/resources/deployedtriggers/requests/UpdateTriggerOpts.java +++ b/src/main/java/com/pipedream/api/resources/deployedtriggers/requests/UpdateTriggerOpts.java @@ -30,6 +30,8 @@ public final class UpdateTriggerOpts { private final Optional name; + private final Optional emitOnDeploy; + private final Map additionalProperties; private UpdateTriggerOpts( @@ -37,11 +39,13 @@ private UpdateTriggerOpts( Optional active, Optional> configuredProps, Optional name, + Optional emitOnDeploy, Map additionalProperties) { this.externalUserId = externalUserId; this.active = active; this.configuredProps = configuredProps; this.name = name; + this.emitOnDeploy = emitOnDeploy; this.additionalProperties = additionalProperties; } @@ -74,6 +78,14 @@ public Optional getName() { return name; } + /** + * @return Whether the trigger should emit events during deployment + */ + @JsonProperty("emit_on_deploy") + public Optional getEmitOnDeploy() { + return emitOnDeploy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -89,12 +101,13 @@ private boolean equalTo(UpdateTriggerOpts other) { return externalUserId.equals(other.externalUserId) && active.equals(other.active) && configuredProps.equals(other.configuredProps) - && name.equals(other.name); + && name.equals(other.name) + && emitOnDeploy.equals(other.emitOnDeploy); } @java.lang.Override public int hashCode() { - return Objects.hash(this.externalUserId, this.active, this.configuredProps, this.name); + return Objects.hash(this.externalUserId, this.active, this.configuredProps, this.name, this.emitOnDeploy); } @java.lang.Override @@ -135,12 +148,21 @@ public interface _FinalStage { _FinalStage name(Optional name); _FinalStage name(String name); + + /** + *

Whether the trigger should emit events during deployment

+ */ + _FinalStage emitOnDeploy(Optional emitOnDeploy); + + _FinalStage emitOnDeploy(Boolean emitOnDeploy); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ExternalUserIdStage, _FinalStage { private String externalUserId; + private Optional emitOnDeploy = Optional.empty(); + private Optional name = Optional.empty(); private Optional> configuredProps = Optional.empty(); @@ -158,6 +180,7 @@ public Builder from(UpdateTriggerOpts other) { active(other.getActive()); configuredProps(other.getConfiguredProps()); name(other.getName()); + emitOnDeploy(other.getEmitOnDeploy()); return this; } @@ -173,6 +196,26 @@ public _FinalStage externalUserId(@NotNull String externalUserId) { return this; } + /** + *

Whether the trigger should emit events during deployment

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

Whether the trigger should emit events during deployment

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

The name of the trigger

* @return Reference to {@code this} so that method calls can be chained together. @@ -228,7 +271,8 @@ public _FinalStage active(Optional active) { @java.lang.Override public UpdateTriggerOpts build() { - return new UpdateTriggerOpts(externalUserId, active, configuredProps, name, additionalProperties); + return new UpdateTriggerOpts( + externalUserId, active, configuredProps, name, emitOnDeploy, additionalProperties); } } } diff --git a/src/main/java/com/pipedream/api/resources/triggers/requests/DeployTriggerOpts.java b/src/main/java/com/pipedream/api/resources/triggers/requests/DeployTriggerOpts.java index 96ffad8..9786097 100644 --- a/src/main/java/com/pipedream/api/resources/triggers/requests/DeployTriggerOpts.java +++ b/src/main/java/com/pipedream/api/resources/triggers/requests/DeployTriggerOpts.java @@ -36,6 +36,8 @@ public final class DeployTriggerOpts { private final Optional webhookUrl; + private final Optional emitOnDeploy; + private final Map additionalProperties; private DeployTriggerOpts( @@ -46,6 +48,7 @@ private DeployTriggerOpts( Optional dynamicPropsId, Optional workflowId, Optional webhookUrl, + Optional emitOnDeploy, Map additionalProperties) { this.id = id; this.version = version; @@ -54,6 +57,7 @@ private DeployTriggerOpts( this.dynamicPropsId = dynamicPropsId; this.workflowId = workflowId; this.webhookUrl = webhookUrl; + this.emitOnDeploy = emitOnDeploy; this.additionalProperties = additionalProperties; } @@ -110,6 +114,14 @@ public Optional getWebhookUrl() { return webhookUrl; } + /** + * @return Whether the trigger should emit events during the deploy hook execution. Defaults to true if not specified. + */ + @JsonProperty("emit_on_deploy") + public Optional getEmitOnDeploy() { + return emitOnDeploy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -128,7 +140,8 @@ private boolean equalTo(DeployTriggerOpts other) { && configuredProps.equals(other.configuredProps) && dynamicPropsId.equals(other.dynamicPropsId) && workflowId.equals(other.workflowId) - && webhookUrl.equals(other.webhookUrl); + && webhookUrl.equals(other.webhookUrl) + && emitOnDeploy.equals(other.emitOnDeploy); } @java.lang.Override @@ -140,7 +153,8 @@ public int hashCode() { this.configuredProps, this.dynamicPropsId, this.workflowId, - this.webhookUrl); + this.webhookUrl, + this.emitOnDeploy); } @java.lang.Override @@ -202,6 +216,13 @@ public interface _FinalStage { _FinalStage webhookUrl(Optional webhookUrl); _FinalStage webhookUrl(String webhookUrl); + + /** + *

Whether the trigger should emit events during the deploy hook execution. Defaults to true if not specified.

+ */ + _FinalStage emitOnDeploy(Optional emitOnDeploy); + + _FinalStage emitOnDeploy(Boolean emitOnDeploy); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -210,6 +231,8 @@ public static final class Builder implements IdStage, ExternalUserIdStage, _Fina private String externalUserId; + private Optional emitOnDeploy = Optional.empty(); + private Optional webhookUrl = Optional.empty(); private Optional workflowId = Optional.empty(); @@ -234,6 +257,7 @@ public Builder from(DeployTriggerOpts other) { dynamicPropsId(other.getDynamicPropsId()); workflowId(other.getWorkflowId()); webhookUrl(other.getWebhookUrl()); + emitOnDeploy(other.getEmitOnDeploy()); return this; } @@ -261,6 +285,26 @@ public _FinalStage externalUserId(@NotNull String externalUserId) { return this; } + /** + *

Whether the trigger should emit events during the deploy hook execution. Defaults to true if not specified.

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

Whether the trigger should emit events during the deploy hook execution. Defaults to true if not specified.

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

Optional webhook URL to receive trigger events

* @return Reference to {@code this} so that method calls can be chained together. @@ -364,6 +408,7 @@ public DeployTriggerOpts build() { dynamicPropsId, workflowId, webhookUrl, + emitOnDeploy, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurableProp.java b/src/main/java/com/pipedream/api/types/ConfigurableProp.java index 4c5213e..886d241 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurableProp.java +++ b/src/main/java/com/pipedream/api/types/ConfigurableProp.java @@ -3,549 +3,1230 @@ */ package com.pipedream.api.types; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; 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 com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; 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 Value value; - private final ConfigurablePropType type; + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + private ConfigurableProp(Value value) { + this.value = value; + } + + public T visit(Visitor visitor) { + return value.visit(visitor); + } + + public static ConfigurableProp alert(ConfigurablePropAlert value) { + return new ConfigurableProp(new AlertValue(value)); + } + + public static ConfigurableProp any(ConfigurablePropAny value) { + return new ConfigurableProp(new AnyValue(value)); + } + + public static ConfigurableProp app(ConfigurablePropApp value) { + return new ConfigurableProp(new AppValue(value)); + } + + public static ConfigurableProp boolean_(ConfigurablePropBoolean value) { + return new ConfigurableProp(new BooleanValue(value)); + } + + public static ConfigurableProp interfaceTimer(ConfigurablePropTimer value) { + return new ConfigurableProp(new InterfaceTimerValue(value)); + } + + public static ConfigurableProp interfaceApphook(ConfigurablePropApphook value) { + return new ConfigurableProp(new InterfaceApphookValue(value)); + } + + public static ConfigurableProp integer(ConfigurablePropIntegerArray value) { + return new ConfigurableProp(new IntegerValue(value)); + } + + public static ConfigurableProp interfaceHttp(ConfigurablePropHttp value) { + return new ConfigurableProp(new InterfaceHttpValue(value)); + } + + public static ConfigurableProp serviceDb(ConfigurablePropDb value) { + return new ConfigurableProp(new ServiceDbValue(value)); + } + + public static ConfigurableProp sql(ConfigurablePropSql value) { + return new ConfigurableProp(new SqlValue(value)); + } + + public static ConfigurableProp airtableBaseId(ConfigurablePropAirtableBaseId value) { + return new ConfigurableProp(new AirtableBaseIdValue(value)); + } + + public static ConfigurableProp airtableTableId(ConfigurablePropAirtableTableId value) { + return new ConfigurableProp(new AirtableTableIdValue(value)); + } - private final Optional label; + public static ConfigurableProp airtableViewId(ConfigurablePropAirtableViewId value) { + return new ConfigurableProp(new AirtableViewIdValue(value)); + } - private final Optional description; + public static ConfigurableProp airtableFieldId(ConfigurablePropAirtableFieldId value) { + return new ConfigurableProp(new AirtableFieldIdValue(value)); + } - private final Optional optional; + public static ConfigurableProp discordChannel(ConfigurablePropDiscordChannel value) { + return new ConfigurableProp(new DiscordChannelValue(value)); + } - private final Optional disabled; + public static ConfigurableProp discordChannel(ConfigurablePropDiscordChannelArray value) { + return new ConfigurableProp(new DiscordChannelValue(value)); + } - private final Optional hidden; + public static ConfigurableProp integer(ConfigurablePropInteger value) { + return new ConfigurableProp(new IntegerValue(value)); + } - private final Optional remoteOptions; + public static ConfigurableProp object(ConfigurablePropObject value) { + return new ConfigurableProp(new ObjectValue(value)); + } - private final Optional useQuery; + public static ConfigurableProp string(ConfigurablePropString value) { + return new ConfigurableProp(new StringValue(value)); + } - private final Optional reloadProps; + public static ConfigurableProp string(ConfigurablePropStringArray value) { + return new ConfigurableProp(new StringValue(value)); + } - private final Optional withLabel; + public boolean isAlert() { + return value instanceof AlertValue; + } - private final Map additionalProperties; + public boolean isAny() { + return value instanceof AnyValue; + } - private ConfigurableProp( - String name, - ConfigurablePropType type, - Optional label, - Optional description, - Optional optional, - Optional disabled, - Optional hidden, - Optional remoteOptions, - Optional useQuery, - Optional reloadProps, - Optional withLabel, - Map additionalProperties) { - this.name = name; - this.type = type; - this.label = label; - this.description = description; - this.optional = optional; - this.disabled = disabled; - this.hidden = hidden; - this.remoteOptions = remoteOptions; - this.useQuery = useQuery; - this.reloadProps = reloadProps; - this.withLabel = withLabel; - this.additionalProperties = additionalProperties; + public boolean isApp() { + return value instanceof AppValue; } - /** - * @return When building configuredProps, make sure to use this field as the key when setting the prop value - */ - @JsonProperty("name") - public String getName() { - return name; + public boolean isBoolean() { + return value instanceof BooleanValue; } - @JsonProperty("type") - public ConfigurablePropType getType() { - return type; + public boolean isInterfaceTimer() { + return value instanceof InterfaceTimerValue; } - /** - * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. - */ - @JsonProperty("label") - public Optional getLabel() { - return label; + public boolean isInterfaceApphook() { + return value instanceof InterfaceApphookValue; } - - /** - * @return A description of the prop, shown to the user when configuring the component. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; + + public boolean isInteger() { + return value instanceof IntegerValue; } - - /** - * @return If true, this prop does not need to be specified. - */ - @JsonProperty("optional") - public Optional getOptional() { - return optional; + + public boolean isInterfaceHttp() { + return value instanceof InterfaceHttpValue; } - /** - * @return If true, this prop will be ignored. - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; + public boolean isServiceDb() { + return value instanceof ServiceDbValue; } - /** - * @return If true, should not expose this prop to the user - */ - @JsonProperty("hidden") - public Optional getHidden() { - return hidden; + public boolean isSql() { + return value instanceof SqlValue; } - /** - * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options - */ - @JsonProperty("remoteOptions") - public Optional getRemoteOptions() { - return remoteOptions; + public boolean isAirtableBaseId() { + return value instanceof AirtableBaseIdValue; } - /** - * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options - */ - @JsonProperty("useQuery") - public Optional getUseQuery() { - return useQuery; - } - - /** - * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one - */ - @JsonProperty("reloadProps") - public Optional getReloadProps() { - return reloadProps; - } - - /** - * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label - */ - @JsonProperty("withLabel") - public Optional getWithLabel() { - return withLabel; + public boolean isAirtableTableId() { + return value instanceof AirtableTableIdValue; } - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConfigurableProp && equalTo((ConfigurableProp) other); + public boolean isAirtableViewId() { + return value instanceof AirtableViewIdValue; } - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; + public boolean isAirtableFieldId() { + return value instanceof AirtableFieldIdValue; } - private boolean equalTo(ConfigurableProp other) { - return name.equals(other.name) - && type.equals(other.type) - && label.equals(other.label) - && description.equals(other.description) - && optional.equals(other.optional) - && disabled.equals(other.disabled) - && hidden.equals(other.hidden) - && remoteOptions.equals(other.remoteOptions) - && useQuery.equals(other.useQuery) - && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + public boolean isDiscordChannel() { + return value instanceof DiscordChannelValue; } - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.type, - this.label, - this.description, - this.optional, - this.disabled, - this.hidden, - this.remoteOptions, - this.useQuery, - this.reloadProps, - this.withLabel); + public boolean isDiscordChannel() { + return value instanceof DiscordChannelValue; } - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); + public boolean isInteger() { + return value instanceof IntegerValue; } - public static NameStage builder() { - return new Builder(); + public boolean isObject() { + return value instanceof ObjectValue; } - public interface NameStage { - /** - *

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

- */ - TypeStage name(@NotNull String name); + public boolean isString() { + return value instanceof StringValue; + } - Builder from(ConfigurableProp other); + public boolean isString() { + return value instanceof StringValue; } - public interface TypeStage { - _FinalStage type(@NotNull ConfigurablePropType type); + public boolean _isUnknown() { + return value instanceof _UnknownValue; } - public interface _FinalStage { - ConfigurableProp build(); + public Optional getAlert() { + if (isAlert()) { + return Optional.of(((AlertValue) value).value); + } + return Optional.empty(); + } + + public Optional getAny() { + if (isAny()) { + return Optional.of(((AnyValue) value).value); + } + return Optional.empty(); + } + + public Optional getApp() { + if (isApp()) { + return Optional.of(((AppValue) value).value); + } + return Optional.empty(); + } + + public Optional getBoolean() { + if (isBoolean()) { + return Optional.of(((BooleanValue) value).value); + } + return Optional.empty(); + } + + public Optional getInterfaceTimer() { + if (isInterfaceTimer()) { + return Optional.of(((InterfaceTimerValue) value).value); + } + return Optional.empty(); + } + + public Optional getInterfaceApphook() { + if (isInterfaceApphook()) { + return Optional.of(((InterfaceApphookValue) value).value); + } + return Optional.empty(); + } + + public Optional getInteger() { + if (isInteger()) { + return Optional.of(((IntegerValue) value).value); + } + return Optional.empty(); + } + + public Optional getInterfaceHttp() { + if (isInterfaceHttp()) { + return Optional.of(((InterfaceHttpValue) value).value); + } + return Optional.empty(); + } + + public Optional getServiceDb() { + if (isServiceDb()) { + return Optional.of(((ServiceDbValue) value).value); + } + return Optional.empty(); + } + + public Optional getSql() { + if (isSql()) { + return Optional.of(((SqlValue) value).value); + } + return Optional.empty(); + } + + public Optional getAirtableBaseId() { + if (isAirtableBaseId()) { + return Optional.of(((AirtableBaseIdValue) value).value); + } + return Optional.empty(); + } + + public Optional getAirtableTableId() { + if (isAirtableTableId()) { + return Optional.of(((AirtableTableIdValue) value).value); + } + return Optional.empty(); + } + + public Optional getAirtableViewId() { + if (isAirtableViewId()) { + return Optional.of(((AirtableViewIdValue) value).value); + } + return Optional.empty(); + } + + public Optional getAirtableFieldId() { + if (isAirtableFieldId()) { + return Optional.of(((AirtableFieldIdValue) value).value); + } + return Optional.empty(); + } + + public Optional getDiscordChannel() { + if (isDiscordChannel()) { + return Optional.of(((DiscordChannelValue) value).value); + } + return Optional.empty(); + } + + public Optional getDiscordChannel() { + if (isDiscordChannel()) { + return Optional.of(((DiscordChannelValue) value).value); + } + return Optional.empty(); + } + + public Optional getInteger() { + if (isInteger()) { + return Optional.of(((IntegerValue) value).value); + } + return Optional.empty(); + } + + public Optional getObject() { + if (isObject()) { + return Optional.of(((ObjectValue) value).value); + } + return Optional.empty(); + } + + public Optional getString() { + if (isString()) { + return Optional.of(((StringValue) value).value); + } + return Optional.empty(); + } + + public Optional getString() { + if (isString()) { + return Optional.of(((StringValue) value).value); + } + return Optional.empty(); + } + + public Optional _getUnknown() { + if (_isUnknown()) { + return Optional.of(((_UnknownValue) value).value); + } + return Optional.empty(); + } + + @JsonValue + private Value getValue() { + return this.value; + } + + public interface Visitor { + T visitAlert(ConfigurablePropAlert alert); + + T visitAny(ConfigurablePropAny any); + + T visitApp(ConfigurablePropApp 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); + T visitBoolean(ConfigurablePropBoolean boolean_); - _FinalStage label(String label); + T visitInterfaceTimer(ConfigurablePropTimer interfaceTimer); - /** - *

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

- */ - _FinalStage description(Optional description); + T visitInterfaceApphook(ConfigurablePropApphook interfaceApphook); - _FinalStage description(String description); + T visitInteger(ConfigurablePropIntegerArray integer); - /** - *

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

- */ - _FinalStage optional(Optional optional); + T visitInterfaceHttp(ConfigurablePropHttp interfaceHttp); - _FinalStage optional(Boolean optional); + T visitServiceDb(ConfigurablePropDb serviceDb); - /** - *

If true, this prop will be ignored.

- */ - _FinalStage disabled(Optional disabled); + T visitSql(ConfigurablePropSql sql); - _FinalStage disabled(Boolean disabled); + T visitAirtableBaseId(ConfigurablePropAirtableBaseId airtableBaseId); - /** - *

If true, should not expose this prop to the user

- */ - _FinalStage hidden(Optional hidden); + T visitAirtableTableId(ConfigurablePropAirtableTableId airtableTableId); - _FinalStage hidden(Boolean hidden); + T visitAirtableViewId(ConfigurablePropAirtableViewId airtableViewId); - /** - *

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); + T visitAirtableFieldId(ConfigurablePropAirtableFieldId airtableFieldId); - _FinalStage remoteOptions(Boolean remoteOptions); + T visitDiscordChannel(ConfigurablePropDiscordChannel discordChannel); - /** - *

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

- */ - _FinalStage useQuery(Optional useQuery); + T visitDiscordChannel(ConfigurablePropDiscordChannelArray discordChannel); - _FinalStage useQuery(Boolean useQuery); + T visitInteger(ConfigurablePropInteger integer); - /** - *

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); + T visitObject(ConfigurablePropObject object); - _FinalStage reloadProps(Boolean reloadProps); + T visitString(ConfigurablePropString string); - /** - *

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); + T visitString(ConfigurablePropStringArray string); - _FinalStage withLabel(Boolean withLabel); + T _visitUnknown(Object unknownType); } + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) + @JsonSubTypes({ + @JsonSubTypes.Type(AlertValue.class), + @JsonSubTypes.Type(AnyValue.class), + @JsonSubTypes.Type(AppValue.class), + @JsonSubTypes.Type(BooleanValue.class), + @JsonSubTypes.Type(InterfaceTimerValue.class), + @JsonSubTypes.Type(InterfaceApphookValue.class), + @JsonSubTypes.Type(IntegerValue.class), + @JsonSubTypes.Type(InterfaceHttpValue.class), + @JsonSubTypes.Type(ServiceDbValue.class), + @JsonSubTypes.Type(SqlValue.class), + @JsonSubTypes.Type(AirtableBaseIdValue.class), + @JsonSubTypes.Type(AirtableTableIdValue.class), + @JsonSubTypes.Type(AirtableViewIdValue.class), + @JsonSubTypes.Type(AirtableFieldIdValue.class), + @JsonSubTypes.Type(DiscordChannelValue.class), + @JsonSubTypes.Type(DiscordChannelValue.class), + @JsonSubTypes.Type(IntegerValue.class), + @JsonSubTypes.Type(ObjectValue.class), + @JsonSubTypes.Type(StringValue.class), + @JsonSubTypes.Type(StringValue.class) + }) @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, TypeStage, _FinalStage { - private String name; + private interface Value { + T visit(Visitor visitor); + } - private ConfigurablePropType type; + @JsonTypeName("alert") + @JsonIgnoreProperties("type") + private static final class AlertValue implements Value { + @JsonUnwrapped + private ConfigurablePropAlert value; - private Optional withLabel = Optional.empty(); + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AlertValue() {} - private Optional reloadProps = Optional.empty(); + private AlertValue(ConfigurablePropAlert value) { + this.value = value; + } - private Optional useQuery = Optional.empty(); + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAlert(value); + } - private Optional remoteOptions = Optional.empty(); + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AlertValue && equalTo((AlertValue) other); + } - private Optional hidden = Optional.empty(); + private boolean equalTo(AlertValue other) { + return value.equals(other.value); + } - private Optional disabled = Optional.empty(); + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } - private Optional optional = Optional.empty(); + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } - private Optional description = Optional.empty(); + @JsonTypeName("any") + @JsonIgnoreProperties("type") + private static final class AnyValue implements Value { + @JsonUnwrapped + private ConfigurablePropAny value; - private Optional label = Optional.empty(); + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AnyValue() {} - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); + private AnyValue(ConfigurablePropAny value) { + this.value = value; + } - private Builder() {} + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAny(value); + } @java.lang.Override - public Builder from(ConfigurableProp other) { - name(other.getName()); - type(other.getType()); - label(other.getLabel()); - description(other.getDescription()); - optional(other.getOptional()); - disabled(other.getDisabled()); - hidden(other.getHidden()); - remoteOptions(other.getRemoteOptions()); - useQuery(other.getUseQuery()); - reloadProps(other.getReloadProps()); - withLabel(other.getWithLabel()); - return this; + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AnyValue && equalTo((AnyValue) other); + } + + private boolean equalTo(AnyValue other) { + return value.equals(other.value); } - /** - *

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 TypeStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; + public int hashCode() { + return Objects.hash(this.value); } @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull ConfigurablePropType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("app") + @JsonIgnoreProperties("type") + private static final class AppValue implements Value { + @JsonUnwrapped + private ConfigurablePropApp value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AppValue() {} + + private AppValue(ConfigurablePropApp value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitApp(value); } - /** - *

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

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage withLabel(Boolean withLabel) { - this.withLabel = Optional.ofNullable(withLabel); - return this; + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AppValue && equalTo((AppValue) other); + } + + private boolean equalTo(AppValue other) { + return value.equals(other.value); } - /** - *

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

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

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

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage reloadProps(Boolean reloadProps) { - this.reloadProps = Optional.ofNullable(reloadProps); - return this; + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("boolean") + @JsonIgnoreProperties("type") + private static final class BooleanValue implements Value { + @JsonUnwrapped + private ConfigurablePropBoolean value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private BooleanValue() {} + + private BooleanValue(ConfigurablePropBoolean value) { + this.value = value; } - /** - *

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

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

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

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage useQuery(Boolean useQuery) { - this.useQuery = Optional.ofNullable(useQuery); - return this; + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BooleanValue && equalTo((BooleanValue) other); + } + + private boolean equalTo(BooleanValue other) { + return value.equals(other.value); } - /** - *

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

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

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

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage remoteOptions(Boolean remoteOptions) { - this.remoteOptions = Optional.ofNullable(remoteOptions); - return this; + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.interface.timer") + @JsonIgnoreProperties("type") + private static final class InterfaceTimerValue implements Value { + @JsonUnwrapped + private ConfigurablePropTimer value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private InterfaceTimerValue() {} + + private InterfaceTimerValue(ConfigurablePropTimer value) { + this.value = value; } - /** - *

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

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

If true, should not expose this prop to the user

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage hidden(Boolean hidden) { - this.hidden = Optional.ofNullable(hidden); - return this; + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InterfaceTimerValue && equalTo((InterfaceTimerValue) other); + } + + private boolean equalTo(InterfaceTimerValue other) { + return value.equals(other.value); } - /** - *

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage disabled(Boolean disabled) { - this.disabled = Optional.ofNullable(disabled); - return this; + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.interface.apphook") + @JsonIgnoreProperties("type") + private static final class InterfaceApphookValue implements Value { + @JsonUnwrapped + private ConfigurablePropApphook value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private InterfaceApphookValue() {} + + private InterfaceApphookValue(ConfigurablePropApphook value) { + this.value = value; } - /** - *

If true, this prop will be ignored.

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

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

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage optional(Boolean optional) { - this.optional = Optional.ofNullable(optional); - return this; + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InterfaceApphookValue && equalTo((InterfaceApphookValue) other); + } + + private boolean equalTo(InterfaceApphookValue other) { + return value.equals(other.value); } - /** - *

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

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

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

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage description(String description) { - this.description = Optional.ofNullable(description); - return this; + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("integer[]") + @JsonIgnoreProperties("type") + private static final class IntegerValue implements Value { + @JsonUnwrapped + private ConfigurablePropIntegerArray value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private IntegerValue() {} + + private IntegerValue(ConfigurablePropIntegerArray value) { + this.value = value; } - /** - *

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

- */ @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; - return this; + public T visit(Visitor visitor) { + return visitor.visitInteger(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IntegerValue && equalTo((IntegerValue) other); + } + + private boolean equalTo(IntegerValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.interface.http") + @JsonIgnoreProperties("type") + private static final class InterfaceHttpValue implements Value { + @JsonUnwrapped + private ConfigurablePropHttp value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private InterfaceHttpValue() {} + + private InterfaceHttpValue(ConfigurablePropHttp value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitInterfaceHttp(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InterfaceHttpValue && equalTo((InterfaceHttpValue) other); + } + + private boolean equalTo(InterfaceHttpValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.service.db") + @JsonIgnoreProperties("type") + private static final class ServiceDbValue implements Value { + @JsonUnwrapped + private ConfigurablePropDb value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private ServiceDbValue() {} + + private ServiceDbValue(ConfigurablePropDb value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitServiceDb(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ServiceDbValue && equalTo((ServiceDbValue) other); + } + + private boolean equalTo(ServiceDbValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("sql") + @JsonIgnoreProperties("type") + private static final class SqlValue implements Value { + @JsonUnwrapped + private ConfigurablePropSql value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private SqlValue() {} + + private SqlValue(ConfigurablePropSql value) { + this.value = value; } - /** - *

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

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; + public T visit(Visitor visitor) { + return visitor.visitSql(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SqlValue && equalTo((SqlValue) other); + } + + private boolean equalTo(SqlValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.airtable.baseId") + @JsonIgnoreProperties("type") + private static final class AirtableBaseIdValue implements Value { + @JsonUnwrapped + private ConfigurablePropAirtableBaseId value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AirtableBaseIdValue() {} + + private AirtableBaseIdValue(ConfigurablePropAirtableBaseId value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAirtableBaseId(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AirtableBaseIdValue && equalTo((AirtableBaseIdValue) other); + } + + private boolean equalTo(AirtableBaseIdValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.airtable.tableId") + @JsonIgnoreProperties("type") + private static final class AirtableTableIdValue implements Value { + @JsonUnwrapped + private ConfigurablePropAirtableTableId value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AirtableTableIdValue() {} + + private AirtableTableIdValue(ConfigurablePropAirtableTableId value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAirtableTableId(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AirtableTableIdValue && equalTo((AirtableTableIdValue) other); + } + + private boolean equalTo(AirtableTableIdValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.airtable.viewId") + @JsonIgnoreProperties("type") + private static final class AirtableViewIdValue implements Value { + @JsonUnwrapped + private ConfigurablePropAirtableViewId value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AirtableViewIdValue() {} + + private AirtableViewIdValue(ConfigurablePropAirtableViewId value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAirtableViewId(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AirtableViewIdValue && equalTo((AirtableViewIdValue) other); + } + + private boolean equalTo(AirtableViewIdValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.airtable.fieldId") + @JsonIgnoreProperties("type") + private static final class AirtableFieldIdValue implements Value { + @JsonUnwrapped + private ConfigurablePropAirtableFieldId value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private AirtableFieldIdValue() {} + + private AirtableFieldIdValue(ConfigurablePropAirtableFieldId value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitAirtableFieldId(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AirtableFieldIdValue && equalTo((AirtableFieldIdValue) other); + } + + private boolean equalTo(AirtableFieldIdValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.discord.channel") + @JsonIgnoreProperties("type") + private static final class DiscordChannelValue implements Value { + @JsonUnwrapped + private ConfigurablePropDiscordChannel value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private DiscordChannelValue() {} + + private DiscordChannelValue(ConfigurablePropDiscordChannel value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitDiscordChannel(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DiscordChannelValue && equalTo((DiscordChannelValue) other); + } + + private boolean equalTo(DiscordChannelValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("$.discord.channel[]") + @JsonIgnoreProperties("type") + private static final class DiscordChannelValue implements Value { + @JsonUnwrapped + private ConfigurablePropDiscordChannelArray value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private DiscordChannelValue() {} + + private DiscordChannelValue(ConfigurablePropDiscordChannelArray value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitDiscordChannel(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DiscordChannelValue && equalTo((DiscordChannelValue) other); + } + + private boolean equalTo(DiscordChannelValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("integer") + @JsonIgnoreProperties("type") + private static final class IntegerValue implements Value { + @JsonUnwrapped + private ConfigurablePropInteger value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private IntegerValue() {} + + private IntegerValue(ConfigurablePropInteger value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitInteger(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IntegerValue && equalTo((IntegerValue) other); + } + + private boolean equalTo(IntegerValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("object") + @JsonIgnoreProperties("type") + private static final class ObjectValue implements Value { + @JsonUnwrapped + private ConfigurablePropObject value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private ObjectValue() {} + + private ObjectValue(ConfigurablePropObject value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitObject(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ObjectValue && equalTo((ObjectValue) other); + } + + private boolean equalTo(ObjectValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("string") + @JsonIgnoreProperties("type") + private static final class StringValue implements Value { + @JsonUnwrapped + private ConfigurablePropString value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private StringValue() {} + + private StringValue(ConfigurablePropString value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitString(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof StringValue && equalTo((StringValue) other); + } + + private boolean equalTo(StringValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonTypeName("string[]") + @JsonIgnoreProperties("type") + private static final class StringValue implements Value { + @JsonUnwrapped + private ConfigurablePropStringArray value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private StringValue() {} + + private StringValue(ConfigurablePropStringArray value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitString(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof StringValue && equalTo((StringValue) other); + } + + private boolean equalTo(StringValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ConfigurableProp{" + "value: " + value + "}"; + } + } + + @JsonIgnoreProperties("type") + private static final class _UnknownValue implements Value { + private String type; + + @JsonValue + private Object value; + + @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) + private _UnknownValue(@JsonProperty("value") Object value) {} + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor._visitUnknown(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof _UnknownValue && equalTo((_UnknownValue) other); + } + + private boolean equalTo(_UnknownValue other) { + return type.equals(other.type) && value.equals(other.value); } - /** - *

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

- */ @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; + public int hashCode() { + return Objects.hash(this.type, this.value); } @java.lang.Override - public ConfigurableProp build() { - return new ConfigurableProp( - name, - type, - label, - description, - optional, - disabled, - hidden, - remoteOptions, - useQuery, - reloadProps, - withLabel, - additionalProperties); + public String toString() { + return "ConfigurableProp{" + "type: " + type + ", value: " + value + "}"; } } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java index 4e70c27..c22bc7c 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableBaseId.java @@ -20,9 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropAirtableBaseId.Builder.class) -public final class ConfigurablePropAirtableBaseId { - private final String appProp; - +public final class ConfigurablePropAirtableBaseId implements IConfigurablePropBase { private final String name; private final Optional label; @@ -43,10 +41,11 @@ public final class ConfigurablePropAirtableBaseId { private final Optional withLabel; + private final String appProp; + private final Map additionalProperties; private ConfigurablePropAirtableBaseId( - String appProp, String name, Optional label, Optional description, @@ -57,8 +56,8 @@ private ConfigurablePropAirtableBaseId( Optional useQuery, Optional reloadProps, Optional withLabel, + String appProp, Map additionalProperties) { - this.appProp = appProp; this.name = name; this.label = label; this.description = description; @@ -69,26 +68,15 @@ private ConfigurablePropAirtableBaseId( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.appProp = appProp; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.airtable.baseId"; - } - - /** - * @return The name of the app prop that provides Airtable authentication - */ - @JsonProperty("appProp") - public String getAppProp() { - return appProp; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -97,6 +85,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -105,6 +94,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -113,6 +103,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -121,6 +112,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -129,6 +121,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -137,6 +130,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -145,6 +139,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -153,6 +148,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -161,10 +157,19 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The name of the app prop that provides Airtable authentication + */ + @JsonProperty("appProp") + public String getAppProp() { + return appProp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -177,8 +182,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropAirtableBaseId other) { - return appProp.equals(other.appProp) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -187,13 +191,13 @@ private boolean equalTo(ConfigurablePropAirtableBaseId other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && appProp.equals(other.appProp); } @java.lang.Override public int hashCode() { return Objects.hash( - this.appProp, this.name, this.label, this.description, @@ -203,7 +207,8 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.appProp); } @java.lang.Override @@ -211,24 +216,24 @@ public String toString() { return ObjectMappers.stringify(this); } - public static AppPropStage builder() { + public static NameStage builder() { return new Builder(); } - public interface AppPropStage { + public interface NameStage { /** - *

The name of the app prop that provides Airtable authentication

+ *

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

*/ - NameStage appProp(@NotNull String appProp); + AppPropStage name(@NotNull String name); Builder from(ConfigurablePropAirtableBaseId other); } - public interface NameStage { + public interface AppPropStage { /** - *

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

+ *

The name of the app prop that provides Airtable authentication

*/ - _FinalStage name(@NotNull String name); + _FinalStage appProp(@NotNull String appProp); } public interface _FinalStage { @@ -299,11 +304,11 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AppPropStage, NameStage, _FinalStage { - private String appProp; - + public static final class Builder implements NameStage, AppPropStage, _FinalStage { private String name; + private String appProp; + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -329,7 +334,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropAirtableBaseId other) { - appProp(other.getAppProp()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -340,30 +344,31 @@ public Builder from(ConfigurablePropAirtableBaseId other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + appProp(other.getAppProp()); return this; } /** - *

The name of the app prop that provides Airtable authentication

- *

The name of the app prop that provides Airtable authentication

+ *

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("appProp") - public NameStage appProp(@NotNull String appProp) { - this.appProp = Objects.requireNonNull(appProp, "appProp must not be null"); + @JsonSetter("name") + public AppPropStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); 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

+ *

The name of the app prop that provides Airtable authentication

+ *

The name of the app prop that provides Airtable authentication

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); + @JsonSetter("appProp") + public _FinalStage appProp(@NotNull String appProp) { + this.appProp = Objects.requireNonNull(appProp, "appProp must not be null"); return this; } @@ -550,7 +555,6 @@ public _FinalStage label(Optional label) { @java.lang.Override public ConfigurablePropAirtableBaseId build() { return new ConfigurablePropAirtableBaseId( - appProp, name, label, description, @@ -561,6 +565,7 @@ public ConfigurablePropAirtableBaseId build() { useQuery, reloadProps, withLabel, + appProp, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java index 04b67ca..85a2da9 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableFieldId.java @@ -20,9 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropAirtableFieldId.Builder.class) -public final class ConfigurablePropAirtableFieldId { - private final String tableIdProp; - +public final class ConfigurablePropAirtableFieldId implements IConfigurablePropBase { private final String name; private final Optional label; @@ -43,10 +41,11 @@ public final class ConfigurablePropAirtableFieldId { private final Optional withLabel; + private final String tableIdProp; + private final Map additionalProperties; private ConfigurablePropAirtableFieldId( - String tableIdProp, String name, Optional label, Optional description, @@ -57,8 +56,8 @@ private ConfigurablePropAirtableFieldId( Optional useQuery, Optional reloadProps, Optional withLabel, + String tableIdProp, Map additionalProperties) { - this.tableIdProp = tableIdProp; this.name = name; this.label = label; this.description = description; @@ -69,26 +68,15 @@ private ConfigurablePropAirtableFieldId( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.tableIdProp = tableIdProp; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.airtable.fieldId"; - } - - /** - * @return The name of the prop that provides the Airtable table ID - */ - @JsonProperty("tableIdProp") - public String getTableIdProp() { - return tableIdProp; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -97,6 +85,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -105,6 +94,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -113,6 +103,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -121,6 +112,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -129,6 +121,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -137,6 +130,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -145,6 +139,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -153,6 +148,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -161,10 +157,19 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The name of the prop that provides the Airtable table ID + */ + @JsonProperty("tableIdProp") + public String getTableIdProp() { + return tableIdProp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -177,8 +182,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropAirtableFieldId other) { - return tableIdProp.equals(other.tableIdProp) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -187,13 +191,13 @@ private boolean equalTo(ConfigurablePropAirtableFieldId other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && tableIdProp.equals(other.tableIdProp); } @java.lang.Override public int hashCode() { return Objects.hash( - this.tableIdProp, this.name, this.label, this.description, @@ -203,7 +207,8 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.tableIdProp); } @java.lang.Override @@ -211,24 +216,24 @@ public String toString() { return ObjectMappers.stringify(this); } - public static TableIdPropStage builder() { + public static NameStage builder() { return new Builder(); } - public interface TableIdPropStage { + public interface NameStage { /** - *

The name of the prop that provides the Airtable table ID

+ *

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

*/ - NameStage tableIdProp(@NotNull String tableIdProp); + TableIdPropStage name(@NotNull String name); Builder from(ConfigurablePropAirtableFieldId other); } - public interface NameStage { + public interface TableIdPropStage { /** - *

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

+ *

The name of the prop that provides the Airtable table ID

*/ - _FinalStage name(@NotNull String name); + _FinalStage tableIdProp(@NotNull String tableIdProp); } public interface _FinalStage { @@ -299,11 +304,11 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TableIdPropStage, NameStage, _FinalStage { - private String tableIdProp; - + public static final class Builder implements NameStage, TableIdPropStage, _FinalStage { private String name; + private String tableIdProp; + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -329,7 +334,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropAirtableFieldId other) { - tableIdProp(other.getTableIdProp()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -340,30 +344,31 @@ public Builder from(ConfigurablePropAirtableFieldId other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + tableIdProp(other.getTableIdProp()); return this; } /** - *

The name of the prop that provides the Airtable table ID

- *

The name of the prop that provides the Airtable table ID

+ *

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("tableIdProp") - public NameStage tableIdProp(@NotNull String tableIdProp) { - this.tableIdProp = Objects.requireNonNull(tableIdProp, "tableIdProp must not be null"); + @JsonSetter("name") + public TableIdPropStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); 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

+ *

The name of the prop that provides the Airtable table ID

+ *

The name of the prop that provides the Airtable table ID

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); + @JsonSetter("tableIdProp") + public _FinalStage tableIdProp(@NotNull String tableIdProp) { + this.tableIdProp = Objects.requireNonNull(tableIdProp, "tableIdProp must not be null"); return this; } @@ -550,7 +555,6 @@ public _FinalStage label(Optional label) { @java.lang.Override public ConfigurablePropAirtableFieldId build() { return new ConfigurablePropAirtableFieldId( - tableIdProp, name, label, description, @@ -561,6 +565,7 @@ public ConfigurablePropAirtableFieldId build() { useQuery, reloadProps, withLabel, + tableIdProp, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java index 0ceeaee..8ca1904 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableTableId.java @@ -20,9 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropAirtableTableId.Builder.class) -public final class ConfigurablePropAirtableTableId { - private final String baseIdProp; - +public final class ConfigurablePropAirtableTableId implements IConfigurablePropBase { private final String name; private final Optional label; @@ -43,10 +41,11 @@ public final class ConfigurablePropAirtableTableId { private final Optional withLabel; + private final String baseIdProp; + private final Map additionalProperties; private ConfigurablePropAirtableTableId( - String baseIdProp, String name, Optional label, Optional description, @@ -57,8 +56,8 @@ private ConfigurablePropAirtableTableId( Optional useQuery, Optional reloadProps, Optional withLabel, + String baseIdProp, Map additionalProperties) { - this.baseIdProp = baseIdProp; this.name = name; this.label = label; this.description = description; @@ -69,26 +68,15 @@ private ConfigurablePropAirtableTableId( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.baseIdProp = baseIdProp; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.airtable.tableId"; - } - - /** - * @return The name of the prop that provides the Airtable base ID - */ - @JsonProperty("baseIdProp") - public String getBaseIdProp() { - return baseIdProp; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -97,6 +85,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -105,6 +94,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -113,6 +103,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -121,6 +112,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -129,6 +121,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -137,6 +130,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -145,6 +139,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -153,6 +148,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -161,10 +157,19 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The name of the prop that provides the Airtable base ID + */ + @JsonProperty("baseIdProp") + public String getBaseIdProp() { + return baseIdProp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -177,8 +182,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropAirtableTableId other) { - return baseIdProp.equals(other.baseIdProp) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -187,13 +191,13 @@ private boolean equalTo(ConfigurablePropAirtableTableId other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && baseIdProp.equals(other.baseIdProp); } @java.lang.Override public int hashCode() { return Objects.hash( - this.baseIdProp, this.name, this.label, this.description, @@ -203,7 +207,8 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.baseIdProp); } @java.lang.Override @@ -211,24 +216,24 @@ public String toString() { return ObjectMappers.stringify(this); } - public static BaseIdPropStage builder() { + public static NameStage builder() { return new Builder(); } - public interface BaseIdPropStage { + public interface NameStage { /** - *

The name of the prop that provides the Airtable base ID

+ *

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

*/ - NameStage baseIdProp(@NotNull String baseIdProp); + BaseIdPropStage name(@NotNull String name); Builder from(ConfigurablePropAirtableTableId other); } - public interface NameStage { + public interface BaseIdPropStage { /** - *

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

+ *

The name of the prop that provides the Airtable base ID

*/ - _FinalStage name(@NotNull String name); + _FinalStage baseIdProp(@NotNull String baseIdProp); } public interface _FinalStage { @@ -299,11 +304,11 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BaseIdPropStage, NameStage, _FinalStage { - private String baseIdProp; - + public static final class Builder implements NameStage, BaseIdPropStage, _FinalStage { private String name; + private String baseIdProp; + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -329,7 +334,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropAirtableTableId other) { - baseIdProp(other.getBaseIdProp()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -340,30 +344,31 @@ public Builder from(ConfigurablePropAirtableTableId other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + baseIdProp(other.getBaseIdProp()); return this; } /** - *

The name of the prop that provides the Airtable base ID

- *

The name of the prop that provides the Airtable base ID

+ *

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("baseIdProp") - public NameStage baseIdProp(@NotNull String baseIdProp) { - this.baseIdProp = Objects.requireNonNull(baseIdProp, "baseIdProp must not be null"); + @JsonSetter("name") + public BaseIdPropStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); 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

+ *

The name of the prop that provides the Airtable base ID

+ *

The name of the prop that provides the Airtable base ID

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); + @JsonSetter("baseIdProp") + public _FinalStage baseIdProp(@NotNull String baseIdProp) { + this.baseIdProp = Objects.requireNonNull(baseIdProp, "baseIdProp must not be null"); return this; } @@ -550,7 +555,6 @@ public _FinalStage label(Optional label) { @java.lang.Override public ConfigurablePropAirtableTableId build() { return new ConfigurablePropAirtableTableId( - baseIdProp, name, label, description, @@ -561,6 +565,7 @@ public ConfigurablePropAirtableTableId build() { useQuery, reloadProps, withLabel, + baseIdProp, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java index 0104c20..73c59d6 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAirtableViewId.java @@ -20,9 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropAirtableViewId.Builder.class) -public final class ConfigurablePropAirtableViewId { - private final String tableIdProp; - +public final class ConfigurablePropAirtableViewId implements IConfigurablePropBase { private final String name; private final Optional label; @@ -43,10 +41,11 @@ public final class ConfigurablePropAirtableViewId { private final Optional withLabel; + private final String tableIdProp; + private final Map additionalProperties; private ConfigurablePropAirtableViewId( - String tableIdProp, String name, Optional label, Optional description, @@ -57,8 +56,8 @@ private ConfigurablePropAirtableViewId( Optional useQuery, Optional reloadProps, Optional withLabel, + String tableIdProp, Map additionalProperties) { - this.tableIdProp = tableIdProp; this.name = name; this.label = label; this.description = description; @@ -69,26 +68,15 @@ private ConfigurablePropAirtableViewId( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.tableIdProp = tableIdProp; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.airtable.viewId"; - } - - /** - * @return The name of the prop that provides the Airtable table ID - */ - @JsonProperty("tableIdProp") - public String getTableIdProp() { - return tableIdProp; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -97,6 +85,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -105,6 +94,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -113,6 +103,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -121,6 +112,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -129,6 +121,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -137,6 +130,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -145,6 +139,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -153,6 +148,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -161,10 +157,19 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The name of the prop that provides the Airtable table ID + */ + @JsonProperty("tableIdProp") + public String getTableIdProp() { + return tableIdProp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -177,8 +182,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropAirtableViewId other) { - return tableIdProp.equals(other.tableIdProp) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -187,13 +191,13 @@ private boolean equalTo(ConfigurablePropAirtableViewId other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && tableIdProp.equals(other.tableIdProp); } @java.lang.Override public int hashCode() { return Objects.hash( - this.tableIdProp, this.name, this.label, this.description, @@ -203,7 +207,8 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.tableIdProp); } @java.lang.Override @@ -211,24 +216,24 @@ public String toString() { return ObjectMappers.stringify(this); } - public static TableIdPropStage builder() { + public static NameStage builder() { return new Builder(); } - public interface TableIdPropStage { + public interface NameStage { /** - *

The name of the prop that provides the Airtable table ID

+ *

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

*/ - NameStage tableIdProp(@NotNull String tableIdProp); + TableIdPropStage name(@NotNull String name); Builder from(ConfigurablePropAirtableViewId other); } - public interface NameStage { + public interface TableIdPropStage { /** - *

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

+ *

The name of the prop that provides the Airtable table ID

*/ - _FinalStage name(@NotNull String name); + _FinalStage tableIdProp(@NotNull String tableIdProp); } public interface _FinalStage { @@ -299,11 +304,11 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TableIdPropStage, NameStage, _FinalStage { - private String tableIdProp; - + public static final class Builder implements NameStage, TableIdPropStage, _FinalStage { private String name; + private String tableIdProp; + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -329,7 +334,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropAirtableViewId other) { - tableIdProp(other.getTableIdProp()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -340,30 +344,31 @@ public Builder from(ConfigurablePropAirtableViewId other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + tableIdProp(other.getTableIdProp()); return this; } /** - *

The name of the prop that provides the Airtable table ID

- *

The name of the prop that provides the Airtable table ID

+ *

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("tableIdProp") - public NameStage tableIdProp(@NotNull String tableIdProp) { - this.tableIdProp = Objects.requireNonNull(tableIdProp, "tableIdProp must not be null"); + @JsonSetter("name") + public TableIdPropStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); 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

+ *

The name of the prop that provides the Airtable table ID

+ *

The name of the prop that provides the Airtable table ID

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); + @JsonSetter("tableIdProp") + public _FinalStage tableIdProp(@NotNull String tableIdProp) { + this.tableIdProp = Objects.requireNonNull(tableIdProp, "tableIdProp must not be null"); return this; } @@ -550,7 +555,6 @@ public _FinalStage label(Optional label) { @java.lang.Override public ConfigurablePropAirtableViewId build() { return new ConfigurablePropAirtableViewId( - tableIdProp, name, label, description, @@ -561,6 +565,7 @@ public ConfigurablePropAirtableViewId build() { useQuery, reloadProps, withLabel, + tableIdProp, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java index 188ce32..2d42a09 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java @@ -20,11 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropAlert.Builder.class) -public final class ConfigurablePropAlert { - private final Optional alertType; - - private final String content; - +public final class ConfigurablePropAlert implements IConfigurablePropBase { private final String name; private final Optional label; @@ -45,11 +41,13 @@ public final class ConfigurablePropAlert { private final Optional withLabel; + private final Optional alertType; + + private final String content; + private final Map additionalProperties; private ConfigurablePropAlert( - Optional alertType, - String content, String name, Optional label, Optional description, @@ -60,9 +58,9 @@ private ConfigurablePropAlert( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional alertType, + String content, Map additionalProperties) { - this.alertType = alertType; - this.content = content; this.name = name; this.label = label; this.description = description; @@ -73,31 +71,16 @@ private ConfigurablePropAlert( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.alertType = alertType; + this.content = content; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "alert"; - } - - @JsonProperty("alertType") - public Optional getAlertType() { - return alertType; - } - - /** - * @return The content of the alert, which can include HTML or plain text. - */ - @JsonProperty("content") - public String getContent() { - return content; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -106,6 +89,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -114,6 +98,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -122,6 +107,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -130,6 +116,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -138,6 +125,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -146,6 +134,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -154,6 +143,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -162,6 +152,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -170,10 +161,24 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + @JsonProperty("alertType") + public Optional getAlertType() { + return alertType; + } + + /** + * @return The content of the alert, which can include HTML or plain text. + */ + @JsonProperty("content") + public String getContent() { + return content; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -186,9 +191,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropAlert other) { - return alertType.equals(other.alertType) - && content.equals(other.content) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -197,14 +200,14 @@ private boolean equalTo(ConfigurablePropAlert other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && alertType.equals(other.alertType) + && content.equals(other.content); } @java.lang.Override public int hashCode() { return Objects.hash( - this.alertType, - this.content, this.name, this.label, this.description, @@ -214,7 +217,9 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.alertType, + this.content); } @java.lang.Override @@ -222,33 +227,29 @@ public String toString() { return ObjectMappers.stringify(this); } - public static ContentStage builder() { + public static NameStage builder() { return new Builder(); } - public interface ContentStage { + public interface NameStage { /** - *

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

+ *

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

*/ - NameStage content(@NotNull String content); + ContentStage name(@NotNull String name); Builder from(ConfigurablePropAlert other); } - public interface NameStage { + public interface ContentStage { /** - *

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

+ *

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

*/ - _FinalStage name(@NotNull String name); + _FinalStage content(@NotNull String content); } public interface _FinalStage { ConfigurablePropAlert build(); - _FinalStage alertType(Optional alertType); - - _FinalStage alertType(ConfigurablePropAlertType alertType); - /** *

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.

*/ @@ -311,13 +312,19 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + _FinalStage alertType(Optional alertType); + + _FinalStage alertType(ConfigurablePropAlertType alertType); } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ContentStage, NameStage, _FinalStage { + public static final class Builder implements NameStage, ContentStage, _FinalStage { + private String name; + private String content; - private String name; + private Optional alertType = Optional.empty(); private Optional withLabel = Optional.empty(); @@ -337,8 +344,6 @@ public static final class Builder implements ContentStage, NameStage, _FinalStag private Optional label = Optional.empty(); - private Optional alertType = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -346,8 +351,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropAlert other) { - alertType(other.getAlertType()); - content(other.getContent()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -358,6 +361,20 @@ public Builder from(ConfigurablePropAlert other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + alertType(other.getAlertType()); + content(other.getContent()); + 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 ContentStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); return this; } @@ -368,20 +385,21 @@ public Builder from(ConfigurablePropAlert other) { */ @java.lang.Override @JsonSetter("content") - public NameStage content(@NotNull String content) { + public _FinalStage content(@NotNull String content) { this.content = Objects.requireNonNull(content, "content must not be null"); 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"); + public _FinalStage alertType(ConfigurablePropAlertType alertType) { + this.alertType = Optional.ofNullable(alertType); + return this; + } + + @java.lang.Override + @JsonSetter(value = "alertType", nulls = Nulls.SKIP) + public _FinalStage alertType(Optional alertType) { + this.alertType = alertType; return this; } @@ -565,24 +583,9 @@ public _FinalStage label(Optional label) { return this; } - @java.lang.Override - public _FinalStage alertType(ConfigurablePropAlertType alertType) { - this.alertType = Optional.ofNullable(alertType); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alertType", nulls = Nulls.SKIP) - public _FinalStage alertType(Optional alertType) { - this.alertType = alertType; - return this; - } - @java.lang.Override public ConfigurablePropAlert build() { return new ConfigurablePropAlert( - alertType, - content, name, label, description, @@ -593,6 +596,8 @@ public ConfigurablePropAlert build() { useQuery, reloadProps, withLabel, + alertType, + content, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropAny.java b/src/main/java/com/pipedream/api/types/ConfigurablePropAny.java index f94d595..f7b1250 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropAny.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropAny.java @@ -21,11 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropAny.Builder.class) -public final class ConfigurablePropAny { - private final Optional default_; - - private final Optional> options; - +public final class ConfigurablePropAny implements IConfigurablePropBase { private final String name; private final Optional label; @@ -46,11 +42,13 @@ public final class ConfigurablePropAny { private final Optional withLabel; + private final Optional default_; + + private final Optional> options; + private final Map additionalProperties; private ConfigurablePropAny( - Optional default_, - Optional> options, String name, Optional label, Optional description, @@ -61,9 +59,9 @@ private ConfigurablePropAny( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional default_, + Optional> options, Map additionalProperties) { - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -74,28 +72,16 @@ private ConfigurablePropAny( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "any"; - } - - @JsonProperty("default") - public Optional getDefault() { - return default_; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -104,6 +90,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -112,6 +99,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -120,6 +108,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -128,6 +117,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -136,6 +126,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -144,6 +135,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -152,6 +144,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -160,6 +153,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -168,10 +162,21 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -184,9 +189,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropAny other) { - return default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -195,14 +198,14 @@ private boolean equalTo(ConfigurablePropAny other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.default_, - this.options, this.name, this.label, this.description, @@ -212,7 +215,9 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.default_, + this.options); } @java.lang.Override @@ -236,14 +241,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropAny build(); - _FinalStage default_(Optional default_); - - _FinalStage default_(Object default_); - - _FinalStage options(Optional> options); - - _FinalStage options(List options); - /** *

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

*/ @@ -306,12 +303,24 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + _FinalStage default_(Optional default_); + + _FinalStage default_(Object default_); + + _FinalStage options(Optional> options); + + _FinalStage options(List options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional> options = Optional.empty(); + + private Optional default_ = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -330,10 +339,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional> options = Optional.empty(); - - private Optional default_ = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -341,8 +346,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropAny other) { - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -353,6 +356,8 @@ public Builder from(ConfigurablePropAny other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -368,6 +373,32 @@ public _FinalStage name(@NotNull String name) { return this; } + @java.lang.Override + public _FinalStage options(List options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional> options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage default_(Object default_) { + this.default_ = Optional.ofNullable(default_); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default", nulls = Nulls.SKIP) + public _FinalStage default_(Optional default_) { + this.default_ = default_; + return this; + } + /** *

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. @@ -548,37 +579,9 @@ public _FinalStage label(Optional label) { return this; } - @java.lang.Override - public _FinalStage options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage default_(Object default_) { - this.default_ = Optional.ofNullable(default_); - return this; - } - - @java.lang.Override - @JsonSetter(value = "default", nulls = Nulls.SKIP) - public _FinalStage default_(Optional default_) { - this.default_ = default_; - return this; - } - @java.lang.Override public ConfigurablePropAny build() { return new ConfigurablePropAny( - default_, - options, name, label, description, @@ -589,6 +592,8 @@ public ConfigurablePropAny build() { useQuery, reloadProps, withLabel, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropApp.java b/src/main/java/com/pipedream/api/types/ConfigurablePropApp.java index 3b71506..db33c23 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropApp.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropApp.java @@ -20,9 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropApp.Builder.class) -public final class ConfigurablePropApp { - private final String app; - +public final class ConfigurablePropApp implements IConfigurablePropBase { private final String name; private final Optional label; @@ -43,10 +41,11 @@ public final class ConfigurablePropApp { private final Optional withLabel; + private final String app; + private final Map additionalProperties; private ConfigurablePropApp( - String app, String name, Optional label, Optional description, @@ -57,8 +56,8 @@ private ConfigurablePropApp( Optional useQuery, Optional reloadProps, Optional withLabel, + String app, Map additionalProperties) { - this.app = app; this.name = name; this.label = label; this.description = description; @@ -69,26 +68,15 @@ private ConfigurablePropApp( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.app = app; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "app"; - } - - /** - * @return 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. - */ - @JsonProperty("app") - public String getApp() { - return app; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -97,6 +85,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -105,6 +94,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -113,6 +103,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -121,6 +112,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -129,6 +121,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -137,6 +130,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -145,6 +139,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -153,6 +148,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -161,10 +157,19 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return 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. + */ + @JsonProperty("app") + public String getApp() { + return app; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -177,8 +182,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropApp other) { - return app.equals(other.app) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -187,13 +191,13 @@ private boolean equalTo(ConfigurablePropApp other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && app.equals(other.app); } @java.lang.Override public int hashCode() { return Objects.hash( - this.app, this.name, this.label, this.description, @@ -203,7 +207,8 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.app); } @java.lang.Override @@ -211,24 +216,24 @@ public String toString() { return ObjectMappers.stringify(this); } - public static AppStage builder() { + public static NameStage builder() { return new Builder(); } - public interface AppStage { + public interface NameStage { /** - *

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.

+ *

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

*/ - NameStage app(@NotNull String app); + AppStage name(@NotNull String name); Builder from(ConfigurablePropApp other); } - public interface NameStage { + public interface AppStage { /** - *

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

+ *

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 name(@NotNull String name); + _FinalStage app(@NotNull String app); } public interface _FinalStage { @@ -299,11 +304,11 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AppStage, NameStage, _FinalStage { - private String app; - + public static final class Builder implements NameStage, AppStage, _FinalStage { private String name; + private String app; + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -329,7 +334,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropApp other) { - app(other.getApp()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -340,30 +344,31 @@ public Builder from(ConfigurablePropApp other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + app(other.getApp()); 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.

- *

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.

+ *

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("app") - public NameStage app(@NotNull String app) { - this.app = Objects.requireNonNull(app, "app must not be null"); + @JsonSetter("name") + public AppStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); 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

+ *

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.

+ *

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 - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); + @JsonSetter("app") + public _FinalStage app(@NotNull String app) { + this.app = Objects.requireNonNull(app, "app must not be null"); return this; } @@ -550,7 +555,6 @@ public _FinalStage label(Optional label) { @java.lang.Override public ConfigurablePropApp build() { return new ConfigurablePropApp( - app, name, label, description, @@ -561,6 +565,7 @@ public ConfigurablePropApp build() { useQuery, reloadProps, withLabel, + app, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java b/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java index fbfd3f7..1483e43 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropApphook.java @@ -21,15 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropApphook.Builder.class) -public final class ConfigurablePropApphook { - private final String appProp; - - private final Optional> eventNames; - - private final Optional remote; - - private final Optional> static_; - +public final class ConfigurablePropApphook implements IConfigurablePropBase { private final String name; private final Optional label; @@ -50,13 +42,17 @@ public final class ConfigurablePropApphook { private final Optional withLabel; + private final String appProp; + + private final Optional> eventNames; + + private final Optional remote; + + private final Optional> static_; + private final Map additionalProperties; private ConfigurablePropApphook( - String appProp, - Optional> eventNames, - Optional remote, - Optional> static_, String name, Optional label, Optional description, @@ -67,11 +63,11 @@ private ConfigurablePropApphook( Optional useQuery, Optional reloadProps, Optional withLabel, + String appProp, + Optional> eventNames, + Optional remote, + Optional> static_, Map additionalProperties) { - this.appProp = appProp; - this.eventNames = eventNames; - this.remote = remote; - this.static_ = static_; this.name = name; this.label = label; this.description = description; @@ -82,50 +78,18 @@ private ConfigurablePropApphook( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.appProp = appProp; + this.eventNames = eventNames; + this.remote = remote; + this.static_ = static_; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.interface.apphook"; - } - - /** - * @return The name of the app prop that this apphook depends on - */ - @JsonProperty("appProp") - public String getAppProp() { - return appProp; - } - - /** - * @return List of event names to listen for - */ - @JsonProperty("eventNames") - public Optional> getEventNames() { - return eventNames; - } - - /** - * @return Whether this apphook is remote - */ - @JsonProperty("remote") - public Optional getRemote() { - return remote; - } - - /** - * @return Static configuration for the apphook - */ - @JsonProperty("static") - public Optional> getStatic() { - return static_; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -134,6 +98,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -142,6 +107,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -150,6 +116,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -158,6 +125,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -166,6 +134,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -174,6 +143,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -182,6 +152,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -190,6 +161,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -198,10 +170,43 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The name of the app prop that this apphook depends on + */ + @JsonProperty("appProp") + public String getAppProp() { + return appProp; + } + + /** + * @return List of event names to listen for + */ + @JsonProperty("eventNames") + public Optional> getEventNames() { + return eventNames; + } + + /** + * @return Whether this apphook is remote + */ + @JsonProperty("remote") + public Optional getRemote() { + return remote; + } + + /** + * @return Static configuration for the apphook + */ + @JsonProperty("static") + public Optional> getStatic() { + return static_; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -214,11 +219,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropApphook other) { - return appProp.equals(other.appProp) - && eventNames.equals(other.eventNames) - && remote.equals(other.remote) - && static_.equals(other.static_) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -227,16 +228,16 @@ private boolean equalTo(ConfigurablePropApphook other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && appProp.equals(other.appProp) + && eventNames.equals(other.eventNames) + && remote.equals(other.remote) + && static_.equals(other.static_); } @java.lang.Override public int hashCode() { return Objects.hash( - this.appProp, - this.eventNames, - this.remote, - this.static_, this.name, this.label, this.description, @@ -246,7 +247,11 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.appProp, + this.eventNames, + this.remote, + this.static_); } @java.lang.Override @@ -254,50 +259,29 @@ public String toString() { return ObjectMappers.stringify(this); } - public static AppPropStage builder() { + public static NameStage builder() { return new Builder(); } - public interface AppPropStage { + public interface NameStage { /** - *

The name of the app prop that this apphook depends on

+ *

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

*/ - NameStage appProp(@NotNull String appProp); + AppPropStage name(@NotNull String name); Builder from(ConfigurablePropApphook other); } - public interface NameStage { + public interface AppPropStage { /** - *

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

+ *

The name of the app prop that this apphook depends on

*/ - _FinalStage name(@NotNull String name); + _FinalStage appProp(@NotNull String appProp); } public interface _FinalStage { ConfigurablePropApphook build(); - /** - *

List of event names to listen for

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

Whether this apphook is remote

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

Static configuration for the apphook

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

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

*/ @@ -360,13 +344,40 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + /** + *

List of event names to listen for

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

Whether this apphook is remote

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

Static configuration for the apphook

+ */ + _FinalStage static_(Optional> static_); + + _FinalStage static_(List static_); } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AppPropStage, NameStage, _FinalStage { + public static final class Builder implements NameStage, AppPropStage, _FinalStage { + private String name; + private String appProp; - private String name; + private Optional> static_ = Optional.empty(); + + private Optional remote = Optional.empty(); + + private Optional> eventNames = Optional.empty(); private Optional withLabel = Optional.empty(); @@ -386,12 +397,6 @@ public static final class Builder implements AppPropStage, NameStage, _FinalStag private Optional label = Optional.empty(); - private Optional> static_ = Optional.empty(); - - private Optional remote = Optional.empty(); - - private Optional> eventNames = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -399,10 +404,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropApphook other) { - appProp(other.getAppProp()); - eventNames(other.getEventNames()); - remote(other.getRemote()); - static_(other.getStatic()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -413,6 +414,22 @@ public Builder from(ConfigurablePropApphook other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + appProp(other.getAppProp()); + eventNames(other.getEventNames()); + remote(other.getRemote()); + static_(other.getStatic()); + 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 AppPropStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); return this; } @@ -423,20 +440,68 @@ public Builder from(ConfigurablePropApphook other) { */ @java.lang.Override @JsonSetter("appProp") - public NameStage appProp(@NotNull String appProp) { + public _FinalStage appProp(@NotNull String appProp) { this.appProp = Objects.requireNonNull(appProp, "appProp must not be null"); 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

+ *

Static configuration for the apphook

* @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"); + public _FinalStage static_(List static_) { + this.static_ = Optional.ofNullable(static_); + return this; + } + + /** + *

Static configuration for the apphook

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

Whether this apphook is remote

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

Whether this apphook is remote

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

List of event names to listen for

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

List of event names to listen for

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

Static configuration for the apphook

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

Static configuration for the apphook

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

Whether this apphook is remote

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

Whether this apphook is remote

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

List of event names to listen for

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

List of event names to listen for

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

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

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

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

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

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

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

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

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

If true, this prop will be ignored.

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

If true, should not expose this prop to the user

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

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

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

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

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

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

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

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

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

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

+ *

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

If true, should not expose this prop to the user

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

If true, should not expose this prop to the user

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

If true, this prop will be ignored.

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

If true, this prop will be ignored.

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

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

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

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

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

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

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

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

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

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

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

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

+ */ + @java.lang.Override + @JsonSetter(value = "label", nulls = Nulls.SKIP) + public _FinalStage label(Optional label) { + this.label = label; + return this; + } + + @java.lang.Override + public ConfigurablePropBase build() { + return new ConfigurablePropBase( + name, + label, + description, + optional, + disabled, + hidden, + remoteOptions, + useQuery, + reloadProps, + withLabel, + additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropBoolean.java b/src/main/java/com/pipedream/api/types/ConfigurablePropBoolean.java index 8d20484..c40a0d6 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropBoolean.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropBoolean.java @@ -21,11 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropBoolean.Builder.class) -public final class ConfigurablePropBoolean { - private final Optional default_; - - private final Optional> options; - +public final class ConfigurablePropBoolean implements IConfigurablePropBase { private final String name; private final Optional label; @@ -46,11 +42,13 @@ public final class ConfigurablePropBoolean { private final Optional withLabel; + private final Optional default_; + + private final Optional> options; + private final Map additionalProperties; private ConfigurablePropBoolean( - Optional default_, - Optional> options, String name, Optional label, Optional description, @@ -61,9 +59,9 @@ private ConfigurablePropBoolean( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional default_, + Optional> options, Map additionalProperties) { - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -74,28 +72,16 @@ private ConfigurablePropBoolean( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "boolean"; - } - - @JsonProperty("default") - public Optional getDefault() { - return default_; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -104,6 +90,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -112,6 +99,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -120,6 +108,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -128,6 +117,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -136,6 +126,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -144,6 +135,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -152,6 +144,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -160,6 +153,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -168,10 +162,21 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -184,9 +189,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropBoolean other) { - return default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -195,14 +198,14 @@ private boolean equalTo(ConfigurablePropBoolean other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.default_, - this.options, this.name, this.label, this.description, @@ -212,7 +215,9 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.default_, + this.options); } @java.lang.Override @@ -236,14 +241,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropBoolean build(); - _FinalStage default_(Optional default_); - - _FinalStage default_(Boolean default_); - - _FinalStage options(Optional> options); - - _FinalStage options(List options); - /** *

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

*/ @@ -306,12 +303,24 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + _FinalStage default_(Optional default_); + + _FinalStage default_(Boolean default_); + + _FinalStage options(Optional> options); + + _FinalStage options(List options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional> options = Optional.empty(); + + private Optional default_ = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -330,10 +339,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional> options = Optional.empty(); - - private Optional default_ = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -341,8 +346,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropBoolean other) { - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -353,6 +356,8 @@ public Builder from(ConfigurablePropBoolean other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -368,6 +373,32 @@ public _FinalStage name(@NotNull String name) { return this; } + @java.lang.Override + public _FinalStage options(List options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional> options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage default_(Boolean default_) { + this.default_ = Optional.ofNullable(default_); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default", nulls = Nulls.SKIP) + public _FinalStage default_(Optional default_) { + this.default_ = default_; + return this; + } + /** *

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. @@ -548,37 +579,9 @@ public _FinalStage label(Optional label) { return this; } - @java.lang.Override - public _FinalStage options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage default_(Boolean default_) { - this.default_ = Optional.ofNullable(default_); - return this; - } - - @java.lang.Override - @JsonSetter(value = "default", nulls = Nulls.SKIP) - public _FinalStage default_(Optional default_) { - this.default_ = default_; - return this; - } - @java.lang.Override public ConfigurablePropBoolean build() { return new ConfigurablePropBoolean( - default_, - options, name, label, description, @@ -589,6 +592,8 @@ public ConfigurablePropBoolean build() { useQuery, reloadProps, withLabel, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java index e66e9bf..1625bfb 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropDb.java @@ -20,7 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropDb.Builder.class) -public final class ConfigurablePropDb { +public final class ConfigurablePropDb implements IConfigurablePropBase { private final String name; private final Optional label; @@ -68,15 +68,11 @@ private ConfigurablePropDb( this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.service.db"; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -85,6 +81,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -93,6 +90,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -101,6 +99,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -109,6 +108,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -117,6 +117,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -125,6 +126,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -133,6 +135,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -141,6 +144,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -149,6 +153,7 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscord.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscord.java index 456b93e..705e354 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscord.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscord.java @@ -20,7 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropDiscord.Builder.class) -public final class ConfigurablePropDiscord { +public final class ConfigurablePropDiscord implements IConfigurablePropBase { private final String name; private final Optional label; @@ -68,15 +68,11 @@ private ConfigurablePropDiscord( this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.discord.channel"; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -85,6 +81,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -93,6 +90,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -101,6 +99,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -109,6 +108,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -117,6 +117,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -125,6 +126,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -133,6 +135,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -141,6 +144,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -149,10 +153,16 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + @JsonProperty("type") + public String getType() { + return "$.discord.channel"; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java index daae542..a765ce5 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannel.java @@ -20,9 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropDiscordChannel.Builder.class) -public final class ConfigurablePropDiscordChannel { - private final String appProp; - +public final class ConfigurablePropDiscordChannel implements IConfigurablePropBase { private final String name; private final Optional label; @@ -43,10 +41,11 @@ public final class ConfigurablePropDiscordChannel { private final Optional withLabel; + private final String appProp; + private final Map additionalProperties; private ConfigurablePropDiscordChannel( - String appProp, String name, Optional label, Optional description, @@ -57,8 +56,8 @@ private ConfigurablePropDiscordChannel( Optional useQuery, Optional reloadProps, Optional withLabel, + String appProp, Map additionalProperties) { - this.appProp = appProp; this.name = name; this.label = label; this.description = description; @@ -69,26 +68,15 @@ private ConfigurablePropDiscordChannel( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.appProp = appProp; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.discord.channel"; - } - - /** - * @return The name of the app prop that provides Discord authentication - */ - @JsonProperty("appProp") - public String getAppProp() { - return appProp; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -97,6 +85,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -105,6 +94,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -113,6 +103,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -121,6 +112,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -129,6 +121,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -137,6 +130,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -145,6 +139,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -153,6 +148,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -161,10 +157,19 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The name of the app prop that provides Discord authentication + */ + @JsonProperty("appProp") + public String getAppProp() { + return appProp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -177,8 +182,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropDiscordChannel other) { - return appProp.equals(other.appProp) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -187,13 +191,13 @@ private boolean equalTo(ConfigurablePropDiscordChannel other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && appProp.equals(other.appProp); } @java.lang.Override public int hashCode() { return Objects.hash( - this.appProp, this.name, this.label, this.description, @@ -203,7 +207,8 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.appProp); } @java.lang.Override @@ -211,24 +216,24 @@ public String toString() { return ObjectMappers.stringify(this); } - public static AppPropStage builder() { + public static NameStage builder() { return new Builder(); } - public interface AppPropStage { + public interface NameStage { /** - *

The name of the app prop that provides Discord authentication

+ *

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

*/ - NameStage appProp(@NotNull String appProp); + AppPropStage name(@NotNull String name); Builder from(ConfigurablePropDiscordChannel other); } - public interface NameStage { + public interface AppPropStage { /** - *

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

+ *

The name of the app prop that provides Discord authentication

*/ - _FinalStage name(@NotNull String name); + _FinalStage appProp(@NotNull String appProp); } public interface _FinalStage { @@ -299,11 +304,11 @@ public interface _FinalStage { } @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AppPropStage, NameStage, _FinalStage { - private String appProp; - + public static final class Builder implements NameStage, AppPropStage, _FinalStage { private String name; + private String appProp; + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -329,7 +334,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropDiscordChannel other) { - appProp(other.getAppProp()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -340,30 +344,31 @@ public Builder from(ConfigurablePropDiscordChannel other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + appProp(other.getAppProp()); return this; } /** - *

The name of the app prop that provides Discord authentication

- *

The name of the app prop that provides Discord authentication

+ *

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("appProp") - public NameStage appProp(@NotNull String appProp) { - this.appProp = Objects.requireNonNull(appProp, "appProp must not be null"); + @JsonSetter("name") + public AppPropStage name(@NotNull String name) { + this.name = Objects.requireNonNull(name, "name must not be null"); 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

+ *

The name of the app prop that provides Discord authentication

+ *

The name of the app prop that provides Discord authentication

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); + @JsonSetter("appProp") + public _FinalStage appProp(@NotNull String appProp) { + this.appProp = Objects.requireNonNull(appProp, "appProp must not be null"); return this; } @@ -550,7 +555,6 @@ public _FinalStage label(Optional label) { @java.lang.Override public ConfigurablePropDiscordChannel build() { return new ConfigurablePropDiscordChannel( - appProp, name, label, description, @@ -561,6 +565,7 @@ public ConfigurablePropDiscordChannel build() { useQuery, reloadProps, withLabel, + appProp, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java index 240c7bd..08e40ab 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropDiscordChannelArray.java @@ -20,9 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropDiscordChannelArray.Builder.class) -public final class ConfigurablePropDiscordChannelArray { - private final Optional appProp; - +public final class ConfigurablePropDiscordChannelArray implements IConfigurablePropBase { private final String name; private final Optional label; @@ -43,10 +41,11 @@ public final class ConfigurablePropDiscordChannelArray { private final Optional withLabel; + private final Optional appProp; + private final Map additionalProperties; private ConfigurablePropDiscordChannelArray( - Optional appProp, String name, Optional label, Optional description, @@ -57,8 +56,8 @@ private ConfigurablePropDiscordChannelArray( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional appProp, Map additionalProperties) { - this.appProp = appProp; this.name = name; this.label = label; this.description = description; @@ -69,26 +68,15 @@ private ConfigurablePropDiscordChannelArray( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.appProp = appProp; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.discord.channel[]"; - } - - /** - * @return The name of the app prop that provides Discord authentication - */ - @JsonProperty("appProp") - public Optional getAppProp() { - return appProp; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -97,6 +85,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -105,6 +94,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -113,6 +103,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -121,6 +112,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -129,6 +121,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -137,6 +130,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -145,6 +139,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -153,6 +148,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -161,10 +157,19 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The name of the app prop that provides Discord authentication + */ + @JsonProperty("appProp") + public Optional getAppProp() { + return appProp; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -178,8 +183,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropDiscordChannelArray other) { - return appProp.equals(other.appProp) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -188,13 +192,13 @@ private boolean equalTo(ConfigurablePropDiscordChannelArray other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && appProp.equals(other.appProp); } @java.lang.Override public int hashCode() { return Objects.hash( - this.appProp, this.name, this.label, this.description, @@ -204,7 +208,8 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.appProp); } @java.lang.Override @@ -228,13 +233,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropDiscordChannelArray build(); - /** - *

The name of the app prop that provides Discord authentication

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

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

*/ @@ -297,12 +295,21 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + /** + *

The name of the app prop that provides Discord authentication

+ */ + _FinalStage appProp(Optional appProp); + + _FinalStage appProp(String appProp); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional appProp = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -321,8 +328,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional appProp = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -330,7 +335,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropDiscordChannelArray other) { - appProp(other.getAppProp()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -341,6 +345,7 @@ public Builder from(ConfigurablePropDiscordChannelArray other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + appProp(other.getAppProp()); return this; } @@ -356,6 +361,26 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

The name of the app prop that provides Discord authentication

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

The name of the app prop that provides Discord authentication

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

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. @@ -536,30 +561,9 @@ public _FinalStage label(Optional label) { return this; } - /** - *

The name of the app prop that provides Discord authentication

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

The name of the app prop that provides Discord authentication

- */ - @java.lang.Override - @JsonSetter(value = "appProp", nulls = Nulls.SKIP) - public _FinalStage appProp(Optional appProp) { - this.appProp = appProp; - return this; - } - @java.lang.Override public ConfigurablePropDiscordChannelArray build() { return new ConfigurablePropDiscordChannelArray( - appProp, name, label, description, @@ -570,6 +574,7 @@ public ConfigurablePropDiscordChannelArray build() { useQuery, reloadProps, withLabel, + appProp, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java b/src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java index 18c009b..489b992 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropHttp.java @@ -20,9 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropHttp.Builder.class) -public final class ConfigurablePropHttp { - private final Optional customResponse; - +public final class ConfigurablePropHttp implements IConfigurablePropBase { private final String name; private final Optional label; @@ -43,10 +41,11 @@ public final class ConfigurablePropHttp { private final Optional withLabel; + private final Optional customResponse; + private final Map additionalProperties; private ConfigurablePropHttp( - Optional customResponse, String name, Optional label, Optional description, @@ -57,8 +56,8 @@ private ConfigurablePropHttp( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional customResponse, Map additionalProperties) { - this.customResponse = customResponse; this.name = name; this.label = label; this.description = description; @@ -69,26 +68,15 @@ private ConfigurablePropHttp( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.customResponse = customResponse; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.interface.http"; - } - - /** - * @return Whether this HTTP interface allows custom responses - */ - @JsonProperty("customResponse") - public Optional getCustomResponse() { - return customResponse; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -97,6 +85,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -105,6 +94,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -113,6 +103,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -121,6 +112,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -129,6 +121,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -137,6 +130,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -145,6 +139,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -153,6 +148,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -161,10 +157,19 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return Whether this HTTP interface allows custom responses + */ + @JsonProperty("customResponse") + public Optional getCustomResponse() { + return customResponse; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -177,8 +182,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropHttp other) { - return customResponse.equals(other.customResponse) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -187,13 +191,13 @@ private boolean equalTo(ConfigurablePropHttp other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && customResponse.equals(other.customResponse); } @java.lang.Override public int hashCode() { return Objects.hash( - this.customResponse, this.name, this.label, this.description, @@ -203,7 +207,8 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.customResponse); } @java.lang.Override @@ -227,13 +232,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropHttp build(); - /** - *

Whether this HTTP interface allows custom responses

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

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

*/ @@ -296,12 +294,21 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + /** + *

Whether this HTTP interface allows custom responses

+ */ + _FinalStage customResponse(Optional customResponse); + + _FinalStage customResponse(Boolean customResponse); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional customResponse = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -320,8 +327,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional customResponse = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -329,7 +334,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropHttp other) { - customResponse(other.getCustomResponse()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -340,6 +344,7 @@ public Builder from(ConfigurablePropHttp other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + customResponse(other.getCustomResponse()); return this; } @@ -355,6 +360,26 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

Whether this HTTP interface allows custom responses

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

Whether this HTTP interface allows custom responses

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

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. @@ -535,30 +560,9 @@ public _FinalStage label(Optional label) { return this; } - /** - *

Whether this HTTP interface allows custom responses

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

Whether this HTTP interface allows custom responses

- */ - @java.lang.Override - @JsonSetter(value = "customResponse", nulls = Nulls.SKIP) - public _FinalStage customResponse(Optional customResponse) { - this.customResponse = customResponse; - return this; - } - @java.lang.Override public ConfigurablePropHttp build() { return new ConfigurablePropHttp( - customResponse, name, label, description, @@ -569,6 +573,7 @@ public ConfigurablePropHttp build() { useQuery, reloadProps, withLabel, + customResponse, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java b/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java index 5559198..b890aaf 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropInteger.java @@ -21,15 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropInteger.Builder.class) -public final class ConfigurablePropInteger { - private final Optional min; - - private final Optional max; - - private final Optional default_; - - private final Optional> options; - +public final class ConfigurablePropInteger implements IConfigurablePropBase { private final String name; private final Optional label; @@ -50,13 +42,17 @@ public final class ConfigurablePropInteger { private final Optional withLabel; + private final Optional min; + + private final Optional max; + + private final Optional default_; + + private final Optional> options; + private final Map additionalProperties; private ConfigurablePropInteger( - Optional min, - Optional max, - Optional default_, - Optional> options, String name, Optional label, Optional description, @@ -67,11 +63,11 @@ private ConfigurablePropInteger( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional min, + Optional max, + Optional default_, + Optional> options, Map additionalProperties) { - this.min = min; - this.max = max; - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -82,47 +78,18 @@ private ConfigurablePropInteger( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.min = min; + this.max = max; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "integer"; - } - - /** - * @return The minimum value for this integer prop. - */ - @JsonProperty("min") - public Optional getMin() { - return min; - } - - /** - * @return The maximum value for this integer prop. - */ - @JsonProperty("max") - public Optional getMax() { - return max; - } - - @JsonProperty("default") - public Optional getDefault() { - return default_; - } - - /** - * @return Available integer options - */ - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -131,6 +98,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -139,6 +107,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -147,6 +116,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -155,6 +125,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -163,6 +134,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -171,6 +143,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -179,6 +152,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -187,6 +161,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -195,10 +170,40 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The minimum value for this integer prop. + */ + @JsonProperty("min") + public Optional getMin() { + return min; + } + + /** + * @return The maximum value for this integer prop. + */ + @JsonProperty("max") + public Optional getMax() { + return max; + } + + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + /** + * @return Available integer options + */ + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -211,11 +216,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropInteger other) { - return min.equals(other.min) - && max.equals(other.max) - && default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -224,16 +225,16 @@ private boolean equalTo(ConfigurablePropInteger other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && min.equals(other.min) + && max.equals(other.max) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.min, - this.max, - this.default_, - this.options, this.name, this.label, this.description, @@ -243,7 +244,11 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.min, + this.max, + this.default_, + this.options); } @java.lang.Override @@ -267,31 +272,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropInteger build(); - /** - *

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); - - _FinalStage default_(Optional default_); - - _FinalStage default_(Double default_); - - /** - *

Available integer options

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

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

*/ @@ -354,12 +334,45 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + /** + *

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); + + _FinalStage default_(Optional default_); + + _FinalStage default_(Double default_); + + /** + *

Available integer options

+ */ + _FinalStage options(Optional> options); + + _FinalStage options(List options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional> options = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional max = Optional.empty(); + + private Optional min = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -378,14 +391,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional> options = Optional.empty(); - - private Optional default_ = Optional.empty(); - - private Optional max = Optional.empty(); - - private Optional min = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -393,10 +398,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropInteger other) { - min(other.getMin()); - max(other.getMax()); - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -407,6 +408,10 @@ public Builder from(ConfigurablePropInteger other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + min(other.getMin()); + max(other.getMax()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -422,6 +427,79 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

Available integer options

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

Available integer options

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

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); + return this; + } + + /** + *

The maximum value for this integer prop.

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

The minimum value for this integer prop.

+ */ + @java.lang.Override + @JsonSetter(value = "min", nulls = Nulls.SKIP) + public _FinalStage min(Optional min) { + this.min = min; + 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. @@ -602,86 +680,9 @@ public _FinalStage label(Optional label) { return this; } - /** - *

Available integer options

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

Available integer options

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

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); - return this; - } - - /** - *

The maximum value for this integer prop.

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

The minimum value for this integer prop.

- */ - @java.lang.Override - @JsonSetter(value = "min", nulls = Nulls.SKIP) - public _FinalStage min(Optional min) { - this.min = min; - return this; - } - @java.lang.Override public ConfigurablePropInteger build() { return new ConfigurablePropInteger( - min, - max, - default_, - options, name, label, description, @@ -692,6 +693,10 @@ public ConfigurablePropInteger build() { useQuery, reloadProps, withLabel, + min, + max, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java b/src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java index dc2000d..970e522 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropIntegerArray.java @@ -21,15 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropIntegerArray.Builder.class) -public final class ConfigurablePropIntegerArray { - private final Optional min; - - private final Optional max; - - private final Optional> default_; - - private final Optional> options; - +public final class ConfigurablePropIntegerArray implements IConfigurablePropBase { private final String name; private final Optional label; @@ -50,13 +42,17 @@ public final class ConfigurablePropIntegerArray { private final Optional withLabel; + private final Optional min; + + private final Optional max; + + private final Optional> default_; + + private final Optional> options; + private final Map additionalProperties; private ConfigurablePropIntegerArray( - Optional min, - Optional max, - Optional> default_, - Optional> options, String name, Optional label, Optional description, @@ -67,11 +63,11 @@ private ConfigurablePropIntegerArray( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional min, + Optional max, + Optional> default_, + Optional> options, Map additionalProperties) { - this.min = min; - this.max = max; - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -82,50 +78,18 @@ private ConfigurablePropIntegerArray( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.min = min; + this.max = max; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "integer[]"; - } - - /** - * @return The minimum value for integers in this array - */ - @JsonProperty("min") - public Optional getMin() { - return min; - } - - /** - * @return The maximum value for integers in this array - */ - @JsonProperty("max") - public Optional getMax() { - return max; - } - - /** - * @return Default array of integers - */ - @JsonProperty("default") - public Optional> getDefault() { - return default_; - } - - /** - * @return Available options for the integer array - */ - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -134,6 +98,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -142,6 +107,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -150,6 +116,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -158,6 +125,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -166,6 +134,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -174,6 +143,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -182,6 +152,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -190,6 +161,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -198,10 +170,43 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return The minimum value for integers in this array + */ + @JsonProperty("min") + public Optional getMin() { + return min; + } + + /** + * @return The maximum value for integers in this array + */ + @JsonProperty("max") + public Optional getMax() { + return max; + } + + /** + * @return Default array of integers + */ + @JsonProperty("default") + public Optional> getDefault() { + return default_; + } + + /** + * @return Available options for the integer array + */ + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -214,11 +219,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropIntegerArray other) { - return min.equals(other.min) - && max.equals(other.max) - && default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -227,16 +228,16 @@ private boolean equalTo(ConfigurablePropIntegerArray other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && min.equals(other.min) + && max.equals(other.max) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.min, - this.max, - this.default_, - this.options, this.name, this.label, this.description, @@ -246,7 +247,11 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.min, + this.max, + this.default_, + this.options); } @java.lang.Override @@ -270,34 +275,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropIntegerArray build(); - /** - *

The minimum value for integers in this array

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

The maximum value for integers in this array

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

Default array of integers

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

Available options for the integer array

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

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

*/ @@ -360,12 +337,48 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + /** + *

The minimum value for integers in this array

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

The maximum value for integers in this array

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

Default array of integers

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

Available options for the integer array

+ */ + _FinalStage options(Optional> options); + + _FinalStage options(List options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional> options = Optional.empty(); + + private Optional> default_ = Optional.empty(); + + private Optional max = Optional.empty(); + + private Optional min = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -384,14 +397,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional> options = Optional.empty(); - - private Optional> default_ = Optional.empty(); - - private Optional max = Optional.empty(); - - private Optional min = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -399,10 +404,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropIntegerArray other) { - min(other.getMin()); - max(other.getMax()); - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -413,6 +414,10 @@ public Builder from(ConfigurablePropIntegerArray other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + min(other.getMin()); + max(other.getMax()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -428,6 +433,86 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

Available options for the integer array

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

Available options for the integer array

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

Default array of integers

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

Default array of integers

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

The maximum value for integers in this array

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

The maximum value for integers in this array

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

The minimum value for integers in this array

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

The minimum value for integers in this array

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

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. @@ -608,93 +693,9 @@ public _FinalStage label(Optional label) { return this; } - /** - *

Available options for the integer array

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

Available options for the integer array

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

Default array of integers

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

Default array of integers

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

The maximum value for integers in this array

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

The maximum value for integers in this array

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

The minimum value for integers in this array

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

The minimum value for integers in this array

- */ - @java.lang.Override - @JsonSetter(value = "min", nulls = Nulls.SKIP) - public _FinalStage min(Optional min) { - this.min = min; - return this; - } - @java.lang.Override public ConfigurablePropIntegerArray build() { return new ConfigurablePropIntegerArray( - min, - max, - default_, - options, name, label, description, @@ -705,6 +706,10 @@ public ConfigurablePropIntegerArray build() { useQuery, reloadProps, withLabel, + min, + max, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropObject.java b/src/main/java/com/pipedream/api/types/ConfigurablePropObject.java index 6174398..a0773df 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropObject.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropObject.java @@ -21,11 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropObject.Builder.class) -public final class ConfigurablePropObject { - private final Optional> default_; - - private final Optional> options; - +public final class ConfigurablePropObject implements IConfigurablePropBase { private final String name; private final Optional label; @@ -46,11 +42,13 @@ public final class ConfigurablePropObject { private final Optional withLabel; + private final Optional> default_; + + private final Optional> options; + private final Map additionalProperties; private ConfigurablePropObject( - Optional> default_, - Optional> options, String name, Optional label, Optional description, @@ -61,9 +59,9 @@ private ConfigurablePropObject( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional> default_, + Optional> options, Map additionalProperties) { - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -74,28 +72,16 @@ private ConfigurablePropObject( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "object"; - } - - @JsonProperty("default") - public Optional> getDefault() { - return default_; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -104,6 +90,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -112,6 +99,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -120,6 +108,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -128,6 +117,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -136,6 +126,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -144,6 +135,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -152,6 +144,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -160,6 +153,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -168,10 +162,21 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + @JsonProperty("default") + public Optional> getDefault() { + return default_; + } + + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -184,9 +189,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropObject other) { - return default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -195,14 +198,14 @@ private boolean equalTo(ConfigurablePropObject other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.default_, - this.options, this.name, this.label, this.description, @@ -212,7 +215,9 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.default_, + this.options); } @java.lang.Override @@ -236,14 +241,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropObject build(); - _FinalStage default_(Optional> default_); - - _FinalStage default_(Map default_); - - _FinalStage options(Optional> options); - - _FinalStage options(List options); - /** *

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

*/ @@ -306,12 +303,24 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + _FinalStage default_(Optional> default_); + + _FinalStage default_(Map default_); + + _FinalStage options(Optional> options); + + _FinalStage options(List options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional> options = Optional.empty(); + + private Optional> default_ = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -330,10 +339,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional> options = Optional.empty(); - - private Optional> default_ = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -341,8 +346,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropObject other) { - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -353,6 +356,8 @@ public Builder from(ConfigurablePropObject other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -368,6 +373,32 @@ public _FinalStage name(@NotNull String name) { return this; } + @java.lang.Override + public _FinalStage options(List options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional> options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage default_(Map default_) { + this.default_ = Optional.ofNullable(default_); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default", nulls = Nulls.SKIP) + public _FinalStage default_(Optional> default_) { + this.default_ = default_; + return this; + } + /** *

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. @@ -548,37 +579,9 @@ public _FinalStage label(Optional label) { return this; } - @java.lang.Override - public _FinalStage options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage default_(Map default_) { - this.default_ = Optional.ofNullable(default_); - return this; - } - - @java.lang.Override - @JsonSetter(value = "default", nulls = Nulls.SKIP) - public _FinalStage default_(Optional> default_) { - this.default_ = default_; - return this; - } - @java.lang.Override public ConfigurablePropObject build() { return new ConfigurablePropObject( - default_, - options, name, label, description, @@ -589,6 +592,8 @@ public ConfigurablePropObject build() { useQuery, reloadProps, withLabel, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java b/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java index 7a570e1..ec5950e 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropSql.java @@ -21,13 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropSql.Builder.class) -public final class ConfigurablePropSql { - private final Optional auth; - - private final Optional default_; - - private final Optional> options; - +public final class ConfigurablePropSql implements IConfigurablePropBase { private final String name; private final Optional label; @@ -48,12 +42,15 @@ public final class ConfigurablePropSql { private final Optional withLabel; + private final Optional auth; + + private final Optional default_; + + private final Optional> options; + private final Map additionalProperties; private ConfigurablePropSql( - Optional auth, - Optional default_, - Optional> options, String name, Optional label, Optional description, @@ -64,10 +61,10 @@ private ConfigurablePropSql( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional auth, + Optional default_, + Optional> options, Map additionalProperties) { - this.auth = auth; - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -78,33 +75,17 @@ private ConfigurablePropSql( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.auth = auth; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "sql"; - } - - @JsonProperty("auth") - public Optional getAuth() { - return auth; - } - - @JsonProperty("default") - public Optional getDefault() { - return default_; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -113,6 +94,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -121,6 +103,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -129,6 +112,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -137,6 +121,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -145,6 +130,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -153,6 +139,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -161,6 +148,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -169,6 +157,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -177,10 +166,26 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + @JsonProperty("auth") + public Optional getAuth() { + return auth; + } + + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -193,10 +198,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropSql other) { - return auth.equals(other.auth) - && default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -205,15 +207,15 @@ private boolean equalTo(ConfigurablePropSql other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && auth.equals(other.auth) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.auth, - this.default_, - this.options, this.name, this.label, this.description, @@ -223,7 +225,10 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.auth, + this.default_, + this.options); } @java.lang.Override @@ -247,18 +252,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropSql build(); - _FinalStage auth(Optional auth); - - _FinalStage auth(ConfigurablePropSqlAuth auth); - - _FinalStage default_(Optional default_); - - _FinalStage default_(ConfiguredPropValueSql default_); - - _FinalStage options(Optional> options); - - _FinalStage options(List options); - /** *

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

*/ @@ -321,12 +314,30 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + _FinalStage auth(Optional auth); + + _FinalStage auth(ConfigurablePropSqlAuth auth); + + _FinalStage default_(Optional default_); + + _FinalStage default_(ConfiguredPropValueSql default_); + + _FinalStage options(Optional> options); + + _FinalStage options(List options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional> options = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional auth = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -345,12 +356,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional> options = Optional.empty(); - - private Optional default_ = Optional.empty(); - - private Optional auth = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -358,9 +363,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropSql other) { - auth(other.getAuth()); - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -371,6 +373,9 @@ public Builder from(ConfigurablePropSql other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + auth(other.getAuth()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -386,6 +391,45 @@ public _FinalStage name(@NotNull String name) { return this; } + @java.lang.Override + public _FinalStage options(List options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional> options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage default_(ConfiguredPropValueSql default_) { + this.default_ = Optional.ofNullable(default_); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default", nulls = Nulls.SKIP) + public _FinalStage default_(Optional default_) { + this.default_ = default_; + return this; + } + + @java.lang.Override + public _FinalStage auth(ConfigurablePropSqlAuth auth) { + this.auth = Optional.ofNullable(auth); + return this; + } + + @java.lang.Override + @JsonSetter(value = "auth", nulls = Nulls.SKIP) + public _FinalStage auth(Optional auth) { + this.auth = auth; + return this; + } + /** *

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. @@ -566,51 +610,9 @@ public _FinalStage label(Optional label) { return this; } - @java.lang.Override - public _FinalStage options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage default_(ConfiguredPropValueSql default_) { - this.default_ = Optional.ofNullable(default_); - return this; - } - - @java.lang.Override - @JsonSetter(value = "default", nulls = Nulls.SKIP) - public _FinalStage default_(Optional default_) { - this.default_ = default_; - return this; - } - - @java.lang.Override - public _FinalStage auth(ConfigurablePropSqlAuth auth) { - this.auth = Optional.ofNullable(auth); - return this; - } - - @java.lang.Override - @JsonSetter(value = "auth", nulls = Nulls.SKIP) - public _FinalStage auth(Optional auth) { - this.auth = auth; - return this; - } - @java.lang.Override public ConfigurablePropSql build() { return new ConfigurablePropSql( - auth, - default_, - options, name, label, description, @@ -621,6 +623,9 @@ public ConfigurablePropSql build() { useQuery, reloadProps, withLabel, + auth, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropString.java b/src/main/java/com/pipedream/api/types/ConfigurablePropString.java index d1ce2e7..9aeb4f1 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropString.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropString.java @@ -21,13 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropString.Builder.class) -public final class ConfigurablePropString { - private final Optional secret; - - private final Optional default_; - - private final Optional> options; - +public final class ConfigurablePropString implements IConfigurablePropBase { private final String name; private final Optional label; @@ -48,12 +42,15 @@ public final class ConfigurablePropString { private final Optional withLabel; + private final Optional secret; + + private final Optional default_; + + private final Optional> options; + private final Map additionalProperties; private ConfigurablePropString( - Optional secret, - Optional default_, - Optional> options, String name, Optional label, Optional description, @@ -64,10 +61,10 @@ private ConfigurablePropString( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional secret, + Optional default_, + Optional> options, Map additionalProperties) { - this.secret = secret; - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -78,36 +75,17 @@ private ConfigurablePropString( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.secret = secret; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "string"; - } - - /** - * @return If true, this prop is a secret and should not be displayed in plain text. - */ - @JsonProperty("secret") - public Optional getSecret() { - return secret; - } - - @JsonProperty("default") - public Optional getDefault() { - return default_; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -116,6 +94,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -124,6 +103,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -132,6 +112,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -140,6 +121,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -148,6 +130,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -156,6 +139,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -164,6 +148,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -172,6 +157,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -180,10 +166,29 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return If true, this prop is a secret and should not be displayed in plain text. + */ + @JsonProperty("secret") + public Optional getSecret() { + return secret; + } + + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -196,10 +201,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropString other) { - return secret.equals(other.secret) - && default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -208,15 +210,15 @@ private boolean equalTo(ConfigurablePropString other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && secret.equals(other.secret) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.secret, - this.default_, - this.options, this.name, this.label, this.description, @@ -226,7 +228,10 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.secret, + this.default_, + this.options); } @java.lang.Override @@ -250,21 +255,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropString build(); - /** - *

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

- */ - _FinalStage secret(Optional secret); - - _FinalStage secret(Boolean secret); - - _FinalStage default_(Optional default_); - - _FinalStage default_(String default_); - - _FinalStage options(Optional> options); - - _FinalStage options(List options); - /** *

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

*/ @@ -327,12 +317,33 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + /** + *

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

+ */ + _FinalStage secret(Optional secret); + + _FinalStage secret(Boolean secret); + + _FinalStage default_(Optional default_); + + _FinalStage default_(String default_); + + _FinalStage options(Optional> options); + + _FinalStage options(List options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional> options = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional secret = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -351,12 +362,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional> options = Optional.empty(); - - private Optional default_ = Optional.empty(); - - private Optional secret = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -364,9 +369,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropString other) { - secret(other.getSecret()); - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -377,6 +379,9 @@ public Builder from(ConfigurablePropString other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + secret(other.getSecret()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -392,6 +397,52 @@ public _FinalStage name(@NotNull String name) { return this; } + @java.lang.Override + public _FinalStage options(List options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional> options) { + this.options = options; + return this; + } + + @java.lang.Override + public _FinalStage default_(String default_) { + this.default_ = Optional.ofNullable(default_); + return this; + } + + @java.lang.Override + @JsonSetter(value = "default", nulls = Nulls.SKIP) + public _FinalStage default_(Optional default_) { + this.default_ = default_; + return this; + } + + /** + *

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); + return this; + } + + /** + *

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

+ */ + @java.lang.Override + @JsonSetter(value = "secret", nulls = Nulls.SKIP) + public _FinalStage secret(Optional secret) { + this.secret = secret; + 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. @@ -572,58 +623,9 @@ public _FinalStage label(Optional label) { return this; } - @java.lang.Override - public _FinalStage options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage default_(String default_) { - this.default_ = Optional.ofNullable(default_); - return this; - } - - @java.lang.Override - @JsonSetter(value = "default", nulls = Nulls.SKIP) - public _FinalStage default_(Optional default_) { - this.default_ = default_; - return this; - } - - /** - *

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); - return this; - } - - /** - *

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

- */ - @java.lang.Override - @JsonSetter(value = "secret", nulls = Nulls.SKIP) - public _FinalStage secret(Optional secret) { - this.secret = secret; - return this; - } - @java.lang.Override public ConfigurablePropString build() { return new ConfigurablePropString( - secret, - default_, - options, name, label, description, @@ -634,6 +636,9 @@ public ConfigurablePropString build() { useQuery, reloadProps, withLabel, + secret, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropStringArray.java b/src/main/java/com/pipedream/api/types/ConfigurablePropStringArray.java index af508a0..18622e1 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropStringArray.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropStringArray.java @@ -21,13 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropStringArray.Builder.class) -public final class ConfigurablePropStringArray { - private final Optional secret; - - private final Optional> default_; - - private final Optional> options; - +public final class ConfigurablePropStringArray implements IConfigurablePropBase { private final String name; private final Optional label; @@ -48,12 +42,15 @@ public final class ConfigurablePropStringArray { private final Optional withLabel; + private final Optional secret; + + private final Optional> default_; + + private final Optional> options; + private final Map additionalProperties; private ConfigurablePropStringArray( - Optional secret, - Optional> default_, - Optional> options, String name, Optional label, Optional description, @@ -64,10 +61,10 @@ private ConfigurablePropStringArray( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional secret, + Optional> default_, + Optional> options, Map additionalProperties) { - this.secret = secret; - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -78,39 +75,17 @@ private ConfigurablePropStringArray( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.secret = secret; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "string[]"; - } - - /** - * @return If true, this prop is a secret and should not be displayed in plain text. - */ - @JsonProperty("secret") - public Optional getSecret() { - return secret; - } - - /** - * @return The default value for this prop - */ - @JsonProperty("default") - public Optional> getDefault() { - return default_; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -119,6 +94,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -127,6 +103,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -135,6 +112,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -143,6 +121,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -151,6 +130,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -159,6 +139,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -167,6 +148,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -175,6 +157,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -183,10 +166,32 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + /** + * @return If true, this prop is a secret and should not be displayed in plain text. + */ + @JsonProperty("secret") + public Optional getSecret() { + return secret; + } + + /** + * @return The default value for this prop + */ + @JsonProperty("default") + public Optional> getDefault() { + return default_; + } + + @JsonProperty("options") + public Optional> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -199,10 +204,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropStringArray other) { - return secret.equals(other.secret) - && default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -211,15 +213,15 @@ private boolean equalTo(ConfigurablePropStringArray other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && secret.equals(other.secret) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.secret, - this.default_, - this.options, this.name, this.label, this.description, @@ -229,7 +231,10 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.secret, + this.default_, + this.options); } @java.lang.Override @@ -253,24 +258,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropStringArray build(); - /** - *

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

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

The default value for this prop

- */ - _FinalStage default_(Optional> default_); - - _FinalStage default_(List default_); - - _FinalStage options(Optional> options); - - _FinalStage options(List options); - /** *

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

*/ @@ -333,12 +320,36 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + /** + *

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

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

The default value for this prop

+ */ + _FinalStage default_(Optional> default_); + + _FinalStage default_(List default_); + + _FinalStage options(Optional> options); + + _FinalStage options(List options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional> options = Optional.empty(); + + private Optional> default_ = Optional.empty(); + + private Optional secret = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -357,12 +368,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional> options = Optional.empty(); - - private Optional> default_ = Optional.empty(); - - private Optional secret = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -370,9 +375,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropStringArray other) { - secret(other.getSecret()); - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -383,6 +385,9 @@ public Builder from(ConfigurablePropStringArray other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + secret(other.getSecret()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -398,6 +403,59 @@ public _FinalStage name(@NotNull String name) { return this; } + @java.lang.Override + public _FinalStage options(List options) { + this.options = Optional.ofNullable(options); + return this; + } + + @java.lang.Override + @JsonSetter(value = "options", nulls = Nulls.SKIP) + public _FinalStage options(Optional> options) { + this.options = options; + return this; + } + + /** + *

The default value for this prop

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

The default value for this prop

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

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

+ */ + @java.lang.Override + @JsonSetter(value = "secret", nulls = Nulls.SKIP) + public _FinalStage secret(Optional secret) { + this.secret = secret; + 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. @@ -578,65 +636,9 @@ public _FinalStage label(Optional label) { return this; } - @java.lang.Override - public _FinalStage options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - /** - *

The default value for this prop

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

The default value for this prop

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

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

- */ - @java.lang.Override - @JsonSetter(value = "secret", nulls = Nulls.SKIP) - public _FinalStage secret(Optional secret) { - this.secret = secret; - return this; - } - @java.lang.Override public ConfigurablePropStringArray build() { return new ConfigurablePropStringArray( - secret, - default_, - options, name, label, description, @@ -647,6 +649,9 @@ public ConfigurablePropStringArray build() { useQuery, reloadProps, withLabel, + secret, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java b/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java index 91e02c9..6be9844 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java +++ b/src/main/java/com/pipedream/api/types/ConfigurablePropTimer.java @@ -21,13 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurablePropTimer.Builder.class) -public final class ConfigurablePropTimer { - private final Optional static_; - - private final Optional default_; - - private final Optional>> options; - +public final class ConfigurablePropTimer implements IConfigurablePropBase { private final String name; private final Optional label; @@ -48,12 +42,15 @@ public final class ConfigurablePropTimer { private final Optional withLabel; + private final Optional static_; + + private final Optional default_; + + private final Optional>> options; + private final Map additionalProperties; private ConfigurablePropTimer( - Optional static_, - Optional default_, - Optional>> options, String name, Optional label, Optional description, @@ -64,10 +61,10 @@ private ConfigurablePropTimer( Optional useQuery, Optional reloadProps, Optional withLabel, + Optional static_, + Optional default_, + Optional>> options, Map additionalProperties) { - this.static_ = static_; - this.default_ = default_; - this.options = options; this.name = name; this.label = label; this.description = description; @@ -78,36 +75,17 @@ private ConfigurablePropTimer( this.useQuery = useQuery; this.reloadProps = reloadProps; this.withLabel = withLabel; + this.static_ = static_; + this.default_ = default_; + this.options = options; this.additionalProperties = additionalProperties; } - @JsonProperty("type") - public String getType() { - return "$.interface.timer"; - } - - @JsonProperty("static") - public Optional getStatic() { - return static_; - } - - @JsonProperty("default") - public Optional getDefault() { - return default_; - } - - /** - * @return Available timer configuration options - */ - @JsonProperty("options") - public Optional>> getOptions() { - return options; - } - /** * @return When building configuredProps, make sure to use this field as the key when setting the prop value */ @JsonProperty("name") + @java.lang.Override public String getName() { return name; } @@ -116,6 +94,7 @@ public String getName() { * @return Value to use as an input label. In cases where type is "app", should load the app via getApp, etc. and show app.name instead. */ @JsonProperty("label") + @java.lang.Override public Optional getLabel() { return label; } @@ -124,6 +103,7 @@ public Optional getLabel() { * @return A description of the prop, shown to the user when configuring the component. */ @JsonProperty("description") + @java.lang.Override public Optional getDescription() { return description; } @@ -132,6 +112,7 @@ public Optional getDescription() { * @return If true, this prop does not need to be specified. */ @JsonProperty("optional") + @java.lang.Override public Optional getOptional() { return optional; } @@ -140,6 +121,7 @@ public Optional getOptional() { * @return If true, this prop will be ignored. */ @JsonProperty("disabled") + @java.lang.Override public Optional getDisabled() { return disabled; } @@ -148,6 +130,7 @@ public Optional getDisabled() { * @return If true, should not expose this prop to the user */ @JsonProperty("hidden") + @java.lang.Override public Optional getHidden() { return hidden; } @@ -156,6 +139,7 @@ public Optional getHidden() { * @return If true, call configureComponent for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */ @JsonProperty("remoteOptions") + @java.lang.Override public Optional getRemoteOptions() { return remoteOptions; } @@ -164,6 +148,7 @@ public Optional getRemoteOptions() { * @return If true, calls to configureComponent for this prop support receiving a query parameter to filter remote options */ @JsonProperty("useQuery") + @java.lang.Override public Optional getUseQuery() { return useQuery; } @@ -172,6 +157,7 @@ public Optional getUseQuery() { * @return If true, after setting a value for this prop, a call to reloadComponentProps is required as the component has dynamic configurable props dependent on this one */ @JsonProperty("reloadProps") + @java.lang.Override public Optional getReloadProps() { return reloadProps; } @@ -180,10 +166,29 @@ public Optional getReloadProps() { * @return If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */ @JsonProperty("withLabel") + @java.lang.Override public Optional getWithLabel() { return withLabel; } + @JsonProperty("static") + public Optional getStatic() { + return static_; + } + + @JsonProperty("default") + public Optional getDefault() { + return default_; + } + + /** + * @return Available timer configuration options + */ + @JsonProperty("options") + public Optional>> getOptions() { + return options; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -196,10 +201,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(ConfigurablePropTimer other) { - return static_.equals(other.static_) - && default_.equals(other.default_) - && options.equals(other.options) - && name.equals(other.name) + return name.equals(other.name) && label.equals(other.label) && description.equals(other.description) && optional.equals(other.optional) @@ -208,15 +210,15 @@ private boolean equalTo(ConfigurablePropTimer other) { && remoteOptions.equals(other.remoteOptions) && useQuery.equals(other.useQuery) && reloadProps.equals(other.reloadProps) - && withLabel.equals(other.withLabel); + && withLabel.equals(other.withLabel) + && static_.equals(other.static_) + && default_.equals(other.default_) + && options.equals(other.options); } @java.lang.Override public int hashCode() { return Objects.hash( - this.static_, - this.default_, - this.options, this.name, this.label, this.description, @@ -226,7 +228,10 @@ public int hashCode() { this.remoteOptions, this.useQuery, this.reloadProps, - this.withLabel); + this.withLabel, + this.static_, + this.default_, + this.options); } @java.lang.Override @@ -250,21 +255,6 @@ public interface NameStage { public interface _FinalStage { ConfigurablePropTimer build(); - _FinalStage static_(Optional static_); - - _FinalStage static_(ConfigurablePropTimerStatic static_); - - _FinalStage default_(Optional default_); - - _FinalStage default_(ConfigurablePropTimerDefault default_); - - /** - *

Available timer configuration options

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

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

*/ @@ -327,12 +317,33 @@ public interface _FinalStage { _FinalStage withLabel(Optional withLabel); _FinalStage withLabel(Boolean withLabel); + + _FinalStage static_(Optional static_); + + _FinalStage static_(ConfigurablePropTimerStatic static_); + + _FinalStage default_(Optional default_); + + _FinalStage default_(ConfigurablePropTimerDefault default_); + + /** + *

Available timer configuration options

+ */ + _FinalStage options(Optional>> options); + + _FinalStage options(List> options); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements NameStage, _FinalStage { private String name; + private Optional>> options = Optional.empty(); + + private Optional default_ = Optional.empty(); + + private Optional static_ = Optional.empty(); + private Optional withLabel = Optional.empty(); private Optional reloadProps = Optional.empty(); @@ -351,12 +362,6 @@ public static final class Builder implements NameStage, _FinalStage { private Optional label = Optional.empty(); - private Optional>> options = Optional.empty(); - - private Optional default_ = Optional.empty(); - - private Optional static_ = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -364,9 +369,6 @@ private Builder() {} @java.lang.Override public Builder from(ConfigurablePropTimer other) { - static_(other.getStatic()); - default_(other.getDefault()); - options(other.getOptions()); name(other.getName()); label(other.getLabel()); description(other.getDescription()); @@ -377,6 +379,9 @@ public Builder from(ConfigurablePropTimer other) { useQuery(other.getUseQuery()); reloadProps(other.getReloadProps()); withLabel(other.getWithLabel()); + static_(other.getStatic()); + default_(other.getDefault()); + options(other.getOptions()); return this; } @@ -392,6 +397,52 @@ public _FinalStage name(@NotNull String name) { return this; } + /** + *

Available timer configuration options

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

Available timer configuration options

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

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. @@ -572,58 +623,9 @@ public _FinalStage label(Optional label) { return this; } - /** - *

Available timer configuration options

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

Available timer configuration options

- */ - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional>> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage default_(ConfigurablePropTimerDefault default_) { - this.default_ = Optional.ofNullable(default_); - return this; - } - - @java.lang.Override - @JsonSetter(value = "default", nulls = Nulls.SKIP) - public _FinalStage default_(Optional default_) { - this.default_ = default_; - return this; - } - - @java.lang.Override - public _FinalStage static_(ConfigurablePropTimerStatic static_) { - this.static_ = Optional.ofNullable(static_); - return this; - } - - @java.lang.Override - @JsonSetter(value = "static", nulls = Nulls.SKIP) - public _FinalStage static_(Optional static_) { - this.static_ = static_; - return this; - } - @java.lang.Override public ConfigurablePropTimer build() { return new ConfigurablePropTimer( - static_, - default_, - options, name, label, description, @@ -634,6 +636,9 @@ public ConfigurablePropTimer build() { useQuery, reloadProps, withLabel, + static_, + default_, + options, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/ConfigurablePropType.java b/src/main/java/com/pipedream/api/types/ConfigurablePropType.java deleted file mode 100644 index ae5fd13..0000000 --- a/src/main/java/com/pipedream/api/types/ConfigurablePropType.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.pipedream.api.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConfigurablePropType { - public static final ConfigurablePropType AIRTABLE_VIEW_ID = - new ConfigurablePropType(Value.AIRTABLE_VIEW_ID, "$.airtable.viewId"); - - public static final ConfigurablePropType APP = new ConfigurablePropType(Value.APP, "app"); - - public static final ConfigurablePropType AIRTABLE_BASE_ID = - new ConfigurablePropType(Value.AIRTABLE_BASE_ID, "$.airtable.baseId"); - - public static final ConfigurablePropType AIRTABLE_TABLE_ID = - new ConfigurablePropType(Value.AIRTABLE_TABLE_ID, "$.airtable.tableId"); - - public static final ConfigurablePropType BOOLEAN = new ConfigurablePropType(Value.BOOLEAN, "boolean"); - - public static final ConfigurablePropType INTERFACE_TIMER = - new ConfigurablePropType(Value.INTERFACE_TIMER, "$.interface.timer"); - - public static final ConfigurablePropType ANY = new ConfigurablePropType(Value.ANY, "any"); - - public static final ConfigurablePropType SERVICE_DB = new ConfigurablePropType(Value.SERVICE_DB, "$.service.db"); - - public static final ConfigurablePropType SQL = new ConfigurablePropType(Value.SQL, "sql"); - - public static final ConfigurablePropType AIRTABLE_FIELD_ID = - new ConfigurablePropType(Value.AIRTABLE_FIELD_ID, "$.airtable.fieldId"); - - public static final ConfigurablePropType STRING_ARRAY = new ConfigurablePropType(Value.STRING_ARRAY, "string[]"); - - public static final ConfigurablePropType DISCORD_CHANNEL_ARRAY = - new ConfigurablePropType(Value.DISCORD_CHANNEL_ARRAY, "$.discord.channel[]"); - - public static final ConfigurablePropType OBJECT = new ConfigurablePropType(Value.OBJECT, "object"); - - public static final ConfigurablePropType INTERFACE_APPHOOK = - new ConfigurablePropType(Value.INTERFACE_APPHOOK, "$.interface.apphook"); - - public static final ConfigurablePropType ALERT = new ConfigurablePropType(Value.ALERT, "alert"); - - public static final ConfigurablePropType STRING = new ConfigurablePropType(Value.STRING, "string"); - - public static final ConfigurablePropType INTEGER = new ConfigurablePropType(Value.INTEGER, "integer"); - - public static final ConfigurablePropType DISCORD_CHANNEL = - new ConfigurablePropType(Value.DISCORD_CHANNEL, "$.discord.channel"); - - public static final ConfigurablePropType INTEGER_ARRAY = new ConfigurablePropType(Value.INTEGER_ARRAY, "integer[]"); - - public static final ConfigurablePropType DATA_STORE = new ConfigurablePropType(Value.DATA_STORE, "data_store"); - - public static final ConfigurablePropType HTTP_REQUEST = - new ConfigurablePropType(Value.HTTP_REQUEST, "http_request"); - - public static final ConfigurablePropType DIR = new ConfigurablePropType(Value.DIR, "dir"); - - public static final ConfigurablePropType INTERFACE_HTTP = - new ConfigurablePropType(Value.INTERFACE_HTTP, "$.interface.http"); - - private final Value value; - - private final String string; - - ConfigurablePropType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConfigurablePropType && this.string.equals(((ConfigurablePropType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AIRTABLE_VIEW_ID: - return visitor.visitAirtableViewId(); - case APP: - return visitor.visitApp(); - case AIRTABLE_BASE_ID: - return visitor.visitAirtableBaseId(); - case AIRTABLE_TABLE_ID: - return visitor.visitAirtableTableId(); - case BOOLEAN: - return visitor.visitBoolean(); - case INTERFACE_TIMER: - return visitor.visitInterfaceTimer(); - case ANY: - return visitor.visitAny(); - case SERVICE_DB: - return visitor.visitServiceDb(); - case SQL: - return visitor.visitSql(); - case AIRTABLE_FIELD_ID: - return visitor.visitAirtableFieldId(); - case STRING_ARRAY: - return visitor.visitStringArray(); - case DISCORD_CHANNEL_ARRAY: - return visitor.visitDiscordChannelArray(); - case OBJECT: - return visitor.visitObject(); - case INTERFACE_APPHOOK: - return visitor.visitInterfaceApphook(); - case ALERT: - return visitor.visitAlert(); - case STRING: - return visitor.visitString(); - case INTEGER: - return visitor.visitInteger(); - case DISCORD_CHANNEL: - return visitor.visitDiscordChannel(); - case INTEGER_ARRAY: - return visitor.visitIntegerArray(); - case DATA_STORE: - return visitor.visitDataStore(); - case HTTP_REQUEST: - return visitor.visitHttpRequest(); - case DIR: - return visitor.visitDir(); - case INTERFACE_HTTP: - return visitor.visitInterfaceHttp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConfigurablePropType valueOf(String value) { - switch (value) { - case "$.airtable.viewId": - return AIRTABLE_VIEW_ID; - case "app": - return APP; - case "$.airtable.baseId": - return AIRTABLE_BASE_ID; - case "$.airtable.tableId": - return AIRTABLE_TABLE_ID; - case "boolean": - return BOOLEAN; - case "$.interface.timer": - return INTERFACE_TIMER; - case "any": - return ANY; - case "$.service.db": - return SERVICE_DB; - case "sql": - return SQL; - case "$.airtable.fieldId": - return AIRTABLE_FIELD_ID; - case "string[]": - return STRING_ARRAY; - case "$.discord.channel[]": - return DISCORD_CHANNEL_ARRAY; - case "object": - return OBJECT; - case "$.interface.apphook": - return INTERFACE_APPHOOK; - case "alert": - return ALERT; - case "string": - return STRING; - case "integer": - return INTEGER; - case "$.discord.channel": - return DISCORD_CHANNEL; - case "integer[]": - return INTEGER_ARRAY; - case "data_store": - return DATA_STORE; - case "http_request": - return HTTP_REQUEST; - case "dir": - return DIR; - case "$.interface.http": - return INTERFACE_HTTP; - default: - return new ConfigurablePropType(Value.UNKNOWN, value); - } - } - - public enum Value { - AIRTABLE_BASE_ID, - - AIRTABLE_FIELD_ID, - - AIRTABLE_TABLE_ID, - - AIRTABLE_VIEW_ID, - - DISCORD_CHANNEL, - - DISCORD_CHANNEL_ARRAY, - - INTERFACE_APPHOOK, - - INTERFACE_HTTP, - - INTERFACE_TIMER, - - SERVICE_DB, - - ALERT, - - ANY, - - APP, - - BOOLEAN, - - DATA_STORE, - - DIR, - - HTTP_REQUEST, - - INTEGER, - - INTEGER_ARRAY, - - OBJECT, - - SQL, - - STRING, - - STRING_ARRAY, - - UNKNOWN - } - - public interface Visitor { - T visitAirtableBaseId(); - - T visitAirtableFieldId(); - - T visitAirtableTableId(); - - T visitAirtableViewId(); - - T visitDiscordChannel(); - - T visitDiscordChannelArray(); - - T visitInterfaceApphook(); - - T visitInterfaceHttp(); - - T visitInterfaceTimer(); - - T visitServiceDb(); - - T visitAlert(); - - T visitAny(); - - T visitApp(); - - T visitBoolean(); - - T visitDataStore(); - - T visitDir(); - - T visitHttpRequest(); - - T visitInteger(); - - T visitIntegerArray(); - - T visitObject(); - - T visitSql(); - - T visitString(); - - T visitStringArray(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/pipedream/api/types/DeployedComponent.java b/src/main/java/com/pipedream/api/types/DeployedComponent.java index f019798..b079a0c 100644 --- a/src/main/java/com/pipedream/api/types/DeployedComponent.java +++ b/src/main/java/com/pipedream/api/types/DeployedComponent.java @@ -48,6 +48,8 @@ public final class DeployedComponent { private final Optional callbackObservations; + private final Optional emitOnDeploy; + private final Map additionalProperties; private DeployedComponent( @@ -63,6 +65,7 @@ private DeployedComponent( String name, String nameSlug, Optional callbackObservations, + Optional emitOnDeploy, Map additionalProperties) { this.id = id; this.ownerId = ownerId; @@ -76,6 +79,7 @@ private DeployedComponent( this.name = name; this.nameSlug = nameSlug; this.callbackObservations = callbackObservations; + this.emitOnDeploy = emitOnDeploy; this.additionalProperties = additionalProperties; } @@ -172,6 +176,14 @@ public Optional getCallbackObservations() { return callbackObservations; } + /** + * @return Whether the trigger emits events during the deploy hook execution. When false, the $emit function is disabled during deploy hook execution. Defaults to true. + */ + @JsonProperty("emit_on_deploy") + public Optional getEmitOnDeploy() { + return emitOnDeploy; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -195,7 +207,8 @@ private boolean equalTo(DeployedComponent other) { && updatedAt == other.updatedAt && name.equals(other.name) && nameSlug.equals(other.nameSlug) - && callbackObservations.equals(other.callbackObservations); + && callbackObservations.equals(other.callbackObservations) + && emitOnDeploy.equals(other.emitOnDeploy); } @java.lang.Override @@ -212,7 +225,8 @@ public int hashCode() { this.updatedAt, this.name, this.nameSlug, - this.callbackObservations); + this.callbackObservations, + this.emitOnDeploy); } @java.lang.Override @@ -313,6 +327,13 @@ public interface _FinalStage { _FinalStage callbackObservations(Optional callbackObservations); _FinalStage callbackObservations(Object callbackObservations); + + /** + *

Whether the trigger emits events during the deploy hook execution. When false, the $emit function is disabled during deploy hook execution. Defaults to true.

+ */ + _FinalStage emitOnDeploy(Optional emitOnDeploy); + + _FinalStage emitOnDeploy(Boolean emitOnDeploy); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -342,6 +363,8 @@ public static final class Builder private String nameSlug; + private Optional emitOnDeploy = Optional.empty(); + private Optional callbackObservations = Optional.empty(); private Map configuredProps = new LinkedHashMap<>(); @@ -369,6 +392,7 @@ public Builder from(DeployedComponent other) { name(other.getName()); nameSlug(other.getNameSlug()); callbackObservations(other.getCallbackObservations()); + emitOnDeploy(other.getEmitOnDeploy()); return this; } @@ -468,6 +492,26 @@ public _FinalStage nameSlug(@NotNull String nameSlug) { return this; } + /** + *

Whether the trigger emits events during the deploy hook execution. When false, the $emit function is disabled during deploy hook execution. Defaults to true.

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

Whether the trigger emits events during the deploy hook execution. When false, the $emit function is disabled during deploy hook execution. Defaults to true.

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

Callback observations for the deployed component

* @return Reference to {@code this} so that method calls can be chained together. @@ -582,6 +626,7 @@ public DeployedComponent build() { name, nameSlug, callbackObservations, + emitOnDeploy, additionalProperties); } } diff --git a/src/main/java/com/pipedream/api/types/IConfigurablePropBase.java b/src/main/java/com/pipedream/api/types/IConfigurablePropBase.java new file mode 100644 index 0000000..39f1f9e --- /dev/null +++ b/src/main/java/com/pipedream/api/types/IConfigurablePropBase.java @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import java.util.Optional; + +public interface IConfigurablePropBase { + String getName(); + + Optional getLabel(); + + Optional getDescription(); + + Optional getOptional(); + + Optional getDisabled(); + + Optional getHidden(); + + Optional getRemoteOptions(); + + Optional getUseQuery(); + + Optional getReloadProps(); + + Optional getWithLabel(); +} diff --git a/src/test/java/com/pipedream/api/OauthTokensWireTest.java b/src/test/java/com/pipedream/api/OauthTokensWireTest.java index 0979f9c..88a6634 100644 --- a/src/test/java/com/pipedream/api/OauthTokensWireTest.java +++ b/src/test/java/com/pipedream/api/OauthTokensWireTest.java @@ -22,7 +22,10 @@ public class OauthTokensWireTest { public void setup() throws Exception { server = new MockWebServer(); server.start(); - client = BaseClient.builder().url(server.url("/").toString()).build(); + client = BaseClient.builder() + .url(server.url("/").toString()) + .token("oauth-test-token") + .build(); } @AfterEach @@ -37,6 +40,7 @@ public void testCreate() throws Exception { .setBody("{\"access_token\":\"access_token\",\"token_type\":\"token_type\",\"expires_in\":1}")); CreateOAuthTokenResponse response = client.oauthTokens() .create(CreateOAuthTokenOpts.builder() + .grantType("client_credentials") .clientId("client_id") .clientSecret("client_secret") .build()); diff --git a/src/test/java/com/pipedream/api/TokensWireTest.java b/src/test/java/com/pipedream/api/TokensWireTest.java index 0762707..8ed94a9 100644 --- a/src/test/java/com/pipedream/api/TokensWireTest.java +++ b/src/test/java/com/pipedream/api/TokensWireTest.java @@ -22,7 +22,10 @@ public class TokensWireTest { public void setup() throws Exception { server = new MockWebServer(); server.start(); - client = BaseClient.builder().url(server.url("/").toString()).build(); + client = BaseClient.builder() + .url(server.url("/").toString()) + .token("oauth-test-token") + .build(); } @AfterEach