a
    !fl)                     @   sp   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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 )ListSubscriptionsPagera  A pager for iterating through ``list_subscriptions`` requests.

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

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

    All the usual :class:`google.pubsub_v1.types.ListSubscriptionsResponse`
    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.ListSubscriptionsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListSubscriptionsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        N_methodr
   ListSubscriptionsRequest_request	_response	_metadataselfr   r   r   r   r   r   l/var/www/html/python-backend/venv/lib/python3.9/site-packages/google/pubsub_v1/services/subscriber/pagers.py__init__0   s    zListSubscriptionsPager.__init__namereturnc                 C   s   t | j|S Ngetattrr   r   r   r   r   r   __getattr__I   s    z"ListSubscriptionsPager.__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ListSubscriptionsPager.pagesc                 c   s   | j D ]}|jE d H  qd S r    r)   Zsubscriptionsr   pager   r   r   __iter__T   s    
zListSubscriptionsPager.__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ListSubscriptionsPager.__repr__N)r2   
__module____qualname____doc__r   r
   ListSubscriptionsResponser   r   r   strr   r   r$   propertyr	   r)   Subscriptionr-   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 )ListSubscriptionsAsyncPagera  A pager for iterating through ``list_subscriptions`` requests.

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

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

    All the usual :class:`google.pubsub_v1.types.ListSubscriptionsResponse`
    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.ListSubscriptionsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListSubscriptionsResponse):
                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$ListSubscriptionsAsyncPager.__init__r   c                 C   s   t | j|S r    r!   r#   r   r   r   r$      s    z'ListSubscriptionsAsyncPager.__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!ListSubscriptionsAsyncPager.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    
z>ListSubscriptionsAsyncPager.__aiter__.<locals>.async_generatorr   r   r=   r   r(   r   	__aiter__   s    z%ListSubscriptionsAsyncPager.__aiter__c                 C   s   d | jj| jS r.   r/   r(   r   r   r   r3      s    z$ListSubscriptionsAsyncPager.__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j dddZe
dddZdS )ListSnapshotsPagera  A pager for iterating through ``list_snapshots`` requests.

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

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

    All the usual :class:`google.pubsub_v1.types.ListSnapshotsResponse`
    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.ListSnapshotsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListSnapshotsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        Nr   r
   ListSnapshotsRequestr   r   r   r   r   r   r   r      s    zListSnapshotsPager.__init__r   c                 C   s   t | j|S r    r!   r#   r   r   r   r$      s    zListSnapshotsPager.__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ListSnapshotsPager.pagesc                 c   s   | j D ]}|jE d H  qd S r    r)   Z	snapshotsr+   r   r   r   r-      s    
zListSnapshotsPager.__iter__c                 C   s   d | jj| jS r.   r/   r(   r   r   r   r3      s    zListSnapshotsPager.__repr__N)r2   r4   r5   r6   r   r
   ListSnapshotsResponserB   r   r   r8   r   r   r$   r9   r	   r)   Snapshotr-   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 )ListSnapshotsAsyncPagera  A pager for iterating through ``list_snapshots`` requests.

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

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

    All the usual :class:`google.pubsub_v1.types.ListSnapshotsResponse`
    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.ListSnapshotsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListSnapshotsResponse):
                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 ListSnapshotsAsyncPager.__init__r   c                 C   s   t | j|S r    r!   r#   r   r   r   r$     s    z#ListSnapshotsAsyncPager.__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ListSnapshotsAsyncPager.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    
z:ListSnapshotsAsyncPager.__aiter__.<locals>.async_generatorr   r>   r   r(   r   r?     s    z!ListSnapshotsAsyncPager.__aiter__c                 C   s   d | jj| jS r.   r/   r(   r   r   r   r3     s    z ListSnapshotsAsyncPager.__repr__N)r2   r4   r5   r6   r   r   r
   rD   rB   r   r   r8   r   r   r$   r9   r   r)   rE   r?   r3   r   r   r   r   rF      s   rF   N)typingr   r   r   r   r   r   r   r	   Zgoogle.pubsub_v1.typesr
   r   r;   r@   rF   r   r   r   r   <module>   s
   (>B>