mosche commented on a change in pull request #16894:
URL: https://github.com/apache/beam/pull/16894#discussion_r811673415



##########
File path: 
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/common/ClientConfiguration.java
##########
@@ -132,58 +156,8 @@ public Builder retry(Consumer<RetryConfiguration.Builder> 
retry) {
 
     abstract Builder regionId(String region);
 
-    abstract AwsCredentialsProvider credentialsProvider();
-
-    abstract ClientConfiguration autoBuild();
+    abstract Builder credentialsProviderAsJson(String credentialsProvider);
 
-    public ClientConfiguration build() {
-      if (credentialsProvider() != null) {
-        credentialsProvider(new 
SerializableAwsCredentialsProvider(credentialsProvider()));
-      }
-      return autoBuild();
-    }
-  }
-
-  /** Internal serializable {@link AwsCredentialsProvider}. */
-  private static class SerializableAwsCredentialsProvider

Review comment:
       Removing SerializableAwsCredentialsProvider to simplify Json 
serialization, otherwise this would require a custom serializer (and can't be 
private any longer). Instead ClientConfiguration just stores the serialized 
Json representation internally.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to