
    y                         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                   G d	 d
ej                               Zddie_        y)z'logging logs delete' command.    )absolute_import)division)unicode_literals)util)base)log)
console_ioc                   &    e Zd ZdZed        Zd Zy)DeletezDelete all entries from a log in the global ```_Default``` log bucket.

  ## EXAMPLES

  To delete all entries from log 'my-log' in the global ```_Default``` log
  bucket:

    $ {command} my-log
  c                 *    | j                  dd       y)z Register flags for this command.log_namez	Log name.)helpN)add_argument)parsers    "lib/surface/logging/logs/delete.pyArgszDelete.Args(   s     
5    c                    t        j                  d|j                  z  d       t        j                         j
                  j                  t        j                         j                  t        j                  t        j                         |j                                     t        j                  |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.
    z(Really delete all log entries from [%s]?T)cancel_on_no)logNameN)r	   PromptContinuer   r   	GetClientprojects_logsr   GetMessages LoggingProjectsLogsDeleteRequestCreateLogResourceNameGetCurrentProjectParentr   DeletedResource)selfargss     r   Runz
Delete.Run-   s     2T]]B 	NN""));;..,,.? 	< 	@A &r   N)__name__
__module____qualname____doc__staticmethodr   r!    r   r   r   r      s      6 6'r   r   DESCRIPTIONz
        {index}
        With no entries, the log will not appear in the list of your
        project's logs. However, you can write new entries to the log.
    N)r%   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   googlecloudsdk.corer   googlecloudsdk.core.consoler	   DefaultUniverseOnlyDeleteCommandr   detailed_helpr'   r   r   <module>r1      s[     % &  ' / ( # 2 'T ' 'F   r   