
                         ,   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  ej                  ej                  j                  ej                  j                   ej                  j"                         G d	 d
ej$                               Zy)zCommand to undelete a folder.    )absolute_import)division)unicode_literals)folders)base)flags)logc                   &    e Zd ZdZed        Zd Zy)Undeletea  Undelete a folder.

  Undeletes the folder with the given folder ID.

  This command can fail for the following reasons:
  * There is no folder with the given ID.
  * The active account does not have Owner or Editor permissions for the
    given folder.
  * When the folder to be undeleted has the same display name as an active
    folder under this folder's parent.

  ## EXAMPLES

  The following command undeletes the folder with the ID `3589215982`:

    $ {command} 3589215982
  c                 L    t        j                  d      j                  |        y )Nzyou want to undelete.)r   FolderIdArgAddToParser)parsers    0lib/surface/resource_manager/folders/undelete.pyArgszUndelete.Args0   s    	-.::6B    c                     t        j                         }t        j                         }|j                  |j	                  |j
                              }t        j                  |       y )N)	foldersId)r   FoldersServiceFoldersMessagesr   *CloudresourcemanagerFoldersUndeleteRequestidr	   RestoredResource)selfargsservicemessagesrestoreds        r   RunzUndelete.Run4   sX    $$&G&&(H;;gg 	< 	 H "r   N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r   r      s"    $ C C#r   r   N)r#   
__future__r   r   r   'googlecloudsdk.api_lib.resource_managerr   googlecloudsdk.callioper   +googlecloudsdk.command_lib.resource_managerr   googlecloudsdk.corer	   ReleaseTracksReleaseTrackALPHABETAGACreateCommandr   r%   r   r   <module>r1      sx    $ &  ' ; ( = # D%%++T->->-C-C%%((*#t!! #*#r   