
                         ,   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	S
.r\R                  \R                   " \R"                  R$                  \R"                  R&                  5       " S S\R(                  5      5       5       r\\l        g)z.Update command for Colab Enterprise Schedules.    )util)	schedules)base)endpoint_util)flags)logzD
        Update a Colab Enterprise notebook execution schedule.
    z
        To update the cron schedule and max runs of a schedule with id `my-schedule`, in region `us-central1`, run:

        $ {command} my-schedule --region=us-central1 --cron-schedule='TZ=America/Los_Angeles 0 0 * * 0' --max-runs=2
    )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)Update%   zUpdate a schedule.c                 .    [         R                  " U SS9  g)zRRegister flags for this command.

Args:
  parser: argparse parser for the command
T)	is_updateN)r   AddCreateOrUpdateScheduleFlags)parsers    %lib/surface/colab/schedules/update.pyArgsUpdate.Args*   s     
((4@    c                 6   U R                  5       n[        R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  5       S   n[        R                  " SUS9   [        R                  " U5      nUR                  n[        R                  " XU5        UR                  [        R                  " X5      5      n[        R                   " UR"                  SS9  UsSSS5        $ ! , (       d  f       g= f)zThis is what gets called when the user runs this command.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.

Returns:
  The API response for updating the schedule.
locationsIdBETA)versionregionschedule)resourcekindN)ReleaseTrackr   GetMessagesCONCEPTSr   ParseAsDictr   AiplatformEndpointOverrides	GetClientprojects_locations_schedulesschedules_utilValidateAndGetColabSchedulePatchCreateSchedulePatchRequestr   UpdatedResourcename)	selfargsrelease_trackmessagesschedule_refr   
api_clientschedules_servicer   s	            r   Run
Update.Run3   s     %%'M 1 1 34H==))//1L  "=1F		2	2v
 >>-0j

1
1 
 00
+ #((

3
3D
Ch 
8==zB!
 
 
s   A?D


D N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r3   __static_attributes__r5   r   r   r   r   %   s      A Ar   r   N)r:   'googlecloudsdk.api_lib.colab_enterpriser   (googlecloudsdk.api_lib.notebook_executorr   r&   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   ,googlecloudsdk.command_lib.notebook_executorr   googlecloudsdk.corer   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr   GAr   UpdateCommandr   detailed_helpr5   r   r   <module>rI      s     5 8 P ( 7 > #		 D%%(($*;*;*@*@A*T * B *X & r   