"""
@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 paperpilot_common.protobuf.user.auth_pb2
import paperpilot_common.protobuf.user.user_pb2
import typing

_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
    ...

class AuthPublicServiceStub:
    """认证公开接口（可匿名访问）"""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Login: grpc.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.LoginRequest,
        paperpilot_common.protobuf.user.auth_pb2.LoginResponse,
    ]
    """登录"""
    Refresh: grpc.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.RefreshTokenRequest,
        paperpilot_common.protobuf.user.auth_pb2.RefreshTokenResponse,
    ]
    """刷新token"""
    Logout: grpc.UnaryUnaryMultiCallable[
        google.protobuf.empty_pb2.Empty,
        google.protobuf.empty_pb2.Empty,
    ]
    """登出"""
    Register: grpc.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.user_pb2.CreateUserRequest,
        paperpilot_common.protobuf.user.auth_pb2.LoginResponse,
    ]
    """注册"""
    SendSmsCode: grpc.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.SendSmsCodeRequest,
        google.protobuf.empty_pb2.Empty,
    ]
    """发送短信验证码"""
    CountPhone: grpc.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.CountPhoneRequest,
        paperpilot_common.protobuf.user.auth_pb2.CountResponse,
    ]
    """获取手机号数量"""
    CountUsername: grpc.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.CountUsernameRequest,
        paperpilot_common.protobuf.user.auth_pb2.CountResponse,
    ]
    """获取用户名数量"""

class AuthPublicServiceAsyncStub:
    """认证公开接口（可匿名访问）"""

    Login: grpc.aio.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.LoginRequest,
        paperpilot_common.protobuf.user.auth_pb2.LoginResponse,
    ]
    """登录"""
    Refresh: grpc.aio.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.RefreshTokenRequest,
        paperpilot_common.protobuf.user.auth_pb2.RefreshTokenResponse,
    ]
    """刷新token"""
    Logout: grpc.aio.UnaryUnaryMultiCallable[
        google.protobuf.empty_pb2.Empty,
        google.protobuf.empty_pb2.Empty,
    ]
    """登出"""
    Register: grpc.aio.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.user_pb2.CreateUserRequest,
        paperpilot_common.protobuf.user.auth_pb2.LoginResponse,
    ]
    """注册"""
    SendSmsCode: grpc.aio.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.SendSmsCodeRequest,
        google.protobuf.empty_pb2.Empty,
    ]
    """发送短信验证码"""
    CountPhone: grpc.aio.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.CountPhoneRequest,
        paperpilot_common.protobuf.user.auth_pb2.CountResponse,
    ]
    """获取手机号数量"""
    CountUsername: grpc.aio.UnaryUnaryMultiCallable[
        paperpilot_common.protobuf.user.auth_pb2.CountUsernameRequest,
        paperpilot_common.protobuf.user.auth_pb2.CountResponse,
    ]
    """获取用户名数量"""

class AuthPublicServiceServicer(metaclass=abc.ABCMeta):
    """认证公开接口（可匿名访问）"""

    @abc.abstractmethod
    def Login(
        self,
        request: paperpilot_common.protobuf.user.auth_pb2.LoginRequest,
        context: _ServicerContext,
    ) -> typing.Union[
        paperpilot_common.protobuf.user.auth_pb2.LoginResponse,
        collections.abc.Awaitable[paperpilot_common.protobuf.user.auth_pb2.LoginResponse],
    ]:
        """登录"""
    @abc.abstractmethod
    def Refresh(
        self,
        request: paperpilot_common.protobuf.user.auth_pb2.RefreshTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[
        paperpilot_common.protobuf.user.auth_pb2.RefreshTokenResponse,
        collections.abc.Awaitable[paperpilot_common.protobuf.user.auth_pb2.RefreshTokenResponse],
    ]:
        """刷新token"""
    @abc.abstractmethod
    def Logout(
        self,
        request: google.protobuf.empty_pb2.Empty,
        context: _ServicerContext,
    ) -> typing.Union[google.protobuf.empty_pb2.Empty, collections.abc.Awaitable[google.protobuf.empty_pb2.Empty]]:
        """登出"""
    @abc.abstractmethod
    def Register(
        self,
        request: paperpilot_common.protobuf.user.user_pb2.CreateUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[
        paperpilot_common.protobuf.user.auth_pb2.LoginResponse,
        collections.abc.Awaitable[paperpilot_common.protobuf.user.auth_pb2.LoginResponse],
    ]:
        """注册"""
    @abc.abstractmethod
    def SendSmsCode(
        self,
        request: paperpilot_common.protobuf.user.auth_pb2.SendSmsCodeRequest,
        context: _ServicerContext,
    ) -> typing.Union[google.protobuf.empty_pb2.Empty, collections.abc.Awaitable[google.protobuf.empty_pb2.Empty]]:
        """发送短信验证码"""
    @abc.abstractmethod
    def CountPhone(
        self,
        request: paperpilot_common.protobuf.user.auth_pb2.CountPhoneRequest,
        context: _ServicerContext,
    ) -> typing.Union[
        paperpilot_common.protobuf.user.auth_pb2.CountResponse,
        collections.abc.Awaitable[paperpilot_common.protobuf.user.auth_pb2.CountResponse],
    ]:
        """获取手机号数量"""
    @abc.abstractmethod
    def CountUsername(
        self,
        request: paperpilot_common.protobuf.user.auth_pb2.CountUsernameRequest,
        context: _ServicerContext,
    ) -> typing.Union[
        paperpilot_common.protobuf.user.auth_pb2.CountResponse,
        collections.abc.Awaitable[paperpilot_common.protobuf.user.auth_pb2.CountResponse],
    ]:
        """获取用户名数量"""

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