Skip to content

Commit

Permalink
improve javadoc for setter.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta19 committed Jan 21, 2025
1 parent 591ef68 commit 90a32af
Showing 1 changed file with 7 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -721,20 +723,9 @@ public Builder setEndpoint(String endpoint) {
/*
* Sets the allowed hard bound token types for this TransportChannelProvider.
*
* <p>This is optional; if it is not provided, bearer tokens will be used.
*
* <p>Examples:
*
* <p>allowedValues is {HardBoundTokenTypes.ALTS}: If DirectPath is used to create the channel,
* use hard ALTS-bound tokens for requests sent on that channel.
*
* <p>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.
*
* <p>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.
* <p>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<HardBoundTokenTypes> allowedValues) {
Expand Down

0 comments on commit 90a32af

Please sign in to comment.