
    Z                        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)&Delete a Cloud NetApp Volume Snapshot.    )absolute_import)division)unicode_literals)client)base)
exceptions)flags)log)
console_ioc                   \    e Zd ZdZej
                  j                  ZdddZe	d        Z
d Zy)Deleter   z;          Delete a Cloud NetApp Volume Snapshot.
          aR            The following command deletes a Snapshot named NAME in the given location and volume:

              $ {command} NAME --location=us-central1 --volume=vol1

          To delete a Snapshot named NAME asynchronously, run the following command:

              $ {command} NAME --location=us-central1 --volume=vol1 --async
          )DESCRIPTIONEXAMPLESc                 .    t        j                  |        y )N)snapshots_flagsAddSnapshotDeleteArgs)parsers    .lib/surface/netapp/volumes/snapshots/delete.pyArgszDelete.Args3   s    ))&1    c                    |j                   j                  j                         }|j                   j                  j                         t	        j
                  dd      |j                  s6dj                  |j                               }t        j                  |      syt        j                  | j                        }|j                  ||j                        }|j                  rWdj                  | j!                         j"                        }t$        j&                  j)                  dj                  |             |S )z=Delete a Cloud NetApp Volume Snapshot in the current project.Nz--volumez'Requires a volume to delete snapshot ofz4You are about to delete a Snapshot {}.
Are you sure?)messagez'gcloud {} netapp volumes snapshots listzBCheck the status of the deletion by listing all snapshots:
  $ {} )CONCEPTSsnapshotParsevolumer	   RequiredArgumentExceptionquietformatRelativeNamer   PromptContinuesnapshots_clientSnapshotsClient_RELEASE_TRACKDeleteSnapshotasync_ReleaseTrackprefixr   statusPrint)selfargssnapshot_refdelete_warningr   resultcommands          r   Runz
Delete.Run7   s   ==))//1L}}!!#+00
?A A ::((.|/H/H/J(K &&~>--d.A.ABF""<=F{{9@@




$
$&g	jj&/# Mr   N)__name__
__module____qualname____doc__r   r(   GAr%   detailed_helpstaticmethodr   r2    r   r   r   r      s@    .$$''.	- 2 2r   r   c                   <    e Zd ZdZej
                  j                  Zy)
DeleteBetar   N)r3   r4   r5   r6   r   r(   BETAr%   r:   r   r   r<   r<   P   s    .$$)).r   r<   c                   <    e Zd ZdZej
                  j                  Zy)DeleteAlphar   N)r3   r4   r5   r6   r   r(   ALPHAr%   r:   r   r   r?   r?   W   s    .$$**.r   r?   N)r6   
__future__r   r   r   /googlecloudsdk.api_lib.netapp.volumes.snapshotsr   r#   googlecloudsdk.callioper   r	   3googlecloudsdk.command_lib.netapp.volumes.snapshotsr
   r   googlecloudsdk.corer   googlecloudsdk.core.consoler   ReleaseTracksr(   r7   DeleteCommandr   r=   r<   r@   r?   r:   r   r   <module>rI      s    - &  ' V ( . X # 2 D%%(().T . *.b D%%**+* * ,* D%%++,+* + -+r   