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

A time range for which error group data shall be displayed.

Query time ranges end at 'now'.
When longer time ranges are selected, the resolution of the data decreases.
The description of each time range below indicates the suggested minimum
timed count duration for that range.
Requests might be rejected or the resulting timed count durations might be
adjusted for lower durations.

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

## Namespace

Google \\ Cloud \\ ErrorReporting \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ period` | `int` Restricts the query to the specified time range. |

### getPeriod

Restricts the query to the specified time range.

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

### setPeriod

Restricts the query to the specified time range.

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

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