
                             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"bigtable instances delete command.    )absolute_import)division)unicode_literalsN)util)base)	arguments)
console_ioc                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)DeleteInstancez%Delete an existing Bigtable instance.EXAMPLESzY          To delete an instance, run:

            $ {command} my-instance-id

          c                     t        j                  | dd       | j                  j                  t         j                         y)z Register flags for this command.z	to deleteT)
positionalN)r   AddInstancesResourceArgdisplay_infoAddCacheUpdaterInstanceCompleter)parsers    (lib/surface/bigtable/instances/delete.pyArgszDeleteInstance.Args*   s0     %%fkdK
''	(C(CD    c                 f   t        j                         }t        j                         }|j                  D ]z  }t	        j
                  dj                  |            }|s+t        j                  |      }|j                  |j                               }|j                  j                  |       | y)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:
      Some value that we want to have printed later.
    z!Delete instance {}. Are you sure?)message)nameN)r   GetAdminClientGetAdminMessagesinstancer	   PromptContinueformatGetInstanceRef+BigtableadminProjectsInstancesDeleteRequestRelativeNameprojects_instancesDelete)selfargsclimsgsr   should_continuerefmsgs           r   RunzDeleteInstance.Run0   s     


C  "DMM"115<<XFHo 
!!(+>>!!# ? %%%c* " r   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r+    r   r   r   r      s?    - 
(//  - E E
r   r   )r/   
__future__r   r   r   r0   googlecloudsdk.api_lib.bigtabler   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   googlecloudsdk.core.consoler	   DeleteCommandr   r4   r   r   <module>r;      s4    ) &  '  0 ( 9 2(T'' (r   