
    J                     v   S r SSKJr  SSKJr  SSKJr  SSK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S.r\	R                   \	R"                  " \	R$                  R&                  \	R$                  R(                  \	R$                  R*                  5       " S S\	R,                  5      5       5       r\\l        g)z9The Secure Source Manager delete instance command module.    )absolute_import)division)unicode_literalsN)	instances)base)flags)resource_args)logz<
          Delete a Secure Source Manager instance.
        a  
            To delete a Secure Source Manager instance named 'my-instance' in location 'us-central1' asynchronously, run:

            $ {command} my-instance --region=us-central1

            To delete a Secure Source Manager instance named 'my-instance' in location 'us-central1' synchronously, and wait a maximum of 30 minutes for it to finish being deleted, run:

            $ {command} my-instance --region=us-central1 --no-async --max-wait=30m
        )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Delete/   z(Delete a Secure Source Manager instance.c                     [         R                  " U S5        [        R                  " U S5        [        R
                  R                  U 5        [        R
                  R                  U S5        g )Nz	to delete60mT)r	   AddInstanceResourceArgr   
AddMaxWaitr   
ASYNC_FLAGAddToParser
SetDefault)parsers    .lib/surface/source_manager/instances/delete.pyArgsDelete.Args6   sH    ((=	VU#OO'OOvt,    c                 <   UR                   n[        R                  " UR                  S9n[        R
                  " 5       nUR                  R                  R                  5       nUR                  US9n[        R                  R                  SR                  UR                  5      5        U(       a  UR                  S5      (       d  SUl        U$ UR!                  UR#                  U5      SR                  UR#                  U5      R%                  5       5      SUS9$ )	N)seconds)instance_refzDelete request issued for [{}].formatdefaultz&Waiting for operation [{}] to completeF)operation_refmessage
has_resultmax_wait)async_datetime	timedeltar$   r   InstancesClientCONCEPTSinstanceParser   r
   statusPrintr   instancesIdIsSpecifiedWaitForOperationGetOperationRefRelativeName)selfargsis_asyncr$   clientr*   	operations          r   Run
Delete.Run>   s    {{H!!$--8H &&(F}}%%++-H84IJJ6fX1124  h'' "",,Y78	""9-::<
> #  r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r8   __static_attributes__r:   r   r   r   r   /   s    
 1- -r   r   )r?   
__future__r   r   r   r&   *googlecloudsdk.api_lib.securesourcemanagerr   googlecloudsdk.callioper   )googlecloudsdk.command_lib.source_managerr   r	   googlecloudsdk.corer
   DETAILED_HELPDefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETAGADeleteCommandr   detailed_helpr:   r   r   <module>rP      s    @ &  '  @ ( ; C #		$ T..33T5F5F5I5I(T ( (T % r   