Skip to content

Commit 1f6cc57

Browse files
committed
SDK regeneration
1 parent 092f40f commit 1f6cc57

14 files changed

+1073
-55
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![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)
44
[![Maven Central](https://img.shields.io/maven-central/v/com.pipedream/pipedream)](https://central.sonatype.com/artifact/com.pipedream/pipedream)
55

6-
The Pipedream Java library provides convenient access to the Pipedream API from Java.
6+
The Pipedream Java library provides convenient access to the Pipedream APIs from Java.
77

88
## Installation
99

@@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file:
2525
<dependency>
2626
<groupId>com.pipedream</groupId>
2727
<artifactId>pipedream</artifactId>
28-
<version>1.0.2</version>
28+
<version>1.0.3</version>
2929
</dependency>
3030
```
3131

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ java {
4848

4949
group = 'com.pipedream'
5050

51-
version = '1.0.2'
51+
version = '1.0.3'
5252

5353
jar {
5454
dependsOn(":generatePomFileForMavenPublication")
@@ -79,7 +79,7 @@ publishing {
7979
maven(MavenPublication) {
8080
groupId = 'com.pipedream'
8181
artifactId = 'pipedream'
82-
version = '1.0.2'
82+
version = '1.0.3'
8383
from components.java
8484
pom {
8585
name = 'pipedream'

src/main/java/com/pipedream/api/core/ClientOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ private ClientOptions(
3535
this.headers.putAll(headers);
3636
this.headers.putAll(new HashMap<String, String>() {
3737
{
38-
put("User-Agent", "com.pipedream:pipedream/1.0.2");
38+
put("User-Agent", "com.pipedream:pipedream/1.0.3");
3939
put("X-Fern-Language", "JAVA");
4040
put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
41-
put("X-Fern-SDK-Version", "1.0.2");
41+
put("X-Fern-SDK-Version", "1.0.3");
4242
}
4343
});
4444
this.headerSuppliers = headerSuppliers;

src/main/java/com/pipedream/api/types/Account.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ private Account(
8181
this.additionalProperties = additionalProperties;
8282
}
8383

84-
/**
85-
* @return The unique ID of the account.
86-
*/
8784
@JsonProperty("id")
8885
public String getId() {
8986
return id;
@@ -237,9 +234,6 @@ public static IdStage builder() {
237234
}
238235

239236
public interface IdStage {
240-
/**
241-
* <p>The unique ID of the account.</p>
242-
*/
243237
_FinalStage id(@NotNull String id);
244238

245239
Builder from(Account other);
@@ -381,11 +375,6 @@ public Builder from(Account other) {
381375
return this;
382376
}
383377

384-
/**
385-
* <p>The unique ID of the account.</p>
386-
* <p>The unique ID of the account.</p>
387-
* @return Reference to {@code this} so that method calls can be chained together.
388-
*/
389378
@java.lang.Override
390379
@JsonSetter("id")
391380
public _FinalStage id(@NotNull String id) {

src/main/java/com/pipedream/api/types/ConfigurePropOpts.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public final class ConfigurePropOpts {
2929

3030
private final Optional<Boolean> blocking;
3131

32-
private final Optional<Map<String, Object>> configuredProps;
32+
private final Optional<Map<String, ConfigurePropOptsConfiguredPropsValue>> configuredProps;
3333

3434
private final Optional<String> dynamicPropsId;
3535

@@ -46,7 +46,7 @@ private ConfigurePropOpts(
4646
String externalUserId,
4747
String propName,
4848
Optional<Boolean> blocking,
49-
Optional<Map<String, Object>> configuredProps,
49+
Optional<Map<String, ConfigurePropOptsConfiguredPropsValue>> configuredProps,
5050
Optional<String> dynamicPropsId,
5151
Optional<Double> page,
5252
Optional<Map<String, Object>> prevContext,
@@ -100,7 +100,7 @@ public Optional<Boolean> getBlocking() {
100100
* @return The configured properties for the component
101101
*/
102102
@JsonProperty("configured_props")
103-
public Optional<Map<String, Object>> getConfiguredProps() {
103+
public Optional<Map<String, ConfigurePropOptsConfiguredPropsValue>> getConfiguredProps() {
104104
return configuredProps;
105105
}
106106

@@ -218,9 +218,9 @@ public interface _FinalStage {
218218
/**
219219
* <p>The configured properties for the component</p>
220220
*/
221-
_FinalStage configuredProps(Optional<Map<String, Object>> configuredProps);
221+
_FinalStage configuredProps(Optional<Map<String, ConfigurePropOptsConfiguredPropsValue>> configuredProps);
222222

223-
_FinalStage configuredProps(Map<String, Object> configuredProps);
223+
_FinalStage configuredProps(Map<String, ConfigurePropOptsConfiguredPropsValue> configuredProps);
224224

225225
/**
226226
* <p>The ID for dynamic props</p>
@@ -267,7 +267,7 @@ public static final class Builder implements IdStage, ExternalUserIdStage, PropN
267267

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

270-
private Optional<Map<String, Object>> configuredProps = Optional.empty();
270+
private Optional<Map<String, ConfigurePropOptsConfiguredPropsValue>> configuredProps = Optional.empty();
271271

272272
private Optional<Boolean> blocking = Optional.empty();
273273

@@ -411,7 +411,7 @@ public _FinalStage dynamicPropsId(Optional<String> dynamicPropsId) {
411411
* @return Reference to {@code this} so that method calls can be chained together.
412412
*/
413413
@java.lang.Override
414-
public _FinalStage configuredProps(Map<String, Object> configuredProps) {
414+
public _FinalStage configuredProps(Map<String, ConfigurePropOptsConfiguredPropsValue> configuredProps) {
415415
this.configuredProps = Optional.ofNullable(configuredProps);
416416
return this;
417417
}
@@ -421,7 +421,8 @@ public _FinalStage configuredProps(Map<String, Object> configuredProps) {
421421
*/
422422
@java.lang.Override
423423
@JsonSetter(value = "configured_props", nulls = Nulls.SKIP)
424-
public _FinalStage configuredProps(Optional<Map<String, Object>> configuredProps) {
424+
public _FinalStage configuredProps(
425+
Optional<Map<String, ConfigurePropOptsConfiguredPropsValue>> configuredProps) {
425426
this.configuredProps = configuredProps;
426427
return this;
427428
}
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
package com.pipedream.api.types;
5+
6+
import com.fasterxml.jackson.annotation.JsonValue;
7+
import com.fasterxml.jackson.core.JsonParseException;
8+
import com.fasterxml.jackson.core.JsonParser;
9+
import com.fasterxml.jackson.core.type.TypeReference;
10+
import com.fasterxml.jackson.databind.DeserializationContext;
11+
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
12+
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
13+
import com.pipedream.api.core.ObjectMappers;
14+
import java.io.IOException;
15+
import java.util.List;
16+
import java.util.Map;
17+
import java.util.Objects;
18+
19+
@JsonDeserialize(using = ConfigurePropOptsConfiguredPropsValue.Deserializer.class)
20+
public final class ConfigurePropOptsConfiguredPropsValue {
21+
private final Object value;
22+
23+
private final int type;
24+
25+
private ConfigurePropOptsConfiguredPropsValue(Object value, int type) {
26+
this.value = value;
27+
this.type = type;
28+
}
29+
30+
@JsonValue
31+
public Object get() {
32+
return this.value;
33+
}
34+
35+
@SuppressWarnings("unchecked")
36+
public <T> T visit(Visitor<T> visitor) {
37+
if (this.type == 0) {
38+
return visitor.visit((Object) this.value);
39+
} else if (this.type == 1) {
40+
return visitor.visit((ConfiguredPropApp) this.value);
41+
} else if (this.type == 2) {
42+
return visitor.visit((ConfiguredPropSql) this.value);
43+
} else if (this.type == 3) {
44+
return visitor.visit((boolean) this.value);
45+
} else if (this.type == 4) {
46+
return visitor.visit((double) this.value);
47+
} else if (this.type == 5) {
48+
return visitor.visit((Map<String, Object>) this.value);
49+
} else if (this.type == 6) {
50+
return visitor.visit((String) this.value);
51+
} else if (this.type == 7) {
52+
return visitor.visit((List<String>) this.value);
53+
}
54+
throw new IllegalStateException("Failed to visit value. This should never happen.");
55+
}
56+
57+
@java.lang.Override
58+
public boolean equals(Object other) {
59+
if (this == other) return true;
60+
return other instanceof ConfigurePropOptsConfiguredPropsValue
61+
&& equalTo((ConfigurePropOptsConfiguredPropsValue) other);
62+
}
63+
64+
private boolean equalTo(ConfigurePropOptsConfiguredPropsValue other) {
65+
return value.equals(other.value);
66+
}
67+
68+
@java.lang.Override
69+
public int hashCode() {
70+
return Objects.hash(this.value);
71+
}
72+
73+
@java.lang.Override
74+
public String toString() {
75+
return this.value.toString();
76+
}
77+
78+
public static ConfigurePropOptsConfiguredPropsValue of(Object value) {
79+
return new ConfigurePropOptsConfiguredPropsValue(value, 0);
80+
}
81+
82+
public static ConfigurePropOptsConfiguredPropsValue of(ConfiguredPropApp value) {
83+
return new ConfigurePropOptsConfiguredPropsValue(value, 1);
84+
}
85+
86+
public static ConfigurePropOptsConfiguredPropsValue of(ConfiguredPropSql value) {
87+
return new ConfigurePropOptsConfiguredPropsValue(value, 2);
88+
}
89+
90+
public static ConfigurePropOptsConfiguredPropsValue of(boolean value) {
91+
return new ConfigurePropOptsConfiguredPropsValue(value, 3);
92+
}
93+
94+
public static ConfigurePropOptsConfiguredPropsValue of(double value) {
95+
return new ConfigurePropOptsConfiguredPropsValue(value, 4);
96+
}
97+
98+
public static ConfigurePropOptsConfiguredPropsValue of(Map<String, Object> value) {
99+
return new ConfigurePropOptsConfiguredPropsValue(value, 5);
100+
}
101+
102+
public static ConfigurePropOptsConfiguredPropsValue of(String value) {
103+
return new ConfigurePropOptsConfiguredPropsValue(value, 6);
104+
}
105+
106+
public static ConfigurePropOptsConfiguredPropsValue of(List<String> value) {
107+
return new ConfigurePropOptsConfiguredPropsValue(value, 7);
108+
}
109+
110+
public interface Visitor<T> {
111+
T visit(Object value);
112+
113+
T visit(ConfiguredPropApp value);
114+
115+
T visit(ConfiguredPropSql value);
116+
117+
T visit(boolean value);
118+
119+
T visit(double value);
120+
121+
T visit(Map<String, Object> value);
122+
123+
T visit(String value);
124+
125+
T visit(List<String> value);
126+
}
127+
128+
static final class Deserializer extends StdDeserializer<ConfigurePropOptsConfiguredPropsValue> {
129+
Deserializer() {
130+
super(ConfigurePropOptsConfiguredPropsValue.class);
131+
}
132+
133+
@java.lang.Override
134+
public ConfigurePropOptsConfiguredPropsValue deserialize(JsonParser p, DeserializationContext context)
135+
throws IOException {
136+
Object value = p.readValueAs(Object.class);
137+
try {
138+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, Object.class));
139+
} catch (RuntimeException e) {
140+
}
141+
try {
142+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, ConfiguredPropApp.class));
143+
} catch (RuntimeException e) {
144+
}
145+
try {
146+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, ConfiguredPropSql.class));
147+
} catch (RuntimeException e) {
148+
}
149+
if (value instanceof Boolean) {
150+
return of((Boolean) value);
151+
}
152+
if (value instanceof Double) {
153+
return of((Double) value);
154+
}
155+
try {
156+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference<Map<String, Object>>() {}));
157+
} catch (RuntimeException e) {
158+
}
159+
try {
160+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class));
161+
} catch (RuntimeException e) {
162+
}
163+
try {
164+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference<List<String>>() {}));
165+
} catch (RuntimeException e) {
166+
}
167+
throw new JsonParseException(p, "Failed to deserialize");
168+
}
169+
}
170+
}

0 commit comments

Comments
 (0)