
    %                         S SK JrJr  S SKJrJrJrJrJrJ	r	J
r
  S SKJr  S SKJr  S SKJrJrJr   " S S\\S9r\\/S	4   r " S
 S\\S9rg	)    )abstractmethodABCMeta)ContextManagerUnionAsyncContextManagerAsyncIteratorCallableOptionalSet)StreamingPullFuture)Message)SubscriptionPathFlowControlSettings	Partitionc                   ^    \ rS rSrSr\ S
S\\\4   S\	S\
\\      S\\   4S jj5       rS	rg)AsyncSubscriberClientInterface$   z
An AsyncSubscriberClientInterface reads messages similar to Google Pub/Sub, but must be used in an
async context.
Any subscribe failures are unlikely to succeed if retried.

Must be used in an `async with` block or have __aenter__() awaited before use.
Nsubscription#per_partition_flow_control_settingsfixed_partitionsreturnc                    #    [        5       e7f)a  
Read messages from a subscription.

Args:
  subscription: The subscription to subscribe to.
  per_partition_flow_control_settings: The flow control settings for each partition subscribed to. Note that these
      settings apply to each partition individually, not in aggregate.
  fixed_partitions: A fixed set of partitions to subscribe to. If not present, will instead use auto-assignment.

Returns:
  An AsyncIterator with Messages that must have ack() called on each exactly once.

Raises:
  GoogleApiCallError: On a permanent failure.
NotImplementedError)selfr   r   r   s       Rlib/third_party/google/cloud/pubsublite/cloudpubsub/subscriber_client_interface.py	subscribe(AsyncSubscriberClientInterface.subscribe-   s     , "##s    N)__name__
__module____qualname____firstlineno____doc__r   r   r   strr   r
   r   r   r   r   r   __static_attributes__r       r   r   r   $   s`     
 6:	$,c12$ .A$ #3y>2	$
 
w	$ $r(   r   )	metaclassNc                   \    \ rS rSrSr\ SS\\\4   S\	S\
S\\\      S\4
S	 jj5       rS
rg)SubscriberClientInterfaceI   z
A SubscriberClientInterface reads messages similar to Google Pub/Sub.
Any subscribe failures are unlikely to succeed if retried.

Must be used in a `with` block or have __enter__() called before use.
Nr   callbackr   r   r   c                     [        5       e)a  
This method starts a background thread to begin pulling messages from
a Pub/Sub Lite subscription and scheduling them to be processed using the
provided ``callback``.

Args:
  subscription: The subscription to subscribe to.
  callback: The callback function. This function receives the message as its only argument.
  per_partition_flow_control_settings: The flow control settings for each partition subscribed to. Note that these
      settings apply to each partition individually, not in aggregate.
  fixed_partitions: A fixed set of partitions to subscribe to. If not present, will instead use auto-assignment.

Returns:
  A StreamingPullFuture instance that can be used to manage the background stream.

Raises:
  GoogleApiCallError: On a permanent failure.
r   )r   r   r-   r   r   s        r   r   #SubscriberClientInterface.subscribeQ   s    4 "##r(   r   r    )r!   r"   r#   r$   r%   r   r   r   r&   MessageCallbackr   r
   r   r   r   r   r'   r   r(   r   r+   r+   I   se      6:$,c12$ "$ .A	$
 #3y>2$ 
$ $r(   r+   )abcr   r   typingr   r   r   r   r	   r
   r   )google.cloud.pubsub_v1.subscriber.futuresr   )google.cloud.pubsub_v1.subscriber.messager   google.cloud.pubsublite.typesr   r   r   r   r0   r+   r   r(   r   <module>r6      s\    (   J = $%8G $D G9d?+"$' "$r(   