+
    8i|                       R t ^ RIHt ^ RIt^ RIHtHtHtHtH	t	H
t
HtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHtHtHt ^ R
IHtHtHt ^ RI H!t! ]'       d	   ^ RIH"t"H#t# ]]
]]$]]$]]%]$]]$]3,          3,          3,          3,          ,          ]]$]3,          3,          t&]]$]&3,          t' ! R R]$]PP                  4      t) ! R R]],          4      t* ! R R4      t+ ! R R]+4      t, ! R R]+4      t- ! R R]],          4      t. ! R R4      t/ ! R R]/4      t0 ! R R]/4      t1 ! R R 4      t2 ! R! R"4      t3R# )#z~Operation class definitions.

.. seealso:: This module is compatible with both the synchronous and asynchronous PyMongo APIs.
)annotationsN)TYPE_CHECKINGAnyGenericMappingOptionalSequenceTupleUnion)RawBSONDocument)helpers_shared)validate_collation_or_none)validate_is_mappingvalidate_list)InvalidOperation)_gen_index_name_index_document_index_list)_CollationIn_DocumentType	_Pipeline)validate_boolean)_AgnosticBulk_AgnosticClientBulkc                      ] tR t^5tRtRtRtRtRtRt	Rt
RtR	tR
tRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRtRt Rt!R# ) _OpabortTransaction	aggregate	bulkWritecommitTransactioncountcreatecreateIndexescreateSearchIndexesdeletedistinctdropdropDatabasedropIndexesdropSearchIndexesendSessionsfindAndModifyfindinsertlistCollectionslistIndexeslistSearchIndexeslistDatabasesupdateupdateIndexupdateSearchIndexrenamegetMorekillCursorstestOperation N)"__name__
__module____qualname____firstlineno__ABORT	AGGREGATE
BULK_WRITECOMMITCOUNTCREATECREATE_INDEXESCREATE_SEARCH_INDEXESDELETEDISTINCTDROPDROP_DATABASEDROP_INDEXESDROP_SEARCH_INDEXESEND_SESSIONSFIND_AND_MODIFYFINDINSERTLIST_COLLECTIONSLIST_INDEXESLIST_SEARCH_INDEXLIST_DATABASESUPDATEUPDATE_INDEXUPDATE_SEARCH_INDEXRENAMEGETMOREKILL_CURSORSTEST__static_attributes__r9       P/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pymongo/operations.pyr   r   5   s    EIJ FEF$N1FHD"M L- L%ODF( L+$NF L-FG LDr\   r   c                  j    ] tR t^UtRtRtRR R lltR R ltR R ltR	 R
 lt	R R lt
R R ltRtR# )	InsertOnez#Represents an insert_one operation.Nc               $    V ^8  d   QhRRRRRR/# )   documentr   	namespaceOptional[str]returnNoner9   )formats   "r]   __annotate__InsertOne.__annotate__]   s"     $ $ $= $TX $r\   c                    Wn         W n        R# )a6  Create an InsertOne instance.

For use with :meth:`~pymongo.asynchronous.collection.AsyncCollection.bulk_write`, :meth:`~pymongo.collection.Collection.bulk_write`,
:meth:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.bulk_write` and :meth:`~pymongo.mongo_client.MongoClient.bulk_write`.

:param document: The document to insert. If the document is missing an
    _id field one will be added.
:param namespace: (optional) The namespace in which to insert a document.

.. versionchanged:: 4.9
   Added the `namespace` option to support `MongoClient.bulk_write`.
N_doc
_namespace)selfrb   rc   s   &&&r]   __init__InsertOne.__init__]   s     	#r\   c                    V ^8  d   QhRRRR/# ra   bulkobjr   re   rf   r9   )rg   s   "r]   rh   ri   m   s     & &M &d &r\   c                <    VP                  V P                  4       R# )>Add this operation to the _AsyncBulk/_Bulk instance `bulkobj`.N)
add_insertrl   rn   rs   s   &&r]   _add_to_bulkInsertOne._add_to_bulkm   s    499%r\   c                    V ^8  d   QhRRRR/# ra   rs   r   re   rf   r9   )rg   s   "r]   rh   ri   q   s     	
 	
+> 	
4 	
r\   c                    V P                   '       g   \        R4      hVP                  V P                   V P                  4       R# )JAdd this operation to the _AsyncClientBulk/_ClientBulk instance `bulkobj`.SMongoClient.bulk_write requires a namespace to be provided for each write operationN)rm   r   rv   rl   rw   s   &&r]   _add_to_client_bulkInsertOne._add_to_client_bulkq   s9    "e  	OOII	
r\   c                   V ^8  d   QhRR/# ra   re   strr9   )rg   s   "r]   rh   ri   |   s     ; ;# ;r\   c                	    V P                   '       d6   V P                  P                   R V P                  : RV P                   : R2# V P                  P                   R V P                  : R2# )(, ))rm   	__class__r:   rl   rn   s   &r]   __repr__InsertOne.__repr__|   s[    ???nn--.a		}Bt>QQRSS..))*!DII=::r\   c                    V ^8  d   QhRRRR/# ra   otherr   re   boolr9   )rg   s   "r]   rh   ri      s      C D r\   c                	    \        V4      \        V 4      8X  d;   VP                  V P                  8H  ;'       d    VP                  V P                  8H  # \        # N)typerl   rm   NotImplementedrn   r   s   &&r]   __eq__InsertOne.__eq__   sB    ;$t*$::*RRu/?/?4??/RRr\   c                    V ^8  d   QhRRRR/# r   r9   )rg   s   "r]   rh   ri           ! !C !D !r\   c                	    W8X  * # r   r9   r   s   &&r]   __ne__InsertOne.__ne__         r\   rk   r   )r:   r;   r<   r=   __doc__	__slots__ro   rx   r   r   r   r   r[   r9   r\   r]   r_   r_   U   s/    -I
$ &	
;

! !r\   r_   c                  R    ] tR t^tRtRtRR R lltR R ltR R ltR	 R
 lt	Rt
R# )	_DeleteOpz)Private base class for delete operations.Nc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# ra   filterMapping[str, Any]	collationOptional[_CollationIn]hintOptional[_IndexKeyHint]rc   rd   re   rf   r9   )rg   s   "r]   rh   _DeleteOp.__annotate__   s<     $ $!$ *$ &	$
 !$ 
$r\   c                	    Ve   \        RV4       Ve3   \        V\        4      '       g   \        P                  ! V4      V n        MW0n        Wn        W n        W@n        R # )Nr   )	r   
isinstancer   r   r   _hint_filter
_collationrm   )rn   r   r   r   rc   s   &&&&&r]   ro   _DeleteOp.__init__   sM     &1JtS$9$9;I;Y;YZ^;_DJJ##r\   c                    V ^8  d   QhRRRR/# r   r9   )rg   s   "r]   rh   r      s      C D r\   c                	    \        V4      \        V 4      8X  d^   VP                  VP                  VP                  VP                  3V P                  V P                  V P                  V P                  38H  # \
        # r   )r   r   r   r   rm   r   r   s   &&r]   r   _DeleteOp.__eq__   sl    ;$t*$    	 

	
 
 r\   c                    V ^8  d   QhRRRR/# r   r9   )rg   s   "r]   rh   r      r   r\   c                	    W8X  * # r   r9   r   s   &&r]   r   _DeleteOp.__ne__   r   r\   c                   V ^8  d   QhRR/# r   r9   )rg   s   "r]   rh   r      s     	c 	c# 	cr\   c                	N   V P                   '       dR   R P                  V P                  P                  V P                  V P
                  V P                  V P                   4      # V P                  P                   RV P                  : RV P
                  : RV P                  : R2# )z{}({!r}, {!r}, {!r}, {!r})r   r   r   )rm   rg   r   r:   r   r   r   r   s   &r]   r   _DeleteOp.__repr__   s    ???/66''

  ..))*!DLL+;2doo=PPRSWS]S]R``abbr\   )r   r   r   rm   )r   r   r   rm   NNNr:   r;   r<   r=   r   r   ro   r   r   r   r[   r9   r\   r]   r   r      s'    3I$$!	c 	cr\   r   c                  R   a  ] tR t^tRtRtR	R V 3R llltR R ltR R ltRt	V ;t
# )
	DeleteOnez"Represents a delete_one operation.c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r   r9   )rg   s   "r]   rh   DeleteOne.__annotate__   <     = =!= *= &	=
 != 
=r\   c                (   < \         SV `  WW44       R# )a5  Create a DeleteOne instance.

