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

0.4.0 (latest) 0.3.2 0.2.1 0.1.0 Reference documentation and code samples for the Google Cloud Maintenance Api V1 Client class Stats.

Stats indicates the type of aggregate and the corresponding aggregates.

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

## Namespace

Google \\ Cloud \\ Maintenance \\ Api \\ V1 \\ 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/V1.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/V1.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/V1.MaintenanceSummary.Aggregate>` |

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