# Google Cloud Maintenance Api V1beta Client - Class Stats (0.4.0)

0.4.0 (latest) 0.3.2 0.2.1 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Maintenance Api V1beta Client class Stats.

Stats indicates the type of aggregate and the corresponding aggregates.

Generated from protobuf message `google.cloud.maintenance.api.v1beta.MaintenanceSummary.Stats`

## Namespace

Google \\ Cloud \\ Maintenance \\ Api \\ V1beta \\ MaintenanceSummary

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ group_by` | `string` groupBy specifies the type of aggregate. For example a group_by might be `"state"` |
| `↳ aggregates` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-maintenance/latest/V1beta.MaintenanceSummary.Aggregate>` Aggregates is a list \<group, count\> pairs. For example, if the group_by is `"state"` a possible tuple in the aggregates list could be "SCHEDULED" : `11`, |

### getGroupBy

groupBy specifies the type of aggregate.

For example a group_by might be `"state"`

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

### setGroupBy

groupBy specifies the type of aggregate.

For example a group_by might be `"state"`

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

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

### getAggregates

Aggregates is a list \<group, count\> pairs. For example, if the
group_by is `"state"` a possible tuple in the aggregates list could be
"SCHEDULED" : `11`,

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-maintenance/latest/V1beta.MaintenanceSummary.Aggregate>` |   |

### setAggregates

Aggregates is a list \<group, count\> pairs. For example, if the
group_by is `"state"` a possible tuple in the aggregates list could be
"SCHEDULED" : `11`,

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-maintenance/latest/V1beta.MaintenanceSummary.Aggregate>` |

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