# Google Cloud Container V1 Client - Class NodePoolAutoscaling (2.10.0)

2.10.0 (latest) 2.9.0 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.4 2.2.1 2.1.0 2.0.0 1.33.0 1.32.0 1.31.0 1.30.3 1.24.0 1.23.0 1.22.0 1.21.1 1.20.0 1.19.0 1.18.0 1.17.1 1.16.0 1.15.0 1.14.0 1.13.1 1.12.1 1.10.3 1.9.1 Reference documentation and code samples for the Google Cloud Container V1 Client class NodePoolAutoscaling.

NodePoolAutoscaling contains information required by cluster autoscaler to
adjust the size of the node pool to the current cluster usage.

Generated from protobuf message `google.container.v1.NodePoolAutoscaling`

## Namespace

Google \\ Cloud \\ Container \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ enabled` | `bool` Is autoscaling enabled for this node pool. |
| `↳ min_node_count` | `int` Minimum number of nodes for one location in the node pool. Must be greater than or equal to 0 and less than or equal to max_node_count. |
| `↳ max_node_count` | `int` Maximum number of nodes for one location in the node pool. Must be \>= min_node_count. There has to be enough quota to scale up the cluster. |
| `↳ autoprovisioned` | `bool` Can this node pool be deleted automatically. |
| `↳ location_policy` | `int` Location policy used when scaling up a node pool. |
| `↳ total_min_node_count` | `int` Minimum number of nodes in the node pool. Must be greater than or equal to 0 and less than or equal to total_max_node_count. The total_\*_node_count fields are mutually exclusive with the \*_node_count fields. |
| `↳ total_max_node_count` | `int` Maximum number of nodes in the node pool. Must be greater than or equal to total_min_node_count. There has to be enough quota to scale up the cluster. The total_\*_node_count fields are mutually exclusive with the \*_node_count fields. |

### getEnabled

Is autoscaling enabled for this node pool.

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

### setEnabled

Is autoscaling enabled for this node pool.

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

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

### getMinNodeCount

Minimum number of nodes for one location in the node pool. Must be greater
than or equal to 0 and less than or equal to max_node_count.

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

### setMinNodeCount

Minimum number of nodes for one location in the node pool. Must be greater
than or equal to 0 and less than or equal to max_node_count.

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

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

### getMaxNodeCount

Maximum number of nodes for one location in the node pool. Must be \>=
min_node_count. There has to be enough quota to scale up the cluster.

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

### setMaxNodeCount

Maximum number of nodes for one location in the node pool. Must be \>=
min_node_count. There has to be enough quota to scale up the cluster.

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

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

### getAutoprovisioned

Can this node pool be deleted automatically.

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

### setAutoprovisioned

Can this node pool be deleted automatically.

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

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

### getLocationPolicy

Location policy used when scaling up a node pool.

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

### setLocationPolicy

Location policy used when scaling up a node pool.

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

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

### getTotalMinNodeCount

Minimum number of nodes in the node pool. Must be greater than or equal
to 0 and less than or equal to total_max_node_count.

The total_\*_node_count fields are mutually exclusive with the \*_node_count
fields.

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

### setTotalMinNodeCount

Minimum number of nodes in the node pool. Must be greater than or equal
to 0 and less than or equal to total_max_node_count.

The total_\*_node_count fields are mutually exclusive with the \*_node_count
fields.

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

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

### getTotalMaxNodeCount

Maximum number of nodes in the node pool. Must be greater than or equal to
total_min_node_count. There has to be enough quota to scale up the cluster.

The total_\*_node_count fields are mutually exclusive with the \*_node_count
fields.

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

### setTotalMaxNodeCount

Maximum number of nodes in the node pool. Must be greater than or equal to
total_min_node_count. There has to be enough quota to scale up the cluster.

The total_\*_node_count fields are mutually exclusive with the \*_node_count
fields.

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

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