Package com.google.auth.oauth2
Class ImpersonatedCredentials.Builder
java.lang.Object
com.google.auth.oauth2.OAuth2Credentials.Builder
com.google.auth.oauth2.GoogleCredentials.Builder
com.google.auth.oauth2.ImpersonatedCredentials.Builder
- Enclosing class:
ImpersonatedCredentials
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Calendar
private String
private int
private GoogleCredentials
private String
private HttpTransportFactory
Fields inherited from class com.google.auth.oauth2.GoogleCredentials.Builder
quotaProjectId, universeDomain
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Builder()
protected
Builder
(GoogleCredentials sourceCredentials, String targetPrincipal) Deprecated.protected
Builder
(ImpersonatedCredentials credentials) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
int
setCalendar
(Calendar calendar) setDelegates
(List<String> delegates) setHttpTransportFactory
(HttpTransportFactory transportFactory) setIamEndpointOverride
(String iamEndpointOverride) setLifetime
(int lifetime) setQuotaProjectId
(String quotaProjectId) setSourceCredentials
(GoogleCredentials sourceCredentials) setTargetPrincipal
(String targetPrincipal) Methods inherited from class com.google.auth.oauth2.GoogleCredentials.Builder
getQuotaProjectId, getUniverseDomain, setAccessToken, setUniverseDomain
Methods inherited from class com.google.auth.oauth2.OAuth2Credentials.Builder
getAccessToken, getExpirationMargin, getRefreshMargin, setExpirationMargin, setRefreshMargin
-
Field Details
-
sourceCredentials
-
targetPrincipal
-
delegates
-
scopes
-
lifetime
private int lifetime -
transportFactory
-
iamEndpointOverride
-
calendar
-
-
Constructor Details
-
Builder
protected Builder() -
Builder
Deprecated.UseBuilder(ImpersonatedCredentials)
instead. This constructor will be removed in a future release.- Parameters:
sourceCredentials
- The source credentials to use for impersonation.targetPrincipal
- The service account to impersonate.
-
Builder
-
-
Method Details
-
setSourceCredentials
@CanIgnoreReturnValue public ImpersonatedCredentials.Builder setSourceCredentials(GoogleCredentials sourceCredentials) -
getSourceCredentials
-
setTargetPrincipal
@CanIgnoreReturnValue public ImpersonatedCredentials.Builder setTargetPrincipal(String targetPrincipal) -
getTargetPrincipal
-
setDelegates
-
getDelegates
-
setScopes
-
getScopes
-
setLifetime
-
getLifetime
public int getLifetime() -
setHttpTransportFactory
@CanIgnoreReturnValue public ImpersonatedCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory) -
getHttpTransportFactory
-
setQuotaProjectId
@CanIgnoreReturnValue public ImpersonatedCredentials.Builder setQuotaProjectId(String quotaProjectId) - Overrides:
setQuotaProjectId
in classGoogleCredentials.Builder
-
setIamEndpointOverride
@CanIgnoreReturnValue public ImpersonatedCredentials.Builder setIamEndpointOverride(String iamEndpointOverride) -
setCalendar
-
getCalendar
-
build
- Overrides:
build
in classGoogleCredentials.Builder
-
Builder(ImpersonatedCredentials)
instead.