# Google Cloud Batch V1 Client - Class Accelerator (1.4.1)

1.4.1 (latest) 1.4.0 1.3.1 1.2.2 1.1.7 1.0.3 0.17.0 0.16.10 0.15.0 0.14.0 0.13.1 0.12.1 0.11.3 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.2 0.4.0 0.3.0 0.2.2 Reference documentation and code samples for the Google Cloud Batch V1 Client class Accelerator.

Accelerator describes Compute Engine accelerators to be attached to the VM.

Generated from protobuf message `google.cloud.batch.v1.AllocationPolicy.Accelerator`

## Namespace

Google \\ Cloud \\ Batch \\ V1 \\ AllocationPolicy

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `string` The accelerator type. For example, "nvidia-tesla-t4". See `gcloud compute accelerator-types list`. |
| `↳ count` | `int|string` The number of accelerators of this type. |
| `↳ install_gpu_drivers` | `bool` Deprecated: please use instances\[0\].install_gpu_drivers instead. |
| `↳ driver_version` | `string` Optional. The NVIDIA GPU driver version that should be installed for this type. You can define the specific driver version such as "470.103.01", following the driver version requirements in <https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver>. Batch will install the specific accelerator driver if qualified. |

### getType

The accelerator type. For example, "nvidia-tesla-t4".

See `gcloud compute accelerator-types list`.

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

### setType

The accelerator type. For example, "nvidia-tesla-t4".

See `gcloud compute accelerator-types list`.

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

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

### getCount

The number of accelerators of this type.

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

### setCount

The number of accelerators of this type.

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

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

### getInstallGpuDrivers

Deprecated: please use instances\[0\].install_gpu_drivers instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setInstallGpuDrivers

Deprecated: please use instances\[0\].install_gpu_drivers instead.

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

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

### getDriverVersion

Optional. The NVIDIA GPU driver version that should be installed for this
type.

You can define the specific driver version such as "470.103.01",
following the driver version requirements in
<https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver>.
Batch will install the specific accelerator driver if qualified.

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

### setDriverVersion

Optional. The NVIDIA GPU driver version that should be installed for this
type.

You can define the specific driver version such as "470.103.01",
following the driver version requirements in
<https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver>.
Batch will install the specific accelerator driver if qualified.

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

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