For use with :meth:`~pymongo.asynchronous.collection.AsyncCollection.bulk_write`, :meth:`~pymongo.collection.Collection.bulk_write`,
:meth:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.bulk_write` and :meth:`~pymongo.mongo_client.MongoClient.bulk_write`.

:param filter: A query that matches the document to delete.
:param collation: An instance of
    :class:`~pymongo.collation.Collation`.
:param hint: An index to use to support the query
    predicate specified either by its string name, or in the same
    format as passed to
    :meth:`~pymongo.asynchronous.collection.AsyncCollection.create_index` or :meth:`~pymongo.collection.Collection.create_index` (e.g.
    ``[('field', ASCENDING)]``). This option is only supported on
    MongoDB 4.4 and above.
:param namespace: (optional) The namespace in which to delete a document.

.. versionchanged:: 4.9
   Added the `namespace` option to support `MongoClient.bulk_write`.
.. versionchanged:: 3.11
   Added the ``hint`` option.
.. versionchanged:: 3.5
   Added the `collation` option.
Nsuperro   rn   r   r   r   rc   r   s   &&&&&r]   ro   DeleteOne.__init__       < 	D<r\   c                    V ^8  d   QhRRRR/# rr   r9   )rg   s   "r]   rh   r           
 
M 
d 
r\   c                ~    VP                  V P                  ^\        V P                  4      V P                  R7       R# ru   )r   r   N
add_deleter   r   r   r   rw   s   &&r]   rx   DeleteOne._add_to_bulk   2    LL0A	 	 	
r\   c                    V ^8  d   QhRRRR/# r{   r9   )rg   s   "r]   rh   r           
 
+> 
4 
r\   c                    V P                   '       g   \        R4      hVP                  V P                   V P                  R\	        V P
                  4      V P                  R7       R# )r}   r~   Fmultir   r   Nrm   r   r   r   r   r   r   rw   s   &&r]   r   DeleteOne._add_to_client_bulk   sT    "e  	OOLL0A 	 	
r\   r9   r   r:   r;   r<   r=   r   r   ro   rx   r   r[   __classcell__r   s   @r]   r   r      s%    ,I= =@

 
r\   r   c                  R   a  ] tR tRtRtR	tR
R V 3R llltR R ltR R ltR	t	V ;t
# )
DeleteManyi  z#Represents a delete_many operation.c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r   r9   )rg   s   "r]   rh   DeleteMany.__annotate__  r   r\   c                (   < \         SV `  WW44       R# )a6  Create a DeleteMany instance.

For use with :meth:`~pymongo.asynchronous.collection.AsyncCollection.bulk_write`, :meth:`~pymongo.collection.Collection.bulk_write`,
:meth:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.bulk_write` and :meth:`~pymongo.mongo_client.MongoClient.bulk_write`.

:param filter: A query that matches the documents to delete.
:param collation: An instance of
    :class:`~pymongo.collation.Collation`.
:param hint: An index to use to support the query
    predicate specified either by its string name, or in the same
    format as passed to
    :meth:`~pymongo.asynchronous.collection.AsyncCollection.create_index` or :meth:`~pymongo.collection.Collection.create_index` (e.g.
    ``[('field', ASCENDING)]``). This option is only supported on
    MongoDB 4.4 and above.
:param namespace: (optional) The namespace in which to delete documents.

.. versionchanged:: 4.9
   Added the `namespace` option to support `MongoClient.bulk_write`.
.. versionchanged:: 3.11
   Added the ``hint`` option.
.. versionchanged:: 3.5
   Added the `collation` option.
Nr   r   s   &&&&&r]   ro   DeleteMany.__init__  r   r\   c                    V ^8  d   QhRRRR/# rr   r9   )rg   s   "r]   rh   r   &  r   r\   c                ~    VP                  V P                  ^ \        V P                  4      V P                  R7       R# r   r   rw   s   &&r]   rx   DeleteMany._add_to_bulk&  r   r\   c                    V ^8  d   QhRRRR/# r{   r9   )rg   s   "r]   rh   r   /  r   r\   c                    V P                   '       g   \        R4      hVP                  V P                   V P                  R\	        V P
                  4      V P                  R7       R# )r}   r~   Tr   Nr   rw   s   &&r]   r   DeleteMany._add_to_client_bulk/  sT    "e  	OOLL0A 	 	
r\   r9   r   r   r   s   @r]   r   r     s%    -I= =@

 
r\   r   c                  j    ] tR tRtRtRtRR R lltR R ltR R	 ltR
 R lt	R R lt
R R ltRtR# )
ReplaceOnei>  z#Represents a replace_one operation.Nc               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )ra   r   r   replacementz%Union[_DocumentType, RawBSONDocument]upsertOptional[bool]r   r   r   r   rc   rd   sortOptional[Mapping[str, Any]]re   rf   r9   )rg   s   "r]   rh   ReplaceOne.__annotate__K  sZ     6$ 6$!6$ ;6$ 	6$
 *6$ &6$ !6$ *6$ 
6$r\   c                   Ve   \        RV4       Ve   \        RV4       Ve3   \        V\        4      '       g   \        P
                  ! V4      V n        MWPn        Wpn        Wn        W n	        W0n
        W@n        W`n        R# )a  Create a ReplaceOne instance.

