# Google Cloud Notebooks V2 Client - Class Instance (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 V2 Client class Instance.

The definition of a notebook instance.

Generated from protobuf message `google.cloud.notebooks.v2.Instance`

## Namespace

Google \\ Cloud \\ Notebooks \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The name of this notebook instance. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` |
| `↳ gce_setup` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.GceSetup` Optional. Compute Engine setup for the notebook. Uses notebook-defined fields. |
| `↳ proxy_uri` | `string` Output only. The proxy endpoint that is used to access the Jupyter notebook. |
| `↳ instance_owners` | `string[]` Optional. Input only. The owner of this instance after creation. Format: `alias\@example.com` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance. |
| `↳ creator` | `string` Output only. Email address of entity that sent original CreateInstance request. |
| `↳ state` | `int` Output only. The state of this instance. |
| `↳ upgrade_history` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.UpgradeHistoryEntry>` Output only. The upgrade history of this instance. |
| `↳ id` | `string` Output only. Unique ID of the resource. |
| `↳ health_state` | `int` Output only. Instance health_state. |
| `↳ health_info` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Output only. Additional information about instance health. Example: healthInfo": { "docker_proxy_agent_status": "1", "docker_status": "1", "jupyterlab_api_status": "-1", "jupyterlab_status": "-1", "updated": "2020-10-18 09:40:03.573409" } |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Instance creation time. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Instance update time. |
| `↳ disable_proxy_access` | `bool` Optional. If true, the notebook instance will not register with the proxy. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Labels to apply to this instance. These can be later modified by the UpdateInstance method. |

### getName

Output only. The name of this notebook instance. Format:
`projects/{project_id}/locations/{location}/instances/{instance_id}`

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

### setName

Output only. The name of this notebook instance. Format:
`projects/{project_id}/locations/{location}/instances/{instance_id}`

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

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

### getGceSetup

Optional. Compute Engine setup for the notebook. Uses notebook-defined
fields.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.GceSetup|null` |   |

### hasGceSetup

### setGceSetup

Optional. Compute Engine setup for the notebook. Uses notebook-defined
fields.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.GceSetup` |

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

### getProxyUri

Output only. The proxy endpoint that is used to access the Jupyter
notebook.

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

### setProxyUri

Output only. The proxy endpoint that is used to access the Jupyter
notebook.

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

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

### getInstanceOwners

Optional. Input only. The owner of this instance after creation. Format:
`alias\@example.com`
Currently supports one owner only. If not specified, all of the service
account users of your VM instance's service account can use
the instance.

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

### setInstanceOwners

Optional. Input only. The owner of this instance after creation. Format:
`alias\@example.com`
Currently supports one owner only. If not specified, all of the service
account users of your VM instance's service account can use
the instance.

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

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

### getCreator

Output only. Email address of entity that sent original CreateInstance
request.

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

### setCreator

Output only. Email address of entity that sent original CreateInstance
request.

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

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

### getState

Output only. The state of this instance.

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

### setState

Output only. The state of this instance.

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

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

### getUpgradeHistory

Output only. The upgrade history of this instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.UpgradeHistoryEntry>` |   |

### setUpgradeHistory

Output only. The upgrade history of this instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.UpgradeHistoryEntry>` |

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

### getId

Output only. Unique ID of the resource.

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

### setId

Output only. Unique ID of the resource.

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

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

### getHealthState

Output only. Instance health_state.

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

### setHealthState

Output only. Instance health_state.

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

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

### getHealthInfo

Output only. Additional information about instance health.

Example:
healthInfo": {
"docker_proxy_agent_status": "1",
"docker_status": "1",
"jupyterlab_api_status": "-1",
"jupyterlab_status": "-1",
"updated": "2020-10-18 09:40:03.573409"
}

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setHealthInfo

Output only. Additional information about instance health.

Example:
healthInfo": {
"docker_proxy_agent_status": "1",
"docker_status": "1",
"jupyterlab_api_status": "-1",
"jupyterlab_status": "-1",
"updated": "2020-10-18 09:40:03.573409"
}

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getCreateTime

Output only. Instance creation time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Instance creation time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getUpdateTime

Output only. Instance update time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Instance update time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getDisableProxyAccess

Optional. If true, the notebook instance will not register with the proxy.

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

### setDisableProxyAccess

Optional. If true, the notebook instance will not register with the proxy.

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

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

### getLabels

Optional. Labels to apply to this instance.

These can be later modified by the UpdateInstance method.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Optional. Labels to apply to this instance.

These can be later modified by the UpdateInstance method.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getInfrastructure

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