"""
@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.maintenance.v2.common_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 MaintenanceServiceStub:
    """A set of methods for managing maintenances in a service."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.maintenance.v2.common_pb2.ListMaintenancesRequest,
        yandex.cloud.maintenance.v2.common_pb2.ListMaintenancesResponse,
    ]
    """Lists maintenances by conditions, specified in request."""

    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.maintenance.v2.common_pb2.GetMaintenanceRequest,
        yandex.cloud.maintenance.v2.common_pb2.Maintenance,
    ]
    """Retrieves the specific Maintenance by ID."""

    Reschedule: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.maintenance.v2.common_pb2.RescheduleMaintenanceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Allows user to reschedule Maintenance to another date and time."""

class MaintenanceServiceAsyncStub:
    """A set of methods for managing maintenances in a service."""

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.maintenance.v2.common_pb2.ListMaintenancesRequest,
        yandex.cloud.maintenance.v2.common_pb2.ListMaintenancesResponse,
    ]
    """Lists maintenances by conditions, specified in request."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.maintenance.v2.common_pb2.GetMaintenanceRequest,
        yandex.cloud.maintenance.v2.common_pb2.Maintenance,
    ]
    """Retrieves the specific Maintenance by ID."""

    Reschedule: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.maintenance.v2.common_pb2.RescheduleMaintenanceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Allows user to reschedule Maintenance to another date and time."""

class MaintenanceServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing maintenances in a service."""

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.maintenance.v2.common_pb2.ListMaintenancesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.maintenance.v2.common_pb2.ListMaintenancesResponse, collections.abc.Awaitable[yandex.cloud.maintenance.v2.common_pb2.ListMaintenancesResponse]]:
        """Lists maintenances by conditions, specified in request."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.maintenance.v2.common_pb2.GetMaintenanceRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.maintenance.v2.common_pb2.Maintenance, collections.abc.Awaitable[yandex.cloud.maintenance.v2.common_pb2.Maintenance]]:
        """Retrieves the specific Maintenance by ID."""

    @abc.abstractmethod
    def Reschedule(
        self,
        request: yandex.cloud.maintenance.v2.common_pb2.RescheduleMaintenanceRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Allows user to reschedule Maintenance to another date and time."""

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