# Stackdriver Error Reporting V1beta1 Client - Class ListGroupStatsRequest (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 ListGroupStatsRequest.

Specifies a set of `ErrorGroupStats` to return.

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

## Namespace

Google \\ Cloud \\ ErrorReporting \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ project_name` | `string` Required. The resource name of the Google Cloud Platform project. Written as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` and `{projectNumber}` can be found in the [Google Cloud console](https://support.google.com/cloud/answer/6158840). It may also include a location, such as `projects/{projectID}/locations/{location}` where `{location}` is a cloud region. Examples: `projects/my-project-123`, `projects/5551234`, `projects/my-project-123/locations/us-central1`, `projects/5551234/locations/us-central1`. For a list of supported locations, see [Supported Regions](https://cloud.google.com/logging/docs/region-support). `global` is the default when unspecified. Use `-` as a wildcard to request group stats from all regions. |
| `↳ group_id` | `string[]` Optional. List all \[ErrorGroupStats\] \[google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats\] with these IDs. The `group_id` is a unique identifier for a particular error group. The identifier is derived from key parts of the error-log content and is treated as Service Data. For information about how Service Data is handled, see [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice). |
| `↳ service_filter` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ServiceContextFilter` Optional. List only \[ErrorGroupStats\] \[google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats\] which belong to a service context that matches the filter. Data for all service contexts is returned if this field is not specified. |
| `↳ time_range` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.QueryTimeRange` Optional. List data for the given time range. If not set, a default time range is used. The field \[time_range_begin\] \[google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin\] in the response will specify the beginning of this time range. Only \[ErrorGroupStats\] \[google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats\] with a non-zero count in the given time range are returned, unless the request contains an explicit \[group_id\] \[google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id\] list. If a \[group_id\] \[google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id\] list is given, also \[ErrorGroupStats\] \[google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats\] with zero occurrences are returned. |
| `↳ timed_count_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Optional. The preferred duration for a single returned \[TimedCount\] \[google.devtools.clouderrorreporting.v1beta1.TimedCount\]. If not set, no timed counts are returned. |
| `↳ alignment` | `int` Optional. The alignment of the timed counts to be returned. Default is `ALIGNMENT_EQUAL_AT_END`. |
| `↳ alignment_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Optional. Time where the timed counts shall be aligned if rounded alignment is chosen. Default is 00:00 UTC. |
| `↳ order` | `int` Optional. The sort order in which the results are returned. Default is `COUNT_DESC`. |
| `↳ page_size` | `int` Optional. The maximum number of results to return per response. Default is 20. |
| `↳ page_token` | `string` Optional. A \[next_page_token\] \[google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token\] provided by a previous response. To view additional results, pass this token along with the identical query parameters as the first request. |

### getProjectName

Required. The resource name of the Google Cloud Platform project. Written
as `projects/{projectID}` or `projects/{projectNumber}`, where
`{projectID}` and `{projectNumber}` can be found in the
[Google Cloud console](https://support.google.com/cloud/answer/6158840).

It may also include a location, such as
`projects/{projectID}/locations/{location}` where `{location}` is a cloud
region.
Examples: `projects/my-project-123`, `projects/5551234`,
`projects/my-project-123/locations/us-central1`,
`projects/5551234/locations/us-central1`.
For a list of supported locations, see [Supported
Regions](https://cloud.google.com/logging/docs/region-support). `global` is
the default when unspecified. Use `-` as a wildcard to request group stats
from all regions.

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

### setProjectName

Required. The resource name of the Google Cloud Platform project. Written
as `projects/{projectID}` or `projects/{projectNumber}`, where
`{projectID}` and `{projectNumber}` can be found in the
[Google Cloud console](https://support.google.com/cloud/answer/6158840).

It may also include a location, such as
`projects/{projectID}/locations/{location}` where `{location}` is a cloud
region.
Examples: `projects/my-project-123`, `projects/5551234`,
`projects/my-project-123/locations/us-central1`,
`projects/5551234/locations/us-central1`.
For a list of supported locations, see [Supported
Regions](https://cloud.google.com/logging/docs/region-support). `global` is
the default when unspecified. Use `-` as a wildcard to request group stats
from all regions.

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

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

### getGroupId

Optional. List all [ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) with these
IDs. The `group_id` is a unique identifier for a particular error group.

The identifier is derived from key parts of the error-log content and is
treated as Service Data. For information about how Service Data
is handled, see [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setGroupId

Optional. List all [ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) with these
IDs. The `group_id` is a unique identifier for a particular error group.

The identifier is derived from key parts of the error-log content and is
treated as Service Data. For information about how Service Data
is handled, see [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice).

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

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

### getServiceFilter

Optional. List only [ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) which belong
to a service context that matches the filter. Data for all service contexts
is returned if this field is not specified.

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

### hasServiceFilter

### clearServiceFilter

### setServiceFilter

Optional. List only [ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) which belong
to a service context that matches the filter. Data for all service contexts
is returned if this field is not specified.

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

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

### getTimeRange

Optional. List data for the given time range.

If not set, a default time range is used. The field
[time_range_begin](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsResponse#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsResponse__getTimeRangeBegin__)
in the response will specify the beginning of this time range. Only
[ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) with a
non-zero count in the given time range are returned, unless the request
contains an explicit [group_id](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsRequest#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsRequest__getGroupId__)
list. If a [group_id](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsRequest#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsRequest__getGroupId__)
list is given, also [ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) with zero
occurrences are returned.

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

### hasTimeRange

### clearTimeRange

### setTimeRange

Optional. List data for the given time range.

If not set, a default time range is used. The field
[time_range_begin](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsResponse#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsResponse__getTimeRangeBegin__)
in the response will specify the beginning of this time range. Only
[ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) with a
non-zero count in the given time range are returned, unless the request
contains an explicit [group_id](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsRequest#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsRequest__getGroupId__)
list. If a [group_id](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsRequest#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsRequest__getGroupId__)
list is given, also [ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) with zero
occurrences are returned.

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

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

### getTimedCountDuration

Optional. The preferred duration for a single returned [TimedCount](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.TimedCount). If not set, no
timed counts are returned.

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

### hasTimedCountDuration

### clearTimedCountDuration

### setTimedCountDuration

Optional. The preferred duration for a single returned [TimedCount](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.TimedCount). If not set, no
timed counts are returned.

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

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

### getAlignment

Optional. The alignment of the timed counts to be returned.

Default is `ALIGNMENT_EQUAL_AT_END`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [TimedCountAlignment](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.TimedCountAlignment). |

### setAlignment

Optional. The alignment of the timed counts to be returned.

Default is `ALIGNMENT_EQUAL_AT_END`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [TimedCountAlignment](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.TimedCountAlignment). |

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

### getAlignmentTime

Optional. Time where the timed counts shall be aligned if rounded
alignment is chosen. Default is 00:00 UTC.

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

### hasAlignmentTime

### clearAlignmentTime

### setAlignmentTime

Optional. Time where the timed counts shall be aligned if rounded
alignment is chosen. Default is 00:00 UTC.

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

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

### getOrder

Optional. The sort order in which the results are returned.

Default is `COUNT_DESC`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ErrorGroupOrder](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupOrder). |

### setOrder

Optional. The sort order in which the results are returned.

Default is `COUNT_DESC`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ErrorGroupOrder](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupOrder). |

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

### getPageSize

Optional. The maximum number of results to return per response.

Default is 20.

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

### setPageSize

Optional. The maximum number of results to return per response.

Default is 20.

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

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

### getPageToken

Optional. A [next_page_token](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsResponse#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsResponse__getNextPageToken__)
provided by a previous response. To view additional results, pass this
token along with the identical query parameters as the first request.

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

### setPageToken

Optional. A [next_page_token](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsResponse#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsResponse__getNextPageToken__)
provided by a previous response. To view additional results, pass this
token along with the identical query parameters as the first request.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `string` Required. The resource name of the Google Cloud Platform project. Written as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` and `{projectNumber}` can be found in the [Google Cloud console](https://support.google.com/cloud/answer/6158840). It may also include a location, such as `projects/{projectID}/locations/{location}` where `{location}` is a cloud region. Examples: `projects/my-project-123`, `projects/5551234`, `projects/my-project-123/locations/us-central1`, `projects/5551234/locations/us-central1`. For a list of supported locations, see [Supported Regions](https://cloud.google.com/logging/docs/region-support). `global` is the default when unspecified. Use `-` as a wildcard to request group stats from all regions. Please see ErrorStatsServiceClient::projectName() for help formatting this field. |
| `timeRange` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.QueryTimeRange` Optional. List data for the given time range. If not set, a default time range is used. The field [time_range_begin](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsResponse#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsResponse__getTimeRangeBegin__) in the response will specify the beginning of this time range. Only [ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) with a non-zero count in the given time range are returned, unless the request contains an explicit [group_id](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsRequest#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsRequest__getGroupId__) list. If a [group_id](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ListGroupStatsRequest#_Google_Cloud_ErrorReporting_V1beta1_ListGroupStatsRequest__getGroupId__) list is given, also [ErrorGroupStats](https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ErrorGroupStats) with zero occurrences are returned. |

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