
    =	                         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 ddlmZ  G d de	j"                        Zy)z/The gcloud firestore operations delete command.    )absolute_import)division)unicode_literals)	api_utils)
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 Firestore admin operation.EXAMPLESzy          To delete the completed `exampleOperationId` operation, run:

            $ {command} exampleOperationId
      c                 `    | j                  dt        dd       t        j                  |        y)z Register flags for this command.nameNz
        The unique name of the operation to delete, formatted as either the full
        or relative resource path:

          projects/my-app-id/databases/(default)/operations/foo

        or:

          foo
        )typedefaulthelp)add_argumentstrr	   AddDatabaseIdFlag)parsers    *lib/surface/firestore/operations/delete.pyArgszDelete.Args*   s5     		   
F#    c                 |   t         j                  j                  |j                  t        j
                  j                  j                  j                  |j                  dt        j                  d      j                         }t        j                  dj                  |      d       t!        j"                  |      S )N)
projectsIddatabasesIdz'firestore.projects.databases.operations)paramsapi_version
collectionz#The operation [{}] will be deleted.T)messagecancel_on_no)r   REGISTRYParser   r
   VALUEScoreproject	GetOrFaildatabaser   FIRESTORE_API_VERSIONRelativeNamer   PromptContinueformatr   DeleteOperation)selfargsr   s      r   Runz
Delete.Run=   s    ##		$++0088BB==
 33< $ > ?Kln 	 5<<TB %%d++r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r2    r   r   r   r      s/    ; 
- $ $$,r   r   N)r6   
__future__r   r   r    googlecloudsdk.api_lib.firestorer   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.firestorer	   googlecloudsdk.corer
   r   googlecloudsdk.core.consoler   DeleteCommandr   r9   r   r   <module>rA      s:    6 &  ' 6 7 ( 6 * ) 2,,T ,,r   