# Google Cloud Game Servers V1 Client - Class GameServerCluster (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.GameServerCluster)
- [1.2.5](https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/1.2.5/V1.GameServerCluster)
- [1.1.1](https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/1.1.1/V1.GameServerCluster)
- [1.0.5](https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/1.0.5/V1.GameServerCluster)
Reference documentation and code samples for the Google Cloud Game Servers V1 Client class GameServerCluster.

A game server cluster resource.

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

## Namespace

Google \\ Cloud \\ Gaming \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. For example, `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The creation time. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The last-modified time. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The labels associated with this game server cluster. Each label is a key-value pair. |
| `↳ connection_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/latest/V1.GameServerClusterConnectionInfo` The game server cluster connection information. This information is used to manage game server clusters. |
| `↳ etag` | `string` ETag of the resource. |
| `↳ description` | `string` Human readable description of the cluster. |
| `↳ cluster_state` | `https://docs.cloud.google.com/php/docs/reference/cloud-game-servers/latest/V1.KubernetesClusterState` Output only. The state of the Kubernetes cluster, this will be available if 'view' is set to `FULL` in the relevant List/Get/Preview request. |

### getName

Required. The resource name of the game server cluster, in the following form:
`projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.

For example,
`projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`.

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

### setName

Required. The resource name of the game server cluster, in the following form:
`projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.

For example,
`projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`.

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

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

### getCreateTime

Output only. The creation time.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The creation time.

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

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

### getUpdateTime

Output only. The last-modified time.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The last-modified time.

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

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

### getLabels

The labels associated with this game server cluster. Each label is a
key-value pair.

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

### setLabels

The labels associated with this game server cluster. Each label is a
key-value pair.

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

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

### getConnectionInfo

The game server cluster connection information. This information is used to
manage game server clusters.

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

### hasConnectionInfo

### clearConnectionInfo

### setConnectionInfo

The game server cluster connection information. This information is used to
manage game server clusters.

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

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

### getEtag

ETag of the resource.

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

### setEtag

ETag of the resource.

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

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

### getDescription

Human readable description of the cluster.

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

### setDescription

Human readable description of the cluster.

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

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

### getClusterState

Output only. The state of the Kubernetes cluster, this will be available if
'view' is set to `FULL` in the relevant List/Get/Preview request.

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

### hasClusterState

### clearClusterState

### setClusterState

Output only. The state of the Kubernetes cluster, this will be available if
'view' is set to `FULL` in the relevant List/Get/Preview request.

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

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