"""
@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.operation.operation_pb2
import yandex.cloud.serverless.triggers.v1.trigger_pb2
import yandex.cloud.serverless.triggers.v1.trigger_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 TriggerServiceStub:
    """A set of methods for managing triggers for serverless functions."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.GetTriggerRequest,
        yandex.cloud.serverless.triggers.v1.trigger_pb2.Trigger,
    ]
    """Returns the specified trigger.

    To get the list of all available triggers, make a [List] request.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggersRequest,
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggersResponse,
    ]
    """Retrieves the list of triggers in the specified folder."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.CreateTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a trigger in the specified folder."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.UpdateTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified trigger."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.DeleteTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified trigger."""

    Pause: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.PauseTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Pauses the specified trigger."""

    Resume: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ResumeTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Restarts the specified trigger."""

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggerOperationsRequest,
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggerOperationsResponse,
    ]
    """Lists operations for the specified trigger."""

class TriggerServiceAsyncStub:
    """A set of methods for managing triggers for serverless functions."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.GetTriggerRequest,
        yandex.cloud.serverless.triggers.v1.trigger_pb2.Trigger,
    ]
    """Returns the specified trigger.

    To get the list of all available triggers, make a [List] request.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggersRequest,
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggersResponse,
    ]
    """Retrieves the list of triggers in the specified folder."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.CreateTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a trigger in the specified folder."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.UpdateTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified trigger."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.DeleteTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified trigger."""

    Pause: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.PauseTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Pauses the specified trigger."""

    Resume: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ResumeTriggerRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Restarts the specified trigger."""

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggerOperationsRequest,
        yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggerOperationsResponse,
    ]
    """Lists operations for the specified trigger."""

class TriggerServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing triggers for serverless functions."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.serverless.triggers.v1.trigger_service_pb2.GetTriggerRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.serverless.triggers.v1.trigger_pb2.Trigger, collections.abc.Awaitable[yandex.cloud.serverless.triggers.v1.trigger_pb2.Trigger]]:
        """Returns the specified trigger.

        To get the list of all available triggers, make a [List] request.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggersRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggersResponse, collections.abc.Awaitable[yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggersResponse]]:
        """Retrieves the list of triggers in the specified folder."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.serverless.triggers.v1.trigger_service_pb2.CreateTriggerRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates a trigger in the specified folder."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.serverless.triggers.v1.trigger_service_pb2.UpdateTriggerRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified trigger."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.serverless.triggers.v1.trigger_service_pb2.DeleteTriggerRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes the specified trigger."""

    @abc.abstractmethod
    def Pause(
        self,
        request: yandex.cloud.serverless.triggers.v1.trigger_service_pb2.PauseTriggerRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Pauses the specified trigger."""

    @abc.abstractmethod
    def Resume(
        self,
        request: yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ResumeTriggerRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Restarts the specified trigger."""

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggerOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggerOperationsResponse, collections.abc.Awaitable[yandex.cloud.serverless.triggers.v1.trigger_service_pb2.ListTriggerOperationsResponse]]:
        """Lists operations for the specified trigger."""

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