
    :                        S r SSKJr  SSKJr  SSKJr  SSK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KJr  SSKJr  SrSr\	R*                  " \	R,                  R.                  5       " S S\	R0                  5      5       r\	R*                  " \	R,                  R4                  \	R,                  R6                  5       " S S\5      5       rg)z5Command to reboot a Persistent Resource in Vertex AI.    )absolute_import)division)unicode_literalsN)client)base)	constants)endpoint_util)flags)
validation)log)
propertiesz?projects/{project}/locations/{region}/operations/{operation_id}zRequest to reboot the PersistentResource [{name}] has been sent.

You may view the status of your PersistentResource reboot operation with the command

  $ {command_prefix} ai operations describe {operation_resource_name}

c                   L    \ rS rSrSr\R                  r\S 5       r	S r
S rSrg)RebootGA-   zReboot a Persistent Resource.

## EXAMPLES

To reboot a persistent resource ``123'' under project ``example'' in region
``us-central1'', run:

  $ {command} 123 --project=example --region=us-central1
c                 2    [         R                  " U S5        g )Nz	to reboot)r
    AddPersistentResourceResourceArg)parsers    -lib/surface/ai/persistent_resources/reboot.pyArgsRebootGA.Args:   s    	**6;?    c                     SnU R                  5       R                  (       a   USU R                  5       R                  -   -  nU$ )Ngcloud )ReleaseTrackprefix)self
cmd_prefixs     r   _CommandPrefixRebootGA._CommandPrefix>   s=    J!!C$++-4444jr   c           	         UR                   R                  R                  5       nUR                  5       S   n[        R
                  " U5        [        R                  " U R                  US9   [        R                  R                  R                  R                  5       nUR                  5       n[        R                   " U R                  S9R#                  U5      n[$        R&                  " SUR(                  5      R+                  S5      S   n[,        R/                  UUUS9n[0        R2                  R5                  [6        R/                  UU R9                  5       US95        UsS S S 5        $ ! , (       d  f       g = f)NlocationsId)versionregion)r#   zoperations\/(\d+)r   )projectr$   operation_id)namecommand_prefixoperation_resource_name)CONCEPTSpersistent_resourceParseAsDictr   ValidateRegionr	   AiplatformEndpointOverrides_api_versionr   VALUEScorer%   	GetOrFailRelativeNamer   PersistentResourcesClientRebootresearchr'   groups!_OPERATION_RESOURCE_NAME_TEMPLATEformatr   statusPrint+_PERSISTENT_RESOURCE_REBOOT_DISPLAY_MESSAGEr   )	r   argspersistent_resource_refr$   r%   resource_nameresponser&   r)   s	            r   RunRebootGA.RunD   s?   "mm??EEG$++-m<Ff%		2	2!!&
2!!&&..88:g-::<m11##%%+VM%:  YY3X]]CJJ1MaPl A H H# !I ! 
jj
5
<
< !002&= = ?@
 '
2 
2 
2s   -C9E00
E> N)__name__
__module____qualname____firstlineno____doc__r   
GA_VERSIONr0   staticmethodr   r   rC   __static_attributes__rE   r   r   r   r   -   s2     %%,@ @r   r   c                   0    \ rS rSrSr\R                  rSrg)RebootPreGA_   zReboot an active Persistent Resource.

## EXAMPLES

To reboot a persistent resource ``123'' under project ``example'' in region
``us-central1'', run:

  $ {command} 123 --project=example --region=us-central1
rE   N)	rF   rG   rH   rI   rJ   r   BETA_VERSIONr0   rM   rE   r   r   rO   rO   _   s     '',r   rO   )rJ   
__future__r   r   r   r7   .googlecloudsdk.api_lib.ai.persistent_resourcesr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r	   2googlecloudsdk.command_lib.ai.persistent_resourcesr
   r   googlecloudsdk.corer   r   r:   r>   ReleaseTracksr   GASilentCommandr   ALPHABETArO   rE   r   r   <module>r]      s    < &  ' 	 A ( 3 7 D I # * F "/ + D%%(().t!! . *.b D%%++T->->-C-CD
(( 
( E
(r   