# Google Cloud Notebooks V1 Client - Class SetInstanceAcceleratorRequest (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.7.5 0.6.2 0.5.0 0.4.1 0.3.6 Reference documentation and code samples for the Google Cloud Notebooks V1 Client class SetInstanceAcceleratorRequest.

Request for setting instance accelerator.

Generated from protobuf message `google.cloud.notebooks.v1.SetInstanceAcceleratorRequest`

## Namespace

Google \\ Cloud \\ Notebooks \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` |
| `↳ type` | `int` Required. Type of this accelerator. |
| `↳ core_count` | `int|string` Required. Count of cores of this accelerator. Note that not all combinations of `type` and `core_count` are valid. Check [GPUs on Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a valid combination. TPUs are not supported. |

### getName

Required. Format:
`projects/{project_id}/locations/{location}/instances/{instance_id}`

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

### setName

Required. Format:
`projects/{project_id}/locations/{location}/instances/{instance_id}`

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

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

### getType

Required. Type of this accelerator.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [AcceleratorType](https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.Instance.AcceleratorType). |

### setType

Required. Type of this accelerator.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [AcceleratorType](https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V1.Instance.AcceleratorType). |

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

### getCoreCount

Required. Count of cores of this accelerator. Note that not all combinations
of `type` and `core_count` are valid. Check [GPUs on
Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
find a valid combination. TPUs are not supported.

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

### setCoreCount

Required. Count of cores of this accelerator. Note that not all combinations
of `type` and `core_count` are valid. Check [GPUs on
Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
find a valid combination. TPUs are not supported.

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

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