# 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 gRPC_impl.mytransformers import HuggingFaceTokenizer_pb2 as mytransformers_dot_HuggingFaceTokenizer__pb2

GRPC_GENERATED_VERSION = '1.71.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},'
        + f' but the generated code in mytransformers/HuggingFaceTokenizer_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 HuggingFaceTokenizerServiceStub(object):
    """/////////////////////////////////////////////////////////////////////////////////
    Service definition
    /////////////////////////////////////////////////////////////////////////////////
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.getAutoTokenizer = channel.unary_unary(
                '/mytransformers.HuggingFaceTokenizerService/getAutoTokenizer',
                request_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
                response_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
                _registered_method=True)
        self.getBertTokenizer = channel.unary_unary(
                '/mytransformers.HuggingFaceTokenizerService/getBertTokenizer',
                request_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
                response_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
                _registered_method=True)
        self.getRobertaTokenizer = channel.unary_unary(
                '/mytransformers.HuggingFaceTokenizerService/getRobertaTokenizer',
                request_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
                response_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
                _registered_method=True)
        self.getT5Tokenizer = channel.unary_unary(
                '/mytransformers.HuggingFaceTokenizerService/getT5Tokenizer',
                request_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
                response_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
                _registered_method=True)
        self.getXLNetTokenizer = channel.unary_unary(
                '/mytransformers.HuggingFaceTokenizerService/getXLNetTokenizer',
                request_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
                response_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
                _registered_method=True)
        self.encode_plus = channel.unary_unary(
                '/mytransformers.HuggingFaceTokenizerService/encode_plus',
                request_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.encodePlus_request.SerializeToString,
                response_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.encodePlus_response.FromString,
                _registered_method=True)
        self.set_pad_token = channel.unary_unary(
                '/mytransformers.HuggingFaceTokenizerService/set_pad_token',
                request_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.setPadToken_request.SerializeToString,
                response_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.setPadToken_response.FromString,
                _registered_method=True)
        self.decode = channel.unary_unary(
                '/mytransformers.HuggingFaceTokenizerService/decode',
                request_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.decode_request.SerializeToString,
                response_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.decode_response.FromString,
                _registered_method=True)


class HuggingFaceTokenizerServiceServicer(object):
    """/////////////////////////////////////////////////////////////////////////////////
    Service definition
    /////////////////////////////////////////////////////////////////////////////////
    """

    def getAutoTokenizer(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 getBertTokenizer(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 getRobertaTokenizer(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 getT5Tokenizer(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 getXLNetTokenizer(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 encode_plus(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 set_pad_token(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 decode(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_HuggingFaceTokenizerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'getAutoTokenizer': grpc.unary_unary_rpc_method_handler(
                    servicer.getAutoTokenizer,
                    request_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.FromString,
                    response_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.SerializeToString,
            ),
            'getBertTokenizer': grpc.unary_unary_rpc_method_handler(
                    servicer.getBertTokenizer,
                    request_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.FromString,
                    response_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.SerializeToString,
            ),
            'getRobertaTokenizer': grpc.unary_unary_rpc_method_handler(
                    servicer.getRobertaTokenizer,
                    request_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.FromString,
                    response_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.SerializeToString,
            ),
            'getT5Tokenizer': grpc.unary_unary_rpc_method_handler(
                    servicer.getT5Tokenizer,
                    request_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.FromString,
                    response_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.SerializeToString,
            ),
            'getXLNetTokenizer': grpc.unary_unary_rpc_method_handler(
                    servicer.getXLNetTokenizer,
                    request_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.FromString,
                    response_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.SerializeToString,
            ),
            'encode_plus': grpc.unary_unary_rpc_method_handler(
                    servicer.encode_plus,
                    request_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.encodePlus_request.FromString,
                    response_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.encodePlus_response.SerializeToString,
            ),
            'set_pad_token': grpc.unary_unary_rpc_method_handler(
                    servicer.set_pad_token,
                    request_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.setPadToken_request.FromString,
                    response_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.setPadToken_response.SerializeToString,
            ),
            'decode': grpc.unary_unary_rpc_method_handler(
                    servicer.decode,
                    request_deserializer=mytransformers_dot_HuggingFaceTokenizer__pb2.decode_request.FromString,
                    response_serializer=mytransformers_dot_HuggingFaceTokenizer__pb2.decode_response.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mytransformers.HuggingFaceTokenizerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('mytransformers.HuggingFaceTokenizerService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class HuggingFaceTokenizerService(object):
    """/////////////////////////////////////////////////////////////////////////////////
    Service definition
    /////////////////////////////////////////////////////////////////////////////////
    """

    @staticmethod
    def getAutoTokenizer(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,
            '/mytransformers.HuggingFaceTokenizerService/getAutoTokenizer',
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getBertTokenizer(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,
            '/mytransformers.HuggingFaceTokenizerService/getBertTokenizer',
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getRobertaTokenizer(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,
            '/mytransformers.HuggingFaceTokenizerService/getRobertaTokenizer',
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getT5Tokenizer(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,
            '/mytransformers.HuggingFaceTokenizerService/getT5Tokenizer',
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getXLNetTokenizer(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,
            '/mytransformers.HuggingFaceTokenizerService/getXLNetTokenizer',
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_request.SerializeToString,
            mytransformers_dot_HuggingFaceTokenizer__pb2.tokenizerFromPretrained_response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def encode_plus(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,
            '/mytransformers.HuggingFaceTokenizerService/encode_plus',
            mytransformers_dot_HuggingFaceTokenizer__pb2.encodePlus_request.SerializeToString,
            mytransformers_dot_HuggingFaceTokenizer__pb2.encodePlus_response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def set_pad_token(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,
            '/mytransformers.HuggingFaceTokenizerService/set_pad_token',
            mytransformers_dot_HuggingFaceTokenizer__pb2.setPadToken_request.SerializeToString,
            mytransformers_dot_HuggingFaceTokenizer__pb2.setPadToken_response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def decode(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,
            '/mytransformers.HuggingFaceTokenizerService/decode',
            mytransformers_dot_HuggingFaceTokenizer__pb2.decode_request.SerializeToString,
            mytransformers_dot_HuggingFaceTokenizer__pb2.decode_response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
