
    8                        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d
lmZ  e	j$                  e	j&                  j(                         G d de	j*                               Z e	j$                  e	j&                  j.                         G d de             Z e	j$                  e	j&                  j2                         G d de             Zy)&Create a Cloud NetApp Volume Snapshot.    )absolute_import)division)unicode_literals)client)base)
exceptions)flags)labels_util)logc                   \    e Zd ZdZej
                  j                  ZdddZe	d        Z
d Zy)Creater   z;          Create a Cloud NetApp Volume Snapshot.
          z          The following command creates a Snapshot named NAME using the required arguments:

              $ {command} NAME --location=us-central1 --volume=vol1
          )DESCRIPTIONEXAMPLESc                 .    t        j                  |        y )N)snapshots_flagsAddSnapshotCreateArgs)parsers    .lib/surface/netapp/volumes/snapshots/create.pyArgszCreate.Args/   s    ))&1    c                 &   |j                   j                  j                         }|j                   j                  j                         t	        j
                  dd      |j                   j                  j                         j                         }t        j                  | j                        }t        j                  ||j                  j                  j                        }|j                  |j                         |j                   |      }|j#                  |||j$                  |      }|j$                  rWdj'                  | j)                         j*                        }t,        j.                  j1                  dj'                  |             |S )z=Create a Cloud NetApp Volume Snapshot in the current project.z--volumez'Requires a volume to create snapshot of)namedescriptionlabelsz'gcloud {} netapp volumes snapshots listzFCheck the status of the new snapshot by listing all snapshots:
  $ {} )CONCEPTSsnapshotParsevolumer	   RequiredArgumentExceptionRelativeNamesnapshots_clientSnapshotsClient_RELEASE_TRACKr   ParseCreateArgsmessagesSnapshotLabelsValueParseSnapshotConfigr   CreateSnapshotasync_formatReleaseTrackprefixr   statusPrint)	selfargssnapshot_ref
volume_refr   r   r   resultcommands	            r   Runz
Create.Run3   sL   ==))//1L}}!!#+00
?  %%++-::<J--d.A.ABF((foo&&22F ))&&($$ * H
 ""j$++xF {{9@@




$
$g 
jj&/ Mr   N)__name__
__module____qualname____doc__r   r-   GAr$   detailed_helpstaticmethodr   r7    r   r   r   r      s@    .$$''.		- 2 2r   r   c                   <    e Zd ZdZej
                  j                  Zy)
CreateBetar   N)r8   r9   r:   r;   r   r-   BETAr$   r?   r   r   rA   rA   U   s    .$$)).r   rA   c                   <    e Zd ZdZej
                  j                  Zy)CreateAlphaz'Creates a Cloud NetApp Volume Snapshot.N)r8   r9   r:   r;   r   r-   ALPHAr$   r?   r   r   rD   rD   \   s    /$$**.r   rD   N)r;   
__future__r   r   r   /googlecloudsdk.api_lib.netapp.volumes.snapshotsr   r"   googlecloudsdk.callioper   r	   3googlecloudsdk.command_lib.netapp.volumes.snapshotsr
   r   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   ReleaseTracksr-   r<   CreateCommandr   rB   rA   rE   rD   r?   r   r   <module>rN      s    - &  ' V ( . X < # D%%(()3T 3 *3l D%%**+* * ,* D%%++,+* + -+r   