
    N	                        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 Zd Z e	j*                  e	j,                  j.                  e	j,                  j0                         G d de	j2                               Z e	j*                  e	j,                  j6                         G d de	j2                               Zy)z"ai-platform models update command.    )absolute_import)division)unicode_literals)models)
operations)base)endpoint_util)flags)models_util)region_util)labels_util)logc                    t        j                         j                  |        t        j                  d      j                  |        t        j                  d      j                  |        t        j                  |        y)z:Get arguments for the `ai-platform models update` command.T)include_globalmodelN)r
   GetModelNameAddToParserGetRegionArgGetDescriptionFlagr   AddUpdateLabelsFlagsparsers    (lib/surface/ai_platform/models/update.py_AddUpdateArgsr       sY    ""6*D)55f=7#//7""6*    c                 D   t        j                  |       }t        j                  |      5  t	        j
                         }t        j                         }t        j                  |||        t        j                  | j                  d       d d d        y # 1 sw Y   y xY w)N)regionzai platform model)kind)r   	GetRegionr	   MlEndpointOverridesr   ModelsClientr   OperationsClientr   Updater   UpdatedResourcer   )argsr   models_clientoperations_clients       r   _Runr(   (   sq      &&((7'')M"335}&7>

)<=	 877s   A!BBc                   &    e Zd ZdZed        Zd Zy)
UpdateBeta%Update an existing AI Platform model.c                     t        |        y Nr   r   s    r   ArgszUpdateBeta.Args5   
    6r   c                     t        |       y r-   r(   selfr%   s     r   RunzUpdateBeta.Run9   	    Jr   N__name__
__module____qualname____doc__staticmethodr/   r5    r   r   r*   r*   1       - r   r*   c                   &    e Zd ZdZed        Zd Zy)r#   r+   c                     t        |        y r-   r.   r   s    r   r/   zUpdate.ArgsA   r0   r   c                     t        |       y r-   r2   r3   s     r   r5   z
Update.RunE   r6   r   Nr7   r=   r   r   r#   r#   =   r>   r   r#   N)r;   
__future__r   r   r    googlecloudsdk.api_lib.ml_enginer   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.ml_enginer	   r
   r   r   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   r   r(   ReleaseTracksReleaseTrackALPHABETAUpdateCommandr*   GAr#   r=   r   r   <module>rN      s    ) &  ' 3 7 ( > 6 < < < #+> D%%++T->->-C-CD##  E D%%(()T  *r   