
    	                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm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/The gcloud datastore operations delete command.    )absolute_import)division)unicode_literals)
operations)base)flags)
properties)	resources)
console_ioc                   .    e Zd ZdZddiZed        Zd Zy)Deletez3Delete a completed Cloud Datastore admin operation.EXAMPLESz          To delete the completed operation with id `exampleId`, run:

            $ {command} exampleId

          or

            $ {command} projects/your-project-id/operations/exampleId
      c                 0    t        j                  | d       y)ztRegister flags for this command.

    Args:
      parser: argparse.ArgumentParser, the parser for this command.
    deleteN)r   AddOperationNameFlag)parsers    *lib/surface/datastore/operations/delete.pyArgszDelete.Args-   s     
vx0    c                 H   t         j                  j                  |j                  dt        j
                  j                  j                  j                  id      j                         }t        j                  dj                  |      d       t        j                  |      S )N
projectsIdzdatastore.projects.operations)params
collectionz#The operation [{}] will be deleted.T)messagecancel_on_no)r
   REGISTRYParsenamer	   VALUEScoreproject	GetOrFailRelativeNamer   PromptContinueformatr   DeleteOperation)selfargsr   s      r   Runz
Delete.Run6   s    ##		*++0088BB
 3 $ 4
 5ALN 	 5<<TB %%d++r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r)    r   r   r   r      s/    ; 
- 1 1,r   r   N)r-   
__future__r   r   r    googlecloudsdk.api_lib.datastorer   googlecloudsdk.callioper   $googlecloudsdk.command_lib.datastorer   googlecloudsdk.corer	   r
   googlecloudsdk.core.consoler   DeleteCommandr   r0   r   r   <module>r8      s7    6 &  ' 7 ( 6 * ) 2$,T $,r   