
    r                        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 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*                  j2                         G d de             Z ej(                  ej*                  j6                         G d dej.                               ZdddZee_        ee_        y)Deletes a Filestore instance.    )absolute_import)division)unicode_literals)filestore_client)base)flags)concept_parsers)log)
properties)
console_ioc                   >    e Zd ZdZej
                  Zed        Zd Z	y)DeleteDelete a Filestore instance.c                    t        j                  t        j                  d      g      j	                  |        t        j                  |        t        j                  |        t        j                  |        t        j                  |        y NzThe instance to delete.)
r
   ConceptParserr	   GetInstancePresentationSpecAddToParserinstances_flagsAddLocationArgAddRegionArgAddAsyncFlagAddForceArgparsers    )lib/surface/filestore/instances/delete.pyArgszDelete.Args&   sg    !!5#D#D!$# #$ %%0[%8""6*  (  ('    c                 j   |j                   j                  j                         }dj                  |j	                               }t        j                  |      syt        j                  | j                        }|j                  ||j                  |j                        }|j                  rt        j                  j                  j                   j#                         j%                  d      }|rd|d<   t&        j(                  j+                  dj                  d	j-                  |                   |S 
r   <You are about to delete Filestore instance {}.
Are you sure?messageNversion.listBCheck the status of the deletion by listing all instances:
  $ {}  CONCEPTSinstanceParseformatRelativeNamer   PromptContinuer   FilestoreClient_API_VERSIONDeleteInstanceasync_forcer   VALUESmetricscommand_nameGetsplitr   statusPrintjoinselfargsinstance_refdelete_warningclientresultcommands          r   Runz
Delete.Run/       ==))//1L&&,f\-F-F-H&I  $$^<--d6G6GHF""<djjIF{{!!))66::<BB3Gg		jj&'*+- Mr   N)
__name__
__module____qualname____doc__r   V1_API_VERSIONr4   staticmethodr   rH    r   r   r   r       s'    $!00,( (r   r   c                   .    e Zd ZdZej
                  Zd Zy)
DeleteBetar   c                 j   |j                   j                  j                         }dj                  |j	                               }t        j                  |      syt        j                  | j                        }|j                  ||j                  |j                        }|j                  rt        j                  j                  j                   j#                         j%                  d      }|rd|d<   t&        j(                  j+                  dj                  d	j-                  |                   |S r!   r,   r@   s          r   rH   zDeleteBeta.RunK   rI   r   N)rJ   rK   rL   rM   r   BETA_API_VERSIONr4   rH   rP   r   r   rR   rR   E   s    $!22,r   rR   c                   >    e Zd ZdZej
                  Zed        Zd Z	y)DeleteAlphar   c                     t        j                  t        j                  d      g      j	                  |        t        j                  |        t        j                  |        t        j                  |        y r   )	r
   r   r	   r   r   r   r   r   r   r   s    r   r   zDeleteAlpha.Argsg   sX    !!))*CD# {6""6*  (  (r   c                 T   |j                   j                  j                         }dj                  |j	                               }t        j                  |      syt        j                  | j                        }|j                  ||j                        }|j                  rt        j                  j                  j                  j!                         j#                  d      }|rd|d<   t$        j&                  j)                  dj                  d	j+                  |                   |S )
r   r"   r#   Nr%   r'   r(   r)   r*   r+   )r-   r.   r/   r0   r1   r   r2   r   r3   r4   DeleteInstanceAlphar6   r   r8   r9   r:   r;   r<   r   r=   r>   r?   r@   s          r   rH   zDeleteAlpha.Runp   s    ==))//1L&&,f\-F-F-H&I  $$^<--d6G6GHF''dkkBF{{!!))66::<BB3Gg		jj&'*+- Mr   N)
rJ   rK   rL   rM   r   ALPHA_API_VERSIONr4   rO   r   rH   rP   r   r   rV   rV   a   s'    $!33,) )r   rV   r   zeTo delete a Filestore instance named NAME in us-central1-c:

  $ {command} NAME --zone=us-central1-c
)DESCRIPTIONEXAMPLESN)rM   
__future__r   r   r    googlecloudsdk.api_lib.filestorer   googlecloudsdk.callioper   $googlecloudsdk.command_lib.filestorer	   .googlecloudsdk.command_lib.filestore.instancesr   (googlecloudsdk.command_lib.util.conceptsr
   googlecloudsdk.corer   r   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackGADeleteCommandr   BETArR   ALPHArV   help_detailed_helprP   r   r   <module>rm      s     $ &  ' = ( 6 S D # * 2 D%%(()!T ! *!H D%%**+  ,6 D%%++,!$$$ ! -!L 	'				  ! r   