
                             S r SSKJr  SSKJr  SSKJr  SSSS.rS	 r	\R                  " \R                  R                  5      \R                   " S
 S\R                  5      5       5       r\\l        g)z:Command for updating the KMS key of a persistent snapshot.    )base_classes)base)flagsz0Update the KMS key of a Compute Engine snapshot.zW
        * {command}* updates the KMS key of a Compute Engine persistent snapshot.
    zz
        To update the KMS key of a snapshot named example-snapshot-1, run:

          $ {command} example-snapshot-1
    )briefDESCRIPTIONEXAMPLESc                 j    [         R                  " SS9R                  U SS9  U R                  SSSS9  g)	z5Add arguments used for parsing in all command tracks.Fpluralzupdate the KMS key for)operation_typez--regionz%The region of the snapshot to update.)helprequiredN)snapshots_flagsMakeSnapshotArgAddArgumentadd_argument)parsers    /lib/surface/compute/snapshots/update_kms_key.py_CommonArgsr   #   sD    !!/;;5 <  	2      c                   B    \ rS rSrSr\S 5       r\SS j5       rS rSr	g)	UpdateKmsKey/   z,Update the KMS key of a persistent snapshot.c                     [        U5        g N)r   )clsr   s     r   ArgsUpdateKmsKey.Args4   s
    r   c                 L    [         R                  " U R                  5       U5      $ r   )r   ComputeApiHolderReleaseTrack)r   no_https     r   _GetApiHolderUpdateKmsKey._GetApiHolder8   s    (()9)9);WEEr   c                    U R                  5       nUR                  nUR                  nUR                  (       a.  [        R
                  " SS9R                  XR                  5      nO-[        R                  " SS9R                  XR                  5      nUR                  5       S:X  aS  UR                  R                  nUR                  UR                  UR                  5       S9nUR                  USU4/5      $ UR                  5       S:X  a^  UR                  R                   nUR#                  UR                  UR                  UR                  5       S9nUR                  USU4/5      $ g )NFr
   zcompute.snapshots)projectsnapshotr   zcompute.regionSnapshots)r&   regionr'   )r#   clientmessagesr(   r   #MakeSnapshotArgForRegionalSnapshotsResolveAsResource	resourcesr   
Collectionapitools_client	snapshots#ComputeSnapshotsUpdateKmsKeyRequestr&   NameMakeRequestsregionSnapshots)ComputeRegionSnapshotsUpdateKmsKeyRequest)selfargscompute_holderr)   r*   snapshot_refservicerequests           r   RunUpdateKmsKey.Run<   sa   '')N""FH{{$HH$ 8 89  %44$ 8 89   $77&&00g<<&&$$& = g   7NG"D!EFF		 	 	"&?	?&&66gBB&&$$$$& C g
   7NG"D!EFF 
@r    N)F)
__name__
__module____qualname____firstlineno____doc__classmethodr   r#   r<   __static_attributes__r>   r   r   r   r   /   s5     5  F FGr   r   N)rC   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   ,googlecloudsdk.command_lib.compute.snapshotsr   r   DETAILED_HELPr   ReleaseTracksr!   ALPHAUniverseCompatibleCommandr   detailed_helpr>   r   r   <module>rO      s    A 8 ( Q @
	 D%%++,'G4<< 'G  -'GT + r   