Skip to content

Commit a839f58

Browse files
committed
SDK regeneration
1 parent a6dfb93 commit a839f58

File tree

5 files changed

+59
-65
lines changed

5 files changed

+59
-65
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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>0.0.256</version>
28+
<version>0.0.2</version>
2929
</dependency>
3030
```
3131

build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies {
1919
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2'
2020
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2'
2121
api 'org.apache.commons:commons-text:1.13.1'
22-
api 'org.immutables:value:2.10.1'
2322
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
2423
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
2524
}
@@ -48,7 +47,7 @@ java {
4847

4948
group = 'com.pipedream'
5049

51-
version = '0.0.256'
50+
version = '0.0.2'
5251

5352
jar {
5453
dependsOn(":generatePomFileForMavenPublication")
@@ -79,7 +78,7 @@ publishing {
7978
maven(MavenPublication) {
8079
groupId = 'com.pipedream'
8180
artifactId = 'pipedream'
82-
version = '0.0.256'
81+
version = '0.0.2'
8382
from components.java
8483
pom {
8584
name = 'pipedream'

src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import java.util.Optional;
1111
import okhttp3.OkHttpClient;
1212

13-
public class AsyncBaseClientBuilder<T extends AsyncBaseClientBuilder<T>> {
13+
public class AsyncBaseClientBuilder {
1414
private Optional<Integer> timeout = Optional.empty();
1515

1616
private Optional<Integer> maxRetries = Optional.empty();
@@ -29,68 +29,65 @@ public class AsyncBaseClientBuilder<T extends AsyncBaseClientBuilder<T>> {
2929
* Sets clientId.
3030
* Defaults to the PIPEDREAM_CLIENT_ID environment variable.
3131
*/
32-
@SuppressWarnings("unchecked")
33-
public T clientId(String clientId) {
32+
public AsyncBaseClientBuilder clientId(String clientId) {
3433
this.clientId = clientId;
35-
return (T) this;
34+
return this;
3635
}
3736

3837
/**
3938
* Sets clientSecret.
4039
* Defaults to the PIPEDREAM_CLIENT_SECRET environment variable.
4140
*/
42-
@SuppressWarnings("unchecked")
43-
public T clientSecret(String clientSecret) {
41+
public AsyncBaseClientBuilder clientSecret(String clientSecret) {
4442
this.clientSecret = clientSecret;
45-
return (T) this;
43+
return this;
4644
}
4745

4846
/**
4947
* Sets projectEnvironment
5048
*/
51-
@SuppressWarnings("unchecked")
52-
public T projectEnvironment(String projectEnvironment) {
49+
public AsyncBaseClientBuilder projectEnvironment(String projectEnvironment) {
5350
this.projectEnvironment = projectEnvironment;
54-
return (T) this;
51+
return this;
5552
}
5653

57-
@SuppressWarnings("unchecked")
58-
public T environment(Environment environment) {
54+
public AsyncBaseClientBuilder environment(Environment environment) {
5955
this.environment = environment;
60-
return (T) this;
56+
return this;
6157
}
6258

63-
@SuppressWarnings("unchecked")
64-
public T url(String url) {
59+
public AsyncBaseClientBuilder url(String url) {
6560
this.environment = Environment.custom(url);
66-
return (T) this;
61+
return this;
6762
}
6863

6964
/**
7065
* Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
7166
*/
72-
@SuppressWarnings("unchecked")
73-
public T timeout(int timeout) {
67+
public AsyncBaseClientBuilder timeout(int timeout) {
7468
this.timeout = Optional.of(timeout);
75-
return (T) this;
69+
return this;
7670
}
7771

7872
/**
7973
* Sets the maximum number of retries for the client. Defaults to 2 retries.
8074
*/
81-
@SuppressWarnings("unchecked")
82-
public T maxRetries(int maxRetries) {
75+
public AsyncBaseClientBuilder maxRetries(int maxRetries) {
8376
this.maxRetries = Optional.of(maxRetries);
84-
return (T) this;
77+
return this;
8578
}
8679

8780
/**
8881
* Sets the underlying OkHttp client
8982
*/
90-
@SuppressWarnings("unchecked")
91-
public T httpClient(OkHttpClient httpClient) {
83+
public AsyncBaseClientBuilder httpClient(OkHttpClient httpClient) {
9284
this.httpClient = httpClient;
93-
return (T) this;
85+
return this;
86+
}
87+
88+
public AsyncBaseClientBuilder projectId(String projectId) {
89+
clientOptionsBuilder.projectId(projectId);
90+
return this;
9491
}
9592

9693
protected ClientOptions buildClientOptions() {
@@ -124,7 +121,7 @@ protected void setEnvironment(ClientOptions.Builder builder) {
124121
*
125122
* Example:
126123
* <pre>{@code
127-
* @Override
124+
* &#64;Override
128125
* protected void setAuthentication(ClientOptions.Builder builder) {
129126
* super.setAuthentication(builder); // Keep existing auth
130127
* builder.addHeader("X-API-Key", this.apiKey);
@@ -149,7 +146,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
149146
*
150147
* Example:
151148
* <pre>{@code
152-
* @Override
149+
* &#64;Override
153150
* protected void setCustomHeaders(ClientOptions.Builder builder) {
154151
* super.setCustomHeaders(builder); // Keep existing headers
155152
* builder.addHeader("X-Trace-ID", generateTraceId());
@@ -215,9 +212,9 @@ protected void setHttpClient(ClientOptions.Builder builder) {
215212
*
216213
* Example:
217214
* <pre>{@code
218-
* @Override
215+
* &#64;Override
219216
* protected void setAdditional(ClientOptions.Builder builder) {
220-
* builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
217+
* builder.addHeader("X-Request-ID", () -&gt; UUID.randomUUID().toString());
221218
* builder.addHeader("X-Client-Version", "1.0.0");
222219
* }
223220
* }</pre>
@@ -231,7 +228,7 @@ protected void setAdditional(ClientOptions.Builder builder) {}
231228
*
232229
* Example:
233230
* <pre>{@code
234-
* @Override
231+
* &#64;Override
235232
* protected void validateConfiguration() {
236233
* super.validateConfiguration(); // Run parent validations
237234
* if (tenantId == null || tenantId.isEmpty()) {

src/main/java/com/pipedream/api/BaseClientBuilder.java

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import java.util.Optional;
1111
import okhttp3.OkHttpClient;
1212

13-
public class BaseClientBuilder<T extends BaseClientBuilder<T>> {
13+
public class BaseClientBuilder {
1414
private Optional<Integer> timeout = Optional.empty();
1515

1616
private Optional<Integer> maxRetries = Optional.empty();
@@ -29,68 +29,65 @@ public class BaseClientBuilder<T extends BaseClientBuilder<T>> {
2929
* Sets clientId.
3030
* Defaults to the PIPEDREAM_CLIENT_ID environment variable.
3131
*/
32-
@SuppressWarnings("unchecked")
33-
public T clientId(String clientId) {
32+
public BaseClientBuilder clientId(String clientId) {
3433
this.clientId = clientId;
35-
return (T) this;
34+
return this;
3635
}
3736

3837
/**
3938
* Sets clientSecret.
4039
* Defaults to the PIPEDREAM_CLIENT_SECRET environment variable.
4140
*/
42-
@SuppressWarnings("unchecked")
43-
public T clientSecret(String clientSecret) {
41+
public BaseClientBuilder clientSecret(String clientSecret) {
4442
this.clientSecret = clientSecret;
45-
return (T) this;
43+
return this;
4644
}
4745

4846
/**
4947
* Sets projectEnvironment
5048
*/
51-
@SuppressWarnings("unchecked")
52-
public T projectEnvironment(String projectEnvironment) {
49+
public BaseClientBuilder projectEnvironment(String projectEnvironment) {
5350
this.projectEnvironment = projectEnvironment;
54-
return (T) this;
51+
return this;
5552
}
5653

57-
@SuppressWarnings("unchecked")
58-
public T environment(Environment environment) {
54+
public BaseClientBuilder environment(Environment environment) {
5955
this.environment = environment;
60-
return (T) this;
56+
return this;
6157
}
6258

63-
@SuppressWarnings("unchecked")
64-
public T url(String url) {
59+
public BaseClientBuilder url(String url) {
6560
this.environment = Environment.custom(url);
66-
return (T) this;
61+
return this;
6762
}
6863

6964
/**
7065
* Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
7166
*/
72-
@SuppressWarnings("unchecked")
73-
public T timeout(int timeout) {
67+
public BaseClientBuilder timeout(int timeout) {
7468
this.timeout = Optional.of(timeout);
75-
return (T) this;
69+
return this;
7670
}
7771

7872
/**
7973
* Sets the maximum number of retries for the client. Defaults to 2 retries.
8074
*/
81-
@SuppressWarnings("unchecked")
82-
public T maxRetries(int maxRetries) {
75+
public BaseClientBuilder maxRetries(int maxRetries) {
8376
this.maxRetries = Optional.of(maxRetries);
84-
return (T) this;
77+
return this;
8578
}
8679

8780
/**
8881
* Sets the underlying OkHttp client
8982
*/
90-
@SuppressWarnings("unchecked")
91-
public T httpClient(OkHttpClient httpClient) {
83+
public BaseClientBuilder httpClient(OkHttpClient httpClient) {
9284
this.httpClient = httpClient;
93-
return (T) this;
85+
return this;
86+
}
87+
88+
public BaseClientBuilder projectId(String projectId) {
89+
clientOptionsBuilder.projectId(projectId);
90+
return this;
9491
}
9592

9693
protected ClientOptions buildClientOptions() {
@@ -124,7 +121,7 @@ protected void setEnvironment(ClientOptions.Builder builder) {
124121
*
125122
* Example:
126123
* <pre>{@code
127-
* @Override
124+
* &#64;Override
128125
* protected void setAuthentication(ClientOptions.Builder builder) {
129126
* super.setAuthentication(builder); // Keep existing auth
130127
* builder.addHeader("X-API-Key", this.apiKey);
@@ -149,7 +146,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
149146
*
150147
* Example:
151148
* <pre>{@code
152-
* @Override
149+
* &#64;Override
153150
* protected void setCustomHeaders(ClientOptions.Builder builder) {
154151
* super.setCustomHeaders(builder); // Keep existing headers
155152
* builder.addHeader("X-Trace-ID", generateTraceId());
@@ -215,9 +212,9 @@ protected void setHttpClient(ClientOptions.Builder builder) {
215212
*
216213
* Example:
217214
* <pre>{@code
218-
* @Override
215+
* &#64;Override
219216
* protected void setAdditional(ClientOptions.Builder builder) {
220-
* builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
217+
* builder.addHeader("X-Request-ID", () -&gt; UUID.randomUUID().toString());
221218
* builder.addHeader("X-Client-Version", "1.0.0");
222219
* }
223220
* }</pre>
@@ -231,7 +228,7 @@ protected void setAdditional(ClientOptions.Builder builder) {}
231228
*
232229
* Example:
233230
* <pre>{@code
234-
* @Override
231+
* &#64;Override
235232
* protected void validateConfiguration() {
236233
* super.validateConfiguration(); // Run parent validations
237234
* if (tenantId == null || tenantId.isEmpty()) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +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/0.0.2");
3839
put("X-Fern-Language", "JAVA");
3940
put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
40-
put("X-Fern-SDK-Version", "0.0.256");
41+
put("X-Fern-SDK-Version", "0.0.2");
4142
}
4243
});
4344
this.headerSuppliers = headerSuppliers;

0 commit comments

Comments
 (0)