# Path: google/cloud/servicedirectory_v1beta1/types/endpoint.py
# class Endpoint(proto.Message):
# 
# Path: google/cloud/servicedirectory_v1beta1/types/namespace.py
# class Namespace(proto.Message):
# 
# Path: google/cloud/servicedirectory_v1beta1/types/registration_service.py
# class CreateNamespaceRequest(proto.Message):
# class ListNamespacesRequest(proto.Message):
# class ListNamespacesResponse(proto.Message):
# class GetNamespaceRequest(proto.Message):
# class UpdateNamespaceRequest(proto.Message):
# class DeleteNamespaceRequest(proto.Message):
# class CreateServiceRequest(proto.Message):
# class ListServicesRequest(proto.Message):
# class ListServicesResponse(proto.Message):
# class GetServiceRequest(proto.Message):
# class UpdateServiceRequest(proto.Message):
# class DeleteServiceRequest(proto.Message):
# class CreateEndpointRequest(proto.Message):
# class ListEndpointsRequest(proto.Message):
# class ListEndpointsResponse(proto.Message):
# class GetEndpointRequest(proto.Message):
# class UpdateEndpointRequest(proto.Message):
# class DeleteEndpointRequest(proto.Message):
#     def raw_page(self):
#     def raw_page(self):
#     def raw_page(self):
# 
# Path: google/cloud/servicedirectory_v1beta1/types/service.py
# class Service(proto.Message):


from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.servicedirectory_v1beta1.types import endpoint
from google.cloud.servicedirectory_v1beta1.types import namespace
from google.cloud.servicedirectory_v1beta1.types import registration_service
from google.cloud.servicedirectory_v1beta1.types import service
        metadata: Sequence[Tuple[str, str]] = ()
    ):
        """Instantiate the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.cloud.servicedirectory_v1beta1.types.ListNamespacesRequest):
                The initial request object.
            response (google.cloud.servicedirectory_v1beta1.types.ListNamespacesResponse):
                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 = registration_service.ListNamespacesRequest(request)
        self._response = response
        self._metadata = metadata

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

    @property
    def pages(self) -> Iterator[registration_service.ListNamespacesResponse]:
        yield self._response
        while self._response.next_page_token:
            self._request.page_token = self._response.next_page_token
            self._response = self._method(self._request, metadata=self._metadata)
            yield self._response


# Path: google/cloud/servicedirectory_v1beta1/types/endpoint.py
# class Endpoint(proto.Message):
# 
# Path: google/cloud/servicedirectory_v1beta1/types/namespace.py
# class Namespace(proto.Message):
# 
# Path: google/cloud/servicedirectory_v1beta1/types/registration_service.py
# class CreateNamespaceRequest(proto.Message):
# class ListNamespacesRequest(proto.Message):
# class ListNamespacesResponse(proto.Message):
# class GetNamespaceRequest(proto.Message):
# class UpdateNamespaceRequest(proto.Message):
# class DeleteNamespaceRequest(proto.Message):
# class CreateServiceRequest(proto.Message):
# class ListServicesRequest(proto.Message):
# class ListServicesResponse(proto.Message):
# class GetServiceRequest(proto.Message):
# class UpdateServiceRequest(proto.Message):
# class DeleteServiceRequest(proto.Message):
# class CreateEndpointRequest(proto.Message):
# class ListEndpointsRequest(proto.Message):
# class ListEndpointsResponse(proto.Message):
# class GetEndpointRequest(proto.Message):
# class UpdateEndpointRequest(proto.Message):
# class DeleteEndpointRequest(proto.Message):
#     def raw_page(self):
#     def raw_page(self):
#     def raw_page(self):
# 
# Path: google/cloud/servicedirectory_v1beta1/types/service.py
# class Service(proto.Message):


# Path: google/cloud/servicedirectory_v1beta1/services/registration_service/pagers.py
from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.servicedirectory_v1beta1.types import endpoint
from google.cloud.servicedirectory_v1beta1.types import namespace
from google.cloud.servicedirectory_v1beta1.types import registration_service
from google.cloud.servicedirectory_v1beta1.types import service

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

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.cloud.servicedirectory_v1beta1.types.ListNamespacesRequest):
                The initial request object.
            response (google.cloud.servicedirectory_v1beta1.types.ListNamespacesResponse):
                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 = registration_service.ListNamespacesRequest(request)
        self._response = response
        self._metadata = metadata

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

    @property
    def pages(self) -> Iterator[registration_service.ListNamespacesResponse]:
        yield self._response
        while self._response.next_page_token:
            self._request.page_token = self._response.next_page_token
            self._response = self._method(self._request, metadata=self._metadata)
            yield self._response


    def __iter__(self) -> Iterator[namespace.Namespace]: