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

import model_pb2 as model__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.startTraining = channel.unary_unary(
                '/FlairModel/startTraining',
                request_serializer=model__pb2.TrainingConfig.SerializeToString,
                response_deserializer=model__pb2.TrainingStatus.FromString,
                )
        self.extract_entities_from_text = channel.unary_unary(
                '/FlairModel/extract_entities_from_text',
                request_serializer=model__pb2.Text.SerializeToString,
                response_deserializer=model__pb2.Text.FromString,
                )


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

    def startTraining(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 extract_entities_from_text(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_FlairModelServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'startTraining': grpc.unary_unary_rpc_method_handler(
                    servicer.startTraining,
                    request_deserializer=model__pb2.TrainingConfig.FromString,
                    response_serializer=model__pb2.TrainingStatus.SerializeToString,
            ),
            'extract_entities_from_text': grpc.unary_unary_rpc_method_handler(
                    servicer.extract_entities_from_text,
                    request_deserializer=model__pb2.Text.FromString,
                    response_serializer=model__pb2.Text.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'FlairModel', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def startTraining(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, '/FlairModel/startTraining',
            model__pb2.TrainingConfig.SerializeToString,
            model__pb2.TrainingStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def extract_entities_from_text(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, '/FlairModel/extract_entities_from_text',
            model__pb2.Text.SerializeToString,
            model__pb2.Text.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
