
                            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  \
R                  \
R                  " \
R                  R                   \
R                  R"                  5       " S
 S\
R$                  5      5       5       r\
R                  " \
R                  R(                  5       " S S\
R$                  5      5       rg)z#Update Attestor public key command.    )absolute_import)division)unicode_literals)apis)	attestors)arg_parsers)base)flagsc                   .    \ rS rSrSr\S 5       rS rSrg)Update   zUpdate a public key on an Attestor.

## EXAMPLES

To update a PGP public key on an existing Attestor `my_attestor`:

  $ {command} \
      0638AADD940361EA2D7F14C58C124F0E663DA097 \
      --attestor=my_attestor \
      --pgp-public-key-file=my_key.pub
c           	          [         R                  " U[         R                  " SSSS95        UR                  SSS9  UR                  S[        R
                  " 5       S	S
9  UR                  SSS9  g NTFz7The attestor on which the public key should be updated.)required
positional
group_helppublic_key_idz#The ID of the public key to update.)helpz--pgp-public-key-filezGThe path to a file containing the updated ASCII-armored PGP public key.)typer   z	--commentz&The comment describing the public key.r
   AddConceptsGetAttestorPresentationSpecadd_argumentr   FileContentsclsparsers     >lib/surface/container/binauthz/attestors/public_keys/update.pyArgsUpdate.Args+       	))I		
 2  4 %%'0  1
 B  D    c                    [         R                  " U R                  5       5      n[        R                  " U5      nUR
                  R                  R                  5       nUR                  UUR                  UR                  UR                  S9$ N)pgp_pubkey_contentcommentr   GetApiVersionReleaseTrackr   ClientCONCEPTSattestorParse	UpdateKeyr   pgp_public_key_filer&   selfargsapi_versionattestors_clientattestor_refs        r   Run
Update.RunA   z    $$T%6%6%89K ''4==))//1L %%33	 &  r"    N	__name__
__module____qualname____firstlineno____doc__classmethodr   r6   __static_attributes__r9   r"   r   r   r      s"    
 D D*r"   r   c                   .    \ rS rSrSr\S 5       rS rSrg)UpdateAlphaO   z#Update a public key on an Attestor.c           	          [         R                  " U[         R                  " SSSS95        UR                  SSS9  UR                  S[        R
                  " 5       S	S
9  UR                  SSS9  g r   r   r   s     r   r   UpdateAlpha.ArgsS   r!   r"   c                    [         R                  " U R                  5       5      n[        R                  " U5      nUR
                  R                  R                  5       nUR                  UUR                  UR                  UR                  S9$ r$   r'   r0   s        r   r6   UpdateAlpha.Runi   r8   r"   r9   Nr:   r9   r"   r   rC   rC   O   s    +D D*r"   rC   N)r?   
__future__r   r   r   )googlecloudsdk.api_lib.container.binauthzr   r   googlecloudsdk.callioper   r	   -googlecloudsdk.command_lib.container.binauthzr
   DefaultUniverseOnlyReleaseTracksr)   BETAGAUpdateCommandr   ALPHArC   r9   r"   r   <module>rS      s    * &  ' : ? / ( ? D%%**D,=,=,@,@A.T . B .b D%%++,$$$$ $ -$r"   