
                         :   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	 Zej"                   ej$                  ej&                  j(                        ej*                   G d
 dej,                                             Zddde_        y)z-Command for recovering recoverable snapshots.    )absolute_import)division)unicode_literals)base_classes)base)flags)scopec                     t        j                  d      t        _        t        j                  j	                  | d       | j                  dd       y )NF)pluralrecover)operation_typez--snapshot-namezpName of the snapshot after the recovery. If not provided, the snapshot will be recovered with the original name.)help)recoverable_snapshots_flagsMakeRecoverableSnapshotArgRecoverRecoverableSnapshotArgAddArgumentadd_argumentparsers    4lib/surface/compute/recoverable_snapshots/recover.py
_AlphaArgsr      sN    !<<EJ 
  
  ,,VI,N?      c                   &    e Zd ZdZed        Zd Zy)r   z/Recovers a Compute Engine recoverable snapshot.c                     t        |        y )N)r   r   s    r   ArgszRecover.Args/   s
    vr   c                    t        j                  | j                               }|j                  }|j                  }t
        j                  j                  ||j                  t        j                  |      t        j                  j                        }|j                  |j                  |j!                         |j"                        }|j%                  |j&                  j(                  d|fgd      d   S )N)scope_listerdefault_scope)projectrecoverableSnapshotsnapshotNamer   T)no_followupr   )r   ComputeApiHolderReleaseTrackclientmessagesr   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListercompute_scope	ScopeEnumGLOBAL)ComputeRecoverableSnapshotsRecoverRequestr    Namesnapshot_nameMakeRequestsapitools_clientrecoverableSnapshots)selfargsholderr&   r'   recoverable_snapshot_refrequests          r   RunzRecover.Run3   s    **4+<+<+>?F]]FH 	&&88&<<VD'1188	 	9 	
  @@(00499;'' A G 

 
 
5
5y'	JK   	 	r   N)__name__
__module____qualname____doc__staticmethodr   r:    r   r   r   r   )   s     8 	r   r   z    Recovers the specified global recoverable snapshot.
    If `--snapshot-name` is provided, the snapshot will be recovered with
    that name. Otherwise, it will be recovered with the original name.
    aQ      To recover a recoverable snapshot named `recoverable-snapshot-1` with
    the original name, run:
      $ {command} recoverable-snapshot-1
    To recover a recoverable snapshot named `recoverable-snapshot-1` with
    a new name `new-snapshot-name`, run:
      $ {command} recoverable-snapshot-1 --snapshot-name=new-snapshot-name
    )DESCRIPTIONEXAMPLESN)r>   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r*   r	   r,   8googlecloudsdk.command_lib.compute.recoverable_snapshotsr   r   HiddenReleaseTracksr%   ALPHADefaultUniverseOnlyCommandr   detailed_helpr@   r   r   <module>rN      s    4 &  ' 7 ( E E i D%%++,	dll 	  - 	D
 r   