# Google Cloud Container V1 Client - Class ClusterAutoscaling (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 ClusterAutoscaling.

ClusterAutoscaling contains global, per-cluster information
required by Cluster Autoscaler to automatically adjust
the size of the cluster and create/delete
node pools based on the current needs.

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

## Namespace

Google \\ Cloud \\ Container \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ enable_node_autoprovisioning` | `bool` Enables automatic node pool creation and deletion. |
| `↳ resource_limits` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ResourceLimit>` Contains global constraints regarding minimum and maximum amount of resources in the cluster. |
| `↳ autoscaling_profile` | `int` Defines autoscaling behaviour. |
| `↳ autoprovisioning_node_pool_defaults` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.AutoprovisioningNodePoolDefaults` AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP. |
| `↳ autoprovisioning_locations` | `string[]` The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the NodePool's nodes can be created by NAP. |
| `↳ default_compute_class_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.DefaultComputeClassConfig` Default compute class is a configuration for default compute class. |
| `↳ autopilot_general_profile` | `int` Autopilot general profile for the cluster, which defines the configuration for the cluster. |

### getEnableNodeAutoprovisioning

Enables automatic node pool creation and deletion.

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

### setEnableNodeAutoprovisioning

Enables automatic node pool creation and deletion.

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

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

### getResourceLimits

Contains global constraints regarding minimum and maximum
amount of resources in the cluster.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ResourceLimit>` |   |

### setResourceLimits

Contains global constraints regarding minimum and maximum
amount of resources in the cluster.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ResourceLimit>` |

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

### getAutoscalingProfile

Defines autoscaling behaviour.

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

### setAutoscalingProfile

Defines autoscaling behaviour.

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

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

### getAutoprovisioningNodePoolDefaults

AutoprovisioningNodePoolDefaults contains defaults for a node pool
created by NAP.

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

### hasAutoprovisioningNodePoolDefaults

### clearAutoprovisioningNodePoolDefaults

### setAutoprovisioningNodePoolDefaults

AutoprovisioningNodePoolDefaults contains defaults for a node pool
created by NAP.

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

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

### getAutoprovisioningLocations

The list of Google Compute Engine
[zones](https://cloud.google.com/compute/docs/zones#available)
in which the NodePool's nodes can be created by NAP.

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

### setAutoprovisioningLocations

The list of Google Compute Engine
[zones](https://cloud.google.com/compute/docs/zones#available)
in which the NodePool's nodes can be created by NAP.

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

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

### getDefaultComputeClassConfig

Default compute class is a configuration for default compute class.

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

### hasDefaultComputeClassConfig

### clearDefaultComputeClassConfig

### setDefaultComputeClassConfig

Default compute class is a configuration for default compute class.

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

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

### getAutopilotGeneralProfile

Autopilot general profile for the cluster, which defines the
configuration for the cluster.

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

### setAutopilotGeneralProfile

Autopilot general profile for the cluster, which defines the
configuration for the cluster.

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

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