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

from . import jina_pb2 as jina__pb2


class JinaRPCStub(object):
    """*
    jina gRPC service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Call = channel.stream_stream(
                '/jina.JinaRPC/Call',
                request_serializer=jina__pb2.Request.SerializeToString,
                response_deserializer=jina__pb2.Request.FromString,
                )
        self.CallUnary = channel.unary_unary(
                '/jina.JinaRPC/CallUnary',
                request_serializer=jina__pb2.Request.SerializeToString,
                response_deserializer=jina__pb2.Request.FromString,
                )
        self.Spawn = channel.unary_stream(
                '/jina.JinaRPC/Spawn',
                request_serializer=jina__pb2.SpawnRequest.SerializeToString,
                response_deserializer=jina__pb2.SpawnRequest.FromString,
                )


class JinaRPCServicer(object):
    """*
    jina gRPC service.
    """

    def Call(self, request_iterator, context):
        """Pass in a Request and a filled Request with matches will be returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CallUnary(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 Spawn(self, request, context):
        """Pass in a Request and a filled Request will be returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_JinaRPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Call': grpc.stream_stream_rpc_method_handler(
                    servicer.Call,
                    request_deserializer=jina__pb2.Request.FromString,
                    response_serializer=jina__pb2.Request.SerializeToString,
            ),
            'CallUnary': grpc.unary_unary_rpc_method_handler(
                    servicer.CallUnary,
                    request_deserializer=jina__pb2.Request.FromString,
                    response_serializer=jina__pb2.Request.SerializeToString,
            ),
            'Spawn': grpc.unary_stream_rpc_method_handler(
                    servicer.Spawn,
                    request_deserializer=jina__pb2.SpawnRequest.FromString,
                    response_serializer=jina__pb2.SpawnRequest.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'jina.JinaRPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class JinaRPC(object):
    """*
    jina gRPC service.
    """

    @staticmethod
    def Call(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/jina.JinaRPC/Call',
            jina__pb2.Request.SerializeToString,
            jina__pb2.Request.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CallUnary(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, '/jina.JinaRPC/CallUnary',
            jina__pb2.Request.SerializeToString,
            jina__pb2.Request.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Spawn(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_stream(request, target, '/jina.JinaRPC/Spawn',
            jina__pb2.SpawnRequest.SerializeToString,
            jina__pb2.SpawnRequest.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

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

from . import jina_pb2 as jina__pb2


class JinaRPCStub(object):
    """*
    jina gRPC service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Call = channel.stream_stream(
                '/jina.JinaRPC/Call',
                request_serializer=jina__pb2.Request.SerializeToString,
                response_deserializer=jina__pb2.Request.FromString,
                )
        self.CallUnary = channel.unary_unary(
                '/jina.JinaRPC/CallUnary',
                request_serializer=jina__pb2.Request.SerializeToString,
                response_deserializer=jina__pb2.Request.FromString,
                )
        self.Spawn = channel.unary_stream(
                '/jina.JinaRPC/Spawn',
                request_serializer=jina__pb2.SpawnRequest.SerializeToString,
                response_deserializer=jina__pb2.SpawnRequest.FromString,
                )


class JinaRPCServicer(object):
    """*
    jina gRPC service.
    """

    def Call(self, request_iterator, context):
        """Pass in a Request and a filled Request with matches will be returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CallUnary(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 Spawn(self, request, context):
        """Pass in a Request and a filled Request will be returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_JinaRPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Call': grpc.stream_stream_rpc_method_handler(
                    servicer.Call,
                    request_deserializer=jina__pb2.Request.FromString,
                    response_serializer=jina__pb2.Request.SerializeToString,
            ),
            'CallUnary': grpc.unary_unary_rpc_method_handler(
                    servicer.CallUnary,
                    request_deserializer=jina__pb2.Request.FromString,
                    response_serializer=jina__pb2.Request.SerializeToString,
            ),
            'Spawn': grpc.unary_stream_rpc_method_handler(
                    servicer.Spawn,
                    request_deserializer=jina__pb2.SpawnRequest.FromString,
                    response_serializer=jina__pb2.SpawnRequest.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'jina.JinaRPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class JinaRPC(object):
    """*
    jina gRPC service.
    """

    @staticmethod
    def Call(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/jina.JinaRPC/Call',
            jina__pb2.Request.SerializeToString,
            jina__pb2.Request.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CallUnary(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, '/jina.JinaRPC/CallUnary',
            jina__pb2.Request.SerializeToString,
            jina__pb2.Request.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Spawn(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_stream(request, target, '/jina.JinaRPC/Spawn',
            jina__pb2.SpawnRequest.SerializeToString,
            jina__pb2.SpawnRequest.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! Client and server classes corresponding to protobuf-defined services. *     jina gRPC service. Constructor.          Args:             channel: A grpc.Channel. *     jina gRPC service. Pass in a Request and a filled Request with matches will be returned. Missing associated documentation comment in .proto file. Pass in a Request and a filled Request will be returned. # This class is part of an EXPERIMENTAL API. *     jina gRPC service.