
                             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l	m
Z
 ddlmZ ej                   G d	 d
ej                               Zy)zJImplementation of list command to list Anywhere Cache instances of bucket.    )api_factory)base)errors_util)flags)storage_url)resource_util)describec                   0    e Zd ZdZdddZed        Zd Zy)Listz.List all Anywhere Cache instances of a bucket.z7

      List all cache instances of this bucket.
      z

      The following command lists all anywhere cache instances of bucket
      ``gs://my-bucket'':

        $ {command} gs://my-bucket
      )DESCRIPTIONEXAMPLESc                 ^    |j                  dt        d       t        j                  |       y )NurlzTSpecifies the URL of the bucket for which anywhere cache instances should be listed.)typehelp)add_argumentstrr   add_raw_display_flag)clsparsers     3lib/surface/storage/buckets/anywhere_caches/list.pyArgsz	List.Args,   s0    
!	   
v&    c              #   j  K   t        j                  |j                        }t        j                  |j
                  |       t        j                  |j                        j                  |j                        }|D ]3  }t        j                  |t        j                  |j                         5 y w)N)r   storage_url_from_stringr   r   raise_error_if_not_gcs_bucketcommand_pathr   get_apischemelist_anywhere_cachesbucket_namer   get_display_dict_for_resourcer	   %AnywhereCacheDisplayTitlesAndDefaultsraw)selfargsr   cache_resourcescache_resources        r   RunzList.Run9   s     

-
-dhh
7C--d.?.?E!))#**5JJO *77


8
8
((  *s   B1B3N)__name__
__module____qualname____doc__detailed_helpclassmethodr   r)    r   r   r   r      s/    6

- 
' 
'r   r   N)r-   googlecloudsdk.api_lib.storager   googlecloudsdk.callioper   "googlecloudsdk.command_lib.storager   r   r   ,googlecloudsdk.command_lib.storage.resourcesr   'surface.storage.buckets.anywhere_cachesr	   DefaultUniverseOnlyListCommandr   r0   r   r   <module>r8      sG    Q 6 ( : 4 : F < *4 * *r   