# Path: google/cloud/recommender_v1beta1/types/insight.py
# class Insight(proto.Message):
#     class Category(proto.Enum):
#     class Severity(proto.Enum):
#     class RecommendationReference(proto.Message):
# class InsightStateInfo(proto.Message):
#     class State(proto.Enum):
#         CATEGORY_UNSPECIFIED = 0
#         COST = 1
#         SECURITY = 2
#         PERFORMANCE = 3
#         MANAGEABILITY = 4
#         SEVERITY_UNSPECIFIED = 0
#         LOW = 1
#         MEDIUM = 2
#         HIGH = 3
#         CRITICAL = 4
#         STATE_UNSPECIFIED = 0
#         ACTIVE = 1
#         ACCEPTED = 2
#         DISMISSED = 3
# 
# Path: google/cloud/recommender_v1beta1/types/recommendation.py
# class Recommendation(proto.Message):
#     class Priority(proto.Enum):
#     class InsightReference(proto.Message):
# class RecommendationContent(proto.Message):
# class OperationGroup(proto.Message):
# class Operation(proto.Message):
# class ValueMatcher(proto.Message):
# class CostProjection(proto.Message):
# class SecurityProjection(proto.Message):
# class SustainabilityProjection(proto.Message):
# class Impact(proto.Message):
#     class Category(proto.Enum):
# class RecommendationStateInfo(proto.Message):
#     class State(proto.Enum):
#         PRIORITY_UNSPECIFIED = 0
#         P4 = 1
#         P3 = 2
#         P2 = 3
#         P1 = 4
#         CATEGORY_UNSPECIFIED = 0
#         COST = 1
#         SECURITY = 2
#         PERFORMANCE = 3
#         MANAGEABILITY = 4
#         SUSTAINABILITY = 5
#         STATE_UNSPECIFIED = 0
#         ACTIVE = 1
#         CLAIMED = 6
#         SUCCEEDED = 3
#         FAILED = 4
#         DISMISSED = 5
# 
# Path: google/cloud/recommender_v1beta1/types/recommender_service.py
# class ListInsightsRequest(proto.Message):
# class ListInsightsResponse(proto.Message):
# class GetInsightRequest(proto.Message):
# class MarkInsightAcceptedRequest(proto.Message):
# class ListRecommendationsRequest(proto.Message):
# class ListRecommendationsResponse(proto.Message):
# class GetRecommendationRequest(proto.Message):
# class MarkRecommendationClaimedRequest(proto.Message):
# class MarkRecommendationSucceededRequest(proto.Message):
# class MarkRecommendationFailedRequest(proto.Message):
# class GetRecommenderConfigRequest(proto.Message):
# class UpdateRecommenderConfigRequest(proto.Message):
# class GetInsightTypeConfigRequest(proto.Message):
# class UpdateInsightTypeConfigRequest(proto.Message):
#     def raw_page(self):
#     def raw_page(self):


from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.recommender_v1beta1.types import insight
from google.cloud.recommender_v1beta1.types import recommendation
from google.cloud.recommender_v1beta1.types import recommender_service
        """Instantiates the pager.

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

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

    @property
    async def pages(
        self,
    ) -> AsyncIterator[recommender_service.ListRecommendationsResponse]:
        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/recommender_v1beta1/types/insight.py
# class Insight(proto.Message):
#     class Category(proto.Enum):
#     class Severity(proto.Enum):
#     class RecommendationReference(proto.Message):
# class InsightStateInfo(proto.Message):
#     class State(proto.Enum):
#         CATEGORY_UNSPECIFIED = 0
#         COST = 1
#         SECURITY = 2
#         PERFORMANCE = 3
#         MANAGEABILITY = 4
#         SEVERITY_UNSPECIFIED = 0
#         LOW = 1
#         MEDIUM = 2
#         HIGH = 3
#         CRITICAL = 4
#         STATE_UNSPECIFIED = 0
#         ACTIVE = 1
#         ACCEPTED = 2
#         DISMISSED = 3
# 
# Path: google/cloud/recommender_v1beta1/types/recommendation.py
# class Recommendation(proto.Message):
#     class Priority(proto.Enum):
#     class InsightReference(proto.Message):
# class RecommendationContent(proto.Message):
# class OperationGroup(proto.Message):
# class Operation(proto.Message):
# class ValueMatcher(proto.Message):
# class CostProjection(proto.Message):
# class SecurityProjection(proto.Message):
# class SustainabilityProjection(proto.Message):
# class Impact(proto.Message):
#     class Category(proto.Enum):
# class RecommendationStateInfo(proto.Message):
#     class State(proto.Enum):
#         PRIORITY_UNSPECIFIED = 0
#         P4 = 1
#         P3 = 2
#         P2 = 3
#         P1 = 4
#         CATEGORY_UNSPECIFIED = 0
#         COST = 1
#         SECURITY = 2
#         PERFORMANCE = 3
#         MANAGEABILITY = 4
#         SUSTAINABILITY = 5
#         STATE_UNSPECIFIED = 0
#         ACTIVE = 1
#         CLAIMED = 6
#         SUCCEEDED = 3
#         FAILED = 4
#         DISMISSED = 5
# 
# Path: google/cloud/recommender_v1beta1/types/recommender_service.py
# class ListInsightsRequest(proto.Message):
# class ListInsightsResponse(proto.Message):
# class GetInsightRequest(proto.Message):
# class MarkInsightAcceptedRequest(proto.Message):
# class ListRecommendationsRequest(proto.Message):
# class ListRecommendationsResponse(proto.Message):
# class GetRecommendationRequest(proto.Message):
# class MarkRecommendationClaimedRequest(proto.Message):
# class MarkRecommendationSucceededRequest(proto.Message):
# class MarkRecommendationFailedRequest(proto.Message):
# class GetRecommenderConfigRequest(proto.Message):
# class UpdateRecommenderConfigRequest(proto.Message):
# class GetInsightTypeConfigRequest(proto.Message):
# class UpdateInsightTypeConfigRequest(proto.Message):
#     def raw_page(self):
#     def raw_page(self):


# Path: google/cloud/recommender_v1beta1/services/recommender/pagers.py
from typing import (
    Any,
    AsyncIterator,
    Awaitable,
    Callable,
    Sequence,
    Tuple,
    Optional,
    Iterator,
)
from google.cloud.recommender_v1beta1.types import insight
from google.cloud.recommender_v1beta1.types import recommendation
from google.cloud.recommender_v1beta1.types import recommender_service

        """Instantiates the pager.

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

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

    @property
    async def pages(
        self,
    ) -> AsyncIterator[recommender_service.ListRecommendationsResponse]:
        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[recommendation.Recommendation]: