
                            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 version 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)DeleteVersionV1!   zDelete an existing Vertex AI model version.

## EXAMPLES

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

  $ {command} 123@1234 --project=example --region=us-central1
c                 P    [         R                  " U S[        R                  5        g )Nz	to delete)r   AddModelVersionResourceArgr   PromptForOpRegion)parsers    'lib/surface/ai/models/delete_version.pyArgsDeleteVersionV1.Args.   s    	$$V[%0%B%BD    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DeleteVersion)selfargsmodel_version_refr   client_instances        r   _RunDeleteVersionV1._Run3   s    		2	2$$V
5..

(
(

+
+I,@,@
ACo    "2244AM5!
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_versionParseAsDictr,   )r(   r)   r*   r   s       r   RunDeleteVersionV1.Run>   s?    3399;%%'6F99Tf55r    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr   r,   r4   __static_attributes__r6   r   r   r   r   !   s'     D D	!6r   r   c                       \ rS rSrSrS rSrg)DeleteVersionV1Beta1D   zDelete an existing Vertex AI model version.

## EXAMPLES

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

  $ {command} 123@1234 --project=example --region=us-central1
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,   DeleteVersionV1Beta1._RunQ   su    		2	2&&v
7%%'556GHi++&77900@B
7 
7 
7s   A+B
B'r6   N)r7   r8   r9   r:   r;   r,   r=   r6   r   r   r?   r?   D   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?   r6   r   r   <module>rY      s    / &  ' 0 3 , ( 3 7 / 5 9 5 D%%(()6d(( 6  *6B D%%++T->->-C-CDB? B  EBr   