"""
@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.resource_pb2
import yandex.cloud.cdn.v1.resource_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 ResourceServiceStub:
    """Provider's resources management service."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.GetResourceRequest,
        yandex.cloud.cdn.v1.resource_pb2.Resource,
    ]
    """Get client's CDN resource by resource id."""

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.ListResourcesRequest,
        yandex.cloud.cdn.v1.resource_service_pb2.ListResourcesResponse,
    ]
    """Lists CDN resources."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.CreateResourceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a CDN resource in the specified folder.

    Creation may take up to 15 minutes.
    """

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.UpdateResourceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified CDN resource.

    The method implements patch behaviour, i.e. only the fields specified in the request are updated in the resource.

    Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge the resource's cache via a
    [CacheService.Purge] request.
    """

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.DeleteResourceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes client's CDN resource."""

    GetProviderCName: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.GetProviderCNameRequest,
        yandex.cloud.cdn.v1.resource_service_pb2.GetProviderCNameResponse,
    ]
    """Get Provider's CNAME (edge endpoint) bind to specified folder id.
    Returns UNIMPLEMENTED error, if provider doesn't support CNAME request.
    """

class ResourceServiceAsyncStub:
    """Provider's resources management service."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.GetResourceRequest,
        yandex.cloud.cdn.v1.resource_pb2.Resource,
    ]
    """Get client's CDN resource by resource id."""

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.ListResourcesRequest,
        yandex.cloud.cdn.v1.resource_service_pb2.ListResourcesResponse,
    ]
    """Lists CDN resources."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.CreateResourceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a CDN resource in the specified folder.

    Creation may take up to 15 minutes.
    """

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.UpdateResourceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified CDN resource.

    The method implements patch behaviour, i.e. only the fields specified in the request are updated in the resource.

    Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge the resource's cache via a
    [CacheService.Purge] request.
    """

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.DeleteResourceRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes client's CDN resource."""

    GetProviderCName: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.cdn.v1.resource_service_pb2.GetProviderCNameRequest,
        yandex.cloud.cdn.v1.resource_service_pb2.GetProviderCNameResponse,
    ]
    """Get Provider's CNAME (edge endpoint) bind to specified folder id.
    Returns UNIMPLEMENTED error, if provider doesn't support CNAME request.
    """

class ResourceServiceServicer(metaclass=abc.ABCMeta):
    """Provider's resources management service."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.cdn.v1.resource_service_pb2.GetResourceRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.cdn.v1.resource_pb2.Resource, collections.abc.Awaitable[yandex.cloud.cdn.v1.resource_pb2.Resource]]:
        """Get client's CDN resource by resource id."""

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.cdn.v1.resource_service_pb2.ListResourcesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.cdn.v1.resource_service_pb2.ListResourcesResponse, collections.abc.Awaitable[yandex.cloud.cdn.v1.resource_service_pb2.ListResourcesResponse]]:
        """Lists CDN resources."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.cdn.v1.resource_service_pb2.CreateResourceRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates a CDN resource in the specified folder.

        Creation may take up to 15 minutes.
        """

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.cdn.v1.resource_service_pb2.UpdateResourceRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified CDN resource.

        The method implements patch behaviour, i.e. only the fields specified in the request are updated in the resource.

        Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge the resource's cache via a
        [CacheService.Purge] request.
        """

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.cdn.v1.resource_service_pb2.DeleteResourceRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes client's CDN resource."""

    @abc.abstractmethod
    def GetProviderCName(
        self,
        request: yandex.cloud.cdn.v1.resource_service_pb2.GetProviderCNameRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.cdn.v1.resource_service_pb2.GetProviderCNameResponse, collections.abc.Awaitable[yandex.cloud.cdn.v1.resource_service_pb2.GetProviderCNameResponse]]:
        """Get Provider's CNAME (edge endpoint) bind to specified folder id.
        Returns UNIMPLEMENTED error, if provider doesn't support CNAME request.
        """

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