"""
@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.mdb.postgresql.v1.backup_retention_policy_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 BackupRetentionPolicyServiceStub:
    """A set of methods for managing PostgreSQL Cluster backup retention policies."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.ListBackupRetentionPoliciesRequest,
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.ListBackupRetentionPoliciesResponse,
    ]
    """List all retention policies."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.CreateBackupRetentionPolicyRequest,
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.CreateBackupRetentionPolicyResponse,
    ]
    """Add a new retention policy."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.DeleteBackupRetentionPolicyRequest,
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.DeleteBackupRetentionPolicyResponse,
    ]
    """Delete retention policy."""

class BackupRetentionPolicyServiceAsyncStub:
    """A set of methods for managing PostgreSQL Cluster backup retention policies."""

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.ListBackupRetentionPoliciesRequest,
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.ListBackupRetentionPoliciesResponse,
    ]
    """List all retention policies."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.CreateBackupRetentionPolicyRequest,
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.CreateBackupRetentionPolicyResponse,
    ]
    """Add a new retention policy."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.DeleteBackupRetentionPolicyRequest,
        yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.DeleteBackupRetentionPolicyResponse,
    ]
    """Delete retention policy."""

class BackupRetentionPolicyServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing PostgreSQL Cluster backup retention policies."""

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.ListBackupRetentionPoliciesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.ListBackupRetentionPoliciesResponse, collections.abc.Awaitable[yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.ListBackupRetentionPoliciesResponse]]:
        """List all retention policies."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.CreateBackupRetentionPolicyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.CreateBackupRetentionPolicyResponse, collections.abc.Awaitable[yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.CreateBackupRetentionPolicyResponse]]:
        """Add a new retention policy."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.DeleteBackupRetentionPolicyRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.DeleteBackupRetentionPolicyResponse, collections.abc.Awaitable[yandex.cloud.mdb.postgresql.v1.backup_retention_policy_service_pb2.DeleteBackupRetentionPolicyResponse]]:
        """Delete retention policy."""

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