File: //lib/google-cloud-sdk/lib/surface/datastore/__pycache__/import.cpython-312.pyc
�
���
� � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ dd lm
Z
dd
lmZ G d� de j � Zy
)z$The gcloud datastore import command.� )�absolute_import)�division)�unicode_literals)� admin_api)�
operations)�base)�flags)�
properties)� resourcesc �. � e Zd ZdZddiZed� � Zd� Zy)�Importa� Import Cloud Datastore entities from Google Cloud Storage.
Imports entities into Google Cloud Datastore. Existing entities with
the same key are overwritten. The import occurs in the background and its
progress can be monitored and managed via the Operation resource that is
created. If an Import operation is cancelled, it is possible that a subset of
the data has already been imported to Cloud Datastore. This data will not be
removed.
�EXAMPLESaW To import all data exported to the output URL
`gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata`, run:
$ {command} gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata
To import all data exported to the output URL
`gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata`
without waiting for the operation to complete, run:
$ {command} gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata --async
To import only the `exampleKind` from the data exported to the output
URL `gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata`,
run:
$ {command} gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata --kinds='exampleKind'
c � � t j | � t j | � | j dd�� t j
j
| � y)z Register flags for this command.� input_urla
Location of the import metadata. Must be a valid Google Cloud Storage
object. The file extension is 'overall_export_metadata'.
This location is the 'output_url' field of a previous export, and can
be found via the 'operations describe' command.
)�helpN)r �AddEntityFilterFlags�
AddLabelsFlag�add_argumentr �
ASYNC_FLAG�AddToParser)�parsers �lib/surface/datastore/import.py�ArgszImport.Args>