Class UserCredentials.Builder (1.54.0)

public static class UserCredentials.Builder extends GoogleCredentials.Builder

Inheritance

java.lang.Object > OAuth2Credentials.Builder > GoogleCredentials.Builder > UserCredentials.Builder

Constructors

Builder()

protected Builder()

Builder(UserCredentials credentials)

protected Builder(UserCredentials credentials)
Parameter
Name Description
credentials UserCredentials

Methods

build()

public UserCredentials build()
Returns
Type Description
UserCredentials
Overrides

getClientId()

public @Nullable String getClientId()
Returns
Type Description
@org.jspecify.annotations.Nullable java.lang.String

getClientSecret()

public @Nullable String getClientSecret()
Returns
Type Description
@org.jspecify.annotations.Nullable java.lang.String

getHttpTransportFactory()

public @Nullable HttpTransportFactory getHttpTransportFactory()
Returns
Type Description
@org.jspecify.annotations.Nullable com.google.auth.http.HttpTransportFactory

getRefreshToken()

public @Nullable String getRefreshToken()
Returns
Type Description
@org.jspecify.annotations.Nullable java.lang.String

getTokenServerUri()

public @Nullable URI getTokenServerUri()
Returns
Type Description
@org.jspecify.annotations.Nullable java.net.URI

setAccessToken(@Nullable AccessToken token)

public UserCredentials.Builder setAccessToken(@Nullable AccessToken token)
Parameter
Name Description
token @org.jspecify.annotations.Nullable com.google.auth.oauth2.AccessToken
Returns
Type Description
UserCredentials.Builder
Overrides

setClientId(String clientId)

public UserCredentials.Builder setClientId(String clientId)
Parameter
Name Description
clientId String
Returns
Type Description
UserCredentials.Builder

setClientSecret(String clientSecret)

public UserCredentials.Builder setClientSecret(String clientSecret)
Parameter
Name Description
clientSecret String
Returns
Type Description
UserCredentials.Builder

setExpirationMargin(Duration expirationMargin)

public UserCredentials.Builder setExpirationMargin(Duration expirationMargin)
Parameter
Name Description
expirationMargin Duration
Returns
Type Description
UserCredentials.Builder
Overrides

setHttpTransportFactory(HttpTransportFactory transportFactory)

public UserCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory)
Parameter
Name Description
transportFactory HttpTransportFactory
Returns
Type Description
UserCredentials.Builder

setQuotaProjectId(@Nullable String quotaProjectId)

public UserCredentials.Builder setQuotaProjectId(@Nullable String quotaProjectId)
Parameter
Name Description
quotaProjectId @org.jspecify.annotations.Nullable java.lang.String
Returns
Type Description
UserCredentials.Builder
Overrides

setRefreshMargin(Duration refreshMargin)

public UserCredentials.Builder setRefreshMargin(Duration refreshMargin)
Parameter
Name Description
refreshMargin Duration
Returns
Type Description
UserCredentials.Builder
Overrides

setRefreshToken(String refreshToken)

public UserCredentials.Builder setRefreshToken(String refreshToken)
Parameter
Name Description
refreshToken String
Returns
Type Description
UserCredentials.Builder

setTokenServerUri(@Nullable URI tokenServerUri)

public UserCredentials.Builder setTokenServerUri(@Nullable URI tokenServerUri)
Parameter
Name Description
tokenServerUri @org.jspecify.annotations.Nullable java.net.URI
Returns
Type Description
UserCredentials.Builder