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

��}�	���dZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lm
Z
ddlmZGd�d
e
j �Zdddj%ddddd�d�e_y)zCImplements the command to import Debian packages into a repository.�)�absolute_import)�division)�unicode_literals)�apis)�waiter)�arg_parsers)�base)�
exceptions)�flags)�	resourcesc�*�eZdZdZdZed��Zd�Zy)�Import�?Import one or more Debian packages into an artifact repository.�v1c���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.
            To import multiple packages, use wildcards at the end of the path.
            )�metavar�required�type�helpN)r�
GetRepoArg�AddToParserr	�
ASYNC_FLAG�add_argumentr�ArgList)�parsers �#lib/surface/artifacts/apt/import.py�ArgszImport.Args$sZ��
����"�"�6�*��O�O����'�
������
�
 �
 �
"����c���tjd|j�}|j}|jD].}d|vs�|jd�r�t
jdd��|jjj�}|j|jd��}|j|��}|j||j���}|jj!|�}t"j$j'|j(d	�
�}	|j*r|	St-j.t-j0|j2�|	d�}
|
S)zRun package import command.�artifactregistry�*rz-Wildcards must be at the end of the GCS path.T)�uris�useWildcards)�	gcsSource)�importAptArtifactsRequest�parentz.artifactregistry.projects.locations.operations)�
collectionzImporting package(s))r�GetClientInstance�api_version�MESSAGES_MODULE�
gcs_source�endswithr
�InvalidArgumentException�CONCEPTS�
repository�Parse�ImportAptArtifactsGcsSource�ImportAptArtifactsRequest�FArtifactregistryProjectsLocationsRepositoriesAptArtifactsImportRequest�RelativeName�,projects_locations_repositories_aptArtifactsrr�REGISTRY�ParseRelativeName�name�async_r�WaitFor�CloudOperationPollerNoResources�projects_locations_operations)�self�args�client�messagesr,�repo_ref�import_request�request�op�op_ref�results           r�Runz
Import.Run8s\��
�
#�
#�$6��8H�8H�
I�F��%�%�H��o�o�
�	�
�	�:�#6�#6�s�#;��1�1��I�K�	K�&�
�}�}�'�'�-�-�/�H��5�5�
�_�_��6��J��7�7��8��N��]�]�"0��$�$�&�^�(�G�
�	<�	<�	C�	C�G�	L�B�
�
�
�
1�
1�
���L�2�N�F��{�{�
�m��~�~�
�
0�
0��2�2�4�
�(�*�f�
�mrN)�__name__�
__module__�__qualname__�__doc__r*�staticmethodrrH�rrrrs!��G��+�����&"rrrzy
      *{command}* imports Debian packages from Google Cloud Storage into the specified
      artifact repository.
      a�
      To import the package `my-package.deb` from Google Cloud Storage into
      `my-repo`, run:

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

      To import the packages `my-package.deb` and `other-package.deb` 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.debz(gs://my-bucket/path/to/other-package.debzgs://my-bucket/my-directory/*zgs://my-bucket/**)�brief�DESCRIPTION�EXAMPLESN)rL�
__future__rrr�googlecloudsdk.api_lib.utilrr�googlecloudsdk.callioperr	r
�$googlecloudsdk.command_lib.artifactsr�googlecloudsdk.corer�Commandr�format�
detailed_helprNrr�<module>rZsn�� J�&��'�,�.�/�(�.�6�)�;�T�\�\�;�~O�
��&	��{�C�9�.�"�	$�3��r