
                            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dlmZ ddlmZ d Z e
j*                  e
j,                  j.                        e
j0                   G d de
j2                                      Z e
j*                  e
j,                  j6                  e
j,                  j8                        e
j0                   G d de                    Zy)z#Vertex AI endpoints delete command.    )absolute_import)division)unicode_literals)
operations)client)base)	constants)endpoint_util)endpoints_util)flags)operations_util)region_util)
console_ioc                 8   | j                   j                  j                         }|j                         d   | _        |j                         d   }t        j                  || j                        5  t        j                  |      }t        j                         }t        j                  dj                  |      d       |j                  |      }t        j                   ||t#        j$                  |j&                              cddd       S # 1 sw Y   yxY w)	z&Delete an existing Vertex AI endpoint.locationsIdendpointsId)region)versionz!This will delete endpoint [{}]...T)cancel_on_noN)CONCEPTSendpointParseAsDictr   r
   AiplatformEndpointOverridesr   EndpointsClientr   OperationsClientr   PromptContinueformatDeleter   WaitForOpMayber   ParseOperationname)argsr   endpoint_refendpoint_idendpoints_clientoperation_clientops          "lib/surface/ai/endpoints/delete.py_Runr*   !   s    ''--/,##%m4$+##%m4+00M--g>!224+22;? 
	 	 	.B))"n;;BGGDF NMMs   1BDDc                   &    e Zd ZdZed        Zd Zy)DeleteGaDelete an existing Vertex AI endpoint.

  ## EXAMPLES

  To delete an endpoint ``123'' under project ``example'' in region
  ``us-central1'', run:

    $ {command} 123 --project=example --region=us-central1
  c                 P    t        j                  | dt        j                         y )Nz	to delete)prompt_func)r   AddEndpointResourceArgr   PromptForOpRegion)parsers    r)   ArgszDeleteGa.Args>   s    	  )F)FH    c                 6    t        |t        j                        S N)r*   r	   
GA_VERSIONselfr#   s     r)   RunzDeleteGa.RunC   s    i**++r4   N)__name__
__module____qualname____doc__staticmethodr3   r:    r4   r)   r,   r,   1   s"     H H,r4   r,   c                       e Zd ZdZd Zy)
DeleteBetar-   c                 6    t        |t        j                        S r6   )r*   r	   BETA_VERSIONr8   s     r)   r:   zDeleteBeta.RunT   s    i,,--r4   N)r;   r<   r=   r>   r:   r@   r4   r)   rB   rB   G   s    .r4   rB   N)r>   
__future__r   r   r   googlecloudsdk.api_lib.air   #googlecloudsdk.api_lib.ai.endpointsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air	   r
   r   r   r   r   googlecloudsdk.core.consoler   r*   ReleaseTracksReleaseTrackGAUniverseCompatibleDeleteCommandr,   BETAALPHArB   r@   r4   r)   <module>rR      s    * &  ' 0 6 ( 3 7 8 / 9 5 2F  D%%((),t!! ,  *,( D%%**D,=,=,C,CD. .  E.r4   