
    ?
                         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
dZ ej                  ej                  j                          G d dej"                               Zy)z)'vmware private-clouds undelete' command.    )absolute_import)division)unicode_literals)PrivateCloudsClient)base)flags)logz
          Unmark a VMware Engine private cloud that was previously marked for deletion by `{parent_command} delete`.

        aa  
          To unmark a private cloud called `my-private-cloud` for deletion, run:


            $ {command} my-private-cloud --location=us-west2-a --project=my-project

          Or:

            $ {command} my-private-cloud

          In the second example, the project and location are taken from gcloud properties core/project and compute/zone.

    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)UnDeletez>Cancel deletion of a Google Cloud VMware Engine private cloud.c                     t        j                  | d       t        j                  j	                  |        t        j                  j                  | d       | j                  j                  d       y)z Register flags for this command.T)
positionalyamlN)r   AddPrivatecloudArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormat)parsers    -lib/surface/vmware/private_clouds/undelete.pyArgszUnDelete.Args7   sN     
$$V=OO'OOvt,
!!&)    c                    |j                   j                  j                         }t               }|j                  }|j                  |      }|r#t        j                  |j                  dd       y |j                  |j                  |      dj                  |j                                     }t        j                  |j                         d       |S )Nzprivate cloudT)kindis_asyncz6waiting for private cloud deletion [{}] to be canceled)operation_refmessage)r   )CONCEPTSprivate_cloudParser   async_r   r	   RestoredResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsprivatecloudclientr   	operationresources          r   RunzUnDelete.Run?   s    ==..446L "F{{H-I	9>>$O&&,,Y7HOO%%') ' *H 224?KOr   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r0    r   r   r   r   1   s!    F-* *r   r   N)r4   
__future__r   r   r   +googlecloudsdk.api_lib.vmware.privatecloudsr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r5   ReleaseTracksReleaseTrackGARestoreCommandr   r8   r   r   <module>rB      sj    0 &  ' K ( 3 #	
	. D%%(()t""  *r   