"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import collections.abc
import google.protobuf.empty_pb2
import grpc
import grpc.aio
import typing
import yandex.cloud.operation.operation_pb2
import yandex.cloud.organizationmanager.v1.idp.user_pb2
import yandex.cloud.organizationmanager.v1.idp.user_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 UserServiceStub:
    """A set of methods for managing users in the Identity Provider system."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GetUserRequest,
        yandex.cloud.organizationmanager.v1.idp.user_pb2.User,
    ]
    """Returns the specified user.

    To get the list of available users, make a [List] request.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ListUsersRequest,
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ListUsersResponse,
    ]
    """Retrieves the list of users in the specified userpool."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.CreateUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a user in the specified userpool."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.UpdateUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified user."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.DeleteUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified user."""

    SetOwnPassword: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetOwnPasswordRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets the password for the authenticated user."""

    SetOthersPassword: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetOthersPasswordRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets the password for another user."""

    Suspend: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SuspendUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Suspends the specified user."""

    Reactivate: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ReactivateUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Reactivates a previously suspended user."""

    GeneratePassword: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GeneratePasswordRequest,
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GeneratePasswordResponse,
    ]
    """Generates a new password."""

    GetSelfPasswordMetadata: grpc.UnaryUnaryMultiCallable[
        google.protobuf.empty_pb2.Empty,
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.PasswordMetadata,
    ]
    """Returns metadata about the authenticated user's password."""

    ConvertToExternal: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ConvertToExternalUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Converts a user to use external authentication."""

    SetPasswordHash: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetPasswordHashRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets a password hash for the specified user."""

    ResolveExternalIds: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ResolveExternalIdsRequest,
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ResolveExternalIdsResponse,
    ]
    """Resolves external IDs to internal user IDs."""

class UserServiceAsyncStub:
    """A set of methods for managing users in the Identity Provider system."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GetUserRequest,
        yandex.cloud.organizationmanager.v1.idp.user_pb2.User,
    ]
    """Returns the specified user.

    To get the list of available users, make a [List] request.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ListUsersRequest,
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ListUsersResponse,
    ]
    """Retrieves the list of users in the specified userpool."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.CreateUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a user in the specified userpool."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.UpdateUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified user."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.DeleteUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified user."""

    SetOwnPassword: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetOwnPasswordRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets the password for the authenticated user."""

    SetOthersPassword: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetOthersPasswordRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets the password for another user."""

    Suspend: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SuspendUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Suspends the specified user."""

    Reactivate: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ReactivateUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Reactivates a previously suspended user."""

    GeneratePassword: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GeneratePasswordRequest,
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GeneratePasswordResponse,
    ]
    """Generates a new password."""

    GetSelfPasswordMetadata: grpc.aio.UnaryUnaryMultiCallable[
        google.protobuf.empty_pb2.Empty,
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.PasswordMetadata,
    ]
    """Returns metadata about the authenticated user's password."""

    ConvertToExternal: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ConvertToExternalUserRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Converts a user to use external authentication."""

    SetPasswordHash: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetPasswordHashRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Sets a password hash for the specified user."""

    ResolveExternalIds: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ResolveExternalIdsRequest,
        yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ResolveExternalIdsResponse,
    ]
    """Resolves external IDs to internal user IDs."""

class UserServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing users in the Identity Provider system."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GetUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.organizationmanager.v1.idp.user_pb2.User, collections.abc.Awaitable[yandex.cloud.organizationmanager.v1.idp.user_pb2.User]]:
        """Returns the specified user.

        To get the list of available users, make a [List] request.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ListUsersRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ListUsersResponse, collections.abc.Awaitable[yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ListUsersResponse]]:
        """Retrieves the list of users in the specified userpool."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.CreateUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates a user in the specified userpool."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.UpdateUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified user."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.DeleteUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes the specified user."""

    @abc.abstractmethod
    def SetOwnPassword(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetOwnPasswordRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Sets the password for the authenticated user."""

    @abc.abstractmethod
    def SetOthersPassword(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetOthersPasswordRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Sets the password for another user."""

    @abc.abstractmethod
    def Suspend(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SuspendUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Suspends the specified user."""

    @abc.abstractmethod
    def Reactivate(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ReactivateUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Reactivates a previously suspended user."""

    @abc.abstractmethod
    def GeneratePassword(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GeneratePasswordRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GeneratePasswordResponse, collections.abc.Awaitable[yandex.cloud.organizationmanager.v1.idp.user_service_pb2.GeneratePasswordResponse]]:
        """Generates a new password."""

    @abc.abstractmethod
    def GetSelfPasswordMetadata(
        self,
        request: google.protobuf.empty_pb2.Empty,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.organizationmanager.v1.idp.user_service_pb2.PasswordMetadata, collections.abc.Awaitable[yandex.cloud.organizationmanager.v1.idp.user_service_pb2.PasswordMetadata]]:
        """Returns metadata about the authenticated user's password."""

    @abc.abstractmethod
    def ConvertToExternal(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ConvertToExternalUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Converts a user to use external authentication."""

    @abc.abstractmethod
    def SetPasswordHash(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.SetPasswordHashRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Sets a password hash for the specified user."""

    @abc.abstractmethod
    def ResolveExternalIds(
        self,
        request: yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ResolveExternalIdsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ResolveExternalIdsResponse, collections.abc.Awaitable[yandex.cloud.organizationmanager.v1.idp.user_service_pb2.ResolveExternalIdsResponse]]:
        """Resolves external IDs to internal user IDs."""

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