"""
@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.iam.v1.key_pb2
import yandex.cloud.iam.v1.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 KeyServiceStub:
    """A set of methods for managing Key resources."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.GetKeyRequest,
        yandex.cloud.iam.v1.key_pb2.Key,
    ]
    """Returns the specified Key resource.

    To get the list of available Key resources, make a [List] request.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.ListKeysRequest,
        yandex.cloud.iam.v1.key_service_pb2.ListKeysResponse,
    ]
    """Retrieves the list of Key resources for the specified service account."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.CreateKeyRequest,
        yandex.cloud.iam.v1.key_service_pb2.CreateKeyResponse,
    ]
    """Creates a key pair for the specified service account."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.UpdateKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified key pair."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.DeleteKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified key pair."""

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.ListKeyOperationsRequest,
        yandex.cloud.iam.v1.key_service_pb2.ListKeyOperationsResponse,
    ]
    """Lists operations for the specified key."""

class KeyServiceAsyncStub:
    """A set of methods for managing Key resources."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.GetKeyRequest,
        yandex.cloud.iam.v1.key_pb2.Key,
    ]
    """Returns the specified Key resource.

    To get the list of available Key resources, make a [List] request.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.ListKeysRequest,
        yandex.cloud.iam.v1.key_service_pb2.ListKeysResponse,
    ]
    """Retrieves the list of Key resources for the specified service account."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.CreateKeyRequest,
        yandex.cloud.iam.v1.key_service_pb2.CreateKeyResponse,
    ]
    """Creates a key pair for the specified service account."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.UpdateKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified key pair."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.DeleteKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified key pair."""

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.key_service_pb2.ListKeyOperationsRequest,
        yandex.cloud.iam.v1.key_service_pb2.ListKeyOperationsResponse,
    ]
    """Lists operations for the specified key."""

class KeyServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing Key resources."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.iam.v1.key_service_pb2.GetKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.key_pb2.Key, collections.abc.Awaitable[yandex.cloud.iam.v1.key_pb2.Key]]:
        """Returns the specified Key resource.

        To get the list of available Key resources, make a [List] request.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.iam.v1.key_service_pb2.ListKeysRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.key_service_pb2.ListKeysResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.key_service_pb2.ListKeysResponse]]:
        """Retrieves the list of Key resources for the specified service account."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.iam.v1.key_service_pb2.CreateKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.key_service_pb2.CreateKeyResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.key_service_pb2.CreateKeyResponse]]:
        """Creates a key pair for the specified service account."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.iam.v1.key_service_pb2.UpdateKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified key pair."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.iam.v1.key_service_pb2.DeleteKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes the specified key pair."""

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.iam.v1.key_service_pb2.ListKeyOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.key_service_pb2.ListKeyOperationsResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.key_service_pb2.ListKeyOperationsResponse]]:
        """Lists operations for the specified key."""

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