Class ServiceAccount.Builder (0.39.0)

publicstaticfinalclass ServiceAccount.BuilderextendsGeneratedMessageV3.Builder<ServiceAccount.Builder>implementsServiceAccountOrBuilder

A service account.

Protobuf type google.cloud.backupdr.v1.ServiceAccount

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllScopes(Iterable<String> values)

publicServiceAccount.BuilderaddAllScopes(Iterable<String>values)

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The scopes to add.

Returns
Type Description
ServiceAccount.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicServiceAccount.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ServiceAccount.Builder
Overrides

addScopes(String value)

publicServiceAccount.BuilderaddScopes(Stringvalue)

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The scopes to add.

Returns
Type Description
ServiceAccount.Builder

This builder for chaining.

addScopesBytes(ByteString value)

publicServiceAccount.BuilderaddScopesBytes(ByteStringvalue)

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the scopes to add.

Returns
Type Description
ServiceAccount.Builder

This builder for chaining.

build()

publicServiceAccountbuild()
Returns
Type Description
ServiceAccount

buildPartial()

publicServiceAccountbuildPartial()
Returns
Type Description
ServiceAccount

clear()

publicServiceAccount.Builderclear()
Returns
Type Description
ServiceAccount.Builder
Overrides

clearEmail()

publicServiceAccount.BuilderclearEmail()

Optional. Email address of the service account.

optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceAccount.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicServiceAccount.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ServiceAccount.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicServiceAccount.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ServiceAccount.Builder
Overrides

clearScopes()

publicServiceAccount.BuilderclearScopes()

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceAccount.Builder

This builder for chaining.

clone()

publicServiceAccount.Builderclone()
Returns
Type Description
ServiceAccount.Builder
Overrides

getDefaultInstanceForType()

publicServiceAccountgetDefaultInstanceForType()
Returns
Type Description
ServiceAccount

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEmail()

publicStringgetEmail()

Optional. Email address of the service account.

optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The email.

getEmailBytes()

publicByteStringgetEmailBytes()

Optional. Email address of the service account.

optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for email.

getScopes(int index)

publicStringgetScopes(intindex)

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The scopes at the given index.

getScopesBytes(int index)

publicByteStringgetScopesBytes(intindex)

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the scopes at the given index.

getScopesCount()

publicintgetScopesCount()

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of scopes.

getScopesList()

publicProtocolStringListgetScopesList()

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the scopes.

hasEmail()

publicbooleanhasEmail()

Optional. Email address of the service account.

optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the email field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ServiceAccount other)

publicServiceAccount.BuildermergeFrom(ServiceAccountother)
Parameter
Name Description
other ServiceAccount
Returns
Type Description
ServiceAccount.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicServiceAccount.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceAccount.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicServiceAccount.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
ServiceAccount.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalServiceAccount.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ServiceAccount.Builder
Overrides

setEmail(String value)

publicServiceAccount.BuildersetEmail(Stringvalue)

Optional. Email address of the service account.

optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The email to set.

Returns
Type Description
ServiceAccount.Builder

This builder for chaining.

setEmailBytes(ByteString value)

publicServiceAccount.BuildersetEmailBytes(ByteStringvalue)

Optional. Email address of the service account.

optional string email = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for email to set.

Returns
Type Description
ServiceAccount.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicServiceAccount.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ServiceAccount.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicServiceAccount.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ServiceAccount.Builder
Overrides

setScopes(int index, String value)

publicServiceAccount.BuildersetScopes(intindex,Stringvalue)

Optional. The list of scopes to be made available for this service account.

repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The scopes to set.

Returns
Type Description
ServiceAccount.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalServiceAccount.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ServiceAccount.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年11月19日 UTC.