
    	                         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)z7Command to delete a specified Batch resource allowance.    )absolute_import)division)unicode_literals)
exceptions)resource_allowances)util)base)resource_args)logc                   &    e Zd ZdZed        Zd Zy)Deletea  Delete a Batch resource allowance.

  This command can fail for the following reasons:
  * The resource allowance specified does not exist.
  * The active account does not have permission to delete the given resource
  allowance.

  ## EXAMPLES

  To delete the resource allowance with name
  `projects/foo/locations/us-central1/resourceAllowances/bar`, run:

    $ {command} projects/foo/locations/us-central1/resourceAllowances/bar
  c                 .    t        j                  |        y )N)r
    AddResourceAllowanceResourceArgs)parsers    /lib/surface/batch/resource_allowances/delete.pyArgszDelete.Args/   s    226:    c                    | j                         }t        j                  |      }|j                  j                  j                         }	 |j                  |      }t        j                  j                  dj!                  |j#                                      |S # t        j                  $ r)}t        j                  |t        j                        d }~ww xY w)NzAResourceAllowance {resourceAllowanceName} deletion is in progress)resourceAllowanceName)ReleaseTrackr   ResourceAllowancesClientCONCEPTSresource_allowanceParser   apitools_exceptions	HttpErrorr   HttpExceptionr   HTTP_ERROR_FORMATr   statusPrintformatRelativeName)selfargsrelease_trackclientresource_allowance_ref	operationes          r   Runz
Delete.Run3   s    %%'M 99-HF!]]==CCE@-- 67i JJK	&<&I&I&K	L  (( @$$Q(>(>??@s   B C.$CCN)__name__
__module____qualname____doc__staticmethodr   r*    r   r   r   r      s      ; ;r   r   N)r.   
__future__r   r   r   apitools.base.pyr   r   googlecloudsdk.api_lib.batchr   r   googlecloudsdk.api_lib.utilgooglecloudsdk.callioper	    googlecloudsdk.command_lib.batchr
   googlecloudsdk.corer   DeleteCommandr   r0   r   r   <module>r9      s:     > &  ' > < - 2 ( : #!T !r   