Ë
    €Ï÷	  ã                   óN   — d Z ddlmZ ddlmZ ddlmZ ddlmZ d„ Z	 d
d„Zd	„ Z	y)zIUseful commands for interacting with the Cloud Firestore Bulk Delete API.é    )Úabsolute_import)Údivision)Úunicode_literals)Ú	api_utilsc                  ó>   — t        j                  «       j                  S )zEReturns the service for interacting with the Datastore Admin service.)r   Ú	GetClientÚprojects_databases© ó    ú3lib/googlecloudsdk/api_lib/firestore/bulk_delete.pyÚ_GetDatabaseServicer      s   € ä	×	Ñ	Ó	×	1Ñ	1Ð1r   Nc                 ó˜   — t        j                  «       }|j                  }i }|r||d<   |r||d<    |di |¤Ž}|j                  | |¬«      S )a*  Returns a request for a Firestore Admin Bulk Delete.

  Args:
    database: the database id to bulk delete, a string.
    namespace_ids: a string list of namespace ids to delete.
    collection_ids: a string list of collection ids to delete.

  Returns:
    a BulkDeleteDocumentsRequest message.
  ÚcollectionIdsÚnamespaceIds)ÚnameÚ0googleFirestoreAdminV1BulkDeleteDocumentsRequestr
   )r   ÚGetMessagesÚ0GoogleFirestoreAdminV1BulkDeleteDocumentsRequestÚ4FirestoreProjectsDatabasesBulkDeleteDocumentsRequest)ÚdatabaseÚnamespace_idsÚcollection_idsÚmessagesÚrequest_classÚkwargsÚbulk_delete_requests          r   ÚGetBulkDeleteDocumentsRequestr      si   € ô ×"Ñ"Ó$€(Ø×KÑK€-à€&ÙØ,€Fˆ?ÑáØ*€Fˆ>Ñá%Ñ/¨Ñ/Ðà	×	FÑ	FØØ7Jð 
Gó 
ð r   c                 óp   — dj                  | |«      }t        «       j                  t        |||¬«      «      S )a&  Performs a Firestore Admin v1 Bulk Delete.

  Args:
    project: the project id, a string.
    database: the databae id, a string.
    namespace_ids: a string list of namespace ids to bulk delete.
    collection_ids: a string list of collections to bulk delete.

  Returns:
    an Operation.
  zprojects/{}/databases/{})r   r   r   )Úformatr   ÚBulkDeleteDocumentsr   )Úprojectr   r   r   Údbnames        r   Ú
BulkDeleter#   <   s=   € ð &×,Ñ,¨W°hÓ?€&Ü	Ó	×	2Ñ	2Ü#ØØ%Ø'ôó
ð r   )NN)
Ú__doc__Ú
__future__r   r   r   Ú googlecloudsdk.api_lib.firestorer   r   r   r#   r
   r   r   Ú<module>r'      s+   ðñ På &Ý Ý 'å 6ò2ð 26óó>r   