
    @
                         d Z ddl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                  dd	      Zej                   G d
 dej                               Zy)zFImplementation of describe command to get the Anywhere Cache Instance.    N)api_factory)base)flags)storage_url)resource_util%AnywhereCacheDisplayTitlesAndDefaults)admission_policyanywhere_cache_idbucketcreate_timeidkindpending_updatestatettlupdate_timezonec                   0    e Zd ZdZdddZed        Zd Zy)Describez7Returns details of Anywhere Cache instance of a bucket.zF

      Desribes a single Anywhere Cache instance if it exists.
      z

      The following command describes the anywhere cache instance of bucket
      ``my-bucket'' having anywhere_cache_id ``my-cache-id'':

        $ {command} my-bucket/my-cache-id
      )DESCRIPTIONEXAMPLESc                 ^    |j                  dt        d       t        j                  |       y )Nr   zIdentifier for a Anywhere Cache instance. It is a combination of bucket_name/anywhere_cache_id, For example : test-bucket/my-cache-id.)typehelp)add_argumentstrr   add_raw_display_flag)clsparsers     7lib/surface/storage/buckets/anywhere_caches/describe.pyArgszDescribe.Args?   s0    
(	   
v&    c                    |j                   j                  d      \  }}}t        j                  t        j
                  j                        j                  ||      }t        j                  |t        |j                        S )N/)r   
rpartitionr   get_apir   ProviderPrefixGCSget_anywhere_cacher   get_display_dict_for_resourcer   raw)selfargsbucket_name_r
   results         r    RunzDescribe.RunM   sp    (,(:(:3(?%K%  ""&&&78  66- r"   N)__name__
__module____qualname____doc__detailed_helpclassmethodr!   r1    r"   r    r   r   -   s/    ?

- ' 'r"   r   )r5   collectionsgooglecloudsdk.api_lib.storager   googlecloudsdk.callioper   "googlecloudsdk.command_lib.storager   r   ,googlecloudsdk.command_lib.storage.resourcesr   
namedtupler   DefaultUniverseOnlyDescribeCommandr   r8   r"   r    <module>rA      sa    M  6 ( 4 : F )?(>(>+) %$ *t## * *r"   