"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import collections.abc
import grpc
import grpc.aio
import typing
import yandex.cloud.kms.v1.symmetric_crypto_service_pb2

_T = typing.TypeVar("_T")

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore[misc, type-arg]
    ...

class SymmetricCryptoServiceStub:
    """--- Data plane for KMS symmetric cryptography operations

    Set of methods that perform symmetric encryption and decryption.
    """

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Encrypt: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricEncryptRequest,
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricEncryptResponse,
    ]
    """Encrypts given plaintext with the specified key."""

    Decrypt: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricDecryptRequest,
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricDecryptResponse,
    ]
    """Decrypts the given ciphertext with the specified key."""

    ReEncrypt: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricReEncryptRequest,
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricReEncryptResponse,
    ]
    """Re-encrypts a ciphertext with the specified KMS key."""

    GenerateDataKey: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.GenerateDataKeyRequest,
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.GenerateDataKeyResponse,
    ]
    """Generates a new symmetric data encryption key (not a KMS key) and returns
    the generated key as plaintext and as ciphertext encrypted with the specified symmetric KMS key.
    """

class SymmetricCryptoServiceAsyncStub:
    """--- Data plane for KMS symmetric cryptography operations

    Set of methods that perform symmetric encryption and decryption.
    """

    Encrypt: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricEncryptRequest,
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricEncryptResponse,
    ]
    """Encrypts given plaintext with the specified key."""

    Decrypt: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricDecryptRequest,
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricDecryptResponse,
    ]
    """Decrypts the given ciphertext with the specified key."""

    ReEncrypt: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricReEncryptRequest,
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricReEncryptResponse,
    ]
    """Re-encrypts a ciphertext with the specified KMS key."""

    GenerateDataKey: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.GenerateDataKeyRequest,
        yandex.cloud.kms.v1.symmetric_crypto_service_pb2.GenerateDataKeyResponse,
    ]
    """Generates a new symmetric data encryption key (not a KMS key) and returns
    the generated key as plaintext and as ciphertext encrypted with the specified symmetric KMS key.
    """

class SymmetricCryptoServiceServicer(metaclass=abc.ABCMeta):
    """--- Data plane for KMS symmetric cryptography operations

    Set of methods that perform symmetric encryption and decryption.
    """

    @abc.abstractmethod
    def Encrypt(
        self,
        request: yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricEncryptRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricEncryptResponse, collections.abc.Awaitable[yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricEncryptResponse]]:
        """Encrypts given plaintext with the specified key."""

    @abc.abstractmethod
    def Decrypt(
        self,
        request: yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricDecryptRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricDecryptResponse, collections.abc.Awaitable[yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricDecryptResponse]]:
        """Decrypts the given ciphertext with the specified key."""

    @abc.abstractmethod
    def ReEncrypt(
        self,
        request: yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricReEncryptRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricReEncryptResponse, collections.abc.Awaitable[yandex.cloud.kms.v1.symmetric_crypto_service_pb2.SymmetricReEncryptResponse]]:
        """Re-encrypts a ciphertext with the specified KMS key."""

    @abc.abstractmethod
    def GenerateDataKey(
        self,
        request: yandex.cloud.kms.v1.symmetric_crypto_service_pb2.GenerateDataKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.kms.v1.symmetric_crypto_service_pb2.GenerateDataKeyResponse, collections.abc.Awaitable[yandex.cloud.kms.v1.symmetric_crypto_service_pb2.GenerateDataKeyResponse]]:
        """Generates a new symmetric data encryption key (not a KMS key) and returns
        the generated key as plaintext and as ciphertext encrypted with the specified symmetric KMS key.
        """

def add_SymmetricCryptoServiceServicer_to_server(servicer: SymmetricCryptoServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
