From a839f58f9020d1de2d8567979439077ff964e668 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:11:04 +0000 Subject: [PATCH] SDK regeneration --- README.md | 2 +- build.gradle | 5 +- .../pipedream/api/AsyncBaseClientBuilder.java | 57 +++++++++---------- .../com/pipedream/api/BaseClientBuilder.java | 57 +++++++++---------- .../com/pipedream/api/core/ClientOptions.java | 3 +- 5 files changed, 59 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 9d4aea9..5a1c34d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file: com.pipedream pipedream - 0.0.256 + 0.0.2 ``` diff --git a/build.gradle b/build.gradle index def2d8c..a619a39 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,6 @@ dependencies { api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' api 'org.apache.commons:commons-text:1.13.1' - api 'org.immutables:value:2.10.1' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' } @@ -48,7 +47,7 @@ java { group = 'com.pipedream' -version = '0.0.256' +version = '0.0.2' jar { dependsOn(":generatePomFileForMavenPublication") @@ -79,7 +78,7 @@ publishing { maven(MavenPublication) { groupId = 'com.pipedream' artifactId = 'pipedream' - version = '0.0.256' + version = '0.0.2' from components.java pom { name = 'pipedream' diff --git a/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java b/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java index cc6e4a9..cea2aff 100644 --- a/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java +++ b/src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java @@ -10,7 +10,7 @@ import java.util.Optional; import okhttp3.OkHttpClient; -public class AsyncBaseClientBuilder> { +public class AsyncBaseClientBuilder { private Optional timeout = Optional.empty(); private Optional maxRetries = Optional.empty(); @@ -29,68 +29,65 @@ public class AsyncBaseClientBuilder> { * Sets clientId. * Defaults to the PIPEDREAM_CLIENT_ID environment variable. */ - @SuppressWarnings("unchecked") - public T clientId(String clientId) { + public AsyncBaseClientBuilder clientId(String clientId) { this.clientId = clientId; - return (T) this; + return this; } /** * Sets clientSecret. * Defaults to the PIPEDREAM_CLIENT_SECRET environment variable. */ - @SuppressWarnings("unchecked") - public T clientSecret(String clientSecret) { + public AsyncBaseClientBuilder clientSecret(String clientSecret) { this.clientSecret = clientSecret; - return (T) this; + return this; } /** * Sets projectEnvironment */ - @SuppressWarnings("unchecked") - public T projectEnvironment(String projectEnvironment) { + public AsyncBaseClientBuilder projectEnvironment(String projectEnvironment) { this.projectEnvironment = projectEnvironment; - return (T) this; + return this; } - @SuppressWarnings("unchecked") - public T environment(Environment environment) { + public AsyncBaseClientBuilder environment(Environment environment) { this.environment = environment; - return (T) this; + return this; } - @SuppressWarnings("unchecked") - public T url(String url) { + public AsyncBaseClientBuilder url(String url) { this.environment = Environment.custom(url); - return (T) this; + return this; } /** * Sets the timeout (in seconds) for the client. Defaults to 60 seconds. */ - @SuppressWarnings("unchecked") - public T timeout(int timeout) { + public AsyncBaseClientBuilder timeout(int timeout) { this.timeout = Optional.of(timeout); - return (T) this; + return this; } /** * Sets the maximum number of retries for the client. Defaults to 2 retries. */ - @SuppressWarnings("unchecked") - public T maxRetries(int maxRetries) { + public AsyncBaseClientBuilder maxRetries(int maxRetries) { this.maxRetries = Optional.of(maxRetries); - return (T) this; + return this; } /** * Sets the underlying OkHttp client */ - @SuppressWarnings("unchecked") - public T httpClient(OkHttpClient httpClient) { + public AsyncBaseClientBuilder httpClient(OkHttpClient httpClient) { this.httpClient = httpClient; - return (T) this; + return this; + } + + public AsyncBaseClientBuilder projectId(String projectId) { + clientOptionsBuilder.projectId(projectId); + return this; } protected ClientOptions buildClientOptions() { @@ -124,7 +121,7 @@ protected void setEnvironment(ClientOptions.Builder builder) { * * Example: *
{@code
-     * @Override
+     * @Override
      * protected void setAuthentication(ClientOptions.Builder builder) {
      *     super.setAuthentication(builder); // Keep existing auth
      *     builder.addHeader("X-API-Key", this.apiKey);
@@ -149,7 +146,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setCustomHeaders(ClientOptions.Builder builder) {
      *     super.setCustomHeaders(builder); // Keep existing headers
      *     builder.addHeader("X-Trace-ID", generateTraceId());
@@ -215,9 +212,9 @@ protected void setHttpClient(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setAdditional(ClientOptions.Builder builder) {
-     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
+     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
      *     builder.addHeader("X-Client-Version", "1.0.0");
      * }
      * }
@@ -231,7 +228,7 @@ protected void setAdditional(ClientOptions.Builder builder) {} * * Example: *
{@code
-     * @Override
+     * @Override
      * protected void validateConfiguration() {
      *     super.validateConfiguration(); // Run parent validations
      *     if (tenantId == null || tenantId.isEmpty()) {
diff --git a/src/main/java/com/pipedream/api/BaseClientBuilder.java b/src/main/java/com/pipedream/api/BaseClientBuilder.java
index 79c1350..18ac974 100644
--- a/src/main/java/com/pipedream/api/BaseClientBuilder.java
+++ b/src/main/java/com/pipedream/api/BaseClientBuilder.java
@@ -10,7 +10,7 @@
 import java.util.Optional;
 import okhttp3.OkHttpClient;
 
-public class BaseClientBuilder> {
+public class BaseClientBuilder {
     private Optional timeout = Optional.empty();
 
     private Optional maxRetries = Optional.empty();
@@ -29,68 +29,65 @@ public class BaseClientBuilder> {
      * Sets clientId.
      * Defaults to the PIPEDREAM_CLIENT_ID environment variable.
      */
-    @SuppressWarnings("unchecked")
-    public T clientId(String clientId) {
+    public BaseClientBuilder clientId(String clientId) {
         this.clientId = clientId;
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets clientSecret.
      * Defaults to the PIPEDREAM_CLIENT_SECRET environment variable.
      */
-    @SuppressWarnings("unchecked")
-    public T clientSecret(String clientSecret) {
+    public BaseClientBuilder clientSecret(String clientSecret) {
         this.clientSecret = clientSecret;
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets projectEnvironment
      */
-    @SuppressWarnings("unchecked")
-    public T projectEnvironment(String projectEnvironment) {
+    public BaseClientBuilder projectEnvironment(String projectEnvironment) {
         this.projectEnvironment = projectEnvironment;
-        return (T) this;
+        return this;
     }
 
-    @SuppressWarnings("unchecked")
-    public T environment(Environment environment) {
+    public BaseClientBuilder environment(Environment environment) {
         this.environment = environment;
-        return (T) this;
+        return this;
     }
 
-    @SuppressWarnings("unchecked")
-    public T url(String url) {
+    public BaseClientBuilder url(String url) {
         this.environment = Environment.custom(url);
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
      */
-    @SuppressWarnings("unchecked")
-    public T timeout(int timeout) {
+    public BaseClientBuilder timeout(int timeout) {
         this.timeout = Optional.of(timeout);
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets the maximum number of retries for the client. Defaults to 2 retries.
      */
-    @SuppressWarnings("unchecked")
-    public T maxRetries(int maxRetries) {
+    public BaseClientBuilder maxRetries(int maxRetries) {
         this.maxRetries = Optional.of(maxRetries);
-        return (T) this;
+        return this;
     }
 
     /**
      * Sets the underlying OkHttp client
      */
-    @SuppressWarnings("unchecked")
-    public T httpClient(OkHttpClient httpClient) {
+    public BaseClientBuilder httpClient(OkHttpClient httpClient) {
         this.httpClient = httpClient;
-        return (T) this;
+        return this;
+    }
+
+    public BaseClientBuilder projectId(String projectId) {
+        clientOptionsBuilder.projectId(projectId);
+        return this;
     }
 
     protected ClientOptions buildClientOptions() {
@@ -124,7 +121,7 @@ protected void setEnvironment(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setAuthentication(ClientOptions.Builder builder) {
      *     super.setAuthentication(builder); // Keep existing auth
      *     builder.addHeader("X-API-Key", this.apiKey);
@@ -149,7 +146,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setCustomHeaders(ClientOptions.Builder builder) {
      *     super.setCustomHeaders(builder); // Keep existing headers
      *     builder.addHeader("X-Trace-ID", generateTraceId());
@@ -215,9 +212,9 @@ protected void setHttpClient(ClientOptions.Builder builder) {
      *
      * Example:
      * 
{@code
-     * @Override
+     * @Override
      * protected void setAdditional(ClientOptions.Builder builder) {
-     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
+     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
      *     builder.addHeader("X-Client-Version", "1.0.0");
      * }
      * }
@@ -231,7 +228,7 @@ protected void setAdditional(ClientOptions.Builder builder) {} * * Example: *
{@code
-     * @Override
+     * @Override
      * protected void validateConfiguration() {
      *     super.validateConfiguration(); // Run parent validations
      *     if (tenantId == null || tenantId.isEmpty()) {
diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java
index 2e7459a..548a432 100644
--- a/src/main/java/com/pipedream/api/core/ClientOptions.java
+++ b/src/main/java/com/pipedream/api/core/ClientOptions.java
@@ -35,9 +35,10 @@ private ClientOptions(
         this.headers.putAll(headers);
         this.headers.putAll(new HashMap() {
             {
+                put("User-Agent", "com.pipedream:pipedream/0.0.2");
                 put("X-Fern-Language", "JAVA");
                 put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
-                put("X-Fern-SDK-Version", "0.0.256");
+                put("X-Fern-SDK-Version", "0.0.2");
             }
         });
         this.headerSuppliers = headerSuppliers;