# Path: google/cloud/trace_v1/types/trace.py
# class Trace(proto.Message):
# class Traces(proto.Message):
# class TraceSpan(proto.Message):
#     class SpanKind(proto.Enum):
# class ListTracesRequest(proto.Message):
#     class ViewType(proto.Enum):
# class ListTracesResponse(proto.Message):
# class GetTraceRequest(proto.Message):
# class PatchTracesRequest(proto.Message):
#         SPAN_KIND_UNSPECIFIED = 0
#         RPC_SERVER = 1
#         RPC_CLIENT = 2
#         VIEW_TYPE_UNSPECIFIED = 0
#         MINIMAL = 1
#         ROOTSPAN = 2
#         COMPLETE = 3
#     def raw_page(self):


from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.trace_v1.types import trace
    def __iter__(self) -> Iterator[trace.Trace]:
        for page in self.pages:
            yield from page.traces

    def __repr__(self) -> str:
        return "{0}<{1!r}>".format(self.__class__.__name__, self._response)


class ListTracesAsyncPager:
    """A pager for iterating through ``list_traces`` requests.

    This class thinly wraps an initial
    :class:`google.cloud.trace_v1.types.ListTracesResponse` object, and
    provides an ``__aiter__`` method to iterate through its
    ``traces`` field.

    If there are more pages, the ``__aiter__`` method will make additional
    ``ListTraces`` requests and continue to iterate
    through the ``traces`` field on the
    corresponding responses.

    All the usual :class:`google.cloud.trace_v1.types.ListTracesResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
    """

    def __init__(
        self,
        method: Callable[..., Awaitable[trace.ListTracesResponse]],
        request: trace.ListTracesRequest,

# Path: google/cloud/trace_v1/types/trace.py
# class Trace(proto.Message):
# class Traces(proto.Message):
# class TraceSpan(proto.Message):
#     class SpanKind(proto.Enum):
# class ListTracesRequest(proto.Message):
#     class ViewType(proto.Enum):
# class ListTracesResponse(proto.Message):
# class GetTraceRequest(proto.Message):
# class PatchTracesRequest(proto.Message):
#         SPAN_KIND_UNSPECIFIED = 0
#         RPC_SERVER = 1
#         RPC_CLIENT = 2
#         VIEW_TYPE_UNSPECIFIED = 0
#         MINIMAL = 1
#         ROOTSPAN = 2
#         COMPLETE = 3
#     def raw_page(self):


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

    def __iter__(self) -> Iterator[trace.Trace]:
        for page in self.pages:
            yield from page.traces

    def __repr__(self) -> str:
        return "{0}<{1!r}>".format(self.__class__.__name__, self._response)


class ListTracesAsyncPager:
    """A pager for iterating through ``list_traces`` requests.

    This class thinly wraps an initial
    :class:`google.cloud.trace_v1.types.ListTracesResponse` object, and
    provides an ``__aiter__`` method to iterate through its
    ``traces`` field.

    If there are more pages, the ``__aiter__`` method will make additional
    ``ListTraces`` requests and continue to iterate
    through the ``traces`` field on the
    corresponding responses.

    All the usual :class:`google.cloud.trace_v1.types.ListTracesResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
    """

    def __init__(
        self,
        method: Callable[..., Awaitable[trace.ListTracesResponse]],
        request: trace.ListTracesRequest,

        response: trace.ListTracesResponse,