
                         z   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                  \R,                  R2                  5      \R4                   " S S\R6                  5      5       5       rg)z*Deletes a Backup and DR Management Server.    )absolute_import)division)unicode_literals)
exceptions)util)ManagementServersClient)base)flags)log)
console_ioc                   :    \ rS rSrSrSSSS.r\S 5       rS rS	r	g
)DeleteAlpha    z'Delete the specified Management Server.z$Deletes a specific management serverz{description}z        To delete a management server `sample-ms` in project `sample-project` and location `us-central1` , run:

          $ {command} sample-ms --project=sample-project --location=us-central1
        )BRIEFDESCRIPTIONEXAMPLESc                     [         R                  R                  U 5        [         R                  R                  U S5        [        R
                  " U S5        g)zmSpecifies additional command flags.

Args:
  parser: argparse.Parser: Parser object for command line inputs.
TzName of the management server to delete. Before you delete, take a look at the prerequisites [here](https://cloud.google.com/backup-disaster-recovery/docs/configuration/decommission).N)r	   
ASYNC_FLAGAddToParser
SetDefaultr
   AddManagementServerResourceArg)parsers    2lib/surface/backup_dr/management_servers/delete.pyArgsDeleteAlpha.Args1   sA     	OO'OOvt,	((	f    c                    [        5       nUR                  nUR                  R                  R	                  5       n[
        R                  " SSSS9   UR                  U5      nU(       a#  [        R                  " UR                   SSSS9  U$ UR#                  UR%                  U5      SR'                  UR)                  5       5      S	S
9$ ! [        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.
zCThe management server will be deleted. You cannot undo this action.T)messagedefaultcancel_on_noNzmanagement serverz]Run the [gcloud backup-dr operations describe] command to check the status of this operation.)kindis_asyncdetailszJDeleting management server [{}]. (This operation could take up to 1 hour.)F)operation_refr   
has_result)r   async_CONCEPTSmanagement_serverParser   PromptContinueDeleteapitools_exceptions	HttpErrorr   HttpExceptionr   HTTP_ERROR_FORMATr   DeletedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsclientr"   r(   	operationes          r   RunDeleteAlpha.RunA   s     %&F{{H77==? @-- 12i 	
.."7 "",,Y7##)6*;*H*H*J#K #   (( @$$Q(>(>??@s   C
 
D%DD N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r;   __static_attributes__r=   r   r   r   r       s4    
 0 6$-  /r   r   N)rB   
__future__r   r   r   apitools.base.pyr   r,   googlecloudsdk.api_lib.backupdrr   2googlecloudsdk.api_lib.backupdr.management_serversr   googlecloudsdk.api_lib.utilgooglecloudsdk.callioper	   #googlecloudsdk.command_lib.backupdrr
   googlecloudsdk.corer   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyDeleteCommandr   r=   r   r   <module>rV      s    1 '  ' > 0 V 2 ( 5 # 2 T..33T5F5F5I5I L$$$ L Lr   