
    
                        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dZej"                   ej$                  ej&                  j(                         G d dej*                                      Zee_        y)z'Resume command for Workbench Schedules.    )util)	schedules)base)parser_arguments)parser_extensions)endpoint_util)flags)logz=
        Resume a Workbench notebook execution schedule.
    z
        To resume a paused schedule with id `my-schedule`, in region `us-central1`, run:

         $ {command} my-schedule --region=us-central1
    )DESCRIPTIONEXAMPLESc                   Z    e Zd ZdZedej                  fd       Zdej                  fdZ
y)ResumezResume a schedule.parserc                 .    t        j                  |        y)zeRegister flags for this command.

    Args:
      parser: The parser to register the flags with.
    N)r	   AddResumeScheduleFlags)r   s    )lib/surface/workbench/schedules/resume.pyArgszResume.Args-   s     
  (    argsc                 ,   | j                         }t        j                  | j                               }|j                  j                  j                         }|j                         d   }t        j                  d|      5  t        j                  |      }|j                  }t        j                  |||       |j                  t        j                  ||            }t        j                   j#                  d       |cddd       S # 1 sw Y   yxY w)zThis is what gets called when the user runs this command.

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

    Returns:
      The API response from resuming the schedule.
    locationsIdBETA)versionregionzResumed schedule.N)ReleaseTrackr   GetMessagesCONCEPTSscheduleParseAsDictr   AiplatformEndpointOverrides	GetClientprojects_locations_schedulesschedules_utilValidateAndGetWorkbenchScheduler   CreateScheduleResumeRequestr
   statusPrint)	selfr   release_trackmessagesschedule_refr   
api_clientschedules_serviceapi_responses	            r   Runz
Resume.Run6   s     %%'M 1 1 34H==))//1L  "=1F		2	2v
 >>-0j

1
1  44
+ '--

4
4Hl
 
jj*+!
 
 
s   A>D

DN)__name__
__module____qualname____doc__staticmethodr   ArgumentInterceptorr   r   	Namespacer0    r   r   r   r   (   s:     )#77 ) )'11 r   r   N)r4   'googlecloudsdk.api_lib.colab_enterpriser   (googlecloudsdk.api_lib.notebook_executorr   r$   googlecloudsdk.callioper   r   r   googlecloudsdk.command_lib.air   ,googlecloudsdk.command_lib.notebook_executorr	   googlecloudsdk.corer
   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr   r   UpdateCommandr   detailed_helpr8   r   r   <module>rD      s     . 8 P ( 4 5 7 > #		 D%%**+)T ) , )V & r   