
    .                         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  \R                  \R                  " \R                  R                  5       " S S	\R                   5      5       5       rg
)z+Update a subordinate certificate authority.    )base)request_utils)
operations)resource_args)update_utils)labels_utilc                   .    \ rS rSrSr\S 5       rS rSrg)Update   a  Update an existing subordinate certificate authority.

## EXAMPLES
  To update labels on a subordinate CA:

    $ {command} server-tls-1 \
      --pool=my-pool \
      --location=us-west1 \
      --update-labels=foo=bar

  To update the CA certificate chain for a subordinate CA:

    $ {command} server-tls-1 \
      --pool=my-pool \
      --location=us-west1 \
      --pem-chain=pem_chain.txt
c                     [         R                  " U S5        [        R                  " SSSS9R	                  U 5        [
        R                  " U 5        g )Nz	to updatez--pem-chainFzA file containing a list of PEM-encoded certificates that represent the issuing chain of this CA. Please note that the certificate corresponding to this specific CA should be excluded.)requiredhelp)r   %AddCertAuthorityPositionalResourceArgr   ArgumentAddToParserr   AddUpdateLabelsFlags)parsers    ,lib/surface/privateca/subordinates/update.pyArgsUpdate.Args0   sC    77LMM		 k&$$V,    c           	      |   [         R                  " SS9n[         R                  " SS9nUR                  R                  R                  5       nUR                  5       nUR                  R                  UR                  US95      n[        R                  " UR                  R                  R                  USS9  [        R                   " XR"                  5      u  pxUR                  R%                  UR'                  UUSR)                  U5      [*        R,                  " 5       S95      n	[.        R0                  " U	SSS9$ )Nv1)api_version)name)version,)r   certificateAuthority
updateMask	requestIdzUpdating Subordinate CA.)privateca_baseGetClientInstanceGetMessagesModuleCONCEPTScertificate_authorityParseRelativeName1projects_locations_caPools_certificateAuthoritiesGetAPrivatecaProjectsLocationsCaPoolsCertificateAuthoritiesGetRequestr   CheckExpectedCATypeCertificateAuthorityTypeValueValuesEnumSUBORDINATEr   UpdateCAFromArgslabelsPatchCPrivatecaProjectsLocationsCaPoolsCertificateAuthoritiesPatchRequestjoinr   GenerateRequestIdr   Await)
selfargsclientmessagesca_refca_name
current_caca_to_updateupdate_mask	operations
             r   Run
Update.Run?   s%   --$?F//DAH]]00668F!!#GIIMMRR 	S 	
J %%%%99EE !- = =!L
 HHNNTT!-xx,#557	 	U 	
I -4 r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r@   __static_attributes__rB   r   r   r
   r
      s     $ - -#r   r
   N)rG    googlecloudsdk.api_lib.privatecar   r!   r   googlecloudsdk.calliope$googlecloudsdk.command_lib.privatecar   r   r   $googlecloudsdk.command_lib.util.argsr   DefaultUniverseOnlyReleaseTracksReleaseTrackGAUpdateCommandr
   rB   r   r   <module>rS      sk    2 D : ( ; > = < D%%(()ET E * Er   