
    
                         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 databases delete.    )absolute_import)division)unicode_literalsN)	databases)base)resource_args)
console_ioc                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)DeletezDelete a Cloud Spanner database.

  Delete a Cloud Spanner database.

  Note: Cloud Spanner might continue to accept requests for a few seconds
  after the database has been deleted.
  EXAMPLESzy        To delete a Cloud Spanner database, run:

          $ {command} my-database-id --instance=my-instance-id
        c                 0    t        j                  | d       y)zSee base class.z	to deleteN)r   AddDatabaseResourceArg)parsers    'lib/surface/spanner/databases/delete.pyArgszDelete.Args/   s     ((=    c                    |j                   j                  j                         }t        j                  dj                  |j                               dd       t        j                  |      }|rt        j                  |      S y)a4  This 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:
      Database delete response, which is empty.

    Raises:
      HttpException when the database is not found.
    z&You are about to delete database: [{}]T)throw_if_unattendedcancel_on_noN)
CONCEPTSdatabaseParser	   PromptContinueformatNamer   Getr   )selfargsdatabase_refr   s       r   Runz
Delete.Run4   sp     ==))//1L0778I8I8KL  }}\*Hl++ r   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r     r   r   r   r      s?     
(//  - > >,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>r0      s4    , &  '  4 ( < 21,T 1,r   