Class ServiceAccountCredentials.Builder (1.7.0)

Stay organized with collections Save and categorize content based on your preferences.
public static class ServiceAccountCredentials.Builder extends GoogleCredentials.Builder

Inheritance

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

Constructors

Builder()

protected Builder()

Builder(ServiceAccountCredentials credentials)

protected Builder(ServiceAccountCredentials credentials)
Parameter
NameDescription
credentialsServiceAccountCredentials

Methods

build()

public ServiceAccountCredentials build()
Returns
TypeDescription
ServiceAccountCredentials
Overrides

getClientEmail()

public String getClientEmail()
Returns
TypeDescription
String

getClientId()

public String getClientId()
Returns
TypeDescription
String

getDefaultScopes()

public Collection<String> getDefaultScopes()
Returns
TypeDescription
Collection<String>

getHttpTransportFactory()

public HttpTransportFactory getHttpTransportFactory()
Returns
TypeDescription
HttpTransportFactory

getLifetime()

public int getLifetime()
Returns
TypeDescription
int

getPrivateKey()

public PrivateKey getPrivateKey()
Returns
TypeDescription
PrivateKey

getPrivateKeyId()

public String getPrivateKeyId()
Returns
TypeDescription
String

getProjectId()

public String getProjectId()
Returns
TypeDescription
String

getQuotaProjectId()

public String getQuotaProjectId()
Returns
TypeDescription
String

getScopes()

public Collection<String> getScopes()
Returns
TypeDescription
Collection<String>

getServiceAccountUser()

public String getServiceAccountUser()
Returns
TypeDescription
String

getTokenServerUri()

public URI getTokenServerUri()
Returns
TypeDescription
URI

getUseJwtAccessWithScope()

public boolean getUseJwtAccessWithScope()
Returns
TypeDescription
boolean

isDefaultRetriesEnabled()

public boolean isDefaultRetriesEnabled()
Returns
TypeDescription
boolean

setClientEmail(String clientEmail)

public ServiceAccountCredentials.Builder setClientEmail(String clientEmail)
Parameter
NameDescription
clientEmailString
Returns
TypeDescription
ServiceAccountCredentials.Builder

setClientId(String clientId)

public ServiceAccountCredentials.Builder setClientId(String clientId)
Parameter
NameDescription
clientIdString
Returns
TypeDescription
ServiceAccountCredentials.Builder

setDefaultRetriesEnabled(boolean defaultRetriesEnabled)

public ServiceAccountCredentials.Builder setDefaultRetriesEnabled(boolean defaultRetriesEnabled)
Parameter
NameDescription
defaultRetriesEnabledboolean
Returns
TypeDescription
ServiceAccountCredentials.Builder

setHttpTransportFactory(HttpTransportFactory transportFactory)

public ServiceAccountCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory)
Parameter
NameDescription
transportFactoryHttpTransportFactory
Returns
TypeDescription
ServiceAccountCredentials.Builder

setLifetime(int lifetime)

public ServiceAccountCredentials.Builder setLifetime(int lifetime)
Parameter
NameDescription
lifetimeint
Returns
TypeDescription
ServiceAccountCredentials.Builder

setPrivateKey(PrivateKey privateKey)

public ServiceAccountCredentials.Builder setPrivateKey(PrivateKey privateKey)
Parameter
NameDescription
privateKeyPrivateKey
Returns
TypeDescription
ServiceAccountCredentials.Builder

setPrivateKeyId(String privateKeyId)

public ServiceAccountCredentials.Builder setPrivateKeyId(String privateKeyId)
Parameter
NameDescription
privateKeyIdString
Returns
TypeDescription
ServiceAccountCredentials.Builder

setPrivateKeyString(String privateKeyPkcs8)

public ServiceAccountCredentials.Builder setPrivateKeyString(String privateKeyPkcs8)
Parameter
NameDescription
privateKeyPkcs8String
Returns
TypeDescription
ServiceAccountCredentials.Builder
Exceptions
TypeDescription
IOException

setProjectId(String projectId)

public ServiceAccountCredentials.Builder setProjectId(String projectId)
Parameter
NameDescription
projectIdString
Returns
TypeDescription
ServiceAccountCredentials.Builder

setQuotaProjectId(String quotaProjectId)

public ServiceAccountCredentials.Builder setQuotaProjectId(String quotaProjectId)
Parameter
NameDescription
quotaProjectIdString
Returns
TypeDescription
ServiceAccountCredentials.Builder

setScopes(Collection<String> scopes)

public ServiceAccountCredentials.Builder setScopes(Collection<String> scopes)
Parameter
NameDescription
scopesCollection<String>
Returns
TypeDescription
ServiceAccountCredentials.Builder

setScopes(Collection<String> scopes, Collection<String> defaultScopes)

public ServiceAccountCredentials.Builder setScopes(Collection<String> scopes, Collection<String> defaultScopes)
Parameters
NameDescription
scopesCollection<String>
defaultScopesCollection<String>
Returns
TypeDescription
ServiceAccountCredentials.Builder

setServiceAccountUser(String serviceAccountUser)

public ServiceAccountCredentials.Builder setServiceAccountUser(String serviceAccountUser)
Parameter
NameDescription
serviceAccountUserString
Returns
TypeDescription
ServiceAccountCredentials.Builder

setTokenServerUri(URI tokenServerUri)

public ServiceAccountCredentials.Builder setTokenServerUri(URI tokenServerUri)
Parameter
NameDescription
tokenServerUriURI
Returns
TypeDescription
ServiceAccountCredentials.Builder

setUseJwtAccessWithScope(boolean useJwtAccessWithScope)

public ServiceAccountCredentials.Builder setUseJwtAccessWithScope(boolean useJwtAccessWithScope)
Parameter
NameDescription
useJwtAccessWithScopeboolean
Returns
TypeDescription
ServiceAccountCredentials.Builder