"""
@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.cdn.v1.rule_pb2
import yandex.cloud.cdn.v1.rule_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 ResourceRulesServiceStub:
    """
    Rules management service.

    Used for Resources Rules management.
    """

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.ListResourceRulesRequest,
        yandex.cloud.cdn.v1.rule_service_pb2.ListResourceRulesResponse,
    ]
    """List all rules for specified resource."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.CreateResourceRuleRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Create new resource rule with specified unique name and rule patter."""

    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.GetResourceRuleRequest,
        yandex.cloud.cdn.v1.rule_pb2.Rule,
    ]
    """Get specified by id resource rule."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.UpdateResourceRuleRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Update specified by id resource rule."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.DeleteResourceRuleRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete specified by id resource rule."""

class ResourceRulesServiceAsyncStub:
    """
    Rules management service.

    Used for Resources Rules management.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.ListResourceRulesRequest,
        yandex.cloud.cdn.v1.rule_service_pb2.ListResourceRulesResponse,
    ]
    """List all rules for specified resource."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.CreateResourceRuleRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Create new resource rule with specified unique name and rule patter."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.GetResourceRuleRequest,
        yandex.cloud.cdn.v1.rule_pb2.Rule,
    ]
    """Get specified by id resource rule."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.UpdateResourceRuleRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Update specified by id resource rule."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.rule_service_pb2.DeleteResourceRuleRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete specified by id resource rule."""

class ResourceRulesServiceServicer(metaclass=abc.ABCMeta):
    """
    Rules management service.

    Used for Resources Rules management.
    """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.cdn.v1.rule_service_pb2.ListResourceRulesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.cdn.v1.rule_service_pb2.ListResourceRulesResponse, collections.abc.Awaitable[yandex.cloud.cdn.v1.rule_service_pb2.ListResourceRulesResponse]]:
        """List all rules for specified resource."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.cdn.v1.rule_service_pb2.CreateResourceRuleRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Create new resource rule with specified unique name and rule patter."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.cdn.v1.rule_service_pb2.GetResourceRuleRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.cdn.v1.rule_pb2.Rule, collections.abc.Awaitable[yandex.cloud.cdn.v1.rule_pb2.Rule]]:
        """Get specified by id resource rule."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.cdn.v1.rule_service_pb2.UpdateResourceRuleRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Update specified by id resource rule."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.cdn.v1.rule_service_pb2.DeleteResourceRuleRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Delete specified by id resource rule."""

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