
                            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)z3Vertex AI deployment monitoring jobs pause command.    )absolute_import)division)unicode_literals)client)base)	constants)endpoint_util)flags)log)
console_ioEXAMPLESz
    To pause 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 pause command.locationsIdmodelDeploymentMonitoringJobsId)regionz7This will pause model deployment monitoring job [{}]...T)cancel_on_no)versiongcloud )id
cmd_prefixN)CONCEPTSmonitoring_jobParseAsDictr	   AiplatformEndpointOverridesr   PromptContinueformatr   ModelMonitoringJobsClientPauser   statusPrintr   *MODEL_MONITORING_JOB_PAUSE_DISPLAY_MESSAGEName)argsr   release_prefixmodel_monitoring_job_refr   model_monitoring_job_idresponser   s           -lib/surface/ai/model_monitoring_jobs/pause.py_Runr+   '   s   !]]99??A#**,];&4;; %'00HAHH#	% //78 JC.((jJJ<<CC',,.: 	D 	GH  IHHs   "B%DDc                   &    e Zd ZdZed        Zd Zy)PauseGa:Pause a running Vertex AI model deployment monitoring job.c                 0    t        j                  | d       y Nzto pauser
    AddModelMonitoringJobResourceArgparsers    r*   ArgszPauseGa.ArgsA       	**6:>    c                 h    t        |t        j                  | j                         j                        S N)r+   r   
GA_VERSIONReleaseTrackprefixselfr%   s     r*   RunzPauseGa.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
Pause.ArgsM   r6   r7   c                 h    t        |t        j                  | j                         j                        S r9   )r+   r   BETA_VERSIONr;   r<   r=   s     r*   r?   z	Pause.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d   H *H D%%++T->->-C-CDJD J EJ $ % r7   