| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/firestore/__pycache__/ |
Upload File : |
�
���
� � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ dd lm
Z
dd
lmZ G d� dej � � Zd
S )z$The gcloud firestore import command.� )�absolute_import)�division)�unicode_literals)�importexport)�
operations)�storage_util)�base)�flags)�
propertiesc �6 � e Zd ZdZddiZed� � � Zd� ZdS )�Importz;import Cloud Firestore documents from Google Cloud Storage.�EXAMPLESa� To import all collection groups from `mybucket/my/path`, run:
$ {command} gs://mybucket/my/path
To import a specific set of collections groups asynchronously, run:
$ {command} gs://mybucket/my/path --collection-ids='specific collection group1','specific collection group2' --async
To import all collection groups from certain namespace, run:
$ {command} gs://mybucket/my/path --namespace-ids='specific namespace id'
c �� � t j | � � t j | � � t j | � � | � dd�� � t
j � | � � dS )z Register flags for this command.�INPUT_URI_PREFIXz�
Location of the import files.
This location is the 'output_uri_prefix' field of a previous export,
and can be found via the '{parent_command} operations describe' command.
)�helpN)r
�AddCollectionIdsFlag�AddNamespaceIdsFlag�AddDatabaseIdFlag�add_argumentr �
ASYNC_FLAG�AddToParser)�parsers �lib/surface/firestore/import.py�ArgszImport.Args1 sz � �
��v�&�&�&� ��f�%�%�%� ��F�#�#�#�
����� �
�
�
� �O����'�'�'�'�'� c �v � t j j j � d�� � }t
j � |j d�� � }t j
||j |� � � �
d� � |j |j �� � }|j st# j |� � |S )NT)�required)�allow_empty_object�/)�
namespace_ids�collection_ids)r �VALUES�core�project�Getr �ObjectReference�FromUrlr r r
�database�ToUrl�rstripr r! �async_r �WaitForOperation)�self�argsr$ �
object_ref�responses r �Runz
Import.RunA s� � ���$�,�0�0�$�0�?�?�G��-�5�5���$� 6� 8� 8�J� �"���
������!�!�#�&�&��(��*�,� ,� ,�H� �;� ,��!�(�+�+�+��Or N)�__name__�
__module__�__qualname__�__doc__�
detailed_help�staticmethodr r1 � r r r
r
sU � � � � � �C�C� �
��-�"