
    <                         d dl mZmZmZmZmZmZmZmZ d dl	m
Z
  G d d      Z G d d      Z G d d      Z G d	 d
      Z G d d      Z G d d      Zy)    )AnyAsyncIterator	AwaitableCallableSequenceTupleOptionalIterator)pubsubc                       e Zd ZdZdddedej                  f   dej                  dej                  dee	e
e
f      fd	Zd
e
defdZedeej                     fd       Zdeej"                     fdZde
fdZy)ListTopicsPagera  A pager for iterating through ``list_topics`` requests.

    This class thinly wraps an initial
    :class:`google.pubsub_v1.types.ListTopicsResponse` object, and
    provides an ``__iter__`` method to iterate through its
    ``topics`` field.

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

    All the usual :class:`google.pubsub_v1.types.ListTopicsResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
     metadatamethod.requestresponser   c                b    || _         t        j                  |      | _        || _        || _        y)a  Instantiate the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.pubsub_v1.types.ListTopicsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListTopicsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        N_methodr   ListTopicsRequest_request	_response	_metadataselfr   r   r   r   s        =lib/third_party/google/pubsub_v1/services/publisher/pagers.py__init__zListTopicsPager.__init__0   +    ( 009!!    namereturnc                 .    t        | j                  |      S Ngetattrr   r   r!   s     r   __getattr__zListTopicsPager.__getattr__I       t~~t,,r    c              #   B  K   | j                    | j                   j                  rw| j                   j                  | j                  _        | j	                  | j                  | j
                        | _         | j                    | j                   j                  rvy y wNr   r   next_page_tokenr   
page_tokenr   r   r   s    r   pageszListTopicsPager.pagesL   h     nnnn,,'+~~'E'EDMM$!\\$--$..\QDN..  nn,,   BBBc              #   Z   K   | j                   D ]  }|j                  E d {     y 7 wr$   r0   topicsr   pages     r   __iter__zListTopicsPager.__iter__T   s$     JJD{{"" "   +)+c                 b    dj                  | j                  j                  | j                        S Nz
{0}<{1!r}>format	__class____name__r   r/   s    r   __repr__zListTopicsPager.__repr__X   #    ""4>>#:#:DNNKKr    N)r?   
__module____qualname____doc__r   r   ListTopicsResponser   r   r   strr   r   r(   propertyr
   r0   Topicr8   r@   r   r    r   r   r      s    . /1"f7778" ))" ++	" 5c?+"2- - - !x 9 9: ! !#(6<<0 #L# Lr    r   c                       e Zd ZdZdddedeej                     f   dej                  dej                  de	e
eef      fd	Zd
edefdZedeej                     fd       Zdeej$                     fdZdefdZy)ListTopicsAsyncPagera  A pager for iterating through ``list_topics`` requests.

    This class thinly wraps an initial
    :class:`google.pubsub_v1.types.ListTopicsResponse` object, and
    provides an ``__aiter__`` method to iterate through its
    ``topics`` field.

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

    All the usual :class:`google.pubsub_v1.types.ListTopicsResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
    r   r   r   .r   r   r   c                b    || _         t        j                  |      | _        || _        || _        y)a  Instantiates the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.pubsub_v1.types.ListTopicsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListTopicsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        Nr   r   s        r   r   zListTopicsAsyncPager.__init__n   r   r    r!   r"   c                 .    t        | j                  |      S r$   r%   r'   s     r   r(   z ListTopicsAsyncPager.__getattr__   r)   r    c                Z  K   | j                    | j                   j                  r| j                   j                  | j                  _        | j	                  | j                  | j
                         d {   | _         | j                    | j                   j                  ry y 7 1wr+   r,   r/   s    r   r0   zListTopicsAsyncPager.pages   n     nnnn,,'+~~'E'EDMM$#'<<<#WWDN..  nn,,W   A5B+7B)8.B+'B+c                       fd} |       S )Nc                 l   K   j                   2 3 d {   } | j                  D ]  }| 	  7 6 y wr$   r4   r7   r   r   s     r   async_generatorz7ListTopicsAsyncPager.__aiter__.<locals>.async_generator   s0     "jj #d $H"N !,#j   4202424r   r   rS   s   ` r   	__aiter__zListTopicsAsyncPager.__aiter__       	#
   r    c                 b    dj                  | j                  j                  | j                        S r;   r<   r/   s    r   r@   zListTopicsAsyncPager.__repr__   rA   r    N)r?   rB   rC   rD   r   r   r   rE   r   r   r   rF   r   r   r(   rG   r   r0   rH   rV   r@   r   r    r   rJ   rJ   \   s    . /1"i(A(ABBC" ))" ++	" 5c?+"2- - - !]6+D+DE ! !!=6 !L# Lr    rJ   c                       e Zd ZdZdddedej                  f   dej                  dej                  dee	e
e
f      fd	Zd
e
defdZedeej                     fd       Zdee
   fdZde
fdZy)ListTopicSubscriptionsPagera  A pager for iterating through ``list_topic_subscriptions`` requests.

    This class thinly wraps an initial
    :class:`google.pubsub_v1.types.ListTopicSubscriptionsResponse` object, and
    provides an ``__iter__`` method to iterate through its
    ``subscriptions`` field.

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

    All the usual :class:`google.pubsub_v1.types.ListTopicSubscriptionsResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
    r   r   r   .r   r   r   c                b    || _         t        j                  |      | _        || _        || _        y)a  Instantiate the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.pubsub_v1.types.ListTopicSubscriptionsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListTopicSubscriptionsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        Nr   r   ListTopicSubscriptionsRequestr   r   r   r   s        r   r   z$ListTopicSubscriptionsPager.__init__   +    ( <<WE!!r    r!   r"   c                 .    t        | j                  |      S r$   r%   r'   s     r   r(   z'ListTopicSubscriptionsPager.__getattr__   r)   r    c              #   B  K   | j                    | j                   j                  rw| j                   j                  | j                  _        | j	                  | j                  | j
                        | _         | j                    | j                   j                  rvy y wr+   r,   r/   s    r   r0   z!ListTopicSubscriptionsPager.pages   r1   r2   c              #   Z   K   | j                   D ]  }|j                  E d {     y 7 wr$   r0   subscriptionsr6   s     r   r8   z$ListTopicSubscriptionsPager.__iter__   s&     JJD)))) )r9   c                 b    dj                  | j                  j                  | j                        S r;   r<   r/   s    r   r@   z$ListTopicSubscriptionsPager.__repr__   rA   r    N)r?   rB   rC   rD   r   r   ListTopicSubscriptionsResponser]   r   r   rF   r   r   r(   rG   r
   r0   r8   r@   r   r    r   rZ   rZ      s    . /1"fCCCD" 55" 77	" 5c?+"2- - - !x E EF ! !*(3- *L# Lr    rZ   c                       e Zd ZdZdddedeej                     f   dej                  dej                  de	e
eef      fd	Zd
edefdZedeej                     fd       Zdee   fdZdefdZy) ListTopicSubscriptionsAsyncPagera  A pager for iterating through ``list_topic_subscriptions`` requests.

    This class thinly wraps an initial
    :class:`google.pubsub_v1.types.ListTopicSubscriptionsResponse` object, and
    provides an ``__aiter__`` method to iterate through its
    ``subscriptions`` field.

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

    All the usual :class:`google.pubsub_v1.types.ListTopicSubscriptionsResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
    r   r   r   .r   r   r   c                b    || _         t        j                  |      | _        || _        || _        y)a  Instantiates the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.pubsub_v1.types.ListTopicSubscriptionsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListTopicSubscriptionsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        Nr\   r   s        r   r   z)ListTopicSubscriptionsAsyncPager.__init__   r^   r    r!   r"   c                 .    t        | j                  |      S r$   r%   r'   s     r   r(   z,ListTopicSubscriptionsAsyncPager.__getattr__  r)   r    c                Z  K   | j                    | j                   j                  r| j                   j                  | j                  _        | j	                  | j                  | j
                         d {   | _         | j                    | j                   j                  ry y 7 1wr+   r,   r/   s    r   r0   z&ListTopicSubscriptionsAsyncPager.pages
  rN   rO   c                       fd} |       S )Nc                 l   K   j                   2 3 d {   } | j                  D ]  }| 	  7 6 y wr$   rb   rR   s     r   rS   zCListTopicSubscriptionsAsyncPager.__aiter__.<locals>.async_generator  s2     "jj #d $ 2 2H"N !3#jrT   r   rU   s   ` r   rV   z*ListTopicSubscriptionsAsyncPager.__aiter__  rW   r    c                 b    dj                  | j                  j                  | j                        S r;   r<   r/   s    r   r@   z)ListTopicSubscriptionsAsyncPager.__repr__  rA   r    N)r?   rB   rC   rD   r   r   r   re   r]   r   r   rF   r   r   r(   rG   r   r0   rV   r@   r   r    r   rg   rg      s    . /1"i(M(MNNO" 55" 77	" 5c?+"2- - - !]6+P+PQ ! !!=- !L# Lr    rg   c                       e Zd ZdZdddedej                  f   dej                  dej                  dee	e
e
f      fd	Zd
e
defdZedeej                     fd       Zdee
   fdZde
fdZy)ListTopicSnapshotsPagera  A pager for iterating through ``list_topic_snapshots`` requests.

    This class thinly wraps an initial
    :class:`google.pubsub_v1.types.ListTopicSnapshotsResponse` object, and
    provides an ``__iter__`` method to iterate through its
    ``snapshots`` field.

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

    All the usual :class:`google.pubsub_v1.types.ListTopicSnapshotsResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
    r   r   r   .r   r   r   c                b    || _         t        j                  |      | _        || _        || _        y)a  Instantiate the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.pubsub_v1.types.ListTopicSnapshotsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListTopicSnapshotsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        Nr   r   ListTopicSnapshotsRequestr   r   r   r   s        r   r   z ListTopicSnapshotsPager.__init__0  +    ( 88A!!r    r!   r"   c                 .    t        | j                  |      S r$   r%   r'   s     r   r(   z#ListTopicSnapshotsPager.__getattr__I  r)   r    c              #   B  K   | j                    | j                   j                  rw| j                   j                  | j                  _        | j	                  | j                  | j
                        | _         | j                    | j                   j                  rvy y wr+   r,   r/   s    r   r0   zListTopicSnapshotsPager.pagesL  r1   r2   c              #   Z   K   | j                   D ]  }|j                  E d {     y 7 wr$   r0   	snapshotsr6   s     r   r8   z ListTopicSnapshotsPager.__iter__T  s$     JJD~~%% %r9   c                 b    dj                  | j                  j                  | j                        S r;   r<   r/   s    r   r@   z ListTopicSnapshotsPager.__repr__X  rA   r    N)r?   rB   rC   rD   r   r   ListTopicSnapshotsResponserr   r   r   rF   r   r   r(   rG   r
   r0   r8   r@   r   r    r   ro   ro     s    . /1"f???@" 11" 33	" 5c?+"2- - - !x A AB ! !&(3- &L# Lr    ro   c                       e Zd ZdZdddedeej                     f   dej                  dej                  de	e
eef      fd	Zd
edefdZedeej                     fd       Zdee   fdZdefdZy)ListTopicSnapshotsAsyncPagera  A pager for iterating through ``list_topic_snapshots`` requests.

    This class thinly wraps an initial
    :class:`google.pubsub_v1.types.ListTopicSnapshotsResponse` object, and
    provides an ``__aiter__`` method to iterate through its
    ``snapshots`` field.

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

    All the usual :class:`google.pubsub_v1.types.ListTopicSnapshotsResponse`
    attributes are available on the pager. If multiple requests are made, only
    the most recent response is retained, and thus used for attribute lookup.
    r   r   r   .r   r   r   c                b    || _         t        j                  |      | _        || _        || _        y)a  Instantiates the pager.

        Args:
            method (Callable): The method that was originally called, and
                which instantiated this pager.
            request (google.pubsub_v1.types.ListTopicSnapshotsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListTopicSnapshotsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        Nrq   r   s        r   r   z%ListTopicSnapshotsAsyncPager.__init__n  rs   r    r!   r"   c                 .    t        | j                  |      S r$   r%   r'   s     r   r(   z(ListTopicSnapshotsAsyncPager.__getattr__  r)   r    c                Z  K   | j                    | j                   j                  r| j                   j                  | j                  _        | j	                  | j                  | j
                         d {   | _         | j                    | j                   j                  ry y 7 1wr+   r,   r/   s    r   r0   z"ListTopicSnapshotsAsyncPager.pages  rN   rO   c                       fd} |       S )Nc                 l   K   j                   2 3 d {   } | j                  D ]  }| 	  7 6 y wr$   rw   rR   s     r   rS   z?ListTopicSnapshotsAsyncPager.__aiter__.<locals>.async_generator  s0     "jj #d $H"N !/#jrT   r   rU   s   ` r   rV   z&ListTopicSnapshotsAsyncPager.__aiter__  rW   r    c                 b    dj                  | j                  j                  | j                        S r;   r<   r/   s    r   r@   z%ListTopicSnapshotsAsyncPager.__repr__  rA   r    N)r?   rB   rC   rD   r   r   r   rz   rr   r   r   rF   r   r   r(   rG   r   r0   rV   r@   r   r    r   r|   r|   \  s    . /1"i(I(IJJK" 11" 33	" 5c?+"2- - - !]6+L+LM ! !!=- !L# Lr    r|   N)typingr   r   r   r   r   r   r	   r
   google.pubsub_v1.typesr   r   rJ   rZ   rg   ro   r|   r   r    r   <module>r      sf    	 	 	 *;L ;L|?L ?LD;L ;L|?L ?LD;L ;L|?L ?Lr    