
                            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iZd Z ej&                  ej(                  j*                         G d dej,                               Z ej&                  ej(                  j0                  ej(                  j2                         G d dej,                               Zee_        ee_        y)z4Vertex AI deployment monitoring jobs resume command.    )absolute_import)division)unicode_literals)client)base)	constants)endpoint_util)flags)log)
console_ioEXAMPLESz
    To resume a model deployment monitoring job `123` of project `example` in region `us-central1`, run:

      $ {command} 123 --project=example --region=us-central1
    c                 :   | j                   j                  j                         }|j                         d   }|j                         d   }t	        j
                  ||      5  t        j                  dj                  |      d       t        j                  |      j                  |      }d}|r|d	|z   z  }t        j                  j                  t        j                   j                  |j#                         |
             |cddd       S # 1 sw Y   yxY w)zRun method for resume command.locationsIdmodelDeploymentMonitoringJobsId)regionz8This will resume model deployment monitoring job [{}]...T)cancel_on_no)versiongcloud )id
cmd_prefixN)CONCEPTSmonitoring_jobParseAsDictr	   AiplatformEndpointOverridesr   PromptContinueformatr   ModelMonitoringJobsClientResumer   statusPrintr   +MODEL_MONITORING_JOB_RESUME_DISPLAY_MESSAGEName)argsr   release_prefixmodel_monitoring_job_refr   model_monitoring_job_idresponser   s           .lib/surface/ai/model_monitoring_jobs/resume.py_Runr+   '   s   !]]99??A#**,];&4;; %'00HBII#	% // 89 JC.((jJJ==DD',,.: 	E 	GH  IHHs   "B%DDc                   &    e Zd ZdZed        Zd Zy)ResumeGa:Resume a paused Vertex AI model deployment monitoring job.c                 0    t        j                  | d       y Nz	to resumer
    AddModelMonitoringJobResourceArgparsers    r*   ArgszResumeGa.ArgsA       	**6;?    c                 h    t        |t        j                  | j                         j                        S N)r+   r   
GA_VERSIONReleaseTrackprefixselfr%   s     r*   RunzResumeGa.RunE   s&    i**D,=,=,?,F,FGGr7   N__name__
__module____qualname____doc__staticmethodr5   r?    r7   r*   r-   r-   =   s    B@ @Hr7   r-   c                   &    e Zd ZdZed        Zd Zy)r    r.   c                 0    t        j                  | d       y r0   r1   r3   s    r*   r5   zResume.ArgsM   r6   r7   c                 h    t        |t        j                  | j                         j                        S r9   )r+   r   BETA_VERSIONr;   r<   r=   s     r*   r?   z
Resume.RunQ   s&    i,,d.?.?.A.H.HIIr7   Nr@   rF   r7   r*   r    r    I   s    B@ @Jr7   r    N)rD   
__future__r   r   r   /googlecloudsdk.api_lib.ai.model_monitoring_jobsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r	   r
   googlecloudsdk.corer   googlecloudsdk.core.consoler   DETAILED_HELPr+   ReleaseTracksr;   GASilentCommandr-   ALPHABETAr    detailed_helprF   r7   r*   <module>rX      s    ; &  ' B ( 3 7 / # 2 	, D%%(()Ht!! H *H D%%++T->->-C-CDJT J EJ % & r7   