For use with :meth:`~pymongo.asynchronous.collection.AsyncCollection.bulk_write`, :meth:`~pymongo.collection.Collection.bulk_write`,
:meth:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.bulk_write` and :meth:`~pymongo.mongo_client.MongoClient.bulk_write`.

:param filter: A query that matches the document to replace.
:param replacement: The new document.
:param upsert: If ``True``, perform an insert if no documents
    match the filter.
:param collation: An instance of
    :class:`~pymongo.collation.Collation`.
:param hint: An index to use to support the query
    predicate specified either by its string name, or in the same
    format as passed to
    :meth:`~pymongo.asynchronous.collection.AsyncCollection.create_index` or :meth:`~pymongo.collection.Collection.create_index` (e.g.
    ``[('field', ASCENDING)]``). This option is only supported on
    MongoDB 4.2 and above.
:param sort: Specify which document the operation updates if the query matches
    multiple documents. The first document matched by the sort order will be updated.
:param namespace: (optional) The namespace in which to replace a document.

.. versionchanged:: 4.10
    Added ``sort`` option.
.. versionchanged:: 4.9
   Added the `namespace` option to support `MongoClient.bulk_write`.
.. versionchanged:: 3.11
   Added the ``hint`` option.
.. versionchanged:: 3.5
   Added the ``collation`` option.
Nr   r   )r   r   r   r   r   r   r   _sortr   rl   _upsertr   rm   )rn   r   r   r   r   r   rc   r   s   &&&&&&&&r]   ro   ReplaceOne.__init__K  sm    P &1Xv.JtS$9$9;I;Y;YZ^;_DJJ
	##r\   c                    V ^8  d   QhRRRR/# rr   r9   )rg   s   "r]   rh   r     s     	
 	
M 	
d 	
r\   c           	         VP                  V P                  V P                  V P                  \	        V P
                  4      V P                  V P                  R7       R# )ru   r   r   r   N)add_replacer   rl   r   r   r   r   r   rw   s   &&r]   rx   ReplaceOne._add_to_bulk  sD    LLIILL0A 	 	
r\   c                    V ^8  d   QhRRRR/# r{   r9   )rg   s   "r]   rh   r     s     
 
+> 
4 
r\   c           
        V P                   '       g   \        R4      hVP                  V P                   V P                  V P                  V P
                  \        V P                  4      V P                  V P                  R7       R# )r}   r~   r   N)
rm   r   r   r   rl   r   r   r   r   r   rw   s   &&r]   r   ReplaceOne._add_to_client_bulk  sf    "e  	OOLLIILL0A 	 	
r\   c                    V ^8  d   QhRRRR/# r   r9   )rg   s   "r]   rh   r     s      C D r\   c                	~   \        V4      \        V 4      8X  d   VP                  VP                  VP                  VP                  VP
                  VP                  VP                  3V P                  V P                  V P                  V P                  V P
                  V P                  V P                  38H  # \        # r   )	r   r   rl   r   r   r   rm   r   r   r   s   &&r]   r   ReplaceOne.__eq__  s    ;$t*$

     		



 " r\   c                    V ^8  d   QhRRRR/# r   r9   )rg   s   "r]   rh   r     r   r\   c                	    W8X  * # r   r9   r   s   &&r]   r   ReplaceOne.__ne__  r   r\   c                   V ^8  d   QhRR/# r   r9   )rg   s   "r]   rh   r     s     
 
# 
r\   c           
     	   V P                   '       ds   R P                  V P                  P                  V P                  V P
                  V P                  V P                  V P                  V P                   V P                  4      # RP                  V P                  P                  V P                  V P
                  V P                  V P                  V P                  V P                  4      # ),{}({!r}, {!r}, {!r}, {!r}, {!r}, {!r}, {!r})z&{}({!r}, {!r}, {!r}, {!r}, {!r}, {!r}))
rm   rg   r   r:   r   rl   r   r   r   r   r   s   &r]   r   ReplaceOne.__repr__  s    ???AHH''		



	 	 8>>NN##LLIILLOOJJJJ
 	
r\   )r   rl   r   r   rm   r   r   )r   rl   r   r   r   rm   r   NNNNN)r:   r;   r<   r=   r   r   ro   rx   r   r   r   r   r[   r9   r\   r]   r   r   >  s0    -I6$p	

 *!
 
r\   r   c                  N    ] tR tRtRtRtR R ltR R ltR R ltR	 R
 lt	Rt
R# )	_UpdateOpi  z)Private base class for update operations.c               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )ra   r   r   doc#Union[Mapping[str, Any], _Pipeline]r   r   r   r   array_filters!Optional[list[Mapping[str, Any]]]r   r   rc   rd   r   r   r9   )rg   s   "r]   rh   _UpdateOp.__annotate__  sZ      ! 1 	
 * 9 & ! *r\   c	                	2   Ve   \        RV4       Ve   \        RV4       Ve   \        RV4       Ve3   \        V\        4      '       g   \
        P                  ! V4      V n        MW`n        Wn        W n	        W0n
        W@n        WPn        Wpn        Wn        R # )Nr   r   r	  )r   r   r   r   r   r   r   r   r   rl   r   r   _array_filtersrm   r   )	rn   r   r  r   r   r	  r   rc   r   s	   &&&&&&&&&r]   ro   _UpdateOp.__init__  s     &1Xv.$/=9JtS$9$9;I;Y;YZ^;_DJJ	#+#
r\   c                    V ^8  d   QhRRRR/# )ra   r   objectre   r   r9   )rg   s   "r]   rh   r    s      F t r\   c           	     	   \        V\        V 4      4      '       d   VP                  VP                  VP                  VP
                  VP                  VP                  VP                  VP                  3V P                  V P                  V P                  V P
                  V P                  V P                  V P                  V P                  38H  # \        # r   )r   r   r   rl   r   r   r  r   rm   r   r   r   s   &&r]   r   _UpdateOp.__eq__  s    eT$Z((

  $$  	 		##



	 & r\   c                    V ^8  d   QhRRRR/# r   r9   )rg   s   "r]   rh   r    r   r\   c                	    W8X  * # r   r9   r   s   &&r]   r   _UpdateOp.__ne__  r   r\   c                   V ^8  d   QhRR/# r   r9   )rg   s   "r]   rh   r    s     
 
# 
r\   c                	   V P                   '       d~   R P                  V P                  P                  V P                  V P
                  V P                  V P                  V P                  V P                  V P                   V P                  4	      # RP                  V P                  P                  V P                  V P
                  V P                  V P                  V P                  V P                  V P                  4      # )z2{}({!r}, {!r}, {!r}, {!r}, {!r}, {!r}, {!r}, {!r})r  )rm   rg   r   r:   r   rl   r   r   r  r   r   r   s   &r]   r   _UpdateOp.__repr__  s    ???GNN''		##




 
 >DDNN##LLIILLOOJJJJ	
 		
r\   )r  r   rl   r   r   rm   r   r   N)r   rl   r   r   r  r   rm   r   r   r9   r\   r]   r  r    s%    3	I:.!
 
r\   r  c                  R   a  ] tR tRtRtR	tR
R V 3R llltR R ltR R ltR	t	V ;t
# )	UpdateOnei+  z#Represents an update_one operation.c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# )ra   r   r   r2   r  r   r   r   r   r	  r
  r   r   rc   rd   r   r   re   rf   r9   )rg   s   "r]   rh   UpdateOne.__annotate__0  so     /b /b!/b 4/b 	/b
 */b 9/b &/b !/b */b 
/br\   c	           
     ,   < \         S	V `  WW4WVWx4       R# )a{  Represents an update_one operation.

For use with :meth:`~pymongo.asynchronous.collection.AsyncCollection.bulk_write`, :meth:`~pymongo.collection.Collection.bulk_write`,
:meth:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.bulk_write` and :meth:`~pymongo.mongo_client.MongoClient.bulk_write`.

