# Path: google/cloud/errorreporting_v1beta1/types/common.py
# class ResolutionStatus(proto.Enum):
# class ErrorGroup(proto.Message):
# class TrackingIssue(proto.Message):
# class ErrorEvent(proto.Message):
# class ServiceContext(proto.Message):
# class ErrorContext(proto.Message):
# class HttpRequestContext(proto.Message):
# class SourceLocation(proto.Message):
#     RESOLUTION_STATUS_UNSPECIFIED = 0
#     OPEN = 1
#     ACKNOWLEDGED = 2
#     RESOLVED = 3
#     MUTED = 4
# 
# Path: google/cloud/errorreporting_v1beta1/types/error_stats_service.py
# class TimedCountAlignment(proto.Enum):
# class ErrorGroupOrder(proto.Enum):
# class ListGroupStatsRequest(proto.Message):
# class ListGroupStatsResponse(proto.Message):
# class ErrorGroupStats(proto.Message):
# class TimedCount(proto.Message):
# class ListEventsRequest(proto.Message):
# class ListEventsResponse(proto.Message):
# class QueryTimeRange(proto.Message):
#     class Period(proto.Enum):
# class ServiceContextFilter(proto.Message):
# class DeleteEventsRequest(proto.Message):
# class DeleteEventsResponse(proto.Message):
#     ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0
#     ALIGNMENT_EQUAL_ROUNDED = 1
#     ALIGNMENT_EQUAL_AT_END = 2
#     GROUP_ORDER_UNSPECIFIED = 0
#     COUNT_DESC = 1
#     LAST_SEEN_DESC = 2
#     CREATED_DESC = 3
#     AFFECTED_USERS_DESC = 4
#         PERIOD_UNSPECIFIED = 0
#         PERIOD_1_HOUR = 1
#         PERIOD_6_HOURS = 2
#         PERIOD_1_DAY = 3
#         PERIOD_1_WEEK = 4
#         PERIOD_30_DAYS = 5
#     def raw_page(self):
#     def raw_page(self):


from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.errorreporting_v1beta1.types import common
from google.cloud.errorreporting_v1beta1.types import error_stats_service
        metadata: Sequence[Tuple[str, str]] = ()
    ):
        """Instantiates the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.cloud.errorreporting_v1beta1.types.ListEventsRequest):
                The initial request object.
            response (google.cloud.errorreporting_v1beta1.types.ListEventsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        """
        self._method = method
        self._request = error_stats_service.ListEventsRequest(request)
        self._response = response
        self._metadata = metadata

    def __getattr__(self, name: str) -> Any:
        return getattr(self._response, name)

    @property
    async def pages(self) -> AsyncIterator[error_stats_service.ListEventsResponse]:
        yield self._response
        while self._response.next_page_token:
            self._request.page_token = self._response.next_page_token
            self._response = await self._method(self._request, metadata=self._metadata)
            yield self._response


# Path: google/cloud/errorreporting_v1beta1/types/common.py
# class ResolutionStatus(proto.Enum):
# class ErrorGroup(proto.Message):
# class TrackingIssue(proto.Message):
# class ErrorEvent(proto.Message):
# class ServiceContext(proto.Message):
# class ErrorContext(proto.Message):
# class HttpRequestContext(proto.Message):
# class SourceLocation(proto.Message):
#     RESOLUTION_STATUS_UNSPECIFIED = 0
#     OPEN = 1
#     ACKNOWLEDGED = 2
#     RESOLVED = 3
#     MUTED = 4
# 
# Path: google/cloud/errorreporting_v1beta1/types/error_stats_service.py
# class TimedCountAlignment(proto.Enum):
# class ErrorGroupOrder(proto.Enum):
# class ListGroupStatsRequest(proto.Message):
# class ListGroupStatsResponse(proto.Message):
# class ErrorGroupStats(proto.Message):
# class TimedCount(proto.Message):
# class ListEventsRequest(proto.Message):
# class ListEventsResponse(proto.Message):
# class QueryTimeRange(proto.Message):
#     class Period(proto.Enum):
# class ServiceContextFilter(proto.Message):
# class DeleteEventsRequest(proto.Message):
# class DeleteEventsResponse(proto.Message):
#     ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0
#     ALIGNMENT_EQUAL_ROUNDED = 1
#     ALIGNMENT_EQUAL_AT_END = 2
#     GROUP_ORDER_UNSPECIFIED = 0
#     COUNT_DESC = 1
#     LAST_SEEN_DESC = 2
#     CREATED_DESC = 3
#     AFFECTED_USERS_DESC = 4
#         PERIOD_UNSPECIFIED = 0
#         PERIOD_1_HOUR = 1
#         PERIOD_6_HOURS = 2
#         PERIOD_1_DAY = 3
#         PERIOD_1_WEEK = 4
#         PERIOD_30_DAYS = 5
#     def raw_page(self):
#     def raw_page(self):


# Path: google/cloud/errorreporting_v1beta1/services/error_stats_service/pagers.py
from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.errorreporting_v1beta1.types import common
from google.cloud.errorreporting_v1beta1.types import error_stats_service

        metadata: Sequence[Tuple[str, str]] = ()
    ):
        """Instantiates the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.cloud.errorreporting_v1beta1.types.ListEventsRequest):
                The initial request object.
            response (google.cloud.errorreporting_v1beta1.types.ListEventsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        """
        self._method = method
        self._request = error_stats_service.ListEventsRequest(request)
        self._response = response
        self._metadata = metadata

    def __getattr__(self, name: str) -> Any:
        return getattr(self._response, name)

    @property
    async def pages(self) -> AsyncIterator[error_stats_service.ListEventsResponse]:
        yield self._response
        while self._response.next_page_token:
            self._request.page_token = self._response.next_page_token
            self._response = await self._method(self._request, metadata=self._metadata)
            yield self._response


    def __aiter__(self) -> AsyncIterator[common.ErrorEvent]: