
    E                        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 ddlmZ  ej$                  ej&                  j(                         G d dej*                               Zy)zDelete a CA pool.    )absolute_import)division)unicode_literals)base)request_utils)flags)
operations)resource_args)log)
console_ioc                   &    e Zd ZdZed        Zd Zy)DeleteaX  Delete a CA pool.

    Note that all certificate authorities must be removed from the CA Pool
    before the CA pool can be deleted.

    ## EXAMPLES

    To delete a CA pool:

      $ {command} my-pool --location=us-west1

    To delete a CA pool while skipping the confirmation input:

      $ {command} my-pool --location=us-west1 --quiet
  c                 Z    t        j                  | d       t        j                  |        y )Nz	to delete)r
   AddCaPoolPositionalResourceArgr   AddIgnoreDependentResourcesFlag)parsers    %lib/surface/privateca/pools/delete.pyArgszDelete.Args1   s     00E	))&1    c                    t        j                  d      }t        j                  d      }|j                  j                  j                         }|j                  r dj                  |j                               }ndj                  |j                               }t        j                  |d      s t        j                  j                  d       y |j                  j                  |j!                  |j                         |j                  t#        j$                                     }t'        j(                  |dd	       t        j                  j                  d
j                  |j                                      y )Nv1a  You are about to delete the CA Pool [{}] without checking if it is being used by another cloud resource. If you proceed, there may be unintended and unrecoverable effects on any dependent resource(s) since the CA Pool would not be able to issue certificates.z(You are about to delete the CA pool [{}]T)messagedefaultzAborted by user.)nameignoreDependentResources	requestIdzDeleting the CA pool)api_versionzDeleted the CA pool [{}].)privateca_baseGetClientInstanceGetMessagesModuleCONCEPTSca_poolParseignore_dependent_resourcesformatRelativeNamer   PromptContinuer   statusPrintprojects_locations_caPoolsr   .PrivatecaProjectsLocationsCaPoolsDeleteRequestr   GenerateRequestIdr	   Await)selfargsclientmessagesca_pool_refprompt_message	operations          r   Runz
Delete.Run6   s@   --d3F//5H--''--/K&&=
 	{'')*  CJJ

"
"
$&n $$ 
jj)*1188??))+%)%D%D#557 	@ 	9:I )t= JJ077  "$ %r   N)__name__
__module____qualname____doc__staticmethodr   r5    r   r   r   r      s       2 2"%r   r   N)r9   
__future__r   r   r    googlecloudsdk.api_lib.privatecar   r   r   googlecloudsdk.calliope$googlecloudsdk.command_lib.privatecar   r	   r
   googlecloudsdk.corer   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackGADeleteCommandr   r;   r   r   <module>rF      se     &  ' C : ( 6 ; > # 2 D%%(()8%T 8% *8%r   