
                             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d	Z	ej                   G d
 dej                               Ze	e_        y)z'logging scopes list' command.    )absolute_import)division)unicode_literals)util)basez0
        List the log scopes for a project.
    z^
     To list the log scopes in a project, run:

        $ {command} --project=my-project
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)ListzList the defined log scopes.c                     t        j                  | dd       | j                  j                  d       | j                  j	                  d       y)z Register flags for this command.zlog scopes to listT)exclude_billing_accountztable(name.segment(-3):label=LOCATION, name.segment(-1):label=LOG_SCOPE_ID, resource_name, description, create_time, update_time)N)r   AddParentArgsdisplay_info	AddFormatAddCacheUpdater)parsers    "lib/surface/logging/scopes/list.pyArgsz	List.Args)   sL     	$d !!	@
 ''-    c           	   #   T  K   t        j                         j                  j                  t        j                         j                  t        j                  t        j                  |j                        j                         dd                  }|j                  D ]  }|  yw)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.

    Yields:
      The list of log scopes.
    	locationsglobal)parentN)r   	GetClientprojects_locations_logScopesr   GetMessages,LoggingProjectsLocationsLogScopesListRequestCreateResourceNameGetProjectResourceprojectRelativeName	logScopes)selfargsresultscopes       r   RunzList.Run7   s      ^^::??GG**''5BBD 	H 	
F !!k "s   B&B(N)__name__
__module____qualname____doc__staticmethodr   r'    r   r   r   r   %   s    $. .r   r   N)r+   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   DETAILED_HELPUniverseCompatibleListCommandr   detailed_helpr-   r   r   <module>r5      s\     % &  ' / (		 %4 % %P # r   