
                         l    S SK JrJr  S SKJr  S SKJrJrJrJ	r	  S SK
Jr   " S S\	\S9r " S S	\\S9rg
)    )abstractmethodABCMeta)Future)ContextManagerMappingUnionAsyncContextManager)	TopicPathc                   Z    \ rS rSrSr\ SS\\\4   S\	S\S\
\\4   S\4
S jj5       rS	rg
)AsyncPublisherClientInterface   z
An AsyncPublisherClientInterface publishes messages similar to Google Pub/Sub, but must be used in an
async context. Any publish failures are unlikely to succeed if retried.

Must be used in an `async with` block or have __aenter__() awaited before use.
topicdataordering_keyattrsreturnc                    #    [        5       e7f)a  
Publish a message.

Args:
  topic: The topic to publish to. Publishes to new topics may have nontrivial startup latency.
  data: The bytestring payload of the message
  ordering_key: The key to enforce ordering on, or "" for no ordering.
  **attrs: Additional attributes to send.

Returns:
  An ack id, which can be decoded using MessageMetadata.decode.

Raises:
  GoogleApiCallError: On a permanent failure.
NotImplementedErrorselfr   r   r   r   s        Qlib/third_party/google/cloud/pubsublite/cloudpubsub/publisher_client_interface.pypublish%AsyncPublisherClientInterface.publish   s     . "##s    N __name__
__module____qualname____firstlineno____doc__r   r   r
   strbytesr   r   __static_attributes__r       r   r   r      sb     
 	$Y^$$ $ 	$
 c"$ 
$ $r'   r   )	metaclassc                   Z    \ rS rSrSr\ SS\\\4   S\	S\S\
\\4   SS4
S	 jj5       rS
rg)PublisherClientInterface8   z
A PublisherClientInterface publishes messages similar to Google Pub/Sub.
Any publish failures are unlikely to succeed if retried.

Must be used in a `with` block or have __enter__() called before use.
r   r   r   r   r   zFuture[str]c                     [        5       e)a  
Publish a message.

Args:
  topic: The topic to publish to. Publishes to new topics may have nontrivial startup latency.
  data: The bytestring payload of the message
  ordering_key: The key to enforce ordering on, or "" for no ordering.
  **attrs: Additional attributes to send.

Returns:
  A future completed with an ack id of type str, which can be decoded using
  MessageMetadata.decode.

Raises:
  GoogleApiCallError: On a permanent failure.
r   r   s        r   r    PublisherClientInterface.publish@   s    0 "##r'   r   Nr   r   r   r'   r   r*   r*   8   sb     
 	$Y^$$ $ 	$
 c"$ 
$ $r'   r*   N)abcr   r   concurrent.futuresr   typingr   r   r   r	   google.cloud.pubsublite.typesr
   r   r*   r   r'   r   <module>r2      s4    ( % F F 3$$77 $D $~  $r'   