# Google Cloud Notebooks V1 Client - Class UpgradeInstanceInternalRequest (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 UpgradeInstanceInternalRequest.

Request for upgrading a notebook instance from within the VM

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

## 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}` |
| `↳ vm_id` | `string` Required. The VM hardware token for authenticating the VM. <https://cloud.google.com/compute/docs/instances/verifying-instance-identity> |
| `↳ type` | `int` Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance. |

### 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` |   |

### getVmId

Required. The VM hardware token for authenticating the VM.

<https://cloud.google.com/compute/docs/instances/verifying-instance-identity>

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

### setVmId

Required. The VM hardware token for authenticating the VM.

<https://cloud.google.com/compute/docs/instances/verifying-instance-identity>

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

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

### getType

Optional. The optional UpgradeType. Setting this field will search for additional
compute images to upgrade this instance.

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

### setType

Optional. The optional UpgradeType. Setting this field will search for additional
compute images to upgrade this instance.

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

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