Class ImpersonatedCredentials.Builder (1.30.0)

public static class ImpersonatedCredentials.Builder extends GoogleCredentials.Builder

Inheritance

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

Constructors

Builder()

protected Builder()

Builder(GoogleCredentials sourceCredentials, String targetPrincipal) (deprecated)

protected Builder(GoogleCredentials sourceCredentials, String targetPrincipal)

Deprecated. Use #Builder(ImpersonatedCredentials) instead. This constructor will be removed in a future release.

Parameters
Name Description
sourceCredentials GoogleCredentials

The source credentials to use for impersonation.

targetPrincipal String

The service account to impersonate.

Builder(ImpersonatedCredentials credentials)

protected Builder(ImpersonatedCredentials credentials)
Parameter
Name Description
credentials ImpersonatedCredentials

Methods

build()

public ImpersonatedCredentials build()
Returns
Type Description
ImpersonatedCredentials
Overrides

getCalendar()

public Calendar getCalendar()
Returns
Type Description
Calendar

getDelegates()

public List<String> getDelegates()
Returns
Type Description
List<String>

getHttpTransportFactory()

public HttpTransportFactory getHttpTransportFactory()
Returns
Type Description
HttpTransportFactory

getLifetime()

public int getLifetime()
Returns
Type Description
int

getScopes()

public List<String> getScopes()
Returns
Type Description
List<String>

getSourceCredentials()

public GoogleCredentials getSourceCredentials()
Returns
Type Description
GoogleCredentials

getTargetPrincipal()

public String getTargetPrincipal()
Returns
Type Description
String

setCalendar(Calendar calendar)

public ImpersonatedCredentials.Builder setCalendar(Calendar calendar)
Parameter
Name Description
calendar Calendar
Returns
Type Description
ImpersonatedCredentials.Builder

setDelegates(List<String> delegates)

public ImpersonatedCredentials.Builder setDelegates(List<String> delegates)
Parameter
Name Description
delegates List<String>
Returns
Type Description
ImpersonatedCredentials.Builder

setHttpTransportFactory(HttpTransportFactory transportFactory)

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

setIamEndpointOverride(String iamEndpointOverride)

public ImpersonatedCredentials.Builder setIamEndpointOverride(String iamEndpointOverride)
Parameter
Name Description
iamEndpointOverride String
Returns
Type Description
ImpersonatedCredentials.Builder

setLifetime(int lifetime)

public ImpersonatedCredentials.Builder setLifetime(int lifetime)
Parameter
Name Description
lifetime int
Returns
Type Description
ImpersonatedCredentials.Builder

setQuotaProjectId(String quotaProjectId)

public ImpersonatedCredentials.Builder setQuotaProjectId(String quotaProjectId)
Parameter
Name Description
quotaProjectId String
Returns
Type Description
ImpersonatedCredentials.Builder
Overrides

setScopes(List<String> scopes)

public ImpersonatedCredentials.Builder setScopes(List<String> scopes)
Parameter
Name Description
scopes List<String>
Returns
Type Description
ImpersonatedCredentials.Builder

setSourceCredentials(GoogleCredentials sourceCredentials)

public ImpersonatedCredentials.Builder setSourceCredentials(GoogleCredentials sourceCredentials)
Parameter
Name Description
sourceCredentials GoogleCredentials
Returns
Type Description
ImpersonatedCredentials.Builder

setTargetPrincipal(String targetPrincipal)

public ImpersonatedCredentials.Builder setTargetPrincipal(String targetPrincipal)
Parameter
Name Description
targetPrincipal String
Returns
Type Description
ImpersonatedCredentials.Builder