
                            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  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$                  j0                         G d de             Zy)z(Deletes a Cloud NetApp Active Directory.    )absolute_import)division)unicode_literals)client)base)flags)log)
console_ioc                   \    e Zd ZdZej
                  j                  ZdddZe	d        Z
d Zy)Delete'Delete a Cloud NetApp Active Directory.zV          Deletes an AD (Active Directory) config for Cloud NetApp Volumes.
          a+            The following command deletes an AD named AD_NAME with the required arguments:

              $ {command} AD_NAME --location=us-central1

          To delete a AD Config asynchronously, run the following command:

              $ {command} AD_NAME --location=us-central1 --async
          )DESCRIPTIONEXAMPLESc                 .    t        j                  |        y )N)activedirectories_flagsAddActiveDirectoryDeleteArgs)parsers    /lib/surface/netapp/active_directories/delete.pyArgszDelete.Args2   s    88@    c                    |j                   j                  j                         }|j                  s6dj	                  |j                               }t        j                  |      syt        j                  | j                        }|j                  ||j                        }|j                  rWdj	                  | j                         j                        }t        j                   j#                  dj	                  |             |S )r   z=You are about to delete an Active Directory {}.
Are you sure?)messageN)release_trackz(gcloud {} netapp active-directories listzJCheck the status of the deletion by listing all active directories:
 $ {} )CONCEPTSactive_directoryParsequietformatRelativeNamer
   PromptContinue	ad_clientActiveDirectoriesClient_RELEASE_TRACKDeleteActiveDirectoryasync_ReleaseTrackprefixr	   statusPrint)selfargsactivedirectory_refdelete_warningr   resultcommands          r   Runz
Delete.Run6   s     --88>>@::((./<<>)@  &&~>..))+F))*=t{{KF{{:AA




$
$&g	jjVG_& Mr   N)__name__
__module____qualname____doc__r   r&   GAr#   detailed_helpstaticmethodr   r0    r   r   r   r      sB    /$$''.	- A Ar   r   c                   <    e Zd ZdZej
                  j                  Zy)
DeleteBetar   N)r1   r2   r3   r4   r   r&   BETAr#   r8   r   r   r:   r:   M   s    /$$)).r   r:   c                   <    e Zd ZdZej
                  j                  Zy)DeleteAlphar   N)r1   r2   r3   r4   r   r&   ALPHAr#   r8   r   r   r=   r=   T   s    /$$**.r   r=   N)r4   
__future__r   r   r   0googlecloudsdk.api_lib.netapp.active_directoriesr   r!   googlecloudsdk.callioper   4googlecloudsdk.command_lib.netapp.active_directoriesr   r   googlecloudsdk.corer	   googlecloudsdk.core.consoler
   ReleaseTracksr&   r5   DeleteCommandr   r;   r:   r>   r=   r8   r   r   <module>rG      s    / &  ' P ( a # 2 D%%((),T , *,^ D%%**+* * ,* D%%++,+* + -+r   