:param filter: A query that matches the document to update.
:param update: The modifications to apply.
:param upsert: If ``True``, perform an insert if no documents
    match the filter.
:param collation: An instance of
    :class:`~pymongo.collation.Collation`.
:param array_filters: A list of filters specifying which
    array elements an update should apply.
:param hint: An index to use to support the query
    predicate specified either by its string name, or in the same
    format as passed to
    :meth:`~pymongo.asynchronous.collection.AsyncCollection.create_index` or :meth:`~pymongo.collection.Collection.create_index` (e.g.
    ``[('field', ASCENDING)]``). This option is only supported on
    MongoDB 4.2 and above.
:param namespace: The namespace in which to update a document.
:param sort: Specify which document the operation updates if the query matches
    multiple documents. The first document matched by the sort order will be updated.

.. versionchanged:: 4.10
    Added ``sort`` option.
.. versionchanged:: 4.9
   Added the `namespace` option to support `MongoClient.bulk_write`.
.. versionchanged:: 3.11
   Added the `hint` option.
.. versionchanged:: 3.9
   Added the ability to accept a pipeline as the `update`.
.. versionchanged:: 3.6
   Added the `array_filters` option.
.. versionchanged:: 3.5
   Added the `collation` option.
Nr   )
rn   r   r2   r   r   r	  r   rc   r   r   s
   &&&&&&&&&r]   ro   UpdateOne.__init__0  s    ^ 	MQZar\   c                    V ^8  d   QhRRRR/# rr   r9   )rg   s   "r]   rh   r  a  s     
 
M 
d 
r\   c                    VP                  V P                  V P                  R\        V P                  4      \        V P                  4      V P                  V P                  V P                  R7       R# )ru   Fr   r	  r   r   N)

add_updater   rl   r   r   r   r   r  r   r   rw   s   &&r]   rx   UpdateOne._add_to_bulka  sU    LLII0A-- 	 		
r\   c                    V ^8  d   QhRRRR/# r{   r9   )rg   s   "r]   rh   r  n  s     
 
+> 
4 
r\   c                &   V P                   '       g   \        R4      hVP                  V P                   V P                  V P                  RV P
                  \        V P                  4      V P                  V P                  V P                  R7	       R# )r}   r~   Fr!  N)rm   r   r"  r   rl   r   r   r   r  r   r   rw   s   &&r]   r   UpdateOne._add_to_client_bulkn  sr    "e  	OOLLIILL0A-- 	 
	
r\   r9   )NNNNNNr   r   s   @r]   r  r  +  s'    -I/b /bb

 
r\   r  c                  R   a  ] tR tRtRtR	tR
R V 3R llltR R ltR R ltR	t	V ;t
# )
UpdateManyi  z$Represents an update_many operation.c               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )ra   r   r   r2   r  r   r   r   r   r	  r
  r   r   rc   rd   re   rf   r9   )rg   s   "r]   rh   UpdateMany.__annotate__  sd     *b *b!*b 4*b 	*b
 **b 9*b &*b !*b 
*br\   c           
     .   < \         SV `  WW4WVVR4       R# )a  Create an UpdateMany instance.

For use with :meth:`~pymongo.asynchronous.collection.AsyncCollection.bulk_write`, :meth:`~pymongo.collection.Collection.bulk_write`,
:meth:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.bulk_write` and :meth:`~pymongo.mongo_client.MongoClient.bulk_write`.

:param filter: A query that matches the documents to update.
:param update: The modifications to apply.
:param upsert: If ``True``, perform an insert if no documents
    match the filter.
:param collation: An instance of
    :class:`~pymongo.collation.Collation`.
:param array_filters: A list of filters specifying which
    array elements an update should apply.
:param hint: An index to use to support the query
    predicate specified either by its string name, or in the same
    format as passed to
    :meth:`~pymongo.asynchronous.collection.AsyncCollection.create_index` or :meth:`~pymongo.collection.Collection.create_index` (e.g.
    ``[('field', ASCENDING)]``). This option is only supported on
    MongoDB 4.2 and above.
:param namespace: (optional) The namespace in which to update documents.

.. versionchanged:: 4.9
   Added the `namespace` option to support `MongoClient.bulk_write`.
.. versionchanged:: 3.11
   Added the `hint` option.
.. versionchanged:: 3.9
   Added the ability to accept a pipeline as the `update`.
.. versionchanged:: 3.6
   Added the `array_filters` option.
