
                             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 ej                   G d dej                               Zy	)
z#'logging buckets undelete' command.    )absolute_import)division)unicode_literals)util)basec                   &    e Zd ZdZed        Zd Zy)UndeletezUndelete a bucket.

  ## EXAMPLES

  To undelete bucket 'my-bucket' in location 'global', run:

    $ {command} my-bucket --location=global
  c                     | j                  dd       t        j                  | dd       t        j                  | d       y)z Register flags for this command.	BUCKET_IDzID of the bucket to undelete.)helpTzLocation of the bucket.zbucket to undeleteN)add_argumentr   AddBucketLocationArgAddParentArgs)parsers    'lib/surface/logging/buckets/undelete.pyArgszUndelete.Args%   sD     9  ;/1v34    c                 D   t        j                         j                  j                  t        j                         j                  t        j                  t        j                  t        j                  |      d|j                        d|j                                     y)zThis is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.
    	locationsbuckets)nameN)
r   	GetClientprojects_locations_bucketsr	   GetMessages.LoggingProjectsLocationsBucketsUndeleteRequestCreateResourceNameGetParentFromArgslocationr   )selfargss     r   RunzUndelete.Run.   sx     	NN//88II((''**40+t}}N4>>+ 	J 	,-r   N)__name__
__module____qualname____doc__staticmethodr   r!    r   r   r	   r	      s      5 5-r   r	   N)r%   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   UniverseCompatibleRestoreCommandr	   r'   r   r   <module>r-      s@     * &  ' / ( -t"" - -r   