# Path: google/cloud/orgpolicy_v2/types/constraint.py
# class Constraint(proto.Message):
#     class ConstraintDefault(proto.Enum):
#     class ListConstraint(proto.Message):
#     class BooleanConstraint(proto.Message):
#         CONSTRAINT_DEFAULT_UNSPECIFIED = 0
#         ALLOW = 1
#         DENY = 2
# 
# Path: google/cloud/orgpolicy_v2/types/orgpolicy.py
# class Policy(proto.Message):
# class AlternatePolicySpec(proto.Message):
# class PolicySpec(proto.Message):
#     class PolicyRule(proto.Message):
#         class StringValues(proto.Message):
# class ListConstraintsRequest(proto.Message):
# class ListConstraintsResponse(proto.Message):
# class ListPoliciesRequest(proto.Message):
# class ListPoliciesResponse(proto.Message):
# class GetPolicyRequest(proto.Message):
# class GetEffectivePolicyRequest(proto.Message):
# class CreatePolicyRequest(proto.Message):
# class UpdatePolicyRequest(proto.Message):
# class DeletePolicyRequest(proto.Message):
#     def raw_page(self):
#     def raw_page(self):


from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.orgpolicy_v2.types import constraint
from google.cloud.orgpolicy_v2.types import orgpolicy
        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.orgpolicy_v2.types.ListConstraintsRequest):
                The initial request object.
            response (google.cloud.orgpolicy_v2.types.ListConstraintsResponse):
                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 = orgpolicy.ListConstraintsRequest(request)
        self._response = response
        self._metadata = metadata

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

    @property
    async def pages(self) -> AsyncIterator[orgpolicy.ListConstraintsResponse]:
        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/orgpolicy_v2/types/constraint.py
# class Constraint(proto.Message):
#     class ConstraintDefault(proto.Enum):
#     class ListConstraint(proto.Message):
#     class BooleanConstraint(proto.Message):
#         CONSTRAINT_DEFAULT_UNSPECIFIED = 0
#         ALLOW = 1
#         DENY = 2
# 
# Path: google/cloud/orgpolicy_v2/types/orgpolicy.py
# class Policy(proto.Message):
# class AlternatePolicySpec(proto.Message):
# class PolicySpec(proto.Message):
#     class PolicyRule(proto.Message):
#         class StringValues(proto.Message):
# class ListConstraintsRequest(proto.Message):
# class ListConstraintsResponse(proto.Message):
# class ListPoliciesRequest(proto.Message):
# class ListPoliciesResponse(proto.Message):
# class GetPolicyRequest(proto.Message):
# class GetEffectivePolicyRequest(proto.Message):
# class CreatePolicyRequest(proto.Message):
# class UpdatePolicyRequest(proto.Message):
# class DeletePolicyRequest(proto.Message):
#     def raw_page(self):
#     def raw_page(self):


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

        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.orgpolicy_v2.types.ListConstraintsRequest):
                The initial request object.
            response (google.cloud.orgpolicy_v2.types.ListConstraintsResponse):
                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 = orgpolicy.ListConstraintsRequest(request)
        self._response = response
        self._metadata = metadata

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

    @property
    async def pages(self) -> AsyncIterator[orgpolicy.ListConstraintsResponse]:
        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[constraint.Constraint]: