Class ImpersonatedCredentials.Builder (1.20.0)

publicstaticclass ImpersonatedCredentials.BuilderextendsGoogleCredentials.Builder

Inheritance

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

Constructors

Builder()

protectedBuilder()

Builder(GoogleCredentials sourceCredentials, String targetPrincipal)

protectedBuilder(GoogleCredentialssourceCredentials,StringtargetPrincipal)
Parameters
Name Description
sourceCredentials GoogleCredentials
targetPrincipal String

Methods

build()

publicImpersonatedCredentialsbuild()
Returns
Type Description
ImpersonatedCredentials
Overrides

getCalendar()

publicCalendargetCalendar()
Returns
Type Description
Calendar

getDelegates()

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

getHttpTransportFactory()

publicHttpTransportFactorygetHttpTransportFactory()
Returns
Type Description
HttpTransportFactory

getLifetime()

publicintgetLifetime()
Returns
Type Description
int

getScopes()

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

getSourceCredentials()

publicGoogleCredentialsgetSourceCredentials()
Returns
Type Description
GoogleCredentials

getTargetPrincipal()

publicStringgetTargetPrincipal()
Returns
Type Description
String

setCalendar(Calendar calendar)

publicImpersonatedCredentials.BuildersetCalendar(Calendarcalendar)
Parameter
Name Description
calendar Calendar
Returns
Type Description
ImpersonatedCredentials.Builder

setDelegates(List<String> delegates)

publicImpersonatedCredentials.BuildersetDelegates(List<String>delegates)
Parameter
Name Description
delegates List<String>
Returns
Type Description
ImpersonatedCredentials.Builder

setHttpTransportFactory(HttpTransportFactory transportFactory)

publicImpersonatedCredentials.BuildersetHttpTransportFactory(HttpTransportFactorytransportFactory)
Parameter
Name Description
transportFactory HttpTransportFactory
Returns
Type Description
ImpersonatedCredentials.Builder

setIamEndpointOverride(String iamEndpointOverride)

publicImpersonatedCredentials.BuildersetIamEndpointOverride(StringiamEndpointOverride)
Parameter
Name Description
iamEndpointOverride String
Returns
Type Description
ImpersonatedCredentials.Builder

setLifetime(int lifetime)

publicImpersonatedCredentials.BuildersetLifetime(intlifetime)
Parameter
Name Description
lifetime int
Returns
Type Description
ImpersonatedCredentials.Builder

setQuotaProjectId(String quotaProjectId)

publicImpersonatedCredentials.BuildersetQuotaProjectId(StringquotaProjectId)
Parameter
Name Description
quotaProjectId String
Returns
Type Description
ImpersonatedCredentials.Builder
Overrides

setScopes(List<String> scopes)

publicImpersonatedCredentials.BuildersetScopes(List<String>scopes)
Parameter
Name Description
scopes List<String>
Returns
Type Description
ImpersonatedCredentials.Builder

setSourceCredentials(GoogleCredentials sourceCredentials)

publicImpersonatedCredentials.BuildersetSourceCredentials(GoogleCredentialssourceCredentials)
Parameter
Name Description
sourceCredentials GoogleCredentials
Returns
Type Description
ImpersonatedCredentials.Builder

setTargetPrincipal(String targetPrincipal)

publicImpersonatedCredentials.BuildersetTargetPrincipal(StringtargetPrincipal)
Parameter
Name Description
targetPrincipal String
Returns
Type Description
ImpersonatedCredentials.Builder

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.