Package com.google.iam.admin.v1
Class ServiceAccount
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.iam.admin.v1.ServiceAccount
- All Implemented Interfaces:
ServiceAccountOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class ServiceAccount
extends com.google.protobuf.GeneratedMessage
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- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn IAM service account.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ServiceAccountOptional.com.google.protobuf.ByteStringOptional.static final com.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.com.google.protobuf.Parser<ServiceAccount>Output only.com.google.protobuf.ByteStringOutput only.intOutput only.com.google.protobuf.ByteStringOutput only.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic ServiceAccount.Builderstatic ServiceAccount.BuildernewBuilder(ServiceAccount prototype) protected ServiceAccount.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static ServiceAccountparseDelimitedFrom(InputStream input) static ServiceAccountparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountparseFrom(byte[] data) static ServiceAccountparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountparseFrom(com.google.protobuf.ByteString data) static ServiceAccountparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountparseFrom(com.google.protobuf.CodedInputStream input) static ServiceAccountparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountparseFrom(InputStream input) static ServiceAccountparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ServiceAccountparseFrom(ByteBuffer data) static ServiceAccountparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<ServiceAccount>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
PROJECT_ID_FIELD_NUMBER
public static final int PROJECT_ID_FIELD_NUMBER- See Also:
-
UNIQUE_ID_FIELD_NUMBER
public static final int UNIQUE_ID_FIELD_NUMBER- See Also:
-
EMAIL_FIELD_NUMBER
public static final int EMAIL_FIELD_NUMBER- See Also:
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER- See Also:
-
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER- See Also:
-
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER- See Also:
-
OAUTH2_CLIENT_ID_FIELD_NUMBER
public static final int OAUTH2_CLIENT_ID_FIELD_NUMBER- See Also:
-
DISABLED_FIELD_NUMBER
public static final int DISABLED_FIELD_NUMBER- See Also:
-
-
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
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static ServiceAccount parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccount parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccount parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccount parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccount parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccount parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ServiceAccount parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static ServiceAccount parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static ServiceAccount parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static ServiceAccount parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ServiceAccount.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-