# Google Cloud Game Servers V1 Client - Class PreviewCreateGameServerClusterRequest (1.2.6)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.2.6 (latest)](https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/latest/V1.PreviewCreateGameServerClusterRequest)
- [1.2.5](https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/1.2.5/V1.PreviewCreateGameServerClusterRequest)
- [1.1.1](https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/1.1.1/V1.PreviewCreateGameServerClusterRequest)
- [1.0.5](https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/1.0.5/V1.PreviewCreateGameServerClusterRequest)
Reference documentation and code samples for the Google Cloud Game Servers V1 Client class PreviewCreateGameServerClusterRequest.

Request message for GameServerClustersService.PreviewCreateGameServerCluster.

Generated from protobuf message `google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest`

## Namespace

Google \\ Cloud \\ Gaming \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/realms/{realm}`. |
| `↳ game_server_cluster_id` | `string` Required. The ID of the game server cluster resource to be created. |
| `↳ game_server_cluster` | `https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/latest/V1.GameServerCluster` Required. The game server cluster resource to be created. |
| `↳ preview_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Optional. The target timestamp to compute the preview. |
| `↳ view` | `int` Optional. This field is deprecated, preview will always return KubernetesClusterState. |

### getParent

Required. The parent resource name, in the following form:
`projects/{project}/locations/{location}/realms/{realm}`.

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

### setParent

Required. The parent resource name, in the following form:
`projects/{project}/locations/{location}/realms/{realm}`.

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

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

### getGameServerClusterId

Required. The ID of the game server cluster resource to be created.

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

### setGameServerClusterId

Required. The ID of the game server cluster resource to be created.

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

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

### getGameServerCluster

Required. The game server cluster resource to be created.

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

### hasGameServerCluster

### clearGameServerCluster

### setGameServerCluster

Required. The game server cluster resource to be created.

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

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

### getPreviewTime

Optional. The target timestamp to compute the preview.

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

### hasPreviewTime

### clearPreviewTime

### setPreviewTime

Optional. The target timestamp to compute the preview.

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

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

### getView

Optional. This field is deprecated, preview will always return
KubernetesClusterState.

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

### setView

Optional. This field is deprecated, preview will always return
KubernetesClusterState.

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

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