"""
@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.iam_token_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 IamTokenServiceStub:
    """A set of methods for managing IAM tokens."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenRequest,
        yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenResponse,
    ]
    """Create an IAM token for the specified identity."""

    CreateForServiceAccount: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenForServiceAccountRequest,
        yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenResponse,
    ]
    """Create an IAM token for service account."""

    Revoke: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.iam_token_service_pb2.RevokeIamTokenRequest,
        yandex.cloud.iam.v1.iam_token_service_pb2.RevokeIamTokenResponse,
    ]
    """Revoke the IAM token."""

class IamTokenServiceAsyncStub:
    """A set of methods for managing IAM tokens."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenRequest,
        yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenResponse,
    ]
    """Create an IAM token for the specified identity."""

    CreateForServiceAccount: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenForServiceAccountRequest,
        yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenResponse,
    ]
    """Create an IAM token for service account."""

    Revoke: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.iam.v1.iam_token_service_pb2.RevokeIamTokenRequest,
        yandex.cloud.iam.v1.iam_token_service_pb2.RevokeIamTokenResponse,
    ]
    """Revoke the IAM token."""

class IamTokenServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing IAM tokens."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenResponse]]:
        """Create an IAM token for the specified identity."""

    @abc.abstractmethod
    def CreateForServiceAccount(
        self,
        request: yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenForServiceAccountRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.iam_token_service_pb2.CreateIamTokenResponse]]:
        """Create an IAM token for service account."""

    @abc.abstractmethod
    def Revoke(
        self,
        request: yandex.cloud.iam.v1.iam_token_service_pb2.RevokeIamTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.iam.v1.iam_token_service_pb2.RevokeIamTokenResponse, collections.abc.Awaitable[yandex.cloud.iam.v1.iam_token_service_pb2.RevokeIamTokenResponse]]:
        """Revoke the IAM token."""

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