# 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
            async for page in self.pages:
                for response in page.constraints:
                    yield response

        return async_generator()

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


class ListPoliciesPager:
    """A pager for iterating through ``list_policies`` requests.

    This class thinly wraps an initial
    :class:`google.cloud.orgpolicy_v2.types.ListPoliciesResponse` object, and
    provides an ``__iter__`` method to iterate through its
    ``policies`` field.

    If there are more pages, the ``__iter__`` method will make additional
    ``ListPolicies`` requests and continue to iterate
    through the ``policies`` field on the
    corresponding responses.

    All the usual :class:`google.cloud.orgpolicy_v2.types.ListPoliciesResponse`
    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/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

            async for page in self.pages:
                for response in page.constraints:
                    yield response

        return async_generator()

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


class ListPoliciesPager:
    """A pager for iterating through ``list_policies`` requests.

    This class thinly wraps an initial
    :class:`google.cloud.orgpolicy_v2.types.ListPoliciesResponse` object, and
    provides an ``__iter__`` method to iterate through its
    ``policies`` field.

    If there are more pages, the ``__iter__`` method will make additional
    ``ListPolicies`` requests and continue to iterate
    through the ``policies`` field on the
    corresponding responses.

    All the usual :class:`google.cloud.orgpolicy_v2.types.ListPoliciesResponse`
    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[..., orgpolicy.ListPoliciesResponse],