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 class
ServiceAccount.Builder
An 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 int
DESCRIPTION_FIELD_NUMBER
static int
DISABLED_FIELD_NUMBER
static int
DISPLAY_NAME_FIELD_NUMBER
static int
EMAIL_FIELD_NUMBER
static int
ETAG_FIELD_NUMBER
static int
NAME_FIELD_NUMBER
static int
OAUTH2_CLIENT_ID_FIELD_NUMBER
static int
PROJECT_ID_FIELD_NUMBER
static int
UNIQUE_ID_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
static ServiceAccount
getDefaultInstance()
ServiceAccount
getDefaultInstanceForType()
String
getDescription()
Optional.com.google.protobuf.ByteString
getDescriptionBytes()
Optional.static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
boolean
getDisabled()
Output only.String
getDisplayName()
Optional.com.google.protobuf.ByteString
getDisplayNameBytes()
Optional.String
getEmail()
Output only.com.google.protobuf.ByteString
getEmailBytes()
Output only.com.google.protobuf.ByteString
getEtag()
Deprecated.google.iam.admin.v1.ServiceAccount.etag is deprecated.String
getName()
The resource name of the service account.com.google.protobuf.ByteString
getNameBytes()
The resource name of the service account.String
getOauth2ClientId()
Output only.com.google.protobuf.ByteString
getOauth2ClientIdBytes()
Output only.com.google.protobuf.Parser<ServiceAccount>
getParserForType()
String
getProjectId()
Output only.com.google.protobuf.ByteString
getProjectIdBytes()
Output only.int
getSerializedSize()
String
getUniqueId()
Output only.com.google.protobuf.ByteString
getUniqueIdBytes()
Output only.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static ServiceAccount.Builder
newBuilder()
static ServiceAccount.Builder
newBuilder(ServiceAccount prototype)
ServiceAccount.Builder
newBuilderForType()
protected ServiceAccount.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static ServiceAccount
parseDelimitedFrom(InputStream input)
static ServiceAccount
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ServiceAccount
parseFrom(byte[] data)
static ServiceAccount
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ServiceAccount
parseFrom(com.google.protobuf.ByteString data)
static ServiceAccount
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ServiceAccount
parseFrom(com.google.protobuf.CodedInputStream input)
static ServiceAccount
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ServiceAccount
parseFrom(InputStream input)
static ServiceAccount
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ServiceAccount
parseFrom(ByteBuffer data)
static ServiceAccount
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<ServiceAccount>
parser()
ServiceAccount.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in 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:
getName
in 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:
getNameBytes
in 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:
getProjectId
in 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:
getProjectIdBytes
in 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:
getUniqueId
in 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:
getUniqueIdBytes
in 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:
getEmail
in 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:
getEmailBytes
in 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:
getDisplayName
in 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:
getDisplayNameBytes
in 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:
getEtag
in 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:
getDescription
in 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:
getDescriptionBytes
in 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:
getOauth2ClientId
in 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:
getOauth2ClientIdBytes
in 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:
getDisabled
in interfaceServiceAccountOrBuilder
- Returns:
- The disabled.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ServiceAccount.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public ServiceAccount getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-