
    L                        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  SS	KJr  SS
KJr  \	R(                  " \	R*                  R,                  5       " S S\	R.                  5      5       r\	R(                  " \	R*                  R2                  5       " S S\5      5       r\	R(                  " \	R*                  R6                  5       " S S\5      5       rg)z;Reverts a Cloud NetApp Volume back to a specified Snapshot.    )absolute_import)division)unicode_literals)client)base)flags)concept_parsers)log)
console_ioc                   d    \ rS rSrSr\R                  R                  rSSS.r	\
S 5       rS rSrg	)
Revert   :Revert a Cloud NetApp Volume back to a specified Snapshot.zU          Revert a Cloud NetApp Volume back to a specified source Snapshot
          z          The following command reverts a Volume named NAME in the given location and snapshot

              $ {command} NAME --location=us-central1 --snapshot="snapshot1"
          )DESCRIPTIONEXAMPLESc                     [         R                  " [        R                  " S5      /5      R	                  U 5        [
        R                  " U 5        [        R                  " U 5        g )NzThe Volume to revert.)r	   ConceptParserr   GetVolumePresentationSpecAddToParservolumes_flagsAddVolumeRevertSnapshotArgAddResourceAsyncFlag)parsers    $lib/surface/netapp/volumes/revert.pyArgsRevert.Args/   sK    !!5#B#B$! #" ##.;v#6,,V4	v&    c                 .   UR                   R                  R                  5       n[        R                  " U R
                  S9nSR                  UR                  5       UR                  5      n[        R                  " US9(       d  gUR                  X!R                  UR                  5      nUR                  (       aW  SR                  U R                  5       R                  5      n[        R                   R#                  SR                  U5      5        U$ )zRun the revert command.)release_trackzDYou are about to revert Volume {} back to Snapshot {}.
Are you sure?)messageNzgcloud {} netapp volumes listzJCheck the status of the volume being reverted by listing all volumes:
$ {})CONCEPTSvolumeParsevolumes_clientVolumesClient_RELEASE_TRACKformatRelativeNamesnapshotr   PromptContinueRevertVolumeasync_ReleaseTrackprefixr
   statusPrint)selfargs
volume_refr   revert_warningresultcommands          r   Run
Revert.Run6   s    %%++-J))8K8KLF	z668$--H  $$^<  ]]DKKHF{{/66




$
$g 
jj"F7O Mr    N)__name__
__module____qualname____firstlineno____doc__r   r-   GAr&   detailed_helpstaticmethodr   r7   __static_attributes__r9   r   r   r   r      s@    B$$''.		- ' 'r   r   c                   D    \ rS rSrSr\R                  R                  rSr	g)
RevertBetaL   r   r9   N)
r:   r;   r<   r=   r>   r   r-   BETAr&   rB   r9   r   r   rD   rD   L   s    B$$)).r   rD   c                   D    \ rS rSrSr\R                  R                  rSr	g)RevertAlphaS   r   r9   N)
r:   r;   r<   r=   r>   r   r-   ALPHAr&   rB   r9   r   r   rH   rH   S   s    B$$**.r   rH   N)r>   
__future__r   r   r   %googlecloudsdk.api_lib.netapp.volumesr   r$   googlecloudsdk.callioper   !googlecloudsdk.command_lib.netappr   )googlecloudsdk.command_lib.netapp.volumesr   (googlecloudsdk.command_lib.util.conceptsr	   googlecloudsdk.corer
   googlecloudsdk.core.consoler   ReleaseTracksr-   r?   Commandr   rF   rD   rJ   rH   r9   r   r   <module>rU      s    B &  ' J ( 3 L D # 2 D%%(()*T\\ * **Z D%%**+* * ,* D%%++,+* + -+r   