"""
@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.api_key_pb2
import yandex.cloud.iam.v1.api_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 ApiKeyServiceStub:
    """A set of methods for managing API keys."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeysRequest,
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeysResponse,
    ]
    """Retrieves the list of API keys for the specified service account."""

    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.GetApiKeyRequest,
        yandex.cloud.iam.v1.api_key_pb2.ApiKey,
    ]
    """Returns the specified API key.

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

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.CreateApiKeyRequest,
        yandex.cloud.iam.v1.api_key_service_pb2.CreateApiKeyResponse,
    ]
    """Creates an API key for the specified service account."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.UpdateApiKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified API key."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.DeleteApiKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified API key."""

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyOperationsRequest,
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyOperationsResponse,
    ]
    """Retrieves the list of operations for the specified API key."""

    ListScopes: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyScopesRequest,
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyScopesResponse,
    ]
    """Retrieves the list of scopes."""

class ApiKeyServiceAsyncStub:
    """A set of methods for managing API keys."""

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeysRequest,
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeysResponse,
    ]
    """Retrieves the list of API keys for the specified service account."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.GetApiKeyRequest,
        yandex.cloud.iam.v1.api_key_pb2.ApiKey,
    ]
    """Returns the specified API key.

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

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.CreateApiKeyRequest,
        yandex.cloud.iam.v1.api_key_service_pb2.CreateApiKeyResponse,
    ]
    """Creates an API key for the specified service account."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.UpdateApiKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified API key."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.DeleteApiKeyRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified API key."""

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyOperationsRequest,
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyOperationsResponse,
    ]
    """Retrieves the list of operations for the specified API key."""

    ListScopes: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyScopesRequest,
        yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyScopesResponse,
    ]
    """Retrieves the list of scopes."""

class ApiKeyServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing API keys."""

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeysRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeysResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeysResponse]]:
        """Retrieves the list of API keys for the specified service account."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.iam.v1.api_key_service_pb2.GetApiKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.api_key_pb2.ApiKey, collections.abc.Awaitable[yandex.cloud.iam.v1.api_key_pb2.ApiKey]]:
        """Returns the specified API key.

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

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.iam.v1.api_key_service_pb2.CreateApiKeyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.api_key_service_pb2.CreateApiKeyResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.api_key_service_pb2.CreateApiKeyResponse]]:
        """Creates an API key for the specified service account."""

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

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

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyOperationsResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyOperationsResponse]]:
        """Retrieves the list of operations for the specified API key."""

    @abc.abstractmethod
    def ListScopes(
        self,
        request: yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyScopesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyScopesResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.api_key_service_pb2.ListApiKeyScopesResponse]]:
        """Retrieves the list of scopes."""

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