
    	                         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 buckets list' command.    )absolute_import)division)unicode_literals)util)basez-
        List the buckets for a project.
    zF
     To list the buckets in a project, run:

        $ {command}
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)ListzList the defined buckets.c                     t        j                  | d       t        j                  | dd       | j                  j	                  d       | j                  j                  d       y)z Register flags for this command.zbuckets to listFzXLocation from which to list buckets. By default, buckets in all locations will be listedztable(name.segment(-3):label=LOCATION, name.segment(-1):label=BUCKET_ID, retentionDays, cmekSettings.yesno(yes="TRUE", no=""):label=CMEK, restrictedFields, indexConfigs, lifecycle_state, locked, create_time, update_time)N)r   AddParentArgsAddBucketLocationArgdisplay_info	AddFormatAddCacheUpdater)parsers    #lib/surface/logging/buckets/list.pyArgsz	List.Args)   s^     	v01	#$ !!	$ ''-    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 buckets.
    )parentN)r   	GetClientprojects_locations_bucketsr   GetMessages*LoggingProjectsLocationsBucketsListRequestGetBucketLocationFromArgsbuckets)selfargsresultbuckets       r   RunzList.Run:   se      ^^88==EE11$7 	F 	9:F ..l !s   A9A;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>r0      s\     & &  ' / (		 "4 " "H # r   