# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from placebrain_contracts import auth_pb2 as auth__pb2

GRPC_GENERATED_VERSION = '1.76.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in auth_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class AuthServiceStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.Register = channel.unary_unary(
                '/auth.AuthService/Register',
                request_serializer=auth__pb2.RegisterRequest.SerializeToString,
                response_deserializer=auth__pb2.RegisterResponse.FromString,
                _registered_method=True)
        self.Login = channel.unary_unary(
                '/auth.AuthService/Login',
                request_serializer=auth__pb2.LoginRequest.SerializeToString,
                response_deserializer=auth__pb2.LoginResponse.FromString,
                _registered_method=True)
        self.RefreshTokens = channel.unary_unary(
                '/auth.AuthService/RefreshTokens',
                request_serializer=auth__pb2.RefreshTokensRequest.SerializeToString,
                response_deserializer=auth__pb2.RefreshTokensResponse.FromString,
                _registered_method=True)
        self.Logout = channel.unary_unary(
                '/auth.AuthService/Logout',
                request_serializer=auth__pb2.LogoutRequest.SerializeToString,
                response_deserializer=auth__pb2.LogoutResponse.FromString,
                _registered_method=True)
        self.GetMe = channel.unary_unary(
                '/auth.AuthService/GetMe',
                request_serializer=auth__pb2.GetMeRequest.SerializeToString,
                response_deserializer=auth__pb2.GetMeResponse.FromString,
                _registered_method=True)
        self.GetUserByEmail = channel.unary_unary(
                '/auth.AuthService/GetUserByEmail',
                request_serializer=auth__pb2.GetUserByEmailRequest.SerializeToString,
                response_deserializer=auth__pb2.GetUserByEmailResponse.FromString,
                _registered_method=True)
        self.ValidateToken = channel.unary_unary(
                '/auth.AuthService/ValidateToken',
                request_serializer=auth__pb2.ValidateTokenRequest.SerializeToString,
                response_deserializer=auth__pb2.ValidateTokenResponse.FromString,
                _registered_method=True)
        self.SendOtp = channel.unary_unary(
                '/auth.AuthService/SendOtp',
                request_serializer=auth__pb2.SendOtpRequest.SerializeToString,
                response_deserializer=auth__pb2.SendOtpResponse.FromString,
                _registered_method=True)
        self.VerifyOtp = channel.unary_unary(
                '/auth.AuthService/VerifyOtp',
                request_serializer=auth__pb2.VerifyOtpRequest.SerializeToString,
                response_deserializer=auth__pb2.VerifyOtpResponse.FromString,
                _registered_method=True)


class AuthServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def Register(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Login(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RefreshTokens(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Logout(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMe(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUserByEmail(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ValidateToken(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendOtp(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyOtp(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AuthServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Register': grpc.unary_unary_rpc_method_handler(
                    servicer.Register,
                    request_deserializer=auth__pb2.RegisterRequest.FromString,
                    response_serializer=auth__pb2.RegisterResponse.SerializeToString,
            ),
            'Login': grpc.unary_unary_rpc_method_handler(
                    servicer.Login,
                    request_deserializer=auth__pb2.LoginRequest.FromString,
                    response_serializer=auth__pb2.LoginResponse.SerializeToString,
            ),
            'RefreshTokens': grpc.unary_unary_rpc_method_handler(
                    servicer.RefreshTokens,
                    request_deserializer=auth__pb2.RefreshTokensRequest.FromString,
                    response_serializer=auth__pb2.RefreshTokensResponse.SerializeToString,
            ),
            'Logout': grpc.unary_unary_rpc_method_handler(
                    servicer.Logout,
                    request_deserializer=auth__pb2.LogoutRequest.FromString,
                    response_serializer=auth__pb2.LogoutResponse.SerializeToString,
            ),
            'GetMe': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMe,
                    request_deserializer=auth__pb2.GetMeRequest.FromString,
                    response_serializer=auth__pb2.GetMeResponse.SerializeToString,
            ),
            'GetUserByEmail': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserByEmail,
                    request_deserializer=auth__pb2.GetUserByEmailRequest.FromString,
                    response_serializer=auth__pb2.GetUserByEmailResponse.SerializeToString,
            ),
            'ValidateToken': grpc.unary_unary_rpc_method_handler(
                    servicer.ValidateToken,
                    request_deserializer=auth__pb2.ValidateTokenRequest.FromString,
                    response_serializer=auth__pb2.ValidateTokenResponse.SerializeToString,
            ),
            'SendOtp': grpc.unary_unary_rpc_method_handler(
                    servicer.SendOtp,
                    request_deserializer=auth__pb2.SendOtpRequest.FromString,
                    response_serializer=auth__pb2.SendOtpResponse.SerializeToString,
            ),
            'VerifyOtp': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyOtp,
                    request_deserializer=auth__pb2.VerifyOtpRequest.FromString,
                    response_serializer=auth__pb2.VerifyOtpResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'auth.AuthService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('auth.AuthService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AuthService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def Register(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/Register',
            auth__pb2.RegisterRequest.SerializeToString,
            auth__pb2.RegisterResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Login(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/Login',
            auth__pb2.LoginRequest.SerializeToString,
            auth__pb2.LoginResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RefreshTokens(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/RefreshTokens',
            auth__pb2.RefreshTokensRequest.SerializeToString,
            auth__pb2.RefreshTokensResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Logout(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/Logout',
            auth__pb2.LogoutRequest.SerializeToString,
            auth__pb2.LogoutResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetMe(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/GetMe',
            auth__pb2.GetMeRequest.SerializeToString,
            auth__pb2.GetMeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUserByEmail(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/GetUserByEmail',
            auth__pb2.GetUserByEmailRequest.SerializeToString,
            auth__pb2.GetUserByEmailResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ValidateToken(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/ValidateToken',
            auth__pb2.ValidateTokenRequest.SerializeToString,
            auth__pb2.ValidateTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendOtp(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/SendOtp',
            auth__pb2.SendOtpRequest.SerializeToString,
            auth__pb2.SendOtpResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VerifyOtp(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/auth.AuthService/VerifyOtp',
            auth__pb2.VerifyOtpRequest.SerializeToString,
            auth__pb2.VerifyOtpResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
