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

The definition of how to configure a VM instance outside of Resources and
Identity.

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

## Namespace

Google \\ Cloud \\ Notebooks \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ machine_type` | `string` Optional. The machine type of the VM instance. <https://cloud.google.com/compute/docs/machine-resource> |
| `↳ accelerator_configs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.AcceleratorConfig>` Optional. The hardware accelerators used on this instance. If you use accelerators, make sure that your configuration has [enough vCPUs and memory to support the `machine_type` you have selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). Currently supports only one accelerator configuration. |
| `↳ service_accounts` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.ServiceAccount>` Optional. The service account that serves as an identity for the VM instance. Currently supports only one service account. |
| `↳ vm_image` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.VmImage` Optional. Use a Compute Engine VM image to start the notebook instance. |
| `↳ container_image` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.ContainerImage` Optional. Use a container image to start the notebook instance. |
| `↳ boot_disk` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.BootDisk` Optional. The boot disk for the VM. |
| `↳ data_disks` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.DataDisk>` Optional. Data disks attached to the VM instance. Currently supports only one data disk. |
| `↳ shielded_instance_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.ShieldedInstanceConfig` Optional. Shielded VM configuration. [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). |
| `↳ network_interfaces` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.NetworkInterface>` Optional. The network interfaces for the VM. Supports only one interface. |
| `↳ disable_public_ip` | `bool` Optional. If true, no external IP will be assigned to this VM instance. |
| `↳ tags` | `string[]` Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). |
| `↳ metadata` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Custom metadata to apply to this instance. |
| `↳ enable_ip_forwarding` | `bool` Optional. Flag to enable ip forwarding or not, default false/off. <https://cloud.google.com/vpc/docs/using-routes#canipforward> |
| `↳ gpu_driver_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-notebooks/latest/V2.GPUDriverConfig` Optional. Configuration for GPU drivers. |

### getMachineType

Optional. The machine type of the VM instance.

<https://cloud.google.com/compute/docs/machine-resource>

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

### setMachineType

Optional. The machine type of the VM instance.

<https://cloud.google.com/compute/docs/machine-resource>

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

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

### getAcceleratorConfigs

Optional. The hardware accelerators used on this instance. If you use
accelerators, make sure that your configuration has
[enough vCPUs and memory to support the `machine_type` you have
selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).

Currently supports only one accelerator configuration.

| **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.AcceleratorConfig>` |   |

### setAcceleratorConfigs

Optional. The hardware accelerators used on this instance. If you use
accelerators, make sure that your configuration has
[enough vCPUs and memory to support the `machine_type` you have
selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).

Currently supports only one accelerator configuration.

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

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

### getServiceAccounts

Optional. The service account that serves as an identity for the VM
instance. Currently supports only one service account.

| **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.ServiceAccount>` |   |

### setServiceAccounts

Optional. The service account that serves as an identity for the VM
instance. Currently supports only one service account.

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

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

### getVmImage

Optional. Use a Compute Engine VM image to start the notebook instance.

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

### hasVmImage

### setVmImage

Optional. Use a Compute Engine VM image to start the notebook instance.

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

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

### getContainerImage

Optional. Use a container image to start the notebook instance.

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

### hasContainerImage

### setContainerImage

Optional. Use a container image to start the notebook instance.

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

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

### getBootDisk

Optional. The boot disk for the VM.

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

### hasBootDisk

### clearBootDisk

### setBootDisk

Optional. The boot disk for the VM.

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

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

### getDataDisks

Optional. Data disks attached to the VM instance.

Currently supports only one data disk.

| **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.DataDisk>` |   |

### setDataDisks

Optional. Data disks attached to the VM instance.

Currently supports only one data disk.

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

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

### getShieldedInstanceConfig

Optional. Shielded VM configuration.

[Images using supported Shielded VM
features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).

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

### hasShieldedInstanceConfig

### clearShieldedInstanceConfig

### setShieldedInstanceConfig

Optional. Shielded VM configuration.

[Images using supported Shielded VM
features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).

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

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

### getNetworkInterfaces

Optional. The network interfaces for the VM.

Supports only one interface.

| **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.NetworkInterface>` |   |

### setNetworkInterfaces

Optional. The network interfaces for the VM.

Supports only one interface.

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

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

### getDisablePublicIp

Optional. If true, no external IP will be assigned to this VM instance.

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

### setDisablePublicIp

Optional. If true, no external IP will be assigned to this VM instance.

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

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

### getTags

Optional. The Compute Engine tags to add to runtime (see [Tagging
instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).

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

### setTags

Optional. The Compute Engine tags to add to runtime (see [Tagging
instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).

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

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

### getMetadata

Optional. Custom metadata to apply to this instance.

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

### setMetadata

Optional. Custom metadata to apply to this instance.

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

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

### getEnableIpForwarding

Optional. Flag to enable ip forwarding or not, default false/off.

<https://cloud.google.com/vpc/docs/using-routes#canipforward>

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

### setEnableIpForwarding

Optional. Flag to enable ip forwarding or not, default false/off.

<https://cloud.google.com/vpc/docs/using-routes#canipforward>

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

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

### getGpuDriverConfig

Optional. Configuration for GPU drivers.

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

### hasGpuDriverConfig

### clearGpuDriverConfig

### setGpuDriverConfig

Optional. Configuration for GPU drivers.

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

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

### getImage

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