- 3.48.0 (latest)
- 3.47.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.39.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.27.0
- 3.26.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.0.0
- 1.2.5
- 1.1.8
- 0.2.0
public static final class ServiceAccount.Builder extends GeneratedMessageV3.Builder<ServiceAccount.Builder> implements ServiceAccountOrBuilder
An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the overview of service accounts. When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account.
Protobuf type google.iam.admin.v1.ServiceAccount
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > ServiceAccount.BuilderImplements
ServiceAccountOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ServiceAccount.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ServiceAccount.Builder |
build()
public ServiceAccount build()
Type | Description |
ServiceAccount |
buildPartial()
public ServiceAccount buildPartial()
Type | Description |
ServiceAccount |
clear()
public ServiceAccount.Builder clear()
Type | Description |
ServiceAccount.Builder |
clearDescription()
public ServiceAccount.Builder clearDescription()
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
string description = 8 [(.google.api.field_behavior) = OPTIONAL];
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clearDisabled()
public ServiceAccount.Builder clearDisabled()
Output only. Whether the service account is disabled.
bool disabled = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clearDisplayName()
public ServiceAccount.Builder clearDisplayName()
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
string display_name = 6 [(.google.api.field_behavior) = OPTIONAL];
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clearEmail()
public ServiceAccount.Builder clearEmail()
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clearEtag() (deprecated)
public ServiceAccount.Builder clearEtag()
Deprecated. google.iam.admin.v1.ServiceAccount.etag is deprecated. See google/iam/admin/v1/iam.proto;l=504
Deprecated. Do not use.
bytes etag = 7 [deprecated = true];
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public ServiceAccount.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
ServiceAccount.Builder |
clearName()
public ServiceAccount.Builder clearName()
The resource name of the service account. Use one of the following formats:
projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}
projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}
As an alternative, you can use the-
wildcard character instead of the project ID:projects/-/serviceAccounts/{EMAIL_ADDRESS}
projects/-/serviceAccounts/{UNIQUE_ID}
When possible, avoid using the-
wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service accountprojects/-/serviceAccounts/fake@example.com
, which does not exist, the response contains an HTTP403 Forbidden
error instead of a404 Not Found
error.
string name = 1;
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clearOauth2ClientId()
public ServiceAccount.Builder clearOauth2ClientId()
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public ServiceAccount.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
ServiceAccount.Builder |
clearProjectId()
public ServiceAccount.Builder clearProjectId()
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clearUniqueId()
public ServiceAccount.Builder clearUniqueId()
Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
string unique_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
clone()
public ServiceAccount.Builder clone()
Type | Description |
ServiceAccount.Builder |
getDefaultInstanceForType()
public ServiceAccount getDefaultInstanceForType()
Type | Description |
ServiceAccount |
getDescription()
public String getDescription()
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
string description = 8 [(.google.api.field_behavior) = OPTIONAL];
Type | Description |
String | The description. |
getDescriptionBytes()
public ByteString getDescriptionBytes()
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
string description = 8 [(.google.api.field_behavior) = OPTIONAL];
Type | Description |
ByteString | The bytes for description. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getDisabled()
public boolean getDisabled()
Output only. Whether the service account is disabled.
bool disabled = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
boolean | The disabled. |
getDisplayName()
public String getDisplayName()
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
string display_name = 6 [(.google.api.field_behavior) = OPTIONAL];
Type | Description |
String | The displayName. |
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
string display_name = 6 [(.google.api.field_behavior) = OPTIONAL];
Type | Description |
ByteString | The bytes for displayName. |
getEmail()
public String getEmail()
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
String | The email. |
getEmailBytes()
public ByteString getEmailBytes()
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ByteString | The bytes for email. |
getEtag() (deprecated)
public ByteString getEtag()
Deprecated. google.iam.admin.v1.ServiceAccount.etag is deprecated. See google/iam/admin/v1/iam.proto;l=504
Deprecated. Do not use.
bytes etag = 7 [deprecated = true];
Type | Description |
ByteString | The etag. |
getName()
public String getName()
The resource name of the service account. Use one of the following formats:
projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}
projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}
As an alternative, you can use the-
wildcard character instead of the project ID:projects/-/serviceAccounts/{EMAIL_ADDRESS}
projects/-/serviceAccounts/{UNIQUE_ID}
When possible, avoid using the-
wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service accountprojects/-/serviceAccounts/fake@example.com
, which does not exist, the response contains an HTTP403 Forbidden
error instead of a404 Not Found
error.
string name = 1;
Type | Description |
String | The name. |
getNameBytes()
public ByteString getNameBytes()
The resource name of the service account. Use one of the following formats:
projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}
projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}
As an alternative, you can use the-
wildcard character instead of the project ID:projects/-/serviceAccounts/{EMAIL_ADDRESS}
projects/-/serviceAccounts/{UNIQUE_ID}
When possible, avoid using the-
wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service accountprojects/-/serviceAccounts/fake@example.com
, which does not exist, the response contains an HTTP403 Forbidden
error instead of a404 Not Found
error.
string name = 1;
Type | Description |
ByteString | The bytes for name. |
getOauth2ClientId()
public String getOauth2ClientId()
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
String | The oauth2ClientId. |
getOauth2ClientIdBytes()
public ByteString getOauth2ClientIdBytes()
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ByteString | The bytes for oauth2ClientId. |
getProjectId()
public String getProjectId()
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
String | The projectId. |
getProjectIdBytes()
public ByteString getProjectIdBytes()
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ByteString | The bytes for projectId. |
getUniqueId()
public String getUniqueId()
Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
string unique_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
String | The uniqueId. |
getUniqueIdBytes()
public ByteString getUniqueIdBytes()
Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
string unique_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ByteString | The bytes for uniqueId. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(ServiceAccount other)
public ServiceAccount.Builder mergeFrom(ServiceAccount other)
Name | Description |
other | ServiceAccount |
Type | Description |
ServiceAccount.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ServiceAccount.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ServiceAccount.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public ServiceAccount.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
ServiceAccount.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ServiceAccount.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ServiceAccount.Builder |
setDescription(String value)
public ServiceAccount.Builder setDescription(String value)
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
string description = 8 [(.google.api.field_behavior) = OPTIONAL];
Name | Description |
value | String The description to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setDescriptionBytes(ByteString value)
public ServiceAccount.Builder setDescriptionBytes(ByteString value)
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
string description = 8 [(.google.api.field_behavior) = OPTIONAL];
Name | Description |
value | ByteString The bytes for description to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setDisabled(boolean value)
public ServiceAccount.Builder setDisabled(boolean value)
Output only. Whether the service account is disabled.
bool disabled = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | boolean The disabled to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setDisplayName(String value)
public ServiceAccount.Builder setDisplayName(String value)
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
string display_name = 6 [(.google.api.field_behavior) = OPTIONAL];
Name | Description |
value | String The displayName to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setDisplayNameBytes(ByteString value)
public ServiceAccount.Builder setDisplayNameBytes(ByteString value)
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
string display_name = 6 [(.google.api.field_behavior) = OPTIONAL];
Name | Description |
value | ByteString The bytes for displayName to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setEmail(String value)
public ServiceAccount.Builder setEmail(String value)
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | String The email to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setEmailBytes(ByteString value)
public ServiceAccount.Builder setEmailBytes(ByteString value)
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | ByteString The bytes for email to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setEtag(ByteString value) (deprecated)
public ServiceAccount.Builder setEtag(ByteString value)
Deprecated. google.iam.admin.v1.ServiceAccount.etag is deprecated. See google/iam/admin/v1/iam.proto;l=504
Deprecated. Do not use.
bytes etag = 7 [deprecated = true];
Name | Description |
value | ByteString The etag to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public ServiceAccount.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ServiceAccount.Builder |
setName(String value)
public ServiceAccount.Builder setName(String value)
The resource name of the service account. Use one of the following formats:
projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}
projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}
As an alternative, you can use the-
wildcard character instead of the project ID:projects/-/serviceAccounts/{EMAIL_ADDRESS}
projects/-/serviceAccounts/{UNIQUE_ID}
When possible, avoid using the-
wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service accountprojects/-/serviceAccounts/fake@example.com
, which does not exist, the response contains an HTTP403 Forbidden
error instead of a404 Not Found
error.
string name = 1;
Name | Description |
value | String The name to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public ServiceAccount.Builder setNameBytes(ByteString value)
The resource name of the service account. Use one of the following formats:
projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}
projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}
As an alternative, you can use the-
wildcard character instead of the project ID:projects/-/serviceAccounts/{EMAIL_ADDRESS}
projects/-/serviceAccounts/{UNIQUE_ID}
When possible, avoid using the-
wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service accountprojects/-/serviceAccounts/fake@example.com
, which does not exist, the response contains an HTTP403 Forbidden
error instead of a404 Not Found
error.
string name = 1;
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setOauth2ClientId(String value)
public ServiceAccount.Builder setOauth2ClientId(String value)
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | String The oauth2ClientId to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setOauth2ClientIdBytes(ByteString value)
public ServiceAccount.Builder setOauth2ClientIdBytes(ByteString value)
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | ByteString The bytes for oauth2ClientId to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setProjectId(String value)
public ServiceAccount.Builder setProjectId(String value)
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | String The projectId to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setProjectIdBytes(ByteString value)
public ServiceAccount.Builder setProjectIdBytes(ByteString value)
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | ByteString The bytes for projectId to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ServiceAccount.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
ServiceAccount.Builder |
setUniqueId(String value)
public ServiceAccount.Builder setUniqueId(String value)
Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
string unique_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | String The uniqueId to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setUniqueIdBytes(ByteString value)
public ServiceAccount.Builder setUniqueIdBytes(ByteString value)
Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
string unique_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | ByteString The bytes for uniqueId to set. |
Type | Description |
ServiceAccount.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final ServiceAccount.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ServiceAccount.Builder |