
    &                         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  ej                   ej"                  j$                         G d dej&                               Zy)z$Update a root certificate authority.    )absolute_import)division)unicode_literals)base)request_utils)
operations)resource_args)update_utils)labels_utilc                   &    e Zd ZdZed        Zd Zy)UpdatezUpdate an existing root certificate authority.

  ## EXAMPLES
    To update labels on a root CA:

      $ {command} prod-root \
        --location=us-west1 \
        --pool=my-pool \
        --update-labels=foo=bar
  c                 Z    t        j                  | d       t        j                  |        y )Nz	to update)r	   %AddCertAuthorityPositionalResourceArgr   AddUpdateLabelsFlags)parsers    %lib/surface/privateca/roots/update.pyArgszUpdate.Args+   s     77L$$V,    c           	         t        j                  d      }t        j                  d      }|j                  j                  j                         }|j                         }|j                  j                  |j                  |            }t        j                  |j                  j                  j                  |d       t        j                   ||j"                        \  }}|j                  j%                  |j'                  ||dj)                  |      t+        j,                                     }	t/        j0                  |	dd      S )Nv1)api_version)name)version,)r   certificateAuthority
updateMask	requestIdzUpdating Root CA.)privateca_baseGetClientInstanceGetMessagesModuleCONCEPTScertificate_authorityParseRelativeName1projects_locations_caPools_certificateAuthoritiesGetAPrivatecaProjectsLocationsCaPoolsCertificateAuthoritiesGetRequestr	   CheckExpectedCATypeCertificateAuthorityTypeValueValuesEnumSELF_SIGNEDr
   UpdateCAFromArgslabelsPatchCPrivatecaProjectsLocationsCaPoolsCertificateAuthoritiesPatchRequestjoinr   GenerateRequestIdr   Await)
selfargsclientmessagesca_refca_name
current_caca_to_updateupdate_mask	operations
             r   Runz
Update.Run0   s$   --$?F//DAH]]00668F!!#GIIMM	J	J 
K 
J
 %%%%99EE
 !- = =j!!L+ HHNN	L	L!-xx,#557	 
M 
9:I I':MMr   N)__name__
__module____qualname____doc__staticmethodr   r=    r   r   r   r      s!    	 - -Nr   r   N)rA   
__future__r   r   r    googlecloudsdk.api_lib.privatecar   r   r   googlecloudsdk.calliope$googlecloudsdk.command_lib.privatecar   r	   r
   $googlecloudsdk.command_lib.util.argsr   ReleaseTracksReleaseTrackGAUpdateCommandr   rC   r   r   <module>rM      se    + &  ' C : ( ; > = < D%%(().NT .N *.Nr   