# Google Cloud Tpu V2 Client - Class ServiceAccount (2.3.0)

2.3.0 (latest) 2.2.2 2.1.2 2.0.0 1.4.7 1.3.2 1.2.0 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Tpu V2 Client class ServiceAccount.

A service account.

Generated from protobuf message `google.cloud.tpu.v2.ServiceAccount`

## Namespace

Google \\ Cloud \\ Tpu \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ email` | `string` Email address of the service account. If empty, default Compute service account will be used. |
| `↳ scope` | `string[]` The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed. |

### getEmail

Email address of the service account. If empty, default Compute service
account will be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setEmail

Email address of the service account. If empty, default Compute service
account will be used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getScope

The list of scopes to be made available for this service account. If empty,
access to all Cloud APIs will be allowed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setScope

The list of scopes to be made available for this service account. If empty,
access to all Cloud APIs will be allowed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |