a
    !f<                     @   s   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 dZG dd dZG dd dZG d	d
 d
ZG dd dZG dd dZdS )    )AnyAsyncIterator	AwaitableCallableSequenceTupleOptionalIterator)pubsubc                   @   s   e Zd ZdZddedejf ejejee	e
e
f  dddZe
edd	d
Zeeej dddZeej dddZe
dddZdS )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                C   s"   || _ t|| _|| _|| _dS )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   r   r   k/var/www/html/python-backend/venv/lib/python3.9/site-packages/google/pubsub_v1/services/publisher/pagers.py__init__0   s    zListTopicsPager.__init__namereturnc                 C   s   t | j|S Ngetattrr   r   r   r   r   r   __getattr__I   s    zListTopicsPager.__getattr__r   c                 c   s>   | j V  | j jr:| j j| j_| j| j| jd| _ | j V  qd S Nr   r   Znext_page_tokenr   Z
page_tokenr   r   r   r   r   r   pagesL   s
    zListTopicsPager.pagesc                 c   s   | j D ]}|jE d H  qd S r    r)   Ztopicsr   pager   r   r   __iter__T   s    
zListTopicsPager.__iter__c                 C   s   d | jj| jS Nz
{0}<{1!r}>format	__class____name__r   r(   r   r   r   __repr__X   s    zListTopicsPager.__repr__N)r2   
__module____qualname____doc__r   r
   ListTopicsResponser   r   r   strr   r   r$   propertyr	   r)   Topicr-   r3   r   r   r   r   r      s   r   c                   @   s   e Zd ZdZddedeej f ejeje	e
eef  dddZeedd	d
Zeeej dddZeej dddZedddZdS )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   c                C   s"   || _ t|| _|| _|| _dS )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   r   r   r   r   n   s    zListTopicsAsyncPager.__init__r   c                 C   s   t | j|S r    r!   r#   r   r   r   r$      s    z ListTopicsAsyncPager.__getattr__r%   c                 C  sD   | j V  | j jr@| j j| j_| j| j| jdI d H | _ | j V  qd S r&   r'   r(   r   r   r   r)      s
    zListTopicsAsyncPager.pagesc                    s    fdd}| S )Nc                    s,    j 2 z3 d H W } | jD ]
}|V  qq6 d S r    r*   r,   r   r(   r   r   async_generator   s    
z7ListTopicsAsyncPager.__aiter__.<locals>.async_generatorr   r   r=   r   r(   r   	__aiter__   s    zListTopicsAsyncPager.__aiter__c                 C   s   d | jj| jS r.   r/   r(   r   r   r   r3      s    zListTopicsAsyncPager.__repr__N)r2   r4   r5   r6   r   r   r
   r7   r   r   r   r8   r   r   r$   r9   r   r)   r:   r?   r3   r   r   r   r   r;   \   s   r;   c                   @   s   e Zd ZdZddedejf ejejee	e
e
f  dddZe
edd	d
Zeeej dddZee
 dddZe
dddZdS )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   c                C   s"   || _ t|| _|| _|| _dS )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   r   r   r   r      s    z$ListTopicSubscriptionsPager.__init__r   c                 C   s   t | j|S r    r!   r#   r   r   r   r$      s    z'ListTopicSubscriptionsPager.__getattr__r%   c                 c   s>   | j V  | j jr:| j j| j_| j| j| jd| _ | j V  qd S r&   r'   r(   r   r   r   r)      s
    z!ListTopicSubscriptionsPager.pagesc                 c   s   | j D ]}|jE d H  qd S r    r)   Zsubscriptionsr+   r   r   r   r-      s    
z$ListTopicSubscriptionsPager.__iter__c                 C   s   d | jj| jS r.   r/   r(   r   r   r   r3      s    z$ListTopicSubscriptionsPager.__repr__N)r2   r4   r5   r6   r   r
   ListTopicSubscriptionsResponserB   r   r   r8   r   r   r$   r9   r	   r)   r-   r3   r   r   r   r   r@      s   r@   c                   @   s   e Zd ZdZddedeej f ejeje	e
