
                             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
  ej                  ej                  j                         G d dej                               Zy	)
z/Get the csr of a pending Certificate Authority.    )absolute_import)division)unicode_literals)base)resource_argsc                   &    e Zd ZdZed        Zd Zy)GetCsra  Get the CSR for a subordinate certificate authority that has not yet been activated.

  Gets the PEM-encoded CSR for a subordinate certificate authority that is
  awaiting user activation. The CSR should be signed by the issuing Certificate
  Authority and uploaded back using the `subordinates activate` command.

  ## EXAMPLES

    To download the CSR for the 'server-tls-1' CA into a file called
    'server-tls-1.csr':

      $ {command} server-tls-1 --location=us-west1 --pool=my-pool > server-tls-1.csr
  c                 f    t        j                  | d       | j                  j                  d       y )Nzfor which to get the CSRzvalue(pemCsr))r   %AddCertAuthorityPositionalResourceArgdisplay_info	AddFormat)parsers    -lib/surface/privateca/subordinates/get_csr.pyArgszGetCsr.Args+   s+    77*,
!!"56    c                    t        j                  d      }t        j                  d      }|j                  j                  j                         }|j                  j                  |j                  |j                                     S )Nv1)api_version)name)
privateca_baseGetClientInstanceGetMessagesModuleCONCEPTScertificate_authorityParse1projects_locations_caPools_certificateAuthoritiesFetchCPrivatecaProjectsLocationsCaPoolsCertificateAuthoritiesFetchRequestRelativeName)selfargsclientmessagesca_refs        r   Runz
GetCsr.Run1   ss    --$?F//DAH]]00668FCCII	L	L$$& 
M 
() )r   N)__name__
__module____qualname____doc__staticmethodr   r%    r   r   r	   r	      s      7 7
)r   r	   N)r)   
__future__r   r   r    googlecloudsdk.api_lib.privatecar   r   googlecloudsdk.calliope$googlecloudsdk.command_lib.privatecar   ReleaseTracksReleaseTrackGACommandr	   r+   r   r   <module>r4      sT    6 &  ' C ( > D%%(())T\\ ) *)r   