
    V                         d dl mZmZ d dlmZmZmZ d dlmZ d dl	m
Z
mZmZmZmZmZmZ d dlmZ d dlmZmZmZ d dlmZ  G d d	e      Zy
)    )ABCabstractmethod)ListOptionalUnion)	Operation)CloudRegion	TopicPathLocationPathSubscriptionPathBacklogLocationPublishTime	EventTime)ReservationPath)TopicSubscriptionReservation)	FieldMaskc            
       v   e Zd ZdZedefd       Zededefd       Zede	defd       Z
ede	defd       Zed	edee   fd
       Zedededefd       Zede	fd       Zede	dee   fd       Zeej,                  dfdedeeeef   dee   defd       Zededefd       Zed	edee   fd       Zedededefd       Zededeeeef   de fd       Z!edefd       Z"ede#de#fd       Z$ede%de#fd       Z&ed	edee#   fd       Z'ede#dede#fd       Z(ede%fd        Z)ede%dee	   fd!       Z*y)"AdminClientInterfacezM
    An admin client for Pub/Sub Lite. Only operates on a single region.
    returnc                      y)zThe region this client is for.N )selfs    Alib/third_party/google/cloud/pubsublite/admin_client_interface.pyregionzAdminClientInterface.region&           topicc                      y)z*Create a topic, returns the created topic.Nr   )r   r   s     r   create_topicz!AdminClientInterface.create_topic*   r   r   
topic_pathc                      y)z%Get the topic object from the server.Nr   r   r"   s     r   	get_topiczAdminClientInterface.get_topic.   r   r   c                      y)z3Get the number of partitions in the provided topic.Nr   r$   s     r   get_topic_partition_countz.AdminClientInterface.get_topic_partition_count2   r   r   location_pathc                      y)zJList the Pub/Sub lite topics that exist for a project in a given location.Nr   r   r(   s     r   list_topicsz AdminClientInterface.list_topics6   r   r   update_maskc                      y)z/Update the masked fields of the provided topic.Nr   )r   r   r,   s      r   update_topicz!AdminClientInterface.update_topic:   r   r   c                      y)z+Delete a topic and all associated messages.Nr   r$   s     r   delete_topicz!AdminClientInterface.delete_topic>   r   r   c                      y)z4List the subscriptions that exist for a given topic.Nr   r$   s     r   list_topic_subscriptionsz-AdminClientInterface.list_topic_subscriptionsB   r   r   Nsubscriptiontargetstarting_offsetc                      y)a(  Create a subscription, returns the created subscription. By default
        a subscription will only receive messages published after the
        subscription was created.

        `starting_offset` is deprecated. Use `target` to initialize the
        subscription to a target location within the message backlog instead.
        `starting_offset` has higher precedence if `target` is also set.

        A seek is initiated if the target location is a publish or event time.
        If the seek fails, the created subscription is not deleted.
        Nr   )r   r3   r4   r5   s       r   create_subscriptionz(AdminClientInterface.create_subscriptionF   r   r   subscription_pathc                      y)z,Get the subscription object from the server.Nr   r   r8   s     r   get_subscriptionz%AdminClientInterface.get_subscriptionY   r   r   c                      y)zQList the Pub/Sub lite subscriptions that exist for a project in a given location.Nr   r*   s     r   list_subscriptionsz'AdminClientInterface.list_subscriptions]   r   r   c                      y)z6Update the masked fields of the provided subscription.Nr   )r   r3   r,   s      r   update_subscriptionz(AdminClientInterface.update_subscriptiona   r   r   c                      y)a  Initiate an out-of-band seek for a subscription to a specified target.

        The seek target may be timestamps or named positions within the message
        backlog See https://cloud.google.com/pubsub/lite/docs/seek for more
        information.

        Returns:
            google.api_core.operation.Operation with:
              result type: google.cloud.pubsublite.SeekSubscriptionResponse
              metadata type: google.cloud.pubsublite.OperationMetadata
        Nr   )r   r8   r4   s      r   seek_subscriptionz&AdminClientInterface.seek_subscriptiong   r   r   c                      y)z2Delete a subscription and all associated messages.Nr   r:   s     r   delete_subscriptionz(AdminClientInterface.delete_subscriptiony   r   r   reservationc                      y)z6Create a reservation, returns the created reservation.Nr   )r   rD   s     r   create_reservationz'AdminClientInterface.create_reservation}   r   r   reservation_pathc                      y)z+Get the reservation object from the server.Nr   r   rG   s     r   get_reservationz$AdminClientInterface.get_reservation   r   r   c                      y)zPList the Pub/Sub lite reservations that exist for a project in a given location.Nr   r*   s     r   list_reservationsz&AdminClientInterface.list_reservations   r   r   c                      y)z5Update the masked fields of the provided reservation.Nr   )r   rD   r,   s      r   update_reservationz'AdminClientInterface.update_reservation   r   r   c                      y)z1Delete a reservation and all associated messages.Nr   rI   s     r   delete_reservationz'AdminClientInterface.delete_reservation   r   r   c                      y)z:List the subscriptions that exist for a given reservation.Nr   rI   s     r   list_reservation_topicsz,AdminClientInterface.list_reservation_topics   r   r   )+__name__
__module____qualname____doc__r   r	   r   r   r!   r
   r%   intr'   r   r   r+   r   r.   r0   r   r2   r   ENDr   r   r   r   r   r7   r;   r=   r?   r   rA   rC   r   rF   r   rJ   rL   rN   rP   rR   r   r   r   r   r   !   sI    - - - 9% 9E 9 9 4I 4% 4 4 BI B# B B Y Y$u+ Y Y >% >i >E > > :y : : C9 CFVAW C C  BQATAT59	" o{I=> "/2	
 
 $ ;2B ;| ; ; ` `lAS ` ` E(E7@E	E E
 + o{I=> 
	 " A5E A A Ek Ek E E : :K : : _| _[@Q _ _ D&D5>D	D D
 @? @ @ I /I	iI Ir   r   N)abcr   r   typingr   r   r   google.api_core.operationr   google.cloud.pubsublite.typesr	   r
   r   r   r   r   r   #google.cloud.pubsublite.types.pathsr   google.cloud.pubsublite_v1r   r   r   'cloudsdk.google.protobuf.field_mask_pb2r   r   r   r   r   <module>r`      sA    $ ( ( /   @ G G =vI3 vIr   