.. versionchanged:: 3.5
   Added the `collation` option.
Nr   )	rn   r   r2   r   r   r	  r   rc   r   s	   &&&&&&&&r]   ro   UpdateMany.__init__  s    T 	MQZ\`ar\   c                    V ^8  d   QhRRRR/# rr   r9   )rg   s   "r]   rh   r*    s     

 

M 

d 

r\   c           
         VP                  V P                  V P                  RV P                  \	        V P
                  4      V P                  V P                  R7       R# )ru   Tr   r	  r   N)r"  r   rl   r   r   r   r  r   rw   s   &&r]   rx   UpdateMany._add_to_bulk  sI    LLIILL0A-- 	 	
r\   c                    V ^8  d   QhRRRR/# r{   r9   )rg   s   "r]   rh   r*    s     
 
+> 
4 
r\   c                   V P                   '       g   \        R4      hVP                  V P                   V P                  V P                  RV P
                  \        V P                  4      V P                  V P                  R7       R# )r}   r~   Tr/  N)
rm   r   r"  r   rl   r   r   r   r  r   rw   s   &&r]   r   UpdateMany._add_to_client_bulk  sk    "e  	OOLLIILL0A-- 	 		
r\   r9   r  r   r   s   @r]   r(  r(    s'    .I*b *bX


 
r\   r(  c                  L    ] tR tRtRtR	tR R lt]R R l4       tR R lt	R	t
R
# )
IndexModeli  zRepresents an index to create.c               $    V ^8  d   QhRRRRRR/# )ra   keys_IndexKeyHintkwargsr   re   rf   r9   )rg   s   "r]   rh   IndexModel.__annotate__  s&     D5 D5] D5c D5d D5r\   c                    \        V4      pVP                  R4      f   \        V4      VR&   \        V4      VR&   \	        VP                  RR4      4      pW n        Ve   W0P                  R&   R# R# )a3
  Create an Index instance.

For use with :meth:`~pymongo.asynchronous.collection.AsyncCollection.create_indexes` and :meth:`~pymongo.collection.Collection.create_indexes`.

Takes either a single key or a list containing (key, direction) pairs
or keys.  If no direction is given, :data:`~pymongo.ASCENDING` will
be assumed.
The key(s) must be an instance of :class:`str`, and the direction(s) must
be one of (:data:`~pymongo.ASCENDING`, :data:`~pymongo.DESCENDING`,
:data:`~pymongo.GEO2D`, :data:`~pymongo.GEOSPHERE`,
:data:`~pymongo.HASHED`, :data:`~pymongo.TEXT`).

Valid options include, but are not limited to:

  - `name`: custom name to use for this index - if none is
    given, a name will be generated.
  - `unique`: if ``True``, creates a uniqueness constraint on the index.
  - `background`: if ``True``, this index should be created in the
    background.
  - `sparse`: if ``True``, omit from the index any documents that lack
    the indexed field.
  - `bucketSize`: for use with geoHaystack indexes.
    Number of documents to group together within a certain proximity
    to a given longitude and latitude.
  - `min`: minimum value for keys in a :data:`~pymongo.GEO2D`
    index.
  - `max`: maximum value for keys in a :data:`~pymongo.GEO2D`
    index.
  - `expireAfterSeconds`: <int> Used to create an expiring (TTL)
    collection. MongoDB will automatically delete documents from
    this collection after <int> seconds. The indexed field must
    be a UTC datetime or the data will not expire.
  - `partialFilterExpression`: A document that specifies a filter for
    a partial index.
  - `collation`: An instance of :class:`~pymongo.collation.Collation`
    that specifies the collation to use.
  - `wildcardProjection`: Allows users to include or exclude specific
    field paths from a `wildcard index`_ using the { "$**" : 1} key
    pattern. Requires MongoDB >= 4.2.
  - `hidden`: if ``True``, this index will be hidden from the query
    planner and will not be evaluated as part of query plan
    selection. Requires MongoDB >= 4.4.

See the MongoDB documentation for a full list of supported options by
server version.

:param keys: a single key or a list containing (key, direction) pairs
     or keys specifying the index to create.
:param kwargs: any additional index creation
    options (see the above list) should be passed as keyword
    arguments.

.. versionchanged:: 3.11
   Added the ``hidden`` option.
.. versionchanged:: 3.2
   Added the ``partialFilterExpression`` option to support partial
   indexes.

.. _wildcard index: https://dochub.mongodb.org/core/index-wildcard/
nameNkeyr   )r   getr   r   r   pop_IndexModel__document)rn   r7  r9  r   s   &&, r]   ro   IndexModel.__init__  sk    z 4 ::f%,T2F6N'-u.vzz+t/LM	  +4OOK( !r\   c                   V ^8  d   QhRR/# )ra   re   zdict[str, Any]r9   )rg   s   "r]   rh   r:    s      . r\   c                    V P                   # )zEAn index document suitable for passing to the createIndexes
command.
)r@  r   s   &r]   rb   IndexModel.document  s    
 r\   c                   V ^8  d   QhRR/# r   r9   )rg   s   "r]   rh   r:  "  s     
 
# 
r\   c                	   R P                  V P                  P                  V P                  R,          RP	                  V P                  P                  4        UUu. uF  w  rVR8w  g   K  RV RV: 2NK  	  upp4      4      # u uppi )z{}({}{})r=   r   =)rg   r   r:   rb   joinitemsrn   r=  values   &  r]   r   IndexModel.__repr__"  sy      NN##MM% GGDMM<O<O<Qb<QjcUX\aUa)r#ay)<Qbc
 	
 cs   B+B
__documentNr:   r;   r<   r=   r   r   ro   propertyrb   r   r[   r9   r\   r]   r5  r5    s/    (ID5L  
 
r\   r5  c                  P    ] tR tRtRtR
tRR R llt]R R l4       tR R	 lt	R
t
R# )SearchIndexModeli*  z$Represents a search index to create.Nc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
ra   
definitionr   r<  rd   r   r9  r   re   rf   r9   )rg   s   "r]   rh   SearchIndexModel.__annotate__/  s<     ' '%' ' 	'
 ' 
'r\   c                    / V n         Ve   W P                   R&   WP                   R&   Ve   W0P                   R&   V P                   P                  V4       R# )an  Create a Search Index instance.

For use with :meth:`~pymongo.collection.AsyncCollection.create_search_index` and :meth:`~pymongo.collection.AsyncCollection.create_search_indexes`.

:param definition: The definition for this index.
:param name: The name for this index, if present.
:param type: The type for this index which defaults to "search". Alternative values include "vectorSearch".
:param kwargs: Keyword arguments supplying any additional options.

.. note:: Search indexes require a MongoDB server version 7.0+ Atlas cluster.
.. versionadded:: 4.5
.. versionchanged:: 4.7
   Added the type and kwargs arguments.
Nr<  rU  r   )_SearchIndexModel__documentr2   )rn   rU  r<  r   r9  s   &&&&,r]   ro   SearchIndexModel.__init__/  sM    * +-&*OOF#(2%&*OOF#v&r\   c                   V ^8  d   QhRR/# )ra   re   r   r9   )rg   s   "r]   rh   rV  M  s      + r\   c                    V P                   # )zThe document for this index.)rX  r   s   &r]   rb   SearchIndexModel.documentL  s     r\   c                   V ^8  d   QhRR/# r   r9   )rg   s   "r]   rh   rV  Q  s     
 
# 
r\   c                	    R P                  V P                  P                  RP                  V P                  P                  4        UUu. uF  w  rV RV: 2NK  	  upp4      4      # u uppi )z{}({})r   rH  )rg   r   r:   rI  rb   rJ  rK  s   &  r]   r   SearchIndexModel.__repr__Q  sZ    NN##IIDMM<O<O<QR<Qjc#ay)<QRS
 	
Rs   	A(rN  )NNrP  r9   r\   r]   rS  rS  *  s-    .I':  
 
r\   rS  )4r   
__future__r   enumtypingr   r   r   r   r   r   r	   r
   bson.raw_bsonr   pymongor   pymongo.collationr   pymongo.commonr   r   pymongo.errorsr   pymongo.helpers_sharedr   r   r   pymongo.typingsr   r   r   pymongo.write_concernr   r   r   r   int
_IndexListr8  Enumr   r_   r   r   r   r   r  r  r(  r5  rS  r9   r\   r]   <module>rn     sG   # 	 	 	 * " 8 = + P P B B 2B U3c5c7383D)D#EEFFGH'RUWZRZJ[[
 c:o&#tyy @2!& 2!j7c 7ct:
	 :
z:
 :
zL
' L
^[
 [
|S
	 S
lL
 L
^W
 W
t+
 +
r\   