# Path: google/cloud/redis_v1/types/cloud_redis.py
# class NodeInfo(proto.Message):
# class Instance(proto.Message):
#     class State(proto.Enum):
#     class Tier(proto.Enum):
#     class ConnectMode(proto.Enum):
#     class ReadReplicasMode(proto.Enum):
# class ListInstancesRequest(proto.Message):
# class ListInstancesResponse(proto.Message):
# class GetInstanceRequest(proto.Message):
# class CreateInstanceRequest(proto.Message):
# class UpdateInstanceRequest(proto.Message):
# class UpgradeInstanceRequest(proto.Message):
# class DeleteInstanceRequest(proto.Message):
# class GcsSource(proto.Message):
# class InputConfig(proto.Message):
# class ImportInstanceRequest(proto.Message):
# class GcsDestination(proto.Message):
# class OutputConfig(proto.Message):
# class ExportInstanceRequest(proto.Message):
# class FailoverInstanceRequest(proto.Message):
#     class DataProtectionMode(proto.Enum):
# class OperationMetadata(proto.Message):
# class LocationMetadata(proto.Message):
# class ZoneMetadata(proto.Message):
#         STATE_UNSPECIFIED = 0
#         CREATING = 1
#         READY = 2
#         UPDATING = 3
#         DELETING = 4
#         REPAIRING = 5
#         MAINTENANCE = 6
#         IMPORTING = 8
#         FAILING_OVER = 9
#         TIER_UNSPECIFIED = 0
#         BASIC = 1
#         STANDARD_HA = 3
#         CONNECT_MODE_UNSPECIFIED = 0
#         DIRECT_PEERING = 1
#         PRIVATE_SERVICE_ACCESS = 2
#         READ_REPLICAS_MODE_UNSPECIFIED = 0
#         READ_REPLICAS_DISABLED = 1
#         READ_REPLICAS_ENABLED = 2
#         DATA_PROTECTION_MODE_UNSPECIFIED = 0
#         LIMITED_DATA_LOSS = 1
#         FORCE_DATA_LOSS = 2
#     def raw_page(self):


from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.redis_v1.types import cloud_redis
            yield self._response

    def __iter__(self) -> Iterator[cloud_redis.Instance]:
        for page in self.pages:
            yield from page.instances

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


class ListInstancesAsyncPager:
    """A pager for iterating through ``list_instances`` requests.

    This class thinly wraps an initial
    :class:`google.cloud.redis_v1.types.ListInstancesResponse` object, and
    provides an ``__aiter__`` method to iterate through its
    ``instances`` field.

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

    All the usual :class:`google.cloud.redis_v1.types.ListInstancesResponse`
    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,

# Path: google/cloud/redis_v1/types/cloud_redis.py
# class NodeInfo(proto.Message):
# class Instance(proto.Message):
#     class State(proto.Enum):
#     class Tier(proto.Enum):
#     class ConnectMode(proto.Enum):
#     class ReadReplicasMode(proto.Enum):
# class ListInstancesRequest(proto.Message):
# class ListInstancesResponse(proto.Message):
# class GetInstanceRequest(proto.Message):
# class CreateInstanceRequest(proto.Message):
# class UpdateInstanceRequest(proto.Message):
# class UpgradeInstanceRequest(proto.Message):
# class DeleteInstanceRequest(proto.Message):
# class GcsSource(proto.Message):
# class InputConfig(proto.Message):
# class ImportInstanceRequest(proto.Message):
# class GcsDestination(proto.Message):
# class OutputConfig(proto.Message):
# class ExportInstanceRequest(proto.Message):
# class FailoverInstanceRequest(proto.Message):
#     class DataProtectionMode(proto.Enum):
# class OperationMetadata(proto.Message):
# class LocationMetadata(proto.Message):
# class ZoneMetadata(proto.Message):
#         STATE_UNSPECIFIED = 0
#         CREATING = 1
#         READY = 2
#         UPDATING = 3
#         DELETING = 4
#         REPAIRING = 5
#         MAINTENANCE = 6
#         IMPORTING = 8
#         FAILING_OVER = 9
#         TIER_UNSPECIFIED = 0
#         BASIC = 1
#         STANDARD_HA = 3
#         CONNECT_MODE_UNSPECIFIED = 0
#         DIRECT_PEERING = 1
#         PRIVATE_SERVICE_ACCESS = 2
#         READ_REPLICAS_MODE_UNSPECIFIED = 0
#         READ_REPLICAS_DISABLED = 1
#         READ_REPLICAS_ENABLED = 2
#         DATA_PROTECTION_MODE_UNSPECIFIED = 0
#         LIMITED_DATA_LOSS = 1
#         FORCE_DATA_LOSS = 2
#     def raw_page(self):


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

            yield self._response

    def __iter__(self) -> Iterator[cloud_redis.Instance]:
        for page in self.pages:
            yield from page.instances

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


class ListInstancesAsyncPager:
    """A pager for iterating through ``list_instances`` requests.

    This class thinly wraps an initial
    :class:`google.cloud.redis_v1.types.ListInstancesResponse` object, and
    provides an ``__aiter__`` method to iterate through its
    ``instances`` field.

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

    All the usual :class:`google.cloud.redis_v1.types.ListInstancesResponse`
    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[cloud_redis.ListInstancesResponse]],