Package com.google.iam.admin.v1
Class ServiceAccount
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- 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
public final class ServiceAccount extends com.google.protobuf.GeneratedMessageV3 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 typegoogle.iam.admin.v1.ServiceAccount- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServiceAccount.BuilderAn IAM service account.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intDESCRIPTION_FIELD_NUMBERstatic intDISABLED_FIELD_NUMBERstatic intDISPLAY_NAME_FIELD_NUMBERstatic intEMAIL_FIELD_NUMBERstatic intETAG_FIELD_NUMBERstatic intNAME_FIELD_NUMBERstatic intOAUTH2_CLIENT_ID_FIELD_NUMBERstatic intPROJECT_ID_FIELD_NUMBERstatic intUNIQUE_ID_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)static ServiceAccountgetDefaultInstance()ServiceAccountgetDefaultInstanceForType()StringgetDescription()Optional.com.google.protobuf.ByteStringgetDescriptionBytes()Optional.static com.google.protobuf.Descriptors.DescriptorgetDescriptor()booleangetDisabled()Output only.StringgetDisplayName()Optional.com.google.protobuf.ByteStringgetDisplayNameBytes()Optional.StringgetEmail()Output only.com.google.protobuf.ByteStringgetEmailBytes()Output only.com.google.protobuf.ByteStringgetEtag()Deprecated.google.iam.admin.v1.ServiceAccount.etag is deprecated.StringgetName()The resource name of the service account.com.google.protobuf.ByteStringgetNameBytes()The resource name of the service account.StringgetOauth2ClientId()Output only.com.google.protobuf.ByteStringgetOauth2ClientIdBytes()Output only.com.google.protobuf.Parser<ServiceAccount>getParserForType()StringgetProjectId()Output only.com.google.protobuf.ByteStringgetProjectIdBytes()Output only.intgetSerializedSize()StringgetUniqueId()Output only.com.google.protobuf.ByteStringgetUniqueIdBytes()Output only.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static ServiceAccount.BuildernewBuilder()static ServiceAccount.BuildernewBuilder(ServiceAccount prototype)ServiceAccount.BuildernewBuilderForType()protected ServiceAccount.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)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()ServiceAccount.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PROJECT_ID_FIELD_NUMBER
public static final int PROJECT_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UNIQUE_ID_FIELD_NUMBER
public static final int UNIQUE_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EMAIL_FIELD_NUMBER
public static final int EMAIL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
OAUTH2_CLIENT_ID_FIELD_NUMBER
public static final int OAUTH2_CLIENT_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DISABLED_FIELD_NUMBER
public static final int DISABLED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
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 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
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];- 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
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];- 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
public String 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
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];- 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 public com.google.protobuf.ByteString 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
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];- 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
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];- 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.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- 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
public static ServiceAccount parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ServiceAccount parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ServiceAccount parseDelimitedFrom(InputStream input) throws IOException
- 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
public ServiceAccount.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static ServiceAccount.Builder newBuilder()
-
newBuilder
public static ServiceAccount.Builder newBuilder(ServiceAccount prototype)
-
toBuilder
public ServiceAccount.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ServiceAccount.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static ServiceAccount getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<ServiceAccount> parser()
-
getParserForType
public com.google.protobuf.Parser<ServiceAccount> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public ServiceAccount getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-