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

import ultipa.proto.ultipa_pb2 as ultipa__pb2

class UltipaRpcsStub(object):
    """The ultipa service definition.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SayHello = channel.unary_unary(
                '/ultipa.UltipaRpcs/SayHello',
                request_serializer=ultipa__pb2.HelloUltipaRequest.SerializeToString,
                response_deserializer=ultipa__pb2.HelloUltipaReply.FromString,
                )
        self.Uql = channel.unary_stream(
                '/ultipa.UltipaRpcs/Uql',
                request_serializer=ultipa__pb2.UqlRequest.SerializeToString,
                response_deserializer=ultipa__pb2.UqlReply.FromString,
                )
        self.InsertNodes = channel.unary_unary(
                '/ultipa.UltipaRpcs/InsertNodes',
                request_serializer=ultipa__pb2.InsertNodesRequest.SerializeToString,
                response_deserializer=ultipa__pb2.InsertNodesReply.FromString,
                )
        self.InsertEdges = channel.unary_unary(
                '/ultipa.UltipaRpcs/InsertEdges',
                request_serializer=ultipa__pb2.InsertEdgesRequest.SerializeToString,
                response_deserializer=ultipa__pb2.InsertEdgesReply.FromString,
                )


class UltipaRpcsServicer(object):
    """The ultipa service definition.
    """

    def SayHello(self, request, context):
        """1. Send a greeting
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Uql(self, request, context):
        """2. uql
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InsertNodes(self, request, context):
        """3. Insert nodes
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InsertEdges(self, request, context):
        """4. Insert edges
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UltipaRpcsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SayHello': grpc.unary_unary_rpc_method_handler(
                    servicer.SayHello,
                    request_deserializer=ultipa__pb2.HelloUltipaRequest.FromString,
                    response_serializer=ultipa__pb2.HelloUltipaReply.SerializeToString,
            ),
            'Uql': grpc.unary_stream_rpc_method_handler(
                    servicer.Uql,
                    request_deserializer=ultipa__pb2.UqlRequest.FromString,
                    response_serializer=ultipa__pb2.UqlReply.SerializeToString,
            ),
            'InsertNodes': grpc.unary_unary_rpc_method_handler(
                    servicer.InsertNodes,
                    request_deserializer=ultipa__pb2.InsertNodesRequest.FromString,
                    response_serializer=ultipa__pb2.InsertNodesReply.SerializeToString,
            ),
            'InsertEdges': grpc.unary_unary_rpc_method_handler(
                    servicer.InsertEdges,
                    request_deserializer=ultipa__pb2.InsertEdgesRequest.FromString,
                    response_serializer=ultipa__pb2.InsertEdgesReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ultipa.UltipaRpcs', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class UltipaRpcs(object):
    """The ultipa service definition.
    """

    @staticmethod
    def SayHello(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, '/ultipa.UltipaRpcs/SayHello',
            ultipa__pb2.HelloUltipaRequest.SerializeToString,
            ultipa__pb2.HelloUltipaReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Uql(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, '/ultipa.UltipaRpcs/Uql',
            ultipa__pb2.UqlRequest.SerializeToString,
            ultipa__pb2.UqlReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InsertNodes(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, '/ultipa.UltipaRpcs/InsertNodes',
            ultipa__pb2.InsertNodesRequest.SerializeToString,
            ultipa__pb2.InsertNodesReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InsertEdges(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, '/ultipa.UltipaRpcs/InsertEdges',
            ultipa__pb2.InsertEdgesRequest.SerializeToString,
            ultipa__pb2.InsertEdgesReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SayHello = channel.unary_unary(
                '/ultipa.UltipaControls/SayHello',
                request_serializer=ultipa__pb2.HelloUltipaRequest.SerializeToString,
                response_deserializer=ultipa__pb2.HelloUltipaReply.FromString,
                )
        self.UserSetting = channel.unary_unary(
                '/ultipa.UltipaControls/UserSetting',
                request_serializer=ultipa__pb2.UserSettingRequest.SerializeToString,
                response_deserializer=ultipa__pb2.UserSettingReply.FromString,
                )
        self.GetLeader = channel.unary_unary(
                '/ultipa.UltipaControls/GetLeader',
                request_serializer=ultipa__pb2.GetLeaderRequest.SerializeToString,
                response_deserializer=ultipa__pb2.GetLeaderReply.FromString,
                )
        self.UqlEx = channel.unary_stream(
                '/ultipa.UltipaControls/UqlEx',
                request_serializer=ultipa__pb2.UqlRequest.SerializeToString,
                response_deserializer=ultipa__pb2.UqlReply.FromString,
                )
        self.Export = channel.unary_stream(
                '/ultipa.UltipaControls/Export',
                request_serializer=ultipa__pb2.ExportRequest.SerializeToString,
                response_deserializer=ultipa__pb2.ExportReply.FromString,
                )
        self.DownloadFileV2 = channel.unary_stream(
                '/ultipa.UltipaControls/DownloadFileV2',
                request_serializer=ultipa__pb2.DownloadFileRequestV2.SerializeToString,
                response_deserializer=ultipa__pb2.DownloadFileReply.FromString,
                )
        self.InstallAlgo = channel.stream_unary(
                '/ultipa.UltipaControls/InstallAlgo',
                request_serializer=ultipa__pb2.InstallAlgoRequest.SerializeToString,
                response_deserializer=ultipa__pb2.InstallAlgoReply.FromString,
                )
        self.UninstallAlgo = channel.unary_unary(
                '/ultipa.UltipaControls/UninstallAlgo',
                request_serializer=ultipa__pb2.UninstallAlgoRequest.SerializeToString,
                response_deserializer=ultipa__pb2.UninstallAlgoReply.FromString,
                )
        self.Uploader = channel.stream_unary(
                '/ultipa.UltipaControls/Uploader',
                request_serializer=ultipa__pb2.UploaderRequest.SerializeToString,
                response_deserializer=ultipa__pb2.UploaderReply.FromString,
                )
        self.CreateGraphByUploader = channel.unary_unary(
                '/ultipa.UltipaControls/CreateGraphByUploader',
                request_serializer=ultipa__pb2.CreateGraphByUploaderRequest.SerializeToString,
                response_deserializer=ultipa__pb2.CreateGraphByUploaderReply.FromString,
                )
        self.InstallExta = channel.stream_unary(
                '/ultipa.UltipaControls/InstallExta',
                request_serializer=ultipa__pb2.InstallExtaRequest.SerializeToString,
                response_deserializer=ultipa__pb2.InstallExtaReply.FromString,
                )
        self.UninstallExta = channel.unary_unary(
                '/ultipa.UltipaControls/UninstallExta',
                request_serializer=ultipa__pb2.UninstallExtaRequest.SerializeToString,
                response_deserializer=ultipa__pb2.UninstallExtaReply.FromString,
                )
        self.Authenticate = channel.unary_unary(
                '/ultipa.UltipaControls/Authenticate',
                request_serializer=ultipa__pb2.AuthenticateRequest.SerializeToString,
                response_deserializer=ultipa__pb2.AuthenticateReply.FromString,
                )


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

    def SayHello(self, request, context):
        """1. Send a greeting
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UserSetting(self, request, context):
        """2. User settings that stores user configuration, controlled by user
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLeader(self, request, context):
        """3. Get the raft leader
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UqlEx(self, request, context):
        """4. Uql extension, the interface used for the execution of top(), kill(), show().* and stats()
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Export(self, request, context):
        """5. Export nodes and edges
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DownloadFileV2(self, request, context):
        """6. Download a file generated by the writeback operation of an algorithm
        The 2nd version, needs to input arguments 'algo name' and 'task ID'
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InstallAlgo(self, request_iterator, context):
        """7. Install an Ultipa standard algorithm
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UninstallAlgo(self, request, context):
        """8. Uninstall an Ultipa standard algorithm
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Uploader(self, request_iterator, context):
        """9. Remote graph loader
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateGraphByUploader(self, request, context):
        """10. Create graph by uploader
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InstallExta(self, request_iterator, context):
        """11. Install an EXTA algorithm
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UninstallExta(self, request, context):
        """12. Uninstall an EXTA algorithm
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Authenticate(self, request, context):
        """13. Authenticate a user
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UltipaControlsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SayHello': grpc.unary_unary_rpc_method_handler(
                    servicer.SayHello,
                    request_deserializer=ultipa__pb2.HelloUltipaRequest.FromString,
                    response_serializer=ultipa__pb2.HelloUltipaReply.SerializeToString,
            ),
            'UserSetting': grpc.unary_unary_rpc_method_handler(
                    servicer.UserSetting,
                    request_deserializer=ultipa__pb2.UserSettingRequest.FromString,
                    response_serializer=ultipa__pb2.UserSettingReply.SerializeToString,
            ),
            'GetLeader': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLeader,
                    request_deserializer=ultipa__pb2.GetLeaderRequest.FromString,
                    response_serializer=ultipa__pb2.GetLeaderReply.SerializeToString,
            ),
            'UqlEx': grpc.unary_stream_rpc_method_handler(
                    servicer.UqlEx,
                    request_deserializer=ultipa__pb2.UqlRequest.FromString,
                    response_serializer=ultipa__pb2.UqlReply.SerializeToString,
            ),
            'Export': grpc.unary_stream_rpc_method_handler(
                    servicer.Export,
                    request_deserializer=ultipa__pb2.ExportRequest.FromString,
                    response_serializer=ultipa__pb2.ExportReply.SerializeToString,
            ),
            'DownloadFileV2': grpc.unary_stream_rpc_method_handler(
                    servicer.DownloadFileV2,
                    request_deserializer=ultipa__pb2.DownloadFileRequestV2.FromString,
                    response_serializer=ultipa__pb2.DownloadFileReply.SerializeToString,
            ),
            'InstallAlgo': grpc.stream_unary_rpc_method_handler(
                    servicer.InstallAlgo,
                    request_deserializer=ultipa__pb2.InstallAlgoRequest.FromString,
                    response_serializer=ultipa__pb2.InstallAlgoReply.SerializeToString,
            ),
            'UninstallAlgo': grpc.unary_unary_rpc_method_handler(
                    servicer.UninstallAlgo,
                    request_deserializer=ultipa__pb2.UninstallAlgoRequest.FromString,
                    response_serializer=ultipa__pb2.UninstallAlgoReply.SerializeToString,
            ),
            'Uploader': grpc.stream_unary_rpc_method_handler(
                    servicer.Uploader,
                    request_deserializer=ultipa__pb2.UploaderRequest.FromString,
                    response_serializer=ultipa__pb2.UploaderReply.SerializeToString,
            ),
            'CreateGraphByUploader': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateGraphByUploader,
                    request_deserializer=ultipa__pb2.CreateGraphByUploaderRequest.FromString,
                    response_serializer=ultipa__pb2.CreateGraphByUploaderReply.SerializeToString,
            ),
            'InstallExta': grpc.stream_unary_rpc_method_handler(
                    servicer.InstallExta,
                    request_deserializer=ultipa__pb2.InstallExtaRequest.FromString,
                    response_serializer=ultipa__pb2.InstallExtaReply.SerializeToString,
            ),
            'UninstallExta': grpc.unary_unary_rpc_method_handler(
                    servicer.UninstallExta,
                    request_deserializer=ultipa__pb2.UninstallExtaRequest.FromString,
                    response_serializer=ultipa__pb2.UninstallExtaReply.SerializeToString,
            ),
            'Authenticate': grpc.unary_unary_rpc_method_handler(
                    servicer.Authenticate,
                    request_deserializer=ultipa__pb2.AuthenticateRequest.FromString,
                    response_serializer=ultipa__pb2.AuthenticateReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ultipa.UltipaControls', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def SayHello(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, '/ultipa.UltipaControls/SayHello',
            ultipa__pb2.HelloUltipaRequest.SerializeToString,
            ultipa__pb2.HelloUltipaReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UserSetting(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, '/ultipa.UltipaControls/UserSetting',
            ultipa__pb2.UserSettingRequest.SerializeToString,
            ultipa__pb2.UserSettingReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLeader(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, '/ultipa.UltipaControls/GetLeader',
            ultipa__pb2.GetLeaderRequest.SerializeToString,
            ultipa__pb2.GetLeaderReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UqlEx(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, '/ultipa.UltipaControls/UqlEx',
            ultipa__pb2.UqlRequest.SerializeToString,
            ultipa__pb2.UqlReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Export(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, '/ultipa.UltipaControls/Export',
            ultipa__pb2.ExportRequest.SerializeToString,
            ultipa__pb2.ExportReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DownloadFileV2(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, '/ultipa.UltipaControls/DownloadFileV2',
            ultipa__pb2.DownloadFileRequestV2.SerializeToString,
            ultipa__pb2.DownloadFileReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InstallAlgo(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_unary(request_iterator, target, '/ultipa.UltipaControls/InstallAlgo',
            ultipa__pb2.InstallAlgoRequest.SerializeToString,
            ultipa__pb2.InstallAlgoReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UninstallAlgo(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, '/ultipa.UltipaControls/UninstallAlgo',
            ultipa__pb2.UninstallAlgoRequest.SerializeToString,
            ultipa__pb2.UninstallAlgoReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Uploader(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_unary(request_iterator, target, '/ultipa.UltipaControls/Uploader',
            ultipa__pb2.UploaderRequest.SerializeToString,
            ultipa__pb2.UploaderReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateGraphByUploader(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, '/ultipa.UltipaControls/CreateGraphByUploader',
            ultipa__pb2.CreateGraphByUploaderRequest.SerializeToString,
            ultipa__pb2.CreateGraphByUploaderReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InstallExta(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_unary(request_iterator, target, '/ultipa.UltipaControls/InstallExta',
            ultipa__pb2.InstallExtaRequest.SerializeToString,
            ultipa__pb2.InstallExtaReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UninstallExta(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, '/ultipa.UltipaControls/UninstallExta',
            ultipa__pb2.UninstallExtaRequest.SerializeToString,
            ultipa__pb2.UninstallExtaReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Authenticate(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, '/ultipa.UltipaControls/Authenticate',
            ultipa__pb2.AuthenticateRequest.SerializeToString,
            ultipa__pb2.AuthenticateReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
