# Google Cloud Network Connectivity V1 Client - Class SpokeStateReasonCount (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.0 2.2.2 2.1.2 2.0.2 1.5.5 1.4.2 1.3.0 1.2.0 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Network Connectivity V1 Client class SpokeStateReasonCount.

The number of spokes in the hub that are inactive for this reason.

Generated from protobuf message `google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount`

## Namespace

Google \\ Cloud \\ NetworkConnectivity \\ V1 \\ SpokeSummary

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ state_reason_code` | `int` Output only. The reason that a spoke is inactive. |
| `↳ count` | `int|string` Output only. The total number of spokes that are inactive for a particular reason and associated with a given hub. |

### getStateReasonCode

Output only. The reason that a spoke is inactive.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.Spoke.StateReason.Code). |

### setStateReasonCode

Output only. The reason that a spoke is inactive.

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

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

### getCount

Output only. The total number of spokes that are inactive for a
particular reason and associated with a given hub.

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

### setCount

Output only. The total number of spokes that are inactive for a
particular reason and associated with a given hub.

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

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