# Google Cloud Net App V1 Client - Class HostGroup (1.12.0)

1.12.0 (latest) 1.11.0 1.10.2 1.9.0 1.8.1 1.7.0 1.6.1 1.4.0 1.3.1 1.2.1 1.1.1 1.0.1 0.3.1 0.2.6 0.1.1 Reference documentation and code samples for the Google Cloud Net App V1 Client class HostGroup.

Host group is a collection of hosts that can be used for accessing a Block
Volume.

Generated from protobuf message `google.cloud.netapp.v1.HostGroup`

## Namespace

Google \\ Cloud \\ NetApp \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the host group. Format: `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. |
| `↳ type` | `int` Required. Type of the host group. |
| `↳ state` | `int` Output only. State of the host group. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Create time of the host group. |
| `↳ hosts` | `string[]` Required. The list of hosts associated with the host group. |
| `↳ os_type` | `int` Required. The OS type of the host group. It indicates the type of operating system used by all of the hosts in the HostGroup. All hosts in a HostGroup must be of the same OS type. This can be set only when creating a HostGroup. |
| `↳ description` | `string` Optional. Description of the host group. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Labels of the host group. |

### getName

Identifier. The resource name of the host group.

Format:
`projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.

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

### setName

Identifier. The resource name of the host group.

Format:
`projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.

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

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

### getType

Required. Type of the host group.

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

### setType

Required. Type of the host group.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.HostGroup.Type). |

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

### getState

Output only. State of the host group.

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

### setState

Output only. State of the host group.

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

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

### getCreateTime

Output only. Create time of the host group.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Create time of the host group.

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

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

### getHosts

Required. The list of hosts associated with the host group.

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

### setHosts

Required. The list of hosts associated with the host group.

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

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

### getOsType

Required. The OS type of the host group. It indicates the type of operating
system used by all of the hosts in the HostGroup. All hosts in a HostGroup
must be of the same OS type. This can be set only when creating a
HostGroup.

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

### setOsType

Required. The OS type of the host group. It indicates the type of operating
system used by all of the hosts in the HostGroup. All hosts in a HostGroup
must be of the same OS type. This can be set only when creating a
HostGroup.

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

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

### getDescription

Optional. Description of the host group.

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

### setDescription

Optional. Description of the host group.

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

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

### getLabels

Optional. Labels of the host group.

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

### setLabels

Optional. Labels of the host group.

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

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