# Interface ServiceAccountOrBuilder (3.88.0)

3.88.0 (latest) 3.86.0 3.83.0 3.82.0 3.80.0 3.78.0 3.77.0 3.76.0 3.75.0 3.73.0 3.71.0 3.70.0 3.69.0 3.68.0 3.67.0 3.65.0 3.63.0 3.62.0 3.59.0 3.58.0 3.57.0 3.55.0 3.54.0 3.53.0 3.52.0 3.51.0 3.50.0 3.49.0 3.48.0 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 interface ServiceAccountOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getDescription()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The description. |

### getDescriptionBytes()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for description. |

### getDisabled()

    public abstract boolean getDisabled()

Output only. Whether the service account is disabled.

`bool disabled = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The disabled. |

### getDisplayName()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The displayName. |

### getDisplayNameBytes()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for displayName. |

### getEmail()

    public abstract String getEmail()

Output only. The email address of the service account.

`string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The email. |

### getEmailBytes()

    public abstract ByteString getEmailBytes()

Output only. The email address of the service account.

`string email = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for email. |

### getEtag() (deprecated)

    public abstract ByteString getEtag()

**Deprecated.** *google.iam.admin.v1.ServiceAccount.etag is deprecated. See
google/iam/admin/v1/iam.proto;l=538*

Deprecated. Do not use.

`bytes etag = 7 [deprecated = true];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The etag. |

### getName()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getOauth2ClientId()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The oauth2ClientId. |

### getOauth2ClientIdBytes()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for oauth2ClientId. |

### getProjectId()

    public abstract String getProjectId()

Output only. The ID of the project that owns the service account.

`string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The projectId. |

### getProjectIdBytes()

    public abstract ByteString getProjectIdBytes()

Output only. The ID of the project that owns the service account.

`string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for projectId. |

### getUniqueId()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The uniqueId. |

### getUniqueIdBytes()

    public abstract 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];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for uniqueId. |