
    .)                         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y)    )AnyAsyncIterator	AwaitableCallableSequenceTupleOptionalIterator)schemac                       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)ListSchemasPagera  A pager for iterating through ``list_schemas`` requests.

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

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

    All the usual :class:`google.pubsub_v1.types.ListSchemasResponse`
    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.ListSchemasRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListSchemasResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        N_methodr   ListSchemasRequest_request	_response	_metadataselfr   r   r   r   s        Blib/third_party/google/pubsub_v1/services/schema_service/pagers.py__init__zListSchemasPager.__init__0   +    ( 11':!!    namereturnc                 .    t        | j                  |      S Ngetattrr   r   r!   s     r   __getattr__zListSchemasPager.__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ListSchemasPager.pagesL   h     nnnn,,'+~~'E'EDMM$!\\$--$..\QDN..  nn,,   BBBc              #   Z   K   | j                   D ]  }|j                  E d {     y 7 wr$   r0   schemasr   pages     r   __iter__zListSchemasPager.__iter__T   $     JJD||## #   +)+c                 b    dj                  | j                  j                  | j                        S Nz
{0}<{1!r}>format	__class____name__r   r/   s    r   __repr__zListSchemasPager.__repr__X   #    ""4>>#:#:DNNKKr    N)r@   
__module____qualname____doc__r   r   ListSchemasResponser   r   r   strr   r   r(   propertyr
   r0   Schemar8   rA   r   r    r   r   r      s    . /1"f8889" **" ,,	" 5c?+"2- - - !x : :; ! !$(6==1 $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)ListSchemasAsyncPagera  A pager for iterating through ``list_schemas`` requests.

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

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

    All the usual :class:`google.pubsub_v1.types.ListSchemasResponse`
    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.ListSchemasRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListSchemasResponse):
                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ListSchemasAsyncPager.__init__n   r   r    r!   r"   c                 .    t        | j                  |      S r$   r%   r'   s     r   r(   z!ListSchemasAsyncPager.__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ListSchemasAsyncPager.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_generatorz8ListSchemasAsyncPager.__aiter__.<locals>.async_generator   0     "jj #d $H"N !-#j   4202424r   r   rT   s   ` r   	__aiter__zListSchemasAsyncPager.__aiter__       	#
   r    c                 b    dj                  | j                  j                  | j                        S r<   r=   r/   s    r   rA   zListSchemasAsyncPager.__repr__   rB   r    N)r@   rC   rD   rE   r   r   r   rF   r   r   r   rG   r   r   r(   rH   r   r0   rI   rX   rA   r   r    r   rK   rK   \   s    . /1"i(B(BCCD" **" ,,	" 5c?+"2- - - !]6+E+EF ! !!=7 !L# Lr    rK   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j"                     fdZde
fdZy)ListSchemaRevisionsPagera  A pager for iterating through ``list_schema_revisions`` requests.

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

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

    All the usual :class:`google.pubsub_v1.types.ListSchemaRevisionsResponse`
    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.ListSchemaRevisionsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListSchemaRevisionsResponse):
                The initial response object.
            metadata (Sequence[Tuple[str, str]]): Strings which should be
                sent along with the request as metadata.
        Nr   r   ListSchemaRevisionsRequestr   r   r   r   s        r   r   z!ListSchemaRevisionsPager.__init__   +    ( 99'B!!r    r!   r"   c                 .    t        | j                  |      S r$   r%   r'   s     r   r(   z$ListSchemaRevisionsPager.__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ListSchemaRevisionsPager.pages   r1   r2   c              #   Z   K   | j                   D ]  }|j                  E d {     y 7 wr$   r4   r6   s     r   r8   z!ListSchemaRevisionsPager.__iter__   r9   r:   c                 b    dj                  | j                  j                  | j                        S r<   r=   r/   s    r   rA   z!ListSchemaRevisionsPager.__repr__   rB   r    N)r@   rC   rD   rE   r   r   ListSchemaRevisionsResponser_   r   r   rG   r   r   r(   rH   r
   r0   rI   r8   rA   r   r    r   r\   r\      s    . /1"f@@@A" 22" 44	" 5c?+"2- - - !x B BC ! !$(6==1 $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)ListSchemaRevisionsAsyncPagera  A pager for iterating through ``list_schema_revisions`` requests.

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

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

    All the usual :class:`google.pubsub_v1.types.ListSchemaRevisionsResponse`
    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.ListSchemaRevisionsRequest):
                The initial request object.
            response (google.pubsub_v1.types.ListSchemaRevisionsResponse):
                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&ListSchemaRevisionsAsyncPager.__init__   r`   r    r!   r"   c                 .    t        | j                  |      S r$   r%   r'   s     r   r(   z)ListSchemaRevisionsAsyncPager.__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#ListSchemaRevisionsAsyncPager.pages
  rO   rP   c                       fd} |       S )Nc                 l   K   j                   2 3 d {   } | j                  D ]  }| 	  7 6 y wr$   r4   rS   s     r   rT   z@ListSchemaRevisionsAsyncPager.__aiter__.<locals>.async_generator  rU   rV   r   rW   s   ` r   rX   z'ListSchemaRevisionsAsyncPager.__aiter__  rY   r    c                 b    dj                  | j                  j                  | j                        S r<   r=   r/   s    r   rA   z&ListSchemaRevisionsAsyncPager.__repr__  rB   r    N)r@   rC   rD   rE   r   r   r   re   r_   r   r   rG   r   r   r(   rH   r   r0   rI   rX   rA   r   r    r   rg   rg      s    . /1"i(J(JKKL" 22" 44	" 5c?+"2- - - !]6+M+MN ! !!=7 !L# Lr    rg   N)typingr   r   r   r   r   r   r	   r
   google.pubsub_v1.typesr   r   rK   r\   rg   r   r    r   <module>rp      sL    	 	 	 *;L ;L|?L ?LD;L ;L|?L ?Lr    