"""
@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.access.access_pb2
import yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_pb2
import yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2
import yandex.cloud.operation.operation_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 AsymmetricEncryptionKeyServiceStub:
    """Set of methods for managing asymmetric KMS keys."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.CreateAsymmetricEncryptionKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """control plane
    Creates an asymmetric KMS key in the specified folder.
    """

    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.GetAsymmetricEncryptionKeyRequest,
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_pb2.AsymmetricEncryptionKey,
    ]
    """Returns the specified asymmetric KMS key.

     To get the list of available asymmetric KMS keys, make a [SymmetricKeyService.List] request.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeysRequest,
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeysResponse,
    ]
    """Returns the list of asymmetric KMS keys in the specified folder."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.UpdateAsymmetricEncryptionKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified asymmetric KMS key."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.DeleteAsymmetricEncryptionKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified asymmetric KMS key. This action also automatically schedules
    the destruction of all of the key's versions in 72 hours.

    The key and its versions appear absent in [AsymmetricEncryptionKeyService.Get] and [AsymmetricEncryptionKeyService.List]
    requests, but can be restored within 72 hours with a request to tech support.
    """

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeyOperationsRequest,
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeyOperationsResponse,
    ]
    """Lists operations for the specified asymmetric KMS key."""

    ListAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        yandex.cloud.access.access_pb2.ListAccessBindingsResponse,
    ]
    """Lists existing access bindings for the specified key."""

    SetAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets access bindings for the key."""

    UpdateAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates access bindings for the specified key."""

class AsymmetricEncryptionKeyServiceAsyncStub:
    """Set of methods for managing asymmetric KMS keys."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.CreateAsymmetricEncryptionKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """control plane
    Creates an asymmetric KMS key in the specified folder.
    """

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.GetAsymmetricEncryptionKeyRequest,
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_pb2.AsymmetricEncryptionKey,
    ]
    """Returns the specified asymmetric KMS key.

     To get the list of available asymmetric KMS keys, make a [SymmetricKeyService.List] request.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeysRequest,
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeysResponse,
    ]
    """Returns the list of asymmetric KMS keys in the specified folder."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.UpdateAsymmetricEncryptionKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified asymmetric KMS key."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.DeleteAsymmetricEncryptionKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified asymmetric KMS key. This action also automatically schedules
    the destruction of all of the key's versions in 72 hours.

    The key and its versions appear absent in [AsymmetricEncryptionKeyService.Get] and [AsymmetricEncryptionKeyService.List]
    requests, but can be restored within 72 hours with a request to tech support.
    """

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeyOperationsRequest,
        yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeyOperationsResponse,
    ]
    """Lists operations for the specified asymmetric KMS key."""

    ListAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        yandex.cloud.access.access_pb2.ListAccessBindingsResponse,
    ]
    """Lists existing access bindings for the specified key."""

    SetAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets access bindings for the key."""

    UpdateAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates access bindings for the specified key."""

class AsymmetricEncryptionKeyServiceServicer(metaclass=abc.ABCMeta):
    """Set of methods for managing asymmetric KMS keys."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.CreateAsymmetricEncryptionKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """control plane
        Creates an asymmetric KMS key in the specified folder.
        """

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.GetAsymmetricEncryptionKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_pb2.AsymmetricEncryptionKey, collections.abc.Awaitable[yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_pb2.AsymmetricEncryptionKey]]:
        """Returns the specified asymmetric KMS key.

         To get the list of available asymmetric KMS keys, make a [SymmetricKeyService.List] request.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeysRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeysResponse, collections.abc.Awaitable[yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeysResponse]]:
        """Returns the list of asymmetric KMS keys in the specified folder."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.UpdateAsymmetricEncryptionKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified asymmetric KMS key."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.DeleteAsymmetricEncryptionKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes the specified asymmetric KMS key. This action also automatically schedules
        the destruction of all of the key's versions in 72 hours.

        The key and its versions appear absent in [AsymmetricEncryptionKeyService.Get] and [AsymmetricEncryptionKeyService.List]
        requests, but can be restored within 72 hours with a request to tech support.
        """

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeyOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeyOperationsResponse, collections.abc.Awaitable[yandex.cloud.kms.v1.asymmetricencryption.asymmetric_encryption_key_service_pb2.ListAsymmetricEncryptionKeyOperationsResponse]]:
        """Lists operations for the specified asymmetric KMS key."""

    @abc.abstractmethod
    def ListAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.access.access_pb2.ListAccessBindingsResponse, collections.abc.Awaitable[yandex.cloud.access.access_pb2.ListAccessBindingsResponse]]:
        """Lists existing access bindings for the specified key."""

    @abc.abstractmethod
    def SetAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Sets access bindings for the key."""

    @abc.abstractmethod
    def UpdateAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates access bindings for the specified key."""

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