
                             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	 G d
 dej                        Ze	e_        y)z'trace sinks list' command.    )absolute_import)division)unicode_literals)util)basez6
        Lists the defined sinks for the project.
    z/

        $ {command}
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Listz(Lists the defined sinks for the project.c                    t         j                  j                  |        t         j                  j                  |        t         j                  j                  |        t         j
                  j                  |        t         j                  j                  |        | j                  dd       | j                  j                  d       | j                  j                  d       y)z Register flags for this command.z	--projectzTList all sinks associated with this project. This will override the default project.)helpz)table(name, destination, writer_identity)N)r   PAGE_SIZE_FLAGRemoveFromParser
LIMIT_FLAGSORT_BY_FLAGFILTER_FLAGURI_FLAGadd_argumentdisplay_info	AddFormatAddCacheUpdater)parsers    lib/surface/trace/sinks/list.pyArgsz	List.Args&   s     	((0OO$$V,&&v.%%f-MM""6*
3  4 !!"MN
''-    c              #   P  K   t        j                         j                  j                  t        j                         j                  t        j                  |j                        j                                     }|j                  D ]  }t        j                  |        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 sinks.
    )parentN)r   	GetClientprojects_traceSinksr   GetMessages'CloudtraceProjectsTraceSinksListRequestGetProjectResourceprojectRelativeNamesinksFormatTraceSink)selfargsresultsinks       r   RunzList.Run5   s      ^^1166BB**4<<8EEG 	C 	IJF   && s   B$B&N)__name__
__module____qualname____doc__staticmethodr   r+    r   r   r   r   #   s    0. .'r   r   N)r/   
__future__r   r   r   googlecloudsdk.api_lib.tracer   googlecloudsdk.callioper   DETAILED_HELPListCommandr   detailed_helpr1   r   r   <module>r8      sG    " &  ' - (	 '4  'F # r   