# Google Cloud Run V2 Client - Class ServiceScaling (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class ServiceScaling.

Scaling settings applied at the service level rather than
at the revision level.

Generated from protobuf message `google.cloud.run.v2.ServiceScaling`

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ min_instance_count` | `int` Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. |
| `↳ scaling_mode` | `int` Optional. The scaling mode for the service. |
| `↳ max_instance_count` | `int` Optional. total max instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. |
| `↳ manual_instance_count` | `int` Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. |

### getMinInstanceCount

Optional. total min instances for the service. This number of instances is
divided among all revisions with specified traffic based on the percent
of traffic they are receiving.

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

### setMinInstanceCount

Optional. total min instances for the service. This number of instances is
divided among all revisions with specified traffic based on the percent
of traffic they are receiving.

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

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

### getScalingMode

Optional. The scaling mode for the service.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ScalingMode](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.ServiceScaling.ScalingMode). |

### setScalingMode

Optional. The scaling mode for the service.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ScalingMode](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.ServiceScaling.ScalingMode). |

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

### getMaxInstanceCount

Optional. total max instances for the service. This number of instances is
divided among all revisions with specified traffic based on the percent
of traffic they are receiving.

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

### setMaxInstanceCount

Optional. total max instances for the service. This number of instances is
divided among all revisions with specified traffic based on the percent
of traffic they are receiving.

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

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

### getManualInstanceCount

Optional. total instance count for the service in manual scaling mode. This
number of instances is divided among all revisions with specified traffic
based on the percent of traffic they are receiving.

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

### hasManualInstanceCount

### clearManualInstanceCount

### setManualInstanceCount

Optional. total instance count for the service in manual scaling mode. This
number of instances is divided among all revisions with specified traffic
based on the percent of traffic they are receiving.

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

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