
    k                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	Jr  SSK
Jr  SSK
Jr  SS	K
Jr  SS
KJr  SSKJr  \R$                  " \R&                  R(                  5       " S S\R*                  5      5       rg)z,Disable a subordinate certificate authority.    )absolute_import)division)unicode_literals)base)request_utils)flags)
operations)resource_args)log)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Disable   a]  Disable a subordinate certificate authority.

Disables a subordinate certificate authority. The subordinate certificate
authority will not be allowed to issue certificates once disabled. It may
still revoke certificates and/or generate CRLs.

## EXAMPLES

To disable a subordinate CA:

    $ {command} server-tls1 --location=us-west1 --pool=my-pool
c                 ^    [         R                  " U S5        [        R                  " U 5        g )Nz
to disable)r
   %AddCertAuthorityPositionalResourceArgr   AddIgnoreDependentResourcesFlag)parsers    -lib/surface/privateca/subordinates/disable.pyArgsDisable.Args.   s     77M	))&1    c           
      x   [         R                  " SS9n[         R                  " SS9nUR                  R                  R                  5       nUR                  5       nUR                  (       aY  SR                  UR                  5       5      n[        R                  " USS9(       d   [        R                  R                  S5        g UR                  R                  UR!                  US95      n["        R$                  " UR&                  R(                  R*                  USS9  UR                  R-                  UR/                  UUR1                  UR                  [2        R4                  " 5       S	9S
95      n[6        R8                  " USSS9  [        R                  R                  SR                  U5      5        g )Nv1)api_versionaD  You are about to disable Certificate Authority [{}] without checking if the CA's CA Pool is being used by another resource. If you proceed and this is the last enabled CA in the CA Pool, there may be unintended and unrecoverable effects on any dependent resource(s) since the CA Pool would not be able to issue certificates.T)messagedefaultzAborted by user.)name)version)ignoreDependentResources	requestId)r   "disableCertificateAuthorityRequestzDisabling Subordinate CAzDisabled Subordinate CA [{}].)privateca_baseGetClientInstanceGetMessagesModuleCONCEPTScertificate_authorityParseRelativeNameignore_dependent_resourcesformatr   PromptContinuer   statusPrint1projects_locations_caPools_certificateAuthoritiesGetAPrivatecaProjectsLocationsCaPoolsCertificateAuthoritiesGetRequestr
   CheckExpectedCATypeCertificateAuthorityTypeValueValuesEnumSUBORDINATEr   EPrivatecaProjectsLocationsCaPoolsCertificateAuthoritiesDisableRequest"DisableCertificateAuthorityRequestr   GenerateRequestIdr	   Await)	selfargsclientmessagesca_refca_nameprompt_message
current_ca	operations	            r   RunDisable.Run3   sz   --$?F//DAH]]00668F!!#G&&= 	v""$%  &&~tL

+,IIMM	J	J 
K 
J
 %%%%99EE
 HHPP	N	N/7//)-)H)H'99; 0 = 
O 
>?I Y :MJJ4;;GDEr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   rB   __static_attributes__rD   r   r   r   r      s!     2 2)Fr   r   N)rI   
__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SilentCommandr   rD   r   r   <module>rV      sf    3 &  ' C : ( 6 ; > # 2 D%%(()<Fd   <F *<Fr   