
                             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  G d	 d
e	j                        Zy)z"Delete autoscaling policy command.    )absolute_import)division)unicode_literals)dataproc)base)flags)
console_ioc                   &    e Zd ZdZed        Zd Zy)DeletezDelete an autoscaling policy.

  ## EXAMPLES

  The following command deletes the autoscaling policy
  `example-autoscaling-policy`:

    $ {command} example-autoscaling-policy
  c                     t        j                  | j                               }t        j                  |d|j
                         y )Ndelete)dpDataprocReleaseTrackr   AddAutoscalingPolicyResourceArgapi_version)clsparserr   s      3lib/surface/dataproc/autoscaling_policies/delete.pyArgszDelete.Args&   s5    {{3++-.H	))&(*2*>*>@    c                    t        j                  | j                               }|j                  }|j                  j
                  j                         }|j                  |j                               }t        j                  dj                  |j                               d       |j                  j                  j                  |       y )N)namez/The autoscaling policy '[{0}]' will be deleted.T)messagecancel_on_no)r   r   r   messagesCONCEPTSautoscaling_policyParse7DataprocProjectsRegionsAutoscalingPoliciesDeleteRequestRelativeNamer	   PromptContinueformatNameclient$projects_regions_autoscalingPoliciesr   )selfargsr   r   
policy_refrequests         r   Runz
Delete.Run,   s    {{4,,./H  H11779JNN$$& O (G AHHOO
 OO88??Hr   N)__name__
__module____qualname____doc__classmethodr   r+    r   r   r   r      s#     @ @
Ir   r   N)r/   
__future__r   r   r   googlecloudsdk.api_lib.dataprocr   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr   googlecloudsdk.core.consoler	   DeleteCommandr   r1   r   r   <module>r8      s3    ) &  ' : ( 5 2IT Ir   