"""
@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.devtools.ycvc.v1.control_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 VersionControlServiceStub:
    """Version Control Service for managing tool version blacklists.
    This service manages obsolete (deprecated/blocked) versions only.

    API Behavior:
    - Supported versions: Return successful InitResponse.
    - Deprecated versions: Return successful InitResponse with deprecation_warning.
    - Blocked versions: Return FAILED_PRECONDITION error with descriptive message.
    """

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Init: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.devtools.ycvc.v1.control_service_pb2.InitRequest,
        yandex.cloud.devtools.ycvc.v1.control_service_pb2.InitResponse,
    ]
    """Initializes client and checks if the provided version is obsolete.
    Returns FAILED_PRECONDITION error for blocked versions.
    """

class VersionControlServiceAsyncStub:
    """Version Control Service for managing tool version blacklists.
    This service manages obsolete (deprecated/blocked) versions only.

    API Behavior:
    - Supported versions: Return successful InitResponse.
    - Deprecated versions: Return successful InitResponse with deprecation_warning.
    - Blocked versions: Return FAILED_PRECONDITION error with descriptive message.
    """

    Init: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.devtools.ycvc.v1.control_service_pb2.InitRequest,
        yandex.cloud.devtools.ycvc.v1.control_service_pb2.InitResponse,
    ]
    """Initializes client and checks if the provided version is obsolete.
    Returns FAILED_PRECONDITION error for blocked versions.
    """

class VersionControlServiceServicer(metaclass=abc.ABCMeta):
    """Version Control Service for managing tool version blacklists.
    This service manages obsolete (deprecated/blocked) versions only.

    API Behavior:
    - Supported versions: Return successful InitResponse.
    - Deprecated versions: Return successful InitResponse with deprecation_warning.
    - Blocked versions: Return FAILED_PRECONDITION error with descriptive message.
    """

    @abc.abstractmethod
    def Init(
        self,
        request: yandex.cloud.devtools.ycvc.v1.control_service_pb2.InitRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.devtools.ycvc.v1.control_service_pb2.InitResponse, collections.abc.Awaitable[yandex.cloud.devtools.ycvc.v1.control_service_pb2.InitResponse]]:
        """Initializes client and checks if the provided version is obsolete.
        Returns FAILED_PRECONDITION error for blocked versions.
        """

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