@@ -304,7 +304,7 @@ async def close(self) -> None:
304304
305305
306306class RewrapManyDataKeyResult :
307- """Result object returned by a :meth:`~ClientEncryption .rewrap_many_data_key` operation.
307+ """Result object returned by a :meth:`~AsyncClientEncryption .rewrap_many_data_key` operation.
308308
309309 .. versionadded:: 4.2
310310 """
@@ -316,7 +316,7 @@ def __init__(self, bulk_write_result: Optional[BulkWriteResult] = None) -> None:
316316 def bulk_write_result (self ) -> Optional [BulkWriteResult ]:
317317 """The result of the bulk write operation used to update the key vault
318318 collection with one or more rewrapped data keys. If
319- :meth:`~ClientEncryption .rewrap_many_data_key` does not find any matching keys to rewrap,
319+ :meth:`~AsyncClientEncryption .rewrap_many_data_key` does not find any matching keys to rewrap,
320320 no bulk write operation will be executed and this field will be
321321 ``None``.
322322 """
@@ -506,7 +506,7 @@ def _create_mongocrypt_options(**kwargs: Any) -> MongoCryptOptions:
506506 return opts
507507
508508
509- class ClientEncryption (Generic [_DocumentType ]):
509+ class AsyncClientEncryption (Generic [_DocumentType ]):
510510 """Explicit client-side field level encryption."""
511511
512512 def __init__ (
@@ -519,7 +519,7 @@ def __init__(
519519 ) -> None :
520520 """Explicit client-side field level encryption.
521521
522- The ClientEncryption class encapsulates explicit operations on a key
522+ The AsyncClientEncryption class encapsulates explicit operations on a key
523523 vault collection that cannot be done directly on an AsyncMongoClient. Similar
524524 to configuring auto encryption on an AsyncMongoClient, it is constructed with
525525 an AsyncMongoClient (to a MongoDB cluster containing the key vault
@@ -1126,23 +1126,23 @@ async def rewrap_many_data_key(
11261126 result = await self ._key_vault_coll .bulk_write (replacements )
11271127 return RewrapManyDataKeyResult (result )
11281128
1129- async def __aenter__ (self ) -> ClientEncryption [_DocumentType ]:
1129+ async def __aenter__ (self ) -> AsyncClientEncryption [_DocumentType ]:
11301130 return self
11311131
11321132 async def __aexit__ (self , exc_type : Any , exc_val : Any , exc_tb : Any ) -> None :
11331133 await self .close ()
11341134
11351135 def _check_closed (self ) -> None :
11361136 if self ._encryption is None :
1137- raise InvalidOperation ("Cannot use closed ClientEncryption " )
1137+ raise InvalidOperation ("Cannot use closed AsyncClientEncryption " )
11381138
11391139 async def close (self ) -> None :
11401140 """Release resources.
11411141
11421142 Note that using this class in a with-statement will automatically call
11431143 :meth:`close`::
11441144
1145- with ClientEncryption (...) as client_encryption:
1145+ with AsyncClientEncryption (...) as client_encryption:
11461146 encrypted = client_encryption.encrypt(value, ...)
11471147 decrypted = client_encryption.decrypt(encrypted)
11481148
0 commit comments