eef  dddZeedd	d
Zeeej dddZee dddZedddZdS ) 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   c                C   s"   || _ t|| _|| _|| _dS )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.
        NrA   r   r   r   r   r      s    z)ListTopicSubscriptionsAsyncPager.__init__r   c                 C   s   t | j|S r    r!   r#   r   r   r   r$     s    z,ListTopicSubscriptionsAsyncPager.__getattr__r%   c                 C  sD   | j V  | j jr@| j j| j_| j| j| jdI d H | _ | j V  qd S r&   r'   r(   r   r   r   r)   
  s
    z&ListTopicSubscriptionsAsyncPager.pagesc                    s    fdd}| S )Nc                    s,    j 2 z3 d H W } | jD ]
}|V  qq6 d S r    rC   r<   r(   r   r   r=     s    
zCListTopicSubscriptionsAsyncPager.__aiter__.<locals>.async_generatorr   r>   r   r(   r   r?     s    z*ListTopicSubscriptionsAsyncPager.__aiter__c                 C   s   d | jj| jS r.   r/   r(   r   r   r   r3     s    z)ListTopicSubscriptionsAsyncPager.__repr__N)r2   r4   r5   r6   r   r   r
   rD   rB   r   r   r8   r   r   r$   r9   r   r)   r?   r3   r   r   r   r   rE      s   rE   c                   @   s   e Zd ZdZddedejf ejejee	e
e
f  dddZe
edd	d
Zeeej dddZee
 dddZe
dddZdS )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   c                C   s"   || _ t|| _|| _|| _dS )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   r   r   r   r   0  s    z ListTopicSnapshotsPager.__init__r   c                 C   s   t | j|S r    r!   r#   r   r   r   r$   I  s    z#ListTopicSnapshotsPager.__getattr__r%   c                 c   s>   | j V  | j jr:| j j| j_| j| j| jd| _ | j V  qd S r&   r'   r(   r   r   r   r)   L  s
    zListTopicSnapshotsPager.pagesc                 c   s   | j D ]}|jE d H  qd S r    r)   Z	snapshotsr+   r   r   r   r-   T  s    
z ListTopicSnapshotsPager.__iter__c                 C   s   d | jj| jS r.   r/   r(   r   r   r   r3   X  s    z ListTopicSnapshotsPager.__repr__N)r2   r4   r5   r6   r   r
   ListTopicSnapshotsResponserH   r   r   r8   r   r   r$   r9   r	   r)   r-   r3   r   r   r   r   rF     s   rF   c                   @   s   e Zd ZdZddedeej f ejeje	e
eef  dddZeedd	d
Zeeej dddZee dddZedddZdS )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   c                C   s"   || _ t|| _|| _|| _dS )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.
        NrG   r   r   r   r   r   n  s    z%ListTopicSnapshotsAsyncPager.__init__r   c                 C   s   t | j|S r    r!   r#   r   r   r   r$     s    z(ListTopicSnapshotsAsyncPager.__getattr__r%   c                 C  sD   | j V  | j jr@| j j| j_| j| j| jdI d H | _ | j V  qd S r&   r'   r(   r   r   r   r)     s
    z"ListTopicSnapshotsAsyncPager.pagesc                    s    fdd}| S )Nc                    s,    j 2 z3 d H W } | jD ]
}|V  qq6 d S r    rI   r<   r(   r   r   r=     s    
z?ListTopicSnapshotsAsyncPager.__aiter__.<locals>.async_generatorr   r>   r   r(   r   r?     s    z&ListTopicSnapshotsAsyncPager.__aiter__c                 C   s   d | jj| jS r.   r/   r(   r   r   r   r3     s    z%ListTopicSnapshotsAsyncPager.__repr__N)r2   r4   r5   r6   r   r   r
   rJ   rH   r   r   r8   r   r   r$   r9   r   r)   r?   r3   r   r   r   r   rK   \  s   rK   N)typingr   r   r   r   r   r   r   r	   Zgoogle.pubsub_v1.typesr
   r   r;   r@   rE   rF   rK   r   r   r   r   <module>   s   (>B>B>