
                             S r SSKJr  SSKJr  SSKJr  SSS.r\R                   " S S	\R                  5      5       r	\\	l
        g
)z'logging views list' command.    )util)arg_parsers)basez2
        Lists the views defined on a bucket.
    zK
     To list the views defined on a bucket, run:

        $ {command}
    )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)List#   zList the defined views.c                     [         R                  " U S5        [         R                  " U SS5        U R                  SS[        R
                  " SS5      SS9  U R                  R                  S	5        g
)z Register flags for this command.zviews to listTz Location of the specified bucketz--bucketz.+zmust be non-emptyzID of bucket)requiredtypehelpzGtable(name.segment(-1):label=VIEW_ID, filter, create_time, update_time)N)r   AddParentArgsAddBucketLocationArgadd_argumentr   RegexpValidatordisplay_info	AddFormat)parsers    !lib/surface/logging/views/list.pyArgs	List.Args'   sq     	v/8:
T((0CD   !!	    c           	   #   >  #    [         R                  " 5       R                  R                  [         R                  " 5       R                  [         R                  " [         R                  " U5      SUR                  5      S95      nUR                   H  nUv   M	     g7f)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 views.
buckets)parentN)
r   	GetClient projects_locations_buckets_viewsr	   GetMessages/LoggingProjectsLocationsBucketsViewsListRequestCreateResourceNameGetBucketLocationFromArgsbucketviews)selfargsresultviews       r   RunList.Run6   s}      ^^>>CCJJ**..t4iN 	K 	OPF j s   BB N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r)   __static_attributes__r+   r   r   r	   r	   #   s     r   r	   N)r0   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   r   DETAILED_HELPUniverseCompatibleListCommandr	   detailed_helpr+   r   r   <module>r9      sX     $ 0 / (		 !4 ! !F # r   