
    
                         d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm	Z	 ddl
mZ dd	lmZ  G d
 de	j                        Zy)z,Command for spanner instance configs delete.    )absolute_import)division)unicode_literalsN)instance_configs)base)flags)
console_ioc                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)Deletez.Delete a Cloud Spanner instance configuration.EXAMPLESz|        To delete a custom Cloud Spanner instance configuration, run:

          $ {command} custom-instance-config
        c                     | j                  ddd       | j                  dd       | j                  dd	t        j                  d
       y)zArgs is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use to add arguments that go on
        the command line after this command. Positional arguments are allowed.
    z--validate-only
store_truez[If specified, validate that the deletion will succeed without deleting the instance config.)actionhelpz--etagzUsed for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance config from overwriting each other.)r   configINSTANCE_CONFIGzCloud Spanner instance config.)metavar	completerr   N)add_argumentr   InstanceConfigCompleter)parsers    .lib/surface/spanner/instance_configs/delete.pyArgszDelete.Args)   sf     (      !//-	  /    c                     t        j                  dj                  |j                        d       t	        j
                  |j                  |j                  |j                        S )zThis 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:
      Instance config delete response, which is empty.
    z+Delete instance config [{0}]. Are you sure?T)messagecancel_on_no)r	   PromptContinueformatr   r   r   etagvalidate_only)selfargss     r   Runz
Delete.RunD   sO     =DDKK ""4;;		4;M;MNNr   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r$    r   r   r   r      s>    6 
(//  - / /4Or   r   )r(   
__future__r   r   r   r)   googlecloudsdk.api_lib.spannerr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   googlecloudsdk.core.consoler	   DeleteCommandr   r-   r   r   <module>r4      s6    3 &  '  ; ( 4 25OT 5Or   