
                         h    S r SSKJr  SSKJr  \R
                   " S S\R                  5      5       rg)z'logging sinks list' command.    )util)basec                   .    \ rS rSrSr\S 5       rS rSrg)List   ztList the defined sinks.

List the defined sinks.

## EXAMPLES

To list all defined sinks:

  $ {command} --limit=10
c                 :   [         R                  R                  U 5        [         R                  R                  U 5        [        R
                  " U S5        U R                  SSS9  U R                  R                  S5        U R                  R                  S5        g)z Register flags for this command.zsinks to listz--sink-filterzA filter expression passed to the Logging API to constrain the sinks returned. For information on accepted values, see https://cloud.google.com/logging/docs/reference/v2/rpc/google.logging.v2#listsinksrequest)helpz table(name, destination, filter)N)
r   PAGE_SIZE_FLAGRemoveFromParserURI_FLAGr   AddParentArgsadd_argumentdisplay_info	AddFormatAddCacheUpdater)parsers    !lib/surface/logging/sinks/list.pyArgs	List.Args$   s     	((0MM""6*v/
h   !!"DE
''-    c                 N   [         R                  " 5       R                  R                  [         R                  " 5       R                  [         R                  " U5      UR                  S95      nUR                   H  nUR                  (       a  M  SUl	        M     UR                  $ )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.

Returns:
  The list of sinks.
)parentfilterz(empty filter))
r   	GetClientprojects_sinksr   GetMessagesLoggingProjectsSinksListRequestGetParentFromArgssink_filtersinksr   )selfargsresultsinks       r   RunList.Run5   s     ^^,,11::))$/8H8H 	; 	
F
 [[[&  <<r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r%   __static_attributes__r'   r   r   r   r      s     	 . . r   r   N)r,   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   UniverseCompatibleListCommandr   r'   r   r   <module>r3      s9     $ 0 ( /4 / /r   