
                            S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJr  \R(                  " \R*                  R,                  5      \R.                   " S S\R0                  5      5       5       r\R(                  " \R*                  R4                  \R*                  R6                  5      \R.                   " S S\5      5       5       rg)z Vertex AI models delete command.    )absolute_import)division)unicode_literals)
operations)client)apis)base)	constants)endpoint_util)flags)models_util)operations_util)region_utilc                   4    \ rS rSrSr\S 5       rS rS rSr	g)DeleteV1!   Delete an existing Vertex AI model.

## EXAMPLES

To delete a model `123` under project `example` in region
`us-central1`, run:

  $ {command} 123 --project=example --region=us-central1
c                 P    [         R                  " U S[        R                  5        g )Nz	to delete)r   AddModelResourceArgr   PromptForOpRegion)parsers    lib/surface/ai/models/delete.pyArgsDeleteV1.Args.   s    	fk);;=    c                 b   [         R                  " [        R                  US9   [        R
                  " [        R                  [        R                  [        R                     5      n[        R                  " UUR                  S9R                  U5      sS S S 5        $ ! , (       d  f       g = f)Nversionregion)r   messages)r   AiplatformEndpointOverridesr
   
GA_VERSIONr   GetClientInstanceAI_PLATFORM_API_NAMEAI_PLATFORM_API_VERSIONr   ModelsClientMESSAGES_MODULEDelete)selfargs	model_refr   client_instances        r   _RunDeleteV1._Run3   s    		2	2$$V
5..

(
(

+
+I,@,@
ACo    "2244:F94E
5 
5 
5s   A2B  
B.c                     UR                   R                  R                  5       nUR                  5       S   nU R	                  XU5      $ )NlocationsId)CONCEPTSmodelParseAsDictr-   )r)   r*   r+   r   s       r   RunDeleteV1.Run=   s>    ##))+I.F99Tf--r    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr   r-   r5   __static_attributes__r7   r   r   r   r   !   s&     = =F.r   r   c                       \ rS rSrSrS rSrg)DeleteV1Beta1C   r   c                 T   [         R                  " [        R                  US9   [        R
                  " 5       R                  U5      n[        R                  " [        R                  " 5       U[        R                  " UR                  5      S9sS S S 5        $ ! , (       d  f       g = f)Nr   )operations_clientopop_ref)r   r!   r
   BETA_VERSIONr   r&   r(   r   WaitForOpMayber   OperationsClientr   ParseModelOperationname)r)   r*   r+   r   	operations        r   r-   DeleteV1Beta1._RunP   st    		2	2&&v
7%%'..y9i++&77900@B
7 
7 
7s   A+B
B'r7   N)r8   r9   r:   r;   r<   r-   r>   r7   r   r   r@   r@   C   s    Br   r@   N)r<   
__future__r   r   r   googlecloudsdk.api_lib.air    googlecloudsdk.api_lib.ai.modelsr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper	   googlecloudsdk.command_lib.air
   r   r   r   r   r   ReleaseTracksReleaseTrackGAUniverseCompatibleDeleteCommandr   ALPHABETAr@   r7   r   r   <module>rZ      s    ' &  ' 0 3 , ( 3 7 / 5 9 5 D%%(().t!! .  *.@ D%%++T->->-C-CDBH B  EBr   