From 90a32af5e30e009fda5f84f20bfcd5c46ee59ef3 Mon Sep 17 00:00:00 2001 From: Riya Mehta Date: Tue, 21 Jan 2025 12:23:20 -0800 Subject: [PATCH] improve javadoc for setter. --- .../InstantiatingGrpcChannelProvider.java | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java b/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java index dc27a58065..4cdeb8d74f 100644 --- a/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java +++ b/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java @@ -141,9 +141,11 @@ public final class InstantiatingGrpcChannelProvider implements TransportChannelP */ @InternalApi public enum HardBoundTokenTypes { - // Use ALTS bound tokens when using DirectPath + // If DirectPath is used to create the channel, use hard ALTS-bound tokens for requests sent on + // that channel. ALTS, - // Use MTLS bound tokens when using S2A + // If MTLS via S2A is used to create the channel, use hard MTLS-bound tokens for requests sent + // on that channel. MTLS_S2A } @@ -721,20 +723,9 @@ public Builder setEndpoint(String endpoint) { /* * Sets the allowed hard bound token types for this TransportChannelProvider. * - *

This is optional; if it is not provided, bearer tokens will be used. - * - *

Examples: - * - *

allowedValues is {HardBoundTokenTypes.ALTS}: If DirectPath is used to create the channel, - * use hard ALTS-bound tokens for requests sent on that channel. - * - *

allowedValues is {HardBoundTokenTypes.MTLS_S2A}: If MTLS via S2A is used to create the - * channel, use hard MTLS-bound tokens for requests sent on that channel. - * - *

allowedValues is {HardBoundTokenTypes.ALTS, HardBoundTokenTypes.MTLS_S2A}: if DirectPath - * is used to create the channel, use hard ALTS-bound tokens for requests sent on that channel. - * If MTLS via S2A is used to create the channel, use hard MTLS-bound tokens for requests sent - * on that channel. + *

The list of + * {@link HardBoundTokenTypes} indicates for which methods of connecting to Google APIs hard bound tokens should + * be used. This is optional; if it is not provided, bearer tokens will be used. */ @InternalApi public Builder setAllowHardBoundTokenTypes(List allowedValues) {