Class ComputeEngineCredentials.Builder (1.36.0)

publicstaticclass ComputeEngineCredentials.BuilderextendsGoogleCredentials.Builder

Inheritance

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

Constructors

Builder()

protectedBuilder()

Builder(ComputeEngineCredentials credentials)

protectedBuilder(ComputeEngineCredentialscredentials)
Parameter
Name Description
credentials ComputeEngineCredentials

Methods

build()

publicComputeEngineCredentialsbuild()
Returns
Type Description
ComputeEngineCredentials
Overrides

getBindingEnforcement()

publicComputeEngineCredentials.BindingEnforcementgetBindingEnforcement()

Get the BindingEnforcement type.

Returns
Type Description
ComputeEngineCredentials.BindingEnforcement

the token binding enforcement policy.

getDefaultScopes()

publicCollection<String>getDefaultScopes()
Returns
Type Description
Collection<String>

getGoogleAuthTransport()

publicComputeEngineCredentials.GoogleAuthTransportgetGoogleAuthTransport()

Get the GoogleAuthTransport type.

Returns
Type Description
ComputeEngineCredentials.GoogleAuthTransport

the transport type over which to authenticate to Google APIs

getHttpTransportFactory()

publicHttpTransportFactorygetHttpTransportFactory()
Returns
Type Description
HttpTransportFactory

getScopes()

publicCollection<String>getScopes()
Returns
Type Description
Collection<String>

setBindingEnforcement(ComputeEngineCredentials.BindingEnforcement bindingEnforcement)

publicComputeEngineCredentials.BuildersetBindingEnforcement(ComputeEngineCredentials.BindingEnforcementbindingEnforcement)

Set the BindingEnforcement type.

Parameter
Name Description
bindingEnforcement ComputeEngineCredentials.BindingEnforcement

the token binding enforcement policy.

Returns
Type Description
ComputeEngineCredentials.Builder

setDefaultScopes(Collection<String> defaultScopes)

publicComputeEngineCredentials.BuildersetDefaultScopes(Collection<String>defaultScopes)
Parameter
Name Description
defaultScopes Collection<String>
Returns
Type Description
ComputeEngineCredentials.Builder

setGoogleAuthTransport(ComputeEngineCredentials.GoogleAuthTransport transport)

publicComputeEngineCredentials.BuildersetGoogleAuthTransport(ComputeEngineCredentials.GoogleAuthTransporttransport)

Set the GoogleAuthTransport type.

Parameter
Name Description
transport ComputeEngineCredentials.GoogleAuthTransport

the transport type over which to authenticate to Google APIs

Returns
Type Description
ComputeEngineCredentials.Builder

setHttpTransportFactory(HttpTransportFactory transportFactory)

publicComputeEngineCredentials.BuildersetHttpTransportFactory(HttpTransportFactorytransportFactory)
Parameter
Name Description
transportFactory HttpTransportFactory
Returns
Type Description
ComputeEngineCredentials.Builder

setQuotaProjectId(String quotaProjectId)

publicComputeEngineCredentials.BuildersetQuotaProjectId(StringquotaProjectId)
Parameter
Name Description
quotaProjectId String
Returns
Type Description
ComputeEngineCredentials.Builder
Overrides

setScopes(Collection<String> scopes)

publicComputeEngineCredentials.BuildersetScopes(Collection<String>scopes)
Parameter
Name Description
scopes Collection<String>
Returns
Type Description
ComputeEngineCredentials.Builder

setUniverseDomain(String universeDomain)

publicComputeEngineCredentials.BuildersetUniverseDomain(StringuniverseDomain)
Parameter
Name Description
universeDomain String
Returns
Type Description
ComputeEngineCredentials.Builder
Overrides

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.