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

from spounge.auth.v2 import auth_service_pb2 as auth_dot_v2_dot_auth__service__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Login = channel.unary_unary(
                '/auth.v2.AuthService/Login',
                request_serializer=auth_dot_v2_dot_auth__service__pb2.LoginRequest.SerializeToString,
                response_deserializer=auth_dot_v2_dot_auth__service__pb2.LoginResponse.FromString,
                _registered_method=True)
        self.RefreshToken = channel.unary_unary(
                '/auth.v2.AuthService/RefreshToken',
                request_serializer=auth_dot_v2_dot_auth__service__pb2.RefreshTokenRequest.SerializeToString,
                response_deserializer=auth_dot_v2_dot_auth__service__pb2.RefreshTokenResponse.FromString,
                _registered_method=True)
        self.Logout = channel.unary_unary(
                '/auth.v2.AuthService/Logout',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=auth_dot_v2_dot_auth__service__pb2.LogoutResponse.FromString,
                _registered_method=True)


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

    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 RefreshToken(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):
        """Logout invalidates the user's session based on the provided auth token.
        """
        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 = {
            'Login': grpc.unary_unary_rpc_method_handler(
                    servicer.Login,
                    request_deserializer=auth_dot_v2_dot_auth__service__pb2.LoginRequest.FromString,
                    response_serializer=auth_dot_v2_dot_auth__service__pb2.LoginResponse.SerializeToString,
            ),
            'RefreshToken': grpc.unary_unary_rpc_method_handler(
                    servicer.RefreshToken,
                    request_deserializer=auth_dot_v2_dot_auth__service__pb2.RefreshTokenRequest.FromString,
                    response_serializer=auth_dot_v2_dot_auth__service__pb2.RefreshTokenResponse.SerializeToString,
            ),
            'Logout': grpc.unary_unary_rpc_method_handler(
                    servicer.Logout,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=auth_dot_v2_dot_auth__service__pb2.LogoutResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'auth.v2.AuthService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('auth.v2.AuthService', rpc_method_handlers)


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

    @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.v2.AuthService/Login',
            auth_dot_v2_dot_auth__service__pb2.LoginRequest.SerializeToString,
            auth_dot_v2_dot_auth__service__pb2.LoginResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RefreshToken(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.v2.AuthService/RefreshToken',
            auth_dot_v2_dot_auth__service__pb2.RefreshTokenRequest.SerializeToString,
            auth_dot_v2_dot_auth__service__pb2.RefreshTokenResponse.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.v2.AuthService/Logout',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            auth_dot_v2_dot_auth__service__pb2.LogoutResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
