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/artifacts/googet/__pycache__/import.cpython-312.pyc
�

���	��dZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lm
Z
ddlmZe
j e
j"j$e
j"j&e
j"j(�Gd�d
e
j*��Zdddj/ddddd�d�e_y)zCImplements the command to import GooGet packages into a repository.�)�absolute_import)�division)�unicode_literals)�apis)�waiter)�arg_parsers)�base)�
exceptions)�flags)�	resourcesc�&�eZdZdZed��Zd�Zy)�Import�?Import one or more GooGet packages into an artifact repository.c���tj�j|�tjj|�|jdddt
j�d��y)z\Set up arguements for this command.

    Args:
      parser: An argparse.ArgumentPaser.
    z--gcs-source�
GCS_SOURCETz�            The Google Cloud Storage location of a package to import.
            Wildcards may be added at the end to import multiple packages.)�metavar�required�type�helpN)r�GetRepoArgFromBeta�AddToParserr	�
ASYNC_FLAG�add_argumentr�ArgList)�parsers �&lib/surface/artifacts/googet/import.py�ArgszImport.Args$s\��
����*�*�6�2��O�O����'�
������
�
 �
 �
"�N��O�c��tjdd�}|j}d}|jD]0}d|vs�d}|j	d�r�tjdd��|jjj�}|j|j|j|j|���	�|j��
�}|jj|�}t j"j%|j&d��}	|j(r|	St+j,t+j.|j0�|	d
�}
|
S)zRun package import command.�artifactregistry�v1F�*Trz-Wildcards must be at the end of the GCS path.)�uris�useWildcards)�	gcsSource)�importGoogetArtifactsRequest�parentz.artifactregistry.projects.locations.operations)�
collectionzImporting package(s))r�GetClientInstance�MESSAGES_MODULE�
gcs_source�endswithr
�InvalidArgumentException�CONCEPTS�
repository�Parse�IArtifactregistryProjectsLocationsRepositoriesGoogetArtifactsImportRequest�ImportGoogetArtifactsRequest�ImportGoogetArtifactsGcsSource�RelativeName�/projects_locations_repositories_googetArtifactsrr�REGISTRY�ParseRelativeName�name�async_r�WaitFor�CloudOperationPollerNoResources�projects_locations_operations)�self�args�client�messages�use_wildcardr+�repo_ref�request�op�op_ref�results           r�Runz
Import.Run7sV��
�
#�
#�$6��
=�F��%�%�H��L��o�o�
�	�
�	����"�"�3�'��3�3��K�M�M�	&��}�}�'�'�-�-�/�H��`�`�%-�%J�%J��=�=��_�_�)�>��&K�&
��$�$�&�a�(�G�
�	?�	?�	F�	F�w�	O�B�
�
�
�
1�
1�
���L�2�N�F��{�{�
�m��~�~�
�
0�
0��2�2�4�
�(�*�f�
�mrN)�__name__�
__module__�__qualname__�__doc__�staticmethodrrG�rrrrs!��H��O��O�$%rrrzy
      *{command}* imports GooGet packages from Google Cloud Storage into the specified
      artifact repository.
      a�
      To import the package `my-package.goo` from Google Cloud Storage into
      `my-repo`, run:

        $ {0} my-repo --location=us-central1 --gcs-source={1}

      To import the packages `my-package.goo` and `other-package.goo` into
      `my-repo`, run:

        $ {0} my-repo --location=us-central1 --gcs-source={1},{2}

      To import all packages from `my-directory` into `my-repo`, run:

        $ {0} my-repo --location=us-central1 --gcs-source={3}

      To import all packages in all subdirectories from a Google Cloud
      Storage bucket into `my-repo`, run:

        $ {0} my-repo --location=us-central1 --gcs-source={4}
    z	{command}z%gs://my-bucket/path/to/my-package.gooz(gs://my-bucket/path/to/other-package.goozgs://my-bucket/my-directory/*zgs://my-bucket/**)�brief�DESCRIPTION�EXAMPLESN)rK�
__future__rrr�googlecloudsdk.api_lib.utilrr�googlecloudsdk.callioperr	r
�$googlecloudsdk.command_lib.artifactsr�googlecloudsdk.corer�
ReleaseTracks�ReleaseTrack�ALPHA�BETA�GA�Commandr�format�
detailed_helprMrr�<module>r^s��� J�&��'�,�.�/�(�.�6�)�����D�%�%�+�+�T�->�->�-C�-C��%�%�(�(�*�;�T�\�\�;�*�;�~O�
��&	��{�C�9�.�"�	$�3��r