
                            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 d Z e
j$                  e
j&                  j(                         G d de
j*                               Z e
j$                  e
j&                  j.                  e
j&                  j0                         G d de
j*                               Zy)z-Command to delete a Tensorboard in Vertex AI.    )absolute_import)division)unicode_literals)
operations)client)base)	constants)endpoint_util)flags)operations_util)tensorboards_utilc                    | j                   j                  j                         }|j                         d   }t	        j
                  ||      5  t        j                  |      j                  |      }t        j                  t        j                         |t        j                  |j                              cd d d        S # 1 sw Y   y xY w)NlocationsId)versionregion)r   )operations_clientopop_ref)CONCEPTStensorboardParseAsDictr
   AiplatformEndpointOverridesr   TensorboardsClientDeleter   WaitForOpMayber   OperationsClientr   ParseTensorboardOperationname)argsr   tensorboard_refr   	operations        %lib/surface/ai/tensorboards/delete.py_Runr$      s    MM--335/!!#M2&00f&))0 ))$557 ::9>>JL	& & &s   A,CCc                   .    e Zd ZdZddiZed        Zd Zy)DeleteGa)Delete an existing Vertex AI Tensorboard.EXAMPLES          To delete a Tensorboard `12345` in region `us-central1` and project `my-project`:

              $ {command} projects/my-project/locations/us-central1/tensorboards/12345

          Or with flags:

              $ {command} 12345
          c                 0    t        j                  | d       y Nz	to deleter   AddTensorboardResourceArgparsers    r#   ArgszDeleteGa.Args=       	##FK8    c                 6    t        |t        j                        S N)r$   r	   
GA_VERSIONselfr    s     r#   RunzDeleteGa.RunA   s    i**++r2   N__name__
__module____qualname____doc__detailed_helpstaticmethodr0   r8    r2   r#   r&   r&   ,   s/    1 - 9 9,r2   r&   c                   .    e Zd ZdZddiZed        Zd Zy)
DeleteBetar'   r(   r)   c                 0    t        j                  | d       y r+   r,   r.   s    r#   r0   zDeleteBeta.ArgsV   r1   r2   c                 6    t        |t        j                        S r4   )r$   r	   BETA_VERSIONr6   s     r#   r8   zDeleteBeta.RunZ   s    i,,--r2   Nr9   r@   r2   r#   rB   rB   E   s/    1 - 9 9.r2   rB   N)r=   
__future__r   r   r   googlecloudsdk.api_lib.air   &googlecloudsdk.api_lib.ai.tensorboardsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air	   r
   r   r   r   r$   ReleaseTracksReleaseTrackGADeleteCommandr&   BETAALPHArB   r@   r2   r#   <module>rQ      s    4 &  ' 0 9 ( 3 7 / 9 ;
L D%%((),t!! , *,0 D%%**D,=,=,C,CD.## . E.r2   