
    I                         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 views list' command.    )absolute_import)division)unicode_literals)util)basez>
        Lists the available locations for Cloud Logging.
    zE
     To list the available locations, run:

        $ {command}
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)ListzList the availables location.c                 f    t        j                  | d       | j                  j                  d       y)z Register flags for this command.zlocations to listztable(locationId)N)r   AddParentArgsdisplay_info	AddFormat)parsers    %lib/surface/logging/locations/list.pyArgsz	List.Args)   s*     	v23
!!"56    c              #      K   t        j                         j                  j                  t        j                         j                  t        j                  |                  }|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 locations.
    )nameN)r   	GetClientprojects_locationsr   GetMessages#LoggingProjectsLocationsListRequestGetParentFromArgs	locations)selfargsresultlocations       r   RunzList.Run0   sf      ^^0055>>''- 	? 	/0F $$n %s   A9A;N)__name__
__module____qualname____doc__staticmethodr   r     r   r   r   r   %   s    %7 7r   r   N)r$   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   DETAILED_HELPUniverseCompatibleListCommandr   detailed_helpr&   r   r   <module>r.      s[     $ &  ' / (		 4  6 # r   