HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/lib/surface/storage/buckets/__pycache__/describe.cpython-312.pyc
�

��F����dZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddl
mZdd	l
mZdd
l
m
Z
ddl
mZddl
mZdd
lmZddlmZddlmZd�Zd�Ze	j,e	j.j0�e	j2Gd�de	j4���Ze	j2e	j,e	j.j8�Gd�de���Zy)zGImplementation of buckets describe command for getting info on buckets.�)�absolute_import)�division)�unicode_literals)�api_factory)�	cloud_api)�base)�errors)�errors_util)�flags)�storage_url)�wildcard_iterator)�full_resource_formatter)�gsutil_json_printer)�
resource_utilc��|jdd��tj|�tj|�tj
j
�y)z$Adds common arguments to the parser.�urlz$Specifies URL of bucket to describe.)�helpN)�add_argumentr�add_additional_headers_flag�add_raw_display_flagr�GsutilJsonPrinter�Register��parsers �'lib/surface/storage/buckets/describe.py�_add_common_argsr"sD�����e�"H��I��#�#�F�+����V�$��'�'�0�0�2�c�X�tj|�rtjd��y)Nz�Describe does not accept wildcards because it returns a single resource. Please use the `ls` or `buckets list` command for retrieving multiple resources.)r
�contains_wildcardr	�InvalidUrlError)rs r�(_validate_url_does_not_contain_wildcardsr!*s-���(�(��-�
�
 �
 �	*���.rc�0�eZdZdZddd�Zed��Zd�Zy)�Describe� Describes Cloud Storage buckets.z.
      Describe a Cloud Storage bucket.
      z�

      Describe a Google Cloud Storage bucket named "my-bucket":

        $ {command} gs://my-bucket

      Describe bucket with JSON formatting, only returning the "name" key:

        $ {command} gs://my-bucket --format="json(name)"
      )�DESCRIPTION�EXAMPLESc��t|�y�N)rrs r�Argsz
Describe.ArgsHs
���V�rc��t|j�tj|j�}t	j
|j|�tj|j�j|jtjj��}tj |t"j$|j&��S)N)�fields_scope��display_raw_keys)r!rr�storage_url_from_stringr
�raise_error_if_not_bucket�command_pathr�get_api�scheme�
get_bucket�bucket_namer�FieldsScope�FULLr�get_display_dict_for_resourcer�BucketDisplayTitlesAndDefaults�raw��self�argsr�bucket_resources    r�RunzDescribe.RunLs���,�T�X�X�6�
�
-�
-�d�h�h�
7�C��)�)�$�*;�*;�S�A�!�)�)�#�*�*�5�@�@�����*�*�/�/�A��O�
�6�6���>�>�����rN)�__name__�
__module__�__qualname__�__doc__�
detailed_help�staticmethodr)r>�rrr#r#3s1��)�
�	
�	�-� ����
rr#c�&�eZdZdZed��Zd�Zy)�
DescribeAlphar$c�D�t|�tj|�yr()rr�add_soft_deleted_flagrs rr)zDescribeAlpha.Argsas���V��	����'rc
��t|j�tj|jd��}t	j
|j|�tj|j�j|j|jrt|j�ndtjj t#|dd���}t%j&|t(j*|j,��S)NT)�is_bucket_gen_parsing_allowed�soft_deletedF)�
generationr+rLr,)r!rrr.r
r/r0rr1r2r3r4rM�intrr5r6�getattrrr7rr8r9r:s    rr>zDescribeAlpha.Runfs���,�T�X�X�6�
�
-�
-������C��)�)�$�*;�*;�S�A�!�)�)�#�*�*�5�@�@����*-�.�.�3�s�~�~�&�d��*�*�/�/��T�>�5�9�	A��O��6�6���>�>�����rN)r?r@rArBrDr)r>rErrrGrG\s��)��(��(�rrGN)rB�
__future__rrr�googlecloudsdk.api_lib.storagerr�googlecloudsdk.callioper�"googlecloudsdk.command_lib.storager	r
rrr
�,googlecloudsdk.command_lib.storage.resourcesrrrrr!�
ReleaseTracks�ReleaseTrack�GA�UniverseCompatible�DescribeCommandr#�ALPHArGrErr�<module>r[s���N�&��'�6�4�(�5�:�4�:�@�P�L�F�3������D�%�%�(�(�)����$�t�#�#�$��*�$�N�������D�%�%�+�+�,��H��-��r