"""
@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.access.access_pb2
import yandex.cloud.lockbox.v1.secret_pb2
import yandex.cloud.lockbox.v1.secret_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 SecretServiceStub:
    """A set of methods for managing secrets."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.GetSecretRequest,
        yandex.cloud.lockbox.v1.secret_pb2.Secret,
    ]
    """Returns the specified secret.

    To get the list of all available secrets, make a [List] request.
    Use [PayloadService.Get] to get the payload (confidential data themselves) of the secret.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretsRequest,
        yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretsResponse,
    ]
    """Retrieves the list of secrets in the specified folder."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.CreateSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a secret in the specified folder."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.UpdateSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified secret."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.DeleteSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified secret."""

    Activate: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ActivateSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Activates the specified secret."""

    Deactivate: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.DeactivateSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deactivates the specified secret."""

    ListVersions: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ListVersionsRequest,
        yandex.cloud.lockbox.v1.secret_service_pb2.ListVersionsResponse,
    ]
    """Retrieves the list of versions of the specified secret."""

    AddVersion: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.AddVersionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Adds new version based on a previous one."""

    ScheduleVersionDestruction: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ScheduleVersionDestructionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Schedules the specified version for destruction.

    Scheduled destruction can be cancelled with the [SecretService.CancelVersionDestruction] method.
    """

    CancelVersionDestruction: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.CancelVersionDestructionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Cancels previously scheduled version destruction, if the version hasn't been destroyed yet."""

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretOperationsRequest,
        yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretOperationsResponse,
    ]
    """Lists operations for the specified secret."""

    ListAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        yandex.cloud.access.access_pb2.ListAccessBindingsResponse,
    ]
    """Lists existing access bindings for the specified secret."""

    SetAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets access bindings for the secret."""

    UpdateAccessBindings: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates access bindings for the secret."""

class SecretServiceAsyncStub:
    """A set of methods for managing secrets."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.GetSecretRequest,
        yandex.cloud.lockbox.v1.secret_pb2.Secret,
    ]
    """Returns the specified secret.

    To get the list of all available secrets, make a [List] request.
    Use [PayloadService.Get] to get the payload (confidential data themselves) of the secret.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretsRequest,
        yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretsResponse,
    ]
    """Retrieves the list of secrets in the specified folder."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.CreateSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a secret in the specified folder."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.UpdateSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified secret."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.DeleteSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified secret."""

    Activate: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ActivateSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Activates the specified secret."""

    Deactivate: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.DeactivateSecretRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deactivates the specified secret."""

    ListVersions: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ListVersionsRequest,
        yandex.cloud.lockbox.v1.secret_service_pb2.ListVersionsResponse,
    ]
    """Retrieves the list of versions of the specified secret."""

    AddVersion: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.AddVersionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Adds new version based on a previous one."""

    ScheduleVersionDestruction: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ScheduleVersionDestructionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Schedules the specified version for destruction.

    Scheduled destruction can be cancelled with the [SecretService.CancelVersionDestruction] method.
    """

    CancelVersionDestruction: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.CancelVersionDestructionRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Cancels previously scheduled version destruction, if the version hasn't been destroyed yet."""

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretOperationsRequest,
        yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretOperationsResponse,
    ]
    """Lists operations for the specified secret."""

    ListAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        yandex.cloud.access.access_pb2.ListAccessBindingsResponse,
    ]
    """Lists existing access bindings for the specified secret."""

    SetAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets access bindings for the secret."""

    UpdateAccessBindings: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates access bindings for the secret."""

class SecretServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing secrets."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.GetSecretRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.lockbox.v1.secret_pb2.Secret, collections.abc.Awaitable[yandex.cloud.lockbox.v1.secret_pb2.Secret]]:
        """Returns the specified secret.

        To get the list of all available secrets, make a [List] request.
        Use [PayloadService.Get] to get the payload (confidential data themselves) of the secret.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretsResponse, collections.abc.Awaitable[yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretsResponse]]:
        """Retrieves the list of secrets in the specified folder."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.CreateSecretRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates a secret in the specified folder."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.UpdateSecretRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified secret."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.DeleteSecretRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes the specified secret."""

    @abc.abstractmethod
    def Activate(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.ActivateSecretRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Activates the specified secret."""

    @abc.abstractmethod
    def Deactivate(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.DeactivateSecretRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deactivates the specified secret."""

    @abc.abstractmethod
    def ListVersions(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.ListVersionsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.lockbox.v1.secret_service_pb2.ListVersionsResponse, collections.abc.Awaitable[yandex.cloud.lockbox.v1.secret_service_pb2.ListVersionsResponse]]:
        """Retrieves the list of versions of the specified secret."""

    @abc.abstractmethod
    def AddVersion(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.AddVersionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Adds new version based on a previous one."""

    @abc.abstractmethod
    def ScheduleVersionDestruction(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.ScheduleVersionDestructionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Schedules the specified version for destruction.

        Scheduled destruction can be cancelled with the [SecretService.CancelVersionDestruction] method.
        """

    @abc.abstractmethod
    def CancelVersionDestruction(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.CancelVersionDestructionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Cancels previously scheduled version destruction, if the version hasn't been destroyed yet."""

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretOperationsResponse, collections.abc.Awaitable[yandex.cloud.lockbox.v1.secret_service_pb2.ListSecretOperationsResponse]]:
        """Lists operations for the specified secret."""

    @abc.abstractmethod
    def ListAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.ListAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.access.access_pb2.ListAccessBindingsResponse, collections.abc.Awaitable[yandex.cloud.access.access_pb2.ListAccessBindingsResponse]]:
        """Lists existing access bindings for the specified secret."""

    @abc.abstractmethod
    def SetAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.SetAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Sets access bindings for the secret."""

    @abc.abstractmethod
    def UpdateAccessBindings(
        self,
        request: yandex.cloud.access.access_pb2.UpdateAccessBindingsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates access bindings for the secret."""

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