# Google Cloud Hypercompute Cluster V1 Client - Class ComputeResourceConfig (0.3.0)

0.3.0 (latest) 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Hypercompute Cluster V1 Client class ComputeResourceConfig.

Describes how a compute resource should be created at runtime.

Generated from protobuf message `google.cloud.hypercomputecluster.v1.ComputeResourceConfig`

## Namespace

Google \\ Cloud \\ HypercomputeCluster \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ new_on_demand_instances` | `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewOnDemandInstancesConfig` Optional. Immutable. If set, indicates that this resource should use on-demand VMs. |
| `↳ new_spot_instances` | `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewSpotInstancesConfig` Optional. Immutable. If set, indicates that this resource should use spot VMs. |
| `↳ new_reserved_instances` | `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewReservedInstancesConfig` Optional. Immutable. If set, indicates that this resource should use reserved VMs. |
| `↳ new_flex_start_instances` | `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewFlexStartInstancesConfig` Optional. Immutable. If set, indicates that this resource should use flex-start VMs. |

### getNewOnDemandInstances

Optional. Immutable. If set, indicates that this resource should use
on-demand VMs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewOnDemandInstancesConfig|null` |   |

### hasNewOnDemandInstances

### setNewOnDemandInstances

Optional. Immutable. If set, indicates that this resource should use
on-demand VMs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewOnDemandInstancesConfig` |

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

### getNewSpotInstances

Optional. Immutable. If set, indicates that this resource should use spot
VMs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewSpotInstancesConfig|null` |   |

### hasNewSpotInstances

### setNewSpotInstances

Optional. Immutable. If set, indicates that this resource should use spot
VMs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewSpotInstancesConfig` |

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

### getNewReservedInstances

Optional. Immutable. If set, indicates that this resource should use
reserved VMs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewReservedInstancesConfig|null` |   |

### hasNewReservedInstances

### setNewReservedInstances

Optional. Immutable. If set, indicates that this resource should use
reserved VMs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewReservedInstancesConfig` |

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

### getNewFlexStartInstances

Optional. Immutable. If set, indicates that this resource should use
flex-start VMs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewFlexStartInstancesConfig|null` |   |

### hasNewFlexStartInstances

### setNewFlexStartInstances

Optional. Immutable. If set, indicates that this resource should use
flex-start VMs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-hypercomputecluster/latest/V1.NewFlexStartInstancesConfig` |

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

### getConfig

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