
                         P   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S	KJr  SS
KJr  SSKJr  \R*                  " \R,                  R.                  \R,                  R0                  5      \R2                   " S S\R4                  5      5       5       rg)z%Deletes a Backup and DR Backup Vault.    )absolute_import)division)unicode_literals)
exceptions)util)BackupVaultsClient)base)flags)log)
console_ioc                   <    \ rS rSrSrSSSSS.r\S 5       rS	 rS
r	g)Delete   z"Delete the specified Backup Vault.zDeletes a specific backup vaultz{description}zThis command uses the backupdr/v1 API. The full documentation for this API can be found at: https://cloud.google.com/backup-disaster-recoverya          To delete a backup vault ``BACKUP_VAULT'' in location ``MY_LOCATION'', run:

        $ {command} BACKUP_VAULT --location=MY_LOCATION

        To override restrictions against the deletion of a backup vault ``BACKUP_VAULT''
        containing inactive datasources in location ``MY_LOCATION'', run:

        $ {command} BACKUP_VAULT --location=MY_LOCATION --ignore-inactive-datasources

        To override restrictions against the deletion of a backup vault ``BACKUP_VAULT''
        containing backup plan references in location ``MY_LOCATION'', run:

        $ {command} BACKUP_VAULT --location=MY_LOCATION --ignore-backup-plan-references
        )BRIEFDESCRIPTIONzAPI REFERENCEEXAMPLESc                     [         R                  " U S5        [         R                  " U 5        [         R                  " U 5        [         R                  " U 5        [         R
                  " U S5        g)zmSpecifies additional command flags.

Args:
  parser: argparse.Parser: Parser object for command line inputs.
zName of the backup vault to delete. Before you delete, take a look at the prerequisites [here](https://cloud.google.com/backup-disaster-recovery/docs/configuration/decommission).backup vaultN)r
   AddBackupVaultResourceArgAddNoAsyncFlag AddIgnoreInactiveDatasourcesFlag!AddIgnoreBackupPlanReferencesFlagAddAllowMissing)parsers    -lib/surface/backup_dr/backup_vaults/delete.pyArgsDelete.Args=   sW     
##	f 
 	**62	++F3	&.1    c           	      \   [        5       nUR                  R                  R                  5       nUR                  n[
        R                  " SSSS9   UR                  UUR                  UR                  UR                  S9nUR#                  U5      nUR                  (       aF  US:X  a@  [$        R&                  " UR(                  SSS	R+                  UR-                  5       5      S
9  U$ U(       a.  UR/                  USR+                  UR-                  5       5      SS9$ [$        R&                  " UR-                  5       SS[        R0                  R+                  UR(                  5      S
9  U$ ! [        R                   a*  n[        R                  " U[        R                   5      eSnAff = f)zConstructs and sends request.

Args:
  args: argparse.Namespace, An object that contains the values for the
    arguments specified in the .Args() method.

Returns:
  ProcessHttpResponse of the request made.
z>The backup vault will be deleted. You cannot undo this action.T)messagedefaultcancel_on_no)ignore_inactive_datasourcesignore_backup_plan_referencesallow_missingNNoner   Fz,= requested backup vault [{}] was not found.)kindis_asyncdetailszHDeleting backup vault [{}]. (This operation could take up to 2 minutes.))operation_refr    
has_result)r   CONCEPTSbackup_vaultParseno_asyncr   PromptContinuer   r#   r$   r%   apitools_exceptions	HttpErrorr   HttpExceptionr   HTTP_ERROR_FORMATGetOperationRefr   DeletedResourcenameformatRelativeNameWaitForOperationASYNC_OPERATION_MESSAGE)selfargsclientr-   r/   	operationer*   s           r   Run
Delete.RunO   s     !F==--335L}}HL@--
&*&F&F(,(J(J**	   i **95Mmv5	
..<CC++-	 $$%((.|/H/H/J(K %   !!#,,33INNC	 C (( @$$Q(>(>??@s   0E- -F+%F&&F+ N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   rA   __static_attributes__rC   r   r   r   r      s9     + 1$?-2 2 2">r   r   N)rH   
__future__r   r   r   apitools.base.pyr   r1   googlecloudsdk.api_lib.backupdrr   -googlecloudsdk.api_lib.backupdr.backup_vaultsr   googlecloudsdk.api_lib.utilgooglecloudsdk.callioper	   #googlecloudsdk.command_lib.backupdrr
   googlecloudsdk.corer   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackALPHAGADefaultUniverseOnlyDeleteCommandr   rC   r   r   <module>r[      s    , &  ' > 0 L 2 ( 5 # 2 D%%++T->->-A-ABlT l  Clr   