diff --git a/README.md b/README.md index a52dbc3..012abc9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPipedreamHQ%2Fpipedream-sdk-java) [![Maven Central](https://img.shields.io/maven-central/v/com.pipedream/pipedream)](https://central.sonatype.com/artifact/com.pipedream/pipedream) -The Pipedream Java library provides convenient access to the Pipedream API from Java. +The Pipedream Java library provides convenient access to the Pipedream APIs from Java. ## Installation @@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file: com.pipedream pipedream - 1.0.2 + 1.0.3 ``` diff --git a/build.gradle b/build.gradle index 8c7bf5a..b2aff62 100644 --- a/build.gradle +++ b/build.gradle @@ -48,7 +48,7 @@ java { group = 'com.pipedream' -version = '1.0.2' +version = '1.0.3' jar { dependsOn(":generatePomFileForMavenPublication") @@ -79,7 +79,7 @@ publishing { maven(MavenPublication) { groupId = 'com.pipedream' artifactId = 'pipedream' - version = '1.0.2' + version = '1.0.3' 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 71fa012..390ad5a 100644 --- a/src/main/java/com/pipedream/api/core/ClientOptions.java +++ b/src/main/java/com/pipedream/api/core/ClientOptions.java @@ -35,10 +35,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.pipedream:pipedream/1.0.2"); + put("User-Agent", "com.pipedream:pipedream/1.0.3"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk"); - put("X-Fern-SDK-Version", "1.0.2"); + put("X-Fern-SDK-Version", "1.0.3"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java b/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java index afbc0ee..bb339b5 100644 --- a/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java +++ b/src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.pipedream.api.core.ObjectMappers; +import com.pipedream.api.types.ConfiguredPropValue; import com.pipedream.api.types.RunActionOptsStashId; import java.util.HashMap; import java.util.Map; @@ -26,7 +27,7 @@ public final class RunActionOpts { private final String externalUserId; - private final Optional> configuredProps; + private final Optional> configuredProps; private final Optional dynamicPropsId; @@ -37,7 +38,7 @@ public final class RunActionOpts { private RunActionOpts( String id, String externalUserId, - Optional> configuredProps, + Optional> configuredProps, Optional dynamicPropsId, Optional stashId, Map additionalProperties) { @@ -65,11 +66,8 @@ public String getExternalUserId() { return externalUserId; } - /** - * @return The configured properties for the action - */ @JsonProperty("configured_props") - public Optional> getConfiguredProps() { + public Optional> getConfiguredProps() { return configuredProps; } @@ -138,12 +136,9 @@ public interface ExternalUserIdStage { public interface _FinalStage { RunActionOpts build(); - /** - *

The configured properties for the action

- */ - _FinalStage configuredProps(Optional> configuredProps); + _FinalStage configuredProps(Optional> configuredProps); - _FinalStage configuredProps(Map configuredProps); + _FinalStage configuredProps(Map configuredProps); /** *

The ID for dynamic props

@@ -167,7 +162,7 @@ public static final class Builder implements IdStage, ExternalUserIdStage, _Fina private Optional dynamicPropsId = Optional.empty(); - private Optional> configuredProps = Optional.empty(); + private Optional> configuredProps = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -241,22 +236,15 @@ public _FinalStage dynamicPropsId(Optional dynamicPropsId) { return this; } - /** - *

The configured properties for the action

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

The configured properties for the action

- */ @java.lang.Override @JsonSetter(value = "configured_props", nulls = Nulls.SKIP) - public _FinalStage configuredProps(Optional> configuredProps) { + public _FinalStage configuredProps(Optional> configuredProps) { this.configuredProps = configuredProps; return this; } 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 735cf4a..b7b613b 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 @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.pipedream.api.core.ObjectMappers; +import com.pipedream.api.types.ConfiguredPropValue; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -25,7 +26,7 @@ public final class UpdateTriggerOpts { private final Optional active; - private final Optional> configuredProps; + private final Optional> configuredProps; private final Optional name; @@ -34,7 +35,7 @@ public final class UpdateTriggerOpts { private UpdateTriggerOpts( String externalUserId, Optional active, - Optional> configuredProps, + Optional> configuredProps, Optional name, Map additionalProperties) { this.externalUserId = externalUserId; @@ -60,11 +61,8 @@ public Optional getActive() { return active; } - /** - * @return The configured properties for the trigger - */ @JsonProperty("configured_props") - public Optional> getConfiguredProps() { + public Optional> getConfiguredProps() { return configuredProps; } @@ -127,12 +125,9 @@ public interface _FinalStage { _FinalStage active(Boolean active); - /** - *

The configured properties for the trigger

- */ - _FinalStage configuredProps(Optional> configuredProps); + _FinalStage configuredProps(Optional> configuredProps); - _FinalStage configuredProps(Map configuredProps); + _FinalStage configuredProps(Map configuredProps); /** *

The name of the trigger

@@ -148,7 +143,7 @@ public static final class Builder implements ExternalUserIdStage, _FinalStage { private Optional name = Optional.empty(); - private Optional> configuredProps = Optional.empty(); + private Optional> configuredProps = Optional.empty(); private Optional active = Optional.empty(); @@ -198,22 +193,15 @@ public _FinalStage name(Optional name) { return this; } - /** - *

The configured properties for the trigger

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

The configured properties for the trigger

- */ @java.lang.Override @JsonSetter(value = "configured_props", nulls = Nulls.SKIP) - public _FinalStage configuredProps(Optional> configuredProps) { + public _FinalStage configuredProps(Optional> configuredProps) { this.configuredProps = configuredProps; return this; } 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 b45a651..8e151d3 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 @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.pipedream.api.core.ObjectMappers; +import com.pipedream.api.types.ConfiguredPropValue; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -25,7 +26,7 @@ public final class DeployTriggerOpts { private final String externalUserId; - private final Optional> configuredProps; + private final Optional> configuredProps; private final Optional dynamicPropsId; @@ -36,7 +37,7 @@ public final class DeployTriggerOpts { private DeployTriggerOpts( String id, String externalUserId, - Optional> configuredProps, + Optional> configuredProps, Optional dynamicPropsId, Optional webhookUrl, Map additionalProperties) { @@ -64,11 +65,8 @@ public String getExternalUserId() { return externalUserId; } - /** - * @return The configured properties for the trigger - */ @JsonProperty("configured_props") - public Optional> getConfiguredProps() { + public Optional> getConfiguredProps() { return configuredProps; } @@ -140,12 +138,9 @@ public interface ExternalUserIdStage { public interface _FinalStage { DeployTriggerOpts build(); - /** - *

The configured properties for the trigger

- */ - _FinalStage configuredProps(Optional> configuredProps); + _FinalStage configuredProps(Optional> configuredProps); - _FinalStage configuredProps(Map configuredProps); + _FinalStage configuredProps(Map configuredProps); /** *

The ID for dynamic props

@@ -172,7 +167,7 @@ public static final class Builder implements IdStage, ExternalUserIdStage, _Fina private Optional dynamicPropsId = Optional.empty(); - private Optional> configuredProps = Optional.empty(); + private Optional> configuredProps = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -253,22 +248,15 @@ public _FinalStage dynamicPropsId(Optional dynamicPropsId) { return this; } - /** - *

The configured properties for the trigger

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

The configured properties for the trigger

- */ @java.lang.Override @JsonSetter(value = "configured_props", nulls = Nulls.SKIP) - public _FinalStage configuredProps(Optional> configuredProps) { + public _FinalStage configuredProps(Optional> configuredProps) { this.configuredProps = configuredProps; return this; } diff --git a/src/main/java/com/pipedream/api/types/Account.java b/src/main/java/com/pipedream/api/types/Account.java index 695b457..3c14085 100644 --- a/src/main/java/com/pipedream/api/types/Account.java +++ b/src/main/java/com/pipedream/api/types/Account.java @@ -81,9 +81,6 @@ private Account( this.additionalProperties = additionalProperties; } - /** - * @return The unique ID of the account. - */ @JsonProperty("id") public String getId() { return id; @@ -237,9 +234,6 @@ public static IdStage builder() { } public interface IdStage { - /** - *

The unique ID of the account.

- */ _FinalStage id(@NotNull String id); Builder from(Account other); @@ -381,11 +375,6 @@ public Builder from(Account other) { return this; } - /** - *

The unique ID of the account.

- *

The unique ID of the account.

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override @JsonSetter("id") public _FinalStage id(@NotNull String id) { diff --git a/src/main/java/com/pipedream/api/types/ConfigurePropOptionsItem.java b/src/main/java/com/pipedream/api/types/ConfigurePropOptionsItem.java new file mode 100644 index 0000000..929b689 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfigurePropOptionsItem.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.pipedream.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ConfigurePropOptionsItem.Deserializer.class) +public final class ConfigurePropOptionsItem { + private final Object value; + + private final int type; + + private ConfigurePropOptionsItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PropOption) this.value); + } else if (this.type == 1) { + return visitor.visit((PropOptionNested) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfigurePropOptionsItem && equalTo((ConfigurePropOptionsItem) other); + } + + private boolean equalTo(ConfigurePropOptionsItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ConfigurePropOptionsItem of(PropOption value) { + return new ConfigurePropOptionsItem(value, 0); + } + + public static ConfigurePropOptionsItem of(PropOptionNested value) { + return new ConfigurePropOptionsItem(value, 1); + } + + public interface Visitor { + T visit(PropOption value); + + T visit(PropOptionNested value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ConfigurePropOptionsItem.class); + } + + @java.lang.Override + public ConfigurePropOptionsItem deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PropOption.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PropOptionNested.class)); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfigurePropOpts.java b/src/main/java/com/pipedream/api/types/ConfigurePropOpts.java index 5c94b13..66cfd12 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurePropOpts.java +++ b/src/main/java/com/pipedream/api/types/ConfigurePropOpts.java @@ -29,7 +29,7 @@ public final class ConfigurePropOpts { private final Optional blocking; - private final Optional> configuredProps; + private final Optional> configuredProps; private final Optional dynamicPropsId; @@ -46,7 +46,7 @@ private ConfigurePropOpts( String externalUserId, String propName, Optional blocking, - Optional> configuredProps, + Optional> configuredProps, Optional dynamicPropsId, Optional page, Optional> prevContext, @@ -96,11 +96,8 @@ public Optional getBlocking() { return blocking; } - /** - * @return The configured properties for the component - */ @JsonProperty("configured_props") - public Optional> getConfiguredProps() { + public Optional> getConfiguredProps() { return configuredProps; } @@ -215,12 +212,9 @@ public interface _FinalStage { _FinalStage blocking(Boolean blocking); - /** - *

The configured properties for the component

- */ - _FinalStage configuredProps(Optional> configuredProps); + _FinalStage configuredProps(Optional> configuredProps); - _FinalStage configuredProps(Map configuredProps); + _FinalStage configuredProps(Map configuredProps); /** *

The ID for dynamic props

@@ -267,7 +261,7 @@ public static final class Builder implements IdStage, ExternalUserIdStage, PropN private Optional dynamicPropsId = Optional.empty(); - private Optional> configuredProps = Optional.empty(); + private Optional> configuredProps = Optional.empty(); private Optional blocking = Optional.empty(); @@ -406,22 +400,15 @@ public _FinalStage dynamicPropsId(Optional dynamicPropsId) { return this; } - /** - *

The configured properties for the component

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

The configured properties for the component

- */ @java.lang.Override @JsonSetter(value = "configured_props", nulls = Nulls.SKIP) - public _FinalStage configuredProps(Optional> configuredProps) { + public _FinalStage configuredProps(Optional> configuredProps) { this.configuredProps = configuredProps; return this; } diff --git a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java index 51444f7..f44af77 100644 --- a/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java +++ b/src/main/java/com/pipedream/api/types/ConfigurePropResponse.java @@ -21,11 +21,11 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ConfigurePropResponse.Builder.class) public final class ConfigurePropResponse { - private final Optional> options; + private final Optional> options; private final Optional> stringOptions; - private final Optional> observations; + private final Optional> observations; private final Optional> context; @@ -34,9 +34,9 @@ public final class ConfigurePropResponse { private final Map additionalProperties; private ConfigurePropResponse( - Optional> options, + Optional> options, Optional> stringOptions, - Optional> observations, + Optional> observations, Optional> context, Optional> errors, Map additionalProperties) { @@ -48,11 +48,8 @@ private ConfigurePropResponse( this.additionalProperties = additionalProperties; } - /** - * @return Available options (with labels) for the configured prop - */ @JsonProperty("options") - public Optional> getOptions() { + public Optional> getOptions() { return options; } @@ -64,11 +61,8 @@ public Optional> getStringOptions() { return stringOptions; } - /** - * @return Any logs produced during the configuration of the prop - */ @JsonProperty("observations") - public Optional> getObservations() { + public Optional> getObservations() { return observations; } @@ -123,11 +117,11 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional> options = Optional.empty(); + private Optional> options = Optional.empty(); private Optional> stringOptions = Optional.empty(); - private Optional> observations = Optional.empty(); + private Optional> observations = Optional.empty(); private Optional> context = Optional.empty(); @@ -147,16 +141,13 @@ public Builder from(ConfigurePropResponse other) { return this; } - /** - *

Available options (with labels) for the configured prop

- */ @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { + public Builder options(Optional> options) { this.options = options; return this; } - public Builder options(List options) { + public Builder options(List options) { this.options = Optional.ofNullable(options); return this; } @@ -175,16 +166,13 @@ public Builder stringOptions(List stringOptions) { return this; } - /** - *

Any logs produced during the configuration of the prop

- */ @JsonSetter(value = "observations", nulls = Nulls.SKIP) - public Builder observations(Optional> observations) { + public Builder observations(Optional> observations) { this.observations = observations; return this; } - public Builder observations(Map observations) { + public Builder observations(List observations) { this.observations = Optional.ofNullable(observations); return this; } diff --git a/src/main/java/com/pipedream/api/types/ConfiguredPropValue.java b/src/main/java/com/pipedream/api/types/ConfiguredPropValue.java new file mode 100644 index 0000000..1a9c3e4 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfiguredPropValue.java @@ -0,0 +1,168 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.pipedream.api.core.ObjectMappers; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@JsonDeserialize(using = ConfiguredPropValue.Deserializer.class) +public final class ConfiguredPropValue { + private final Object value; + + private final int type; + + private ConfiguredPropValue(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Object) this.value); + } else if (this.type == 1) { + return visitor.visit((ConfiguredPropValueApp) this.value); + } else if (this.type == 2) { + return visitor.visit((boolean) this.value); + } else if (this.type == 3) { + return visitor.visit((double) this.value); + } else if (this.type == 4) { + return visitor.visit((Map) this.value); + } else if (this.type == 5) { + return visitor.visit((ConfiguredPropValueSql) this.value); + } else if (this.type == 6) { + return visitor.visit((String) this.value); + } else if (this.type == 7) { + return visitor.visit((List) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfiguredPropValue && equalTo((ConfiguredPropValue) other); + } + + private boolean equalTo(ConfiguredPropValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ConfiguredPropValue of(Object value) { + return new ConfiguredPropValue(value, 0); + } + + public static ConfiguredPropValue of(ConfiguredPropValueApp value) { + return new ConfiguredPropValue(value, 1); + } + + public static ConfiguredPropValue of(boolean value) { + return new ConfiguredPropValue(value, 2); + } + + public static ConfiguredPropValue of(double value) { + return new ConfiguredPropValue(value, 3); + } + + public static ConfiguredPropValue of(Map value) { + return new ConfiguredPropValue(value, 4); + } + + public static ConfiguredPropValue of(ConfiguredPropValueSql value) { + return new ConfiguredPropValue(value, 5); + } + + public static ConfiguredPropValue of(String value) { + return new ConfiguredPropValue(value, 6); + } + + public static ConfiguredPropValue of(List value) { + return new ConfiguredPropValue(value, 7); + } + + public interface Visitor { + T visit(Object value); + + T visit(ConfiguredPropValueApp value); + + T visit(boolean value); + + T visit(double value); + + T visit(Map value); + + T visit(ConfiguredPropValueSql value); + + T visit(String value); + + T visit(List value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ConfiguredPropValue.class); + } + + @java.lang.Override + public ConfiguredPropValue deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Object.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ConfiguredPropValueApp.class)); + } catch (RuntimeException e) { + } + if (value instanceof Boolean) { + return of((Boolean) value); + } + if (value instanceof Double) { + return of((Double) value); + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ConfiguredPropValueSql.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfiguredPropValueApp.java b/src/main/java/com/pipedream/api/types/ConfiguredPropValueApp.java new file mode 100644 index 0000000..1f16c97 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfiguredPropValueApp.java @@ -0,0 +1,102 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.pipedream.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfiguredPropValueApp.Builder.class) +public final class ConfiguredPropValueApp { + private final String authProvisionId; + + private final Map additionalProperties; + + private ConfiguredPropValueApp(String authProvisionId, Map additionalProperties) { + this.authProvisionId = authProvisionId; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("authProvisionId") + public String getAuthProvisionId() { + return authProvisionId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfiguredPropValueApp && equalTo((ConfiguredPropValueApp) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfiguredPropValueApp other) { + return authProvisionId.equals(other.authProvisionId); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.authProvisionId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AuthProvisionIdStage builder() { + return new Builder(); + } + + public interface AuthProvisionIdStage { + _FinalStage authProvisionId(@NotNull String authProvisionId); + + Builder from(ConfiguredPropValueApp other); + } + + public interface _FinalStage { + ConfiguredPropValueApp build(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AuthProvisionIdStage, _FinalStage { + private String authProvisionId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfiguredPropValueApp other) { + authProvisionId(other.getAuthProvisionId()); + return this; + } + + @java.lang.Override + @JsonSetter("authProvisionId") + public _FinalStage authProvisionId(@NotNull String authProvisionId) { + this.authProvisionId = Objects.requireNonNull(authProvisionId, "authProvisionId must not be null"); + return this; + } + + @java.lang.Override + public ConfiguredPropValueApp build() { + return new ConfiguredPropValueApp(authProvisionId, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ConfiguredPropValueSql.java b/src/main/java/com/pipedream/api/types/ConfiguredPropValueSql.java new file mode 100644 index 0000000..2b59798 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ConfiguredPropValueSql.java @@ -0,0 +1,244 @@ +/** + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ConfiguredPropValueSql.Builder.class) +public final class ConfiguredPropValueSql { + private final String value; + + private final String query; + + private final List params; + + private final boolean usePreparedStatements; + + private final Map additionalProperties; + + private ConfiguredPropValueSql( + String value, + String query, + List params, + boolean usePreparedStatements, + Map additionalProperties) { + this.value = value; + this.query = query; + this.params = params; + this.usePreparedStatements = usePreparedStatements; + this.additionalProperties = additionalProperties; + } + + /** + * @return The raw SQL query, as provided by the user + */ + @JsonProperty("value") + public String getValue() { + return value; + } + + /** + * @return The SQL query to execute + */ + @JsonProperty("query") + public String getQuery() { + return query; + } + + /** + * @return The list of parameters for the prepared statement + */ + @JsonProperty("params") + public List getParams() { + return params; + } + + /** + * @return Whether to use prepared statements for the query or not + */ + @JsonProperty("usePreparedStatements") + public boolean getUsePreparedStatements() { + return usePreparedStatements; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ConfiguredPropValueSql && equalTo((ConfiguredPropValueSql) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ConfiguredPropValueSql other) { + return value.equals(other.value) + && query.equals(other.query) + && params.equals(other.params) + && usePreparedStatements == other.usePreparedStatements; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value, this.query, this.params, this.usePreparedStatements); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ValueStage builder() { + return new Builder(); + } + + public interface ValueStage { + /** + *

The raw SQL query, as provided by the user

+ */ + QueryStage value(@NotNull String value); + + Builder from(ConfiguredPropValueSql other); + } + + public interface QueryStage { + /** + *

The SQL query to execute

+ */ + UsePreparedStatementsStage query(@NotNull String query); + } + + public interface UsePreparedStatementsStage { + /** + *

Whether to use prepared statements for the query or not

+ */ + _FinalStage usePreparedStatements(boolean usePreparedStatements); + } + + public interface _FinalStage { + ConfiguredPropValueSql build(); + + /** + *

The list of parameters for the prepared statement

+ */ + _FinalStage params(List params); + + _FinalStage addParams(String params); + + _FinalStage addAllParams(List params); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ValueStage, QueryStage, UsePreparedStatementsStage, _FinalStage { + private String value; + + private String query; + + private boolean usePreparedStatements; + + private List params = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ConfiguredPropValueSql other) { + value(other.getValue()); + query(other.getQuery()); + params(other.getParams()); + usePreparedStatements(other.getUsePreparedStatements()); + return this; + } + + /** + *

The raw SQL query, as provided by the user

+ *

The raw SQL query, as provided by the user

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

The SQL query to execute

+ *

The SQL query to execute

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

Whether to use prepared statements for the query or not

+ *

Whether to use prepared statements for the query or not

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("usePreparedStatements") + public _FinalStage usePreparedStatements(boolean usePreparedStatements) { + this.usePreparedStatements = usePreparedStatements; + return this; + } + + /** + *

The list of parameters for the prepared statement

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

The list of parameters for the prepared statement

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

The list of parameters for the prepared statement

+ */ + @java.lang.Override + @JsonSetter(value = "params", nulls = Nulls.SKIP) + public _FinalStage params(List params) { + this.params.clear(); + this.params.addAll(params); + return this; + } + + @java.lang.Override + public ConfiguredPropValueSql build() { + return new ConfiguredPropValueSql(value, query, params, usePreparedStatements, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/DeployedComponent.java b/src/main/java/com/pipedream/api/types/DeployedComponent.java index 8a6e6b9..c73889a 100644 --- a/src/main/java/com/pipedream/api/types/DeployedComponent.java +++ b/src/main/java/com/pipedream/api/types/DeployedComponent.java @@ -32,7 +32,7 @@ public final class DeployedComponent { private final List configurableProps; - private final Map configuredProps; + private final Map configuredProps; private final boolean active; @@ -53,7 +53,7 @@ private DeployedComponent( String ownerId, String componentId, List configurableProps, - Map configuredProps, + Map configuredProps, boolean active, int createdAt, int updatedAt, @@ -107,11 +107,8 @@ public List getConfigurableProps() { return configurableProps; } - /** - * @return The configured properties of the component - */ @JsonProperty("configured_props") - public Map getConfiguredProps() { + public Map getConfiguredProps() { return configuredProps; } @@ -280,14 +277,11 @@ public interface _FinalStage { _FinalStage addAllConfigurableProps(List configurableProps); - /** - *

The configured properties of the component

- */ - _FinalStage configuredProps(Map configuredProps); + _FinalStage configuredProps(Map configuredProps); - _FinalStage putAllConfiguredProps(Map configuredProps); + _FinalStage putAllConfiguredProps(Map configuredProps); - _FinalStage configuredProps(String key, Object value); + _FinalStage configuredProps(String key, ConfiguredPropValue value); _FinalStage callbackObservations(Optional callbackObservations); @@ -323,7 +317,7 @@ public static final class Builder private Optional callbackObservations = Optional.empty(); - private Map configuredProps = new LinkedHashMap<>(); + private Map configuredProps = new LinkedHashMap<>(); private List configurableProps = new ArrayList<>(); @@ -457,32 +451,21 @@ public _FinalStage callbackObservations(Optional callbackObservations) { return this; } - /** - *

The configured properties of the component

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage configuredProps(String key, Object value) { + public _FinalStage configuredProps(String key, ConfiguredPropValue value) { this.configuredProps.put(key, value); return this; } - /** - *

The configured properties of the component

- * @return Reference to {@code this} so that method calls can be chained together. - */ @java.lang.Override - public _FinalStage putAllConfiguredProps(Map configuredProps) { + public _FinalStage putAllConfiguredProps(Map configuredProps) { this.configuredProps.putAll(configuredProps); return this; } - /** - *

The configured properties of the component

- */ @java.lang.Override @JsonSetter(value = "configured_props", nulls = Nulls.SKIP) - public _FinalStage configuredProps(Map configuredProps) { + public _FinalStage configuredProps(Map configuredProps) { this.configuredProps.clear(); this.configuredProps.putAll(configuredProps); return this; diff --git a/src/main/java/com/pipedream/api/types/Observation.java b/src/main/java/com/pipedream/api/types/Observation.java new file mode 100644 index 0000000..528ee85 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/Observation.java @@ -0,0 +1,222 @@ +/** + * 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 = Observation.Builder.class) +public final class Observation { + private final Optional err; + + private final String k; + + private final Optional msg; + + private final double ts; + + private final Map additionalProperties; + + private Observation( + Optional err, + String k, + Optional msg, + double ts, + Map additionalProperties) { + this.err = err; + this.k = k; + this.msg = msg; + this.ts = ts; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("err") + public Optional getErr() { + return err; + } + + /** + * @return The source of the log (e.g. console.log) + */ + @JsonProperty("k") + public String getK() { + return k; + } + + /** + * @return The log message + */ + @JsonProperty("msg") + public Optional getMsg() { + return msg; + } + + /** + * @return The time at which the log was produced, as milliseconds since the epoch + */ + @JsonProperty("ts") + public double getTs() { + return ts; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof Observation && equalTo((Observation) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Observation other) { + return err.equals(other.err) && k.equals(other.k) && msg.equals(other.msg) && ts == other.ts; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.err, this.k, this.msg, this.ts); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static KStage builder() { + return new Builder(); + } + + public interface KStage { + /** + *

The source of the log (e.g. console.log)

+ */ + TsStage k(@NotNull String k); + + Builder from(Observation other); + } + + public interface TsStage { + /** + *

The time at which the log was produced, as milliseconds since the epoch

+ */ + _FinalStage ts(double ts); + } + + public interface _FinalStage { + Observation build(); + + _FinalStage err(Optional err); + + _FinalStage err(ObservationError err); + + /** + *

The log message

+ */ + _FinalStage msg(Optional msg); + + _FinalStage msg(String msg); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements KStage, TsStage, _FinalStage { + private String k; + + private double ts; + + private Optional msg = Optional.empty(); + + private Optional err = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Observation other) { + err(other.getErr()); + k(other.getK()); + msg(other.getMsg()); + ts(other.getTs()); + return this; + } + + /** + *

The source of the log (e.g. console.log)

+ *

The source of the log (e.g. console.log)

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

The time at which the log was produced, as milliseconds since the epoch

+ *

The time at which the log was produced, as milliseconds since the epoch

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("ts") + public _FinalStage ts(double ts) { + this.ts = ts; + return this; + } + + /** + *

The log message

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

The log message

+ */ + @java.lang.Override + @JsonSetter(value = "msg", nulls = Nulls.SKIP) + public _FinalStage msg(Optional msg) { + this.msg = msg; + return this; + } + + @java.lang.Override + public _FinalStage err(ObservationError err) { + this.err = Optional.ofNullable(err); + return this; + } + + @java.lang.Override + @JsonSetter(value = "err", nulls = Nulls.SKIP) + public _FinalStage err(Optional err) { + this.err = err; + return this; + } + + @java.lang.Override + public Observation build() { + return new Observation(err, k, msg, ts, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ObservationError.java b/src/main/java/com/pipedream/api/types/ObservationError.java new file mode 100644 index 0000000..3993a6b --- /dev/null +++ b/src/main/java/com/pipedream/api/types/ObservationError.java @@ -0,0 +1,161 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.pipedream.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ObservationError.Builder.class) +public final class ObservationError { + private final Optional name; + + private final Optional message; + + private final Optional stack; + + private final Map additionalProperties; + + private ObservationError( + Optional name, + Optional message, + Optional stack, + Map additionalProperties) { + this.name = name; + this.message = message; + this.stack = stack; + this.additionalProperties = additionalProperties; + } + + /** + * @return The name of the error/exception + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return The error message + */ + @JsonProperty("message") + public Optional getMessage() { + return message; + } + + /** + * @return The stack trace of the error + */ + @JsonProperty("stack") + public Optional getStack() { + return stack; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ObservationError && equalTo((ObservationError) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ObservationError other) { + return name.equals(other.name) && message.equals(other.message) && stack.equals(other.stack); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.name, this.message, this.stack); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private Optional message = Optional.empty(); + + private Optional stack = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ObservationError other) { + name(other.getName()); + message(other.getMessage()); + stack(other.getStack()); + return this; + } + + /** + *

The name of the error/exception

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

The error message

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

The stack trace of the error

+ */ + @JsonSetter(value = "stack", nulls = Nulls.SKIP) + public Builder stack(Optional stack) { + this.stack = stack; + return this; + } + + public Builder stack(String stack) { + this.stack = Optional.ofNullable(stack); + return this; + } + + public ObservationError build() { + return new ObservationError(name, message, stack, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/PropOptionNested.java b/src/main/java/com/pipedream/api/types/PropOptionNested.java new file mode 100644 index 0000000..6224151 --- /dev/null +++ b/src/main/java/com/pipedream/api/types/PropOptionNested.java @@ -0,0 +1,102 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.pipedream.api.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.pipedream.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PropOptionNested.Builder.class) +public final class PropOptionNested { + private final PropOption lv; + + private final Map additionalProperties; + + private PropOptionNested(PropOption lv, Map additionalProperties) { + this.lv = lv; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("__lv") + public PropOption getLv() { + return lv; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PropOptionNested && equalTo((PropOptionNested) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PropOptionNested other) { + return lv.equals(other.lv); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.lv); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static LvStage builder() { + return new Builder(); + } + + public interface LvStage { + _FinalStage lv(@NotNull PropOption lv); + + Builder from(PropOptionNested other); + } + + public interface _FinalStage { + PropOptionNested build(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements LvStage, _FinalStage { + private PropOption lv; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PropOptionNested other) { + lv(other.getLv()); + return this; + } + + @java.lang.Override + @JsonSetter("__lv") + public _FinalStage lv(@NotNull PropOption lv) { + this.lv = Objects.requireNonNull(lv, "lv must not be null"); + return this; + } + + @java.lang.Override + public PropOptionNested build() { + return new PropOptionNested(lv, additionalProperties); + } + } +} diff --git a/src/main/java/com/pipedream/api/types/ReloadPropsOpts.java b/src/main/java/com/pipedream/api/types/ReloadPropsOpts.java index 2b06ac8..4af3415 100644 --- a/src/main/java/com/pipedream/api/types/ReloadPropsOpts.java +++ b/src/main/java/com/pipedream/api/types/ReloadPropsOpts.java @@ -27,7 +27,7 @@ public final class ReloadPropsOpts { private final Optional blocking; - private final Optional> configuredProps; + private final Optional> configuredProps; private final Optional dynamicPropsId; @@ -37,7 +37,7 @@ private ReloadPropsOpts( String id, String externalUserId, Optional blocking, - Optional> configuredProps, + Optional> configuredProps, Optional dynamicPropsId, Map additionalProperties) { this.id = id; @@ -72,11 +72,8 @@ public Optional getBlocking() { return blocking; } - /** - * @return The configured properties for the component - */ @JsonProperty("configured_props") - public Optional> getConfiguredProps() { + public Optional> getConfiguredProps() { return configuredProps; } @@ -147,12 +144,9 @@ public interface _FinalStage { _FinalStage blocking(Boolean blocking); - /** - *

The configured properties for the component

- */ - _FinalStage configuredProps(Optional> configuredProps); + _FinalStage configuredProps(Optional> configuredProps); - _FinalStage configuredProps(Map configuredProps); + _FinalStage configuredProps(Map configuredProps); /** *

The ID for dynamic props

@@ -170,7 +164,7 @@ public static final class Builder implements IdStage, ExternalUserIdStage, _Fina private Optional dynamicPropsId = Optional.empty(); - private Optional> configuredProps = Optional.empty(); + private Optional> configuredProps = Optional.empty(); private Optional blocking = Optional.empty(); @@ -233,22 +227,15 @@ public _FinalStage dynamicPropsId(Optional dynamicPropsId) { return this; } - /** - *

The configured properties for the component

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

The configured properties for the component

- */ @java.lang.Override @JsonSetter(value = "configured_props", nulls = Nulls.SKIP) - public _FinalStage configuredProps(Optional> configuredProps) { + public _FinalStage configuredProps(Optional> configuredProps) { this.configuredProps = configuredProps; return this; } diff --git a/src/main/java/com/pipedream/api/types/ReloadPropsResponse.java b/src/main/java/com/pipedream/api/types/ReloadPropsResponse.java index ad3e825..4fe9986 100644 --- a/src/main/java/com/pipedream/api/types/ReloadPropsResponse.java +++ b/src/main/java/com/pipedream/api/types/ReloadPropsResponse.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ReloadPropsResponse.Builder.class) public final class ReloadPropsResponse { - private final Optional> observations; + private final Optional> observations; private final Optional> errors; @@ -30,7 +30,7 @@ public final class ReloadPropsResponse { private final Map additionalProperties; private ReloadPropsResponse( - Optional> observations, + Optional> observations, Optional> errors, Optional dynamicProps, Map additionalProperties) { @@ -40,11 +40,8 @@ private ReloadPropsResponse( this.additionalProperties = additionalProperties; } - /** - * @return Any logs produced during the configuration of the prop - */ @JsonProperty("observations") - public Optional> getObservations() { + public Optional> getObservations() { return observations; } @@ -94,7 +91,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional> observations = Optional.empty(); + private Optional> observations = Optional.empty(); private Optional> errors = Optional.empty(); @@ -112,16 +109,13 @@ public Builder from(ReloadPropsResponse other) { return this; } - /** - *

Any logs produced during the configuration of the prop

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