Package com.google.iam.admin.v1
Class ServiceAccount.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ServiceAccount.Builder>
com.google.iam.admin.v1.ServiceAccount.Builder
- All Implemented Interfaces:
ServiceAccountOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ServiceAccount
public static final class ServiceAccount.Builder
extends com.google.protobuf.GeneratedMessage.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](https://cloud.google.com/iam/help/service-accounts/overview). 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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.Output only.Optional.Output only.Deprecated.google.iam.admin.v1.ServiceAccount.etag is deprecated.The resource name of the service account.Output only.Output only.Output only.Optional.com.google.protobuf.ByteStringOptional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanOutput only.Optional.com.google.protobuf.ByteStringOptional.getEmail()Output only.com.google.protobuf.ByteStringOutput only.com.google.protobuf.ByteStringgetEtag()Deprecated.google.iam.admin.v1.ServiceAccount.etag is deprecated.getName()The resource name of the service account.com.google.protobuf.ByteStringThe resource name of the service account.Output only.com.google.protobuf.ByteStringOutput only.Output only.com.google.protobuf.ByteStringOutput only.Output only.com.google.protobuf.ByteStringOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(ServiceAccount other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setDescription(String value) Optional.setDescriptionBytes(com.google.protobuf.ByteString value) Optional.setDisabled(boolean value) Output only.setDisplayName(String value) Optional.setDisplayNameBytes(com.google.protobuf.ByteString value) Optional.Output only.setEmailBytes(com.google.protobuf.ByteString value) Output only.setEtag(com.google.protobuf.ByteString value) Deprecated.google.iam.admin.v1.ServiceAccount.etag is deprecated.The resource name of the service account.setNameBytes(com.google.protobuf.ByteString value) The resource name of the service account.setOauth2ClientId(String value) Output only.setOauth2ClientIdBytes(com.google.protobuf.ByteString value) Output only.setProjectId(String value) Output only.setProjectIdBytes(com.google.protobuf.ByteString value) Output only.setUniqueId(String value) Output only.setUniqueIdBytes(com.google.protobuf.ByteString value) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ServiceAccount.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<ServiceAccount.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<ServiceAccount.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ServiceAccount.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ServiceAccount.Builder>
-
mergeFrom
public ServiceAccount.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ServiceAccount.Builder>- Throws:
IOException
-
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 account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.string name = 1;- Specified by:
getNamein interfaceServiceAccountOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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 account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.string name = 1;- Specified by:
getNameBytesin interfaceServiceAccountOrBuilder- Returns:
- The bytes for name.
-
setName
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 account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
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 account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
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 account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getProjectId
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getProjectIdin interfaceServiceAccountOrBuilder- Returns:
- The projectId.
-
getProjectIdBytes
public com.google.protobuf.ByteString getProjectIdBytes()Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getProjectIdBytesin interfaceServiceAccountOrBuilder- Returns:
- The bytes for projectId.
-
setProjectId
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The projectId to set.- Returns:
- This builder for chaining.
-
clearProjectId
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setProjectIdBytes
Output only. The ID of the project that owns the service account.
string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for projectId to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
getUniqueIdin interfaceServiceAccountOrBuilder- Returns:
- The uniqueId.
-
getUniqueIdBytes
public com.google.protobuf.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];- Specified by:
getUniqueIdBytesin interfaceServiceAccountOrBuilder- Returns:
- The bytes for uniqueId.
-
setUniqueId
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];- Parameters:
value- The uniqueId to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
setUniqueIdBytes
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];- Parameters:
value- The bytes for uniqueId to set.- Returns:
- This builder for chaining.
-
getEmail
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getEmailin interfaceServiceAccountOrBuilder- Returns:
- The email.
-
getEmailBytes
public com.google.protobuf.ByteString getEmailBytes()Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getEmailBytesin interfaceServiceAccountOrBuilder- Returns:
- The bytes for email.
-
setEmail
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The email to set.- Returns:
- This builder for chaining.
-
clearEmail
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setEmailBytes
Output only. The email address of the service account.
string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for email to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
getDisplayNamein interfaceServiceAccountOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.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];- Specified by:
getDisplayNameBytesin interfaceServiceAccountOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
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];- Parameters:
value- The displayName to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
setDisplayNameBytes
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];- Parameters:
value- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
getEtag
Deprecated.google.iam.admin.v1.ServiceAccount.etag is deprecated. See google/iam/admin/v1/iam.proto;l=538Deprecated. Do not use.
bytes etag = 7 [deprecated = true];- Specified by:
getEtagin interfaceServiceAccountOrBuilder- Returns:
- The etag.
-
setEtag
Deprecated.google.iam.admin.v1.ServiceAccount.etag is deprecated. See google/iam/admin/v1/iam.proto;l=538Deprecated. Do not use.
bytes etag = 7 [deprecated = true];- Parameters:
value- The etag to set.- Returns:
- This builder for chaining.
-
clearEtag
Deprecated.google.iam.admin.v1.ServiceAccount.etag is deprecated. See google/iam/admin/v1/iam.proto;l=538Deprecated. Do not use.
bytes etag = 7 [deprecated = true];- Returns:
- This builder for chaining.
-
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];- Specified by:
getDescriptionin interfaceServiceAccountOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.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];- Specified by:
getDescriptionBytesin interfaceServiceAccountOrBuilder- Returns:
- The bytes for description.
-
setDescription
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];- Parameters:
value- The description to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
setDescriptionBytes
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];- Parameters:
value- The bytes for description to set.- Returns:
- This builder for chaining.
-
getOauth2ClientId
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getOauth2ClientIdin interfaceServiceAccountOrBuilder- Returns:
- The oauth2ClientId.
-
getOauth2ClientIdBytes
public com.google.protobuf.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];- Specified by:
getOauth2ClientIdBytesin interfaceServiceAccountOrBuilder- Returns:
- The bytes for oauth2ClientId.
-
setOauth2ClientId
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The oauth2ClientId to set.- Returns:
- This builder for chaining.
-
clearOauth2ClientId
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setOauth2ClientIdBytes
Output only. The OAuth 2.0 client ID for the service account.
string oauth2_client_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for oauth2ClientId to set.- Returns:
- This builder for chaining.
-
getDisabled
public boolean getDisabled()Output only. Whether the service account is disabled.
bool disabled = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getDisabledin interfaceServiceAccountOrBuilder- Returns:
- The disabled.
-
setDisabled
Output only. Whether the service account is disabled.
bool disabled = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The disabled to set.- Returns:
- This builder for chaining.
-
clearDisabled
Output only. Whether the service account is disabled.
bool disabled = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-