
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSK	Jr  SS	K	Jr  S
 r\R                   " S S\R                  5      5       rg)z)Cloud Pub/Sub subscriptions seek command.    )absolute_import)division)unicode_literals)subscriptions)base)flags)resource_args)utilc                    [         R                  " 5       nU R                  R                  R	                  5       nSUR                  5       0nSnSnU R                  (       a?  [        R                  " U R                  U R                  5      nUR                  5       US'   O$[        R                  " U R                  5      nXSS'   UR                  X%US9  U$ )ab  This is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  A serialized object (dict) describing the results of the operation.  This
  description fits the Resource described in the ResourceRegistry under
  'pubsub.subscriptions.seek'.
subscriptionIdN
snapshotIdtime)r   snapshot_ref)r   SubscriptionsClientCONCEPTSsubscriptionParseRelativeNamesnapshotr
   ParseSnapshotsnapshot_projectFormatSeekTimer   Seek)argsclientsubscription_refresultr   r   s         (lib/surface/pubsub/subscriptions/seek.py_Runr      s     ,,.&]]//557.;;=>&,	$	]]%%dmmT5J5JKL'446F<tyy)D6N+++E	-    c                   .    \ rS rSrSr\S 5       rS rSrg)r   <   zJResets a subscription's backlog to a point in time or to a given snapshot.c                 ^    [         R                  " U S5        [        R                  " U 5        g )Nz
to affect.)r	   AddSubscriptionResourceArgr   AddSeekFlags)parsers    r   Args	Seek.Args@   s     ,,V\B	vr    c                     [        U5      $ )N)r   )selfr   s     r   RunSeek.RunE   s    :r     N)	__name__
__module____qualname____firstlineno____doc__staticmethodr'   r+   __static_attributes__r-   r    r   r   r   <   s    R r    r   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.pubsubr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.pubsubr   r	   r
   r   DefaultUniverseOnlyCommandr   r-   r    r   <module>r;      sL    0 &  ' 7 ( 3 ; 2> 	4<< 	 	r    