# Stackdriver Error Reporting V1beta1 Client - Class ErrorGroupStats (0.26.1)

0.26.1 (latest) 0.26.0 0.25.3 0.24.0 0.23.1 0.22.10 0.21.1 0.20.2 0.19.12

> [!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 Stackdriver Error Reporting V1beta1 Client class ErrorGroupStats.

Data extracted for a specific group based on certain filter criteria,
such as a given time period and/or service filter.

Generated from protobuf message `google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats`

## Namespace

Google \\ Cloud \\ ErrorReporting \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ group` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroup` Group data that is independent of the filter criteria. |
| `↳ count` | `int|string` Approximate total number of events in the given group that match the filter criteria. |
| `↳ affected_users_count` | `int|string` Approximate number of affected users in the given group that match the filter criteria. Users are distinguished by data in the \[ErrorContext\] \[google.devtools.clouderrorreporting.v1beta1.ErrorContext\] of the individual error events, such as their login name or their remote IP address in case of HTTP requests. The number of affected users can be zero even if the number of errors is non-zero if no data was provided from which the affected user could be deduced. Users are counted based on data in the request context that was provided in the error report. If more users are implicitly affected, such as due to a crash of the whole service, this is not reflected here. |
| `↳ timed_counts` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.TimedCount>` Approximate number of occurrences over time. Timed counts returned by ListGroups are guaranteed to be: - Inside the requested time interval - Non-overlapping, and - Ordered by ascending time. |
| `↳ first_seen_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Approximate first occurrence that was ever seen for this group and which matches the given filter criteria, ignoring the time_range that was specified in the request. |
| `↳ last_seen_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Approximate last occurrence that was ever seen for this group and which matches the given filter criteria, ignoring the time_range that was specified in the request. |
| `↳ affected_services` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ServiceContext>` Service contexts with a non-zero error count for the given filter criteria. This list can be truncated if multiple services are affected. Refer to `num_affected_services` for the total count. |
| `↳ num_affected_services` | `int` The total number of services with a non-zero error count for the given filter criteria. |
| `↳ representative` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorEvent` An arbitrary event that is chosen as representative for the whole group. The representative event is intended to be used as a quick preview for the whole group. Events in the group are usually sufficiently similar to each other such that showing an arbitrary representative provides insight into the characteristics of the group as a whole. |

### getGroup

Group data that is independent of the filter criteria.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroup|null` |   |

### hasGroup

### clearGroup

### setGroup

Group data that is independent of the filter criteria.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroup` |

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

### getCount

Approximate total number of events in the given group that match
the filter criteria.

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

### setCount

Approximate total number of events in the given group that match
the filter criteria.

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

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

### getAffectedUsersCount

Approximate number of affected users in the given group that
match the filter criteria.

Users are distinguished by data in the [ErrorContext](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorContext) of the
individual error events, such as their login name or their remote
IP address in case of HTTP requests.
The number of affected users can be zero even if the number of
errors is non-zero if no data was provided from which the
affected user could be deduced.
Users are counted based on data in the request
context that was provided in the error report. If more users are
implicitly affected, such as due to a crash of the whole service,
this is not reflected here.

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

### setAffectedUsersCount

Approximate number of affected users in the given group that
match the filter criteria.

Users are distinguished by data in the [ErrorContext](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorContext) of the
individual error events, such as their login name or their remote
IP address in case of HTTP requests.
The number of affected users can be zero even if the number of
errors is non-zero if no data was provided from which the
affected user could be deduced.
Users are counted based on data in the request
context that was provided in the error report. If more users are
implicitly affected, such as due to a crash of the whole service,
this is not reflected here.

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

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

### getTimedCounts

Approximate number of occurrences over time.

Timed counts returned by ListGroups are guaranteed to be:

- Inside the requested time interval
- Non-overlapping, and
- Ordered by ascending time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.TimedCount>` |   |

### setTimedCounts

Approximate number of occurrences over time.

Timed counts returned by ListGroups are guaranteed to be:

- Inside the requested time interval
- Non-overlapping, and
- Ordered by ascending time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.TimedCount>` |

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

### getFirstSeenTime

Approximate first occurrence that was ever seen for this group
and which matches the given filter criteria, ignoring the
time_range that was specified in the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasFirstSeenTime

### clearFirstSeenTime

### setFirstSeenTime

Approximate first occurrence that was ever seen for this group
and which matches the given filter criteria, ignoring the
time_range that was specified in the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getLastSeenTime

Approximate last occurrence that was ever seen for this group and
which matches the given filter criteria, ignoring the time_range
that was specified in the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasLastSeenTime

### clearLastSeenTime

### setLastSeenTime

Approximate last occurrence that was ever seen for this group and
which matches the given filter criteria, ignoring the time_range
that was specified in the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getAffectedServices

Service contexts with a non-zero error count for the given filter
criteria. This list can be truncated if multiple services are affected.

Refer to `num_affected_services` for the total count.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ServiceContext>` |   |

### setAffectedServices

Service contexts with a non-zero error count for the given filter
criteria. This list can be truncated if multiple services are affected.

Refer to `num_affected_services` for the total count.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ServiceContext>` |

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

### getNumAffectedServices

The total number of services with a non-zero error count for the given
filter criteria.

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

### setNumAffectedServices

The total number of services with a non-zero error count for the given
filter criteria.

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

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

### getRepresentative

An arbitrary event that is chosen as representative for the whole group.

The representative event is intended to be used as a quick preview for
the whole group. Events in the group are usually sufficiently similar
to each other such that showing an arbitrary representative provides
insight into the characteristics of the group as a whole.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorEvent|null` |   |

### hasRepresentative

### clearRepresentative

### setRepresentative

An arbitrary event that is chosen as representative for the whole group.

The representative event is intended to be used as a quick preview for
the whole group. Events in the group are usually sufficiently similar
to each other such that showing an arbitrary representative provides
insight into the characteristics of the group as a whole.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorEvent` |

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