Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.pipedream'

version = '0.0.2'
version = '1.0.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.pipedream'
artifactId = 'pipedream'
version = '0.0.2'
version = '1.0.0'
from components.java
pom {
name = 'pipedream'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ public CompletableFuture<BaseClientHttpResponse<RunActionResponse>> run(
if (request.getDynamicPropsId().isPresent()) {
properties.put("dynamic_props_id", request.getDynamicPropsId());
}
if (request.getStashId().isPresent()) {
properties.put("stash_id", request.getStashId());
}
RequestBody body;
try {
body = RequestBody.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ public BaseClientHttpResponse<RunActionResponse> run(RunActionOpts request, Requ
if (request.getDynamicPropsId().isPresent()) {
properties.put("dynamic_props_id", request.getDynamicPropsId());
}
if (request.getStashId().isPresent()) {
properties.put("stash_id", request.getStashId());
}
RequestBody body;
try {
body = RequestBody.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.resources.actions.types.RunActionOptsStashId;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
Expand All @@ -31,6 +32,8 @@ public final class RunActionOpts {

private final Optional<String> dynamicPropsId;

private final Optional<RunActionOptsStashId> stashId;

private final Map<String, Object> additionalProperties;

private RunActionOpts(
Expand All @@ -39,12 +42,14 @@ private RunActionOpts(
String externalUserId,
Optional<Map<String, Object>> configuredProps,
Optional<String> dynamicPropsId,
Optional<RunActionOptsStashId> stashId,
Map<String, Object> additionalProperties) {
this.asyncHandle = asyncHandle;
this.id = id;
this.externalUserId = externalUserId;
this.configuredProps = configuredProps;
this.dynamicPropsId = dynamicPropsId;
this.stashId = stashId;
this.additionalProperties = additionalProperties;
}

Expand Down Expand Up @@ -85,6 +90,14 @@ public Optional<String> getDynamicPropsId() {
return dynamicPropsId;
}

/**
* @return The ID of the File Stash to use for syncing the action's /tmp directory
*/
@JsonProperty("stash_id")
public Optional<RunActionOptsStashId> getStashId() {
return stashId;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand All @@ -101,12 +114,19 @@ private boolean equalTo(RunActionOpts other) {
&& id.equals(other.id)
&& externalUserId.equals(other.externalUserId)
&& configuredProps.equals(other.configuredProps)
&& dynamicPropsId.equals(other.dynamicPropsId);
&& dynamicPropsId.equals(other.dynamicPropsId)
&& stashId.equals(other.stashId);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.asyncHandle, this.id, this.externalUserId, this.configuredProps, this.dynamicPropsId);
return Objects.hash(
this.asyncHandle,
this.id,
this.externalUserId,
this.configuredProps,
this.dynamicPropsId,
this.stashId);
}

@java.lang.Override
Expand Down Expand Up @@ -154,6 +174,13 @@ public interface _FinalStage {
_FinalStage dynamicPropsId(Optional<String> dynamicPropsId);

_FinalStage dynamicPropsId(String dynamicPropsId);

/**
* <p>The ID of the File Stash to use for syncing the action's /tmp directory</p>
*/
_FinalStage stashId(Optional<RunActionOptsStashId> stashId);

_FinalStage stashId(RunActionOptsStashId stashId);
}

@JsonIgnoreProperties(ignoreUnknown = true)
Expand All @@ -162,6 +189,8 @@ public static final class Builder implements IdStage, ExternalUserIdStage, _Fina

private String externalUserId;

private Optional<RunActionOptsStashId> stashId = Optional.empty();

private Optional<String> dynamicPropsId = Optional.empty();

private Optional<Map<String, Object>> configuredProps = Optional.empty();
Expand All @@ -180,6 +209,7 @@ public Builder from(RunActionOpts other) {
externalUserId(other.getExternalUserId());
configuredProps(other.getConfiguredProps());
dynamicPropsId(other.getDynamicPropsId());
stashId(other.getStashId());
return this;
}

Expand Down Expand Up @@ -207,6 +237,26 @@ public _FinalStage externalUserId(@NotNull String externalUserId) {
return this;
}

/**
* <p>The ID of the File Stash to use for syncing the action's /tmp directory</p>
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
public _FinalStage stashId(RunActionOptsStashId stashId) {
this.stashId = Optional.ofNullable(stashId);
return this;
}

/**
* <p>The ID of the File Stash to use for syncing the action's /tmp directory</p>
*/
@java.lang.Override
@JsonSetter(value = "stash_id", nulls = Nulls.SKIP)
public _FinalStage stashId(Optional<RunActionOptsStashId> stashId) {
this.stashId = stashId;
return this;
}

/**
* <p>The ID for dynamic props</p>
* @return Reference to {@code this} so that method calls can be chained together.
Expand Down Expand Up @@ -263,7 +313,7 @@ public _FinalStage asyncHandle(Optional<String> asyncHandle) {
@java.lang.Override
public RunActionOpts build() {
return new RunActionOpts(
asyncHandle, id, externalUserId, configuredProps, dynamicPropsId, additionalProperties);
asyncHandle, id, externalUserId, configuredProps, dynamicPropsId, stashId, additionalProperties);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.pipedream.api.resources.actions.types;

import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.pipedream.api.core.ObjectMappers;
import java.io.IOException;
import java.util.Objects;

@JsonDeserialize(using = RunActionOptsStashId.Deserializer.class)
public final class RunActionOptsStashId {
private final Object value;

private final int type;

private RunActionOptsStashId(Object value, int type) {
this.value = value;
this.type = type;
}

@JsonValue
public Object get() {
return this.value;
}

@SuppressWarnings("unchecked")
public <T> T visit(Visitor<T> visitor) {
if (this.type == 0) {
return visitor.visit((String) this.value);
} else if (this.type == 1) {
return visitor.visit((boolean) this.value);
}
throw new IllegalStateException("Failed to visit value. This should never happen.");
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
return other instanceof RunActionOptsStashId && equalTo((RunActionOptsStashId) other);
}

private boolean equalTo(RunActionOptsStashId other) {
return value.equals(other.value);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.value);
}

@java.lang.Override
public String toString() {
return this.value.toString();
}

public static RunActionOptsStashId of(String value) {
return new RunActionOptsStashId(value, 0);
}

public static RunActionOptsStashId of(boolean value) {
return new RunActionOptsStashId(value, 1);
}

public interface Visitor<T> {
T visit(String value);

T visit(boolean value);
}

static final class Deserializer extends StdDeserializer<RunActionOptsStashId> {
Deserializer() {
super(RunActionOptsStashId.class);
}

@java.lang.Override
public RunActionOptsStashId deserialize(JsonParser p, DeserializationContext context) throws IOException {
Object value = p.readValueAs(Object.class);
try {
return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class));
} catch (IllegalArgumentException e) {
}
if (value instanceof Boolean) {
return of((Boolean) value);
}
throw new JsonParseException(p, "Failed to deserialize");
}
}
}