"""
@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.origin_pb2
import yandex.cloud.cdn.v1.origin_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 OriginServiceStub:
    """
    Origin management service.
    Origin is not a standalone entity. It can live only within origin group.
    """

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.GetOriginRequest,
        yandex.cloud.cdn.v1.origin_pb2.Origin,
    ]
    """Get origin in origin group."""

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.ListOriginsRequest,
        yandex.cloud.cdn.v1.origin_service_pb2.ListOriginsResponse,
    ]
    """Lists origins of origin group."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.CreateOriginRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates origin inside origin group."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.UpdateOriginRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified origin from the origin group.

    Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge cache of the resources that
    use the origin via a [CacheService.Purge] request.
    """

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.DeleteOriginRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes origin from origin group."""

class OriginServiceAsyncStub:
    """
    Origin management service.
    Origin is not a standalone entity. It can live only within origin group.
    """

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.GetOriginRequest,
        yandex.cloud.cdn.v1.origin_pb2.Origin,
    ]
    """Get origin in origin group."""

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.ListOriginsRequest,
        yandex.cloud.cdn.v1.origin_service_pb2.ListOriginsResponse,
    ]
    """Lists origins of origin group."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.CreateOriginRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates origin inside origin group."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.UpdateOriginRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified origin from the origin group.

    Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge cache of the resources that
    use the origin via a [CacheService.Purge] request.
    """

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.origin_service_pb2.DeleteOriginRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes origin from origin group."""

class OriginServiceServicer(metaclass=abc.ABCMeta):
    """
    Origin management service.
    Origin is not a standalone entity. It can live only within origin group.
    """

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.cdn.v1.origin_service_pb2.GetOriginRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.cdn.v1.origin_pb2.Origin, collections.abc.Awaitable[yandex.cloud.cdn.v1.origin_pb2.Origin]]:
        """Get origin in origin group."""

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.cdn.v1.origin_service_pb2.ListOriginsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.cdn.v1.origin_service_pb2.ListOriginsResponse, collections.abc.Awaitable[yandex.cloud.cdn.v1.origin_service_pb2.ListOriginsResponse]]:
        """Lists origins of origin group."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.cdn.v1.origin_service_pb2.CreateOriginRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates origin inside origin group."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.cdn.v1.origin_service_pb2.UpdateOriginRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified origin from the origin group.

        Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge cache of the resources that
        use the origin via a [CacheService.Purge] request.
        """

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.cdn.v1.origin_service_pb2.DeleteOriginRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes origin from origin group."""

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