ahmedabu98 commented on code in PR #35017:
URL: https://github.com/apache/beam/pull/35017#discussion_r2121184560


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1.java:
##########
@@ -502,9 +504,17 @@ public PartitionQuery.Builder partitionQuery() {
    */
   @Immutable
   public static final class Write {
-    private static final Write INSTANCE = new Write();
+    private @Nullable String projectId;
+    private @Nullable String databaseId;
 
-    private Write() {}
+    public static final Write INSTANCE = new Write(null, null);
+
+    public Write() {}
+
+    public Write(@Nullable String projectId, @Nullable String databaseId) {
+      this.projectId = projectId;
+      this.databaseId = databaseId;
+    }

Review Comment:
   Can we keep the original constructor private? and we probably don't need the 
second one -- I don't think it will be a practical option for users



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1.java:
##########
@@ -1414,9 +1446,33 @@ private Builder(
         super(clock, firestoreStatefulComponentFactory, rpcQosOptions);
       }
 
+      /** Set the GCP project ID to be used by the Firestore client. */
+      public Builder setProjectId(@Nullable String projectId) {
+        this.projectId = projectId;
+        return this;
+      }
+
+      /** Set the Firestore database ID (e.g., "(default)"). */
+      public Builder setDatabaseId(@Nullable String databaseId) {
+        this.databaseId = databaseId;
+        return this;
+      }
+
+      @VisibleForTesting
+      public @Nullable String getProjectId() {
+        return this.projectId;
+      }
+
+      @VisibleForTesting
+      public @Nullable String getDatabaseId() {
+        return this.databaseId;
+      }

Review Comment:
   Can we make these package private?



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1.java:
##########
@@ -1528,10 +1594,33 @@ public static final class Builder
             BatchWriteWithDeadLetterQueue,
             BatchWriteWithDeadLetterQueue.Builder> {
 
+      private @Nullable String projectId;
+      private @Nullable String databaseId;
+
       private Builder() {
         super();
       }
 
+      public Builder setProjectId(@Nullable String projectId) {
+        this.projectId = projectId;
+        return this;
+      }
+
+      public Builder setDatabaseId(@Nullable String databaseId) {
+        this.databaseId = databaseId;
+        return this;
+      }
+
+      @VisibleForTesting
+      public @Nullable String getProjectId() {
+        return this.projectId;
+      }
+
+      @VisibleForTesting
+      public @Nullable String getDatabaseId() {
+        return this.databaseId;
+      }

Review Comment:
   Package private here too please



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to