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

from . import node_tracker_pb2 as node__tracker__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.register_storage_server = channel.unary_unary(
                '/di_store.node_tracker.NodeTracker/register_storage_server',
                request_serializer=node__tracker__pb2.StorageServer.SerializeToString,
                response_deserializer=node__tracker__pb2.RegisterStorageServerResponse.FromString,
                )
        self.unregister_storage_server = channel.unary_unary(
                '/di_store.node_tracker.NodeTracker/unregister_storage_server',
                request_serializer=node__tracker__pb2.StorageServer.SerializeToString,
                response_deserializer=node__tracker__pb2.UnregisterStorageServerResponse.FromString,
                )
        self.register_storage_client = channel.unary_unary(
                '/di_store.node_tracker.NodeTracker/register_storage_client',
                request_serializer=node__tracker__pb2.StorageClient.SerializeToString,
                response_deserializer=node__tracker__pb2.RegisterStorageClientResponse.FromString,
                )
        self.register_object = channel.unary_unary(
                '/di_store.node_tracker.NodeTracker/register_object',
                request_serializer=node__tracker__pb2.RegisterObjectRequest.SerializeToString,
                response_deserializer=node__tracker__pb2.RegisterObjectResponse.FromString,
                )
        self.server_info = channel.unary_unary(
                '/di_store.node_tracker.NodeTracker/server_info',
                request_serializer=node__tracker__pb2.ServerInfoRequest.SerializeToString,
                response_deserializer=node__tracker__pb2.ServerInfoResponse.FromString,
                )
        self.object_info = channel.unary_unary(
                '/di_store.node_tracker.NodeTracker/object_info',
                request_serializer=node__tracker__pb2.ObjectInfoRequest.SerializeToString,
                response_deserializer=node__tracker__pb2.ObjectInfoResponse.FromString,
                )
        self.object_delete = channel.unary_unary(
                '/di_store.node_tracker.NodeTracker/object_delete',
                request_serializer=node__tracker__pb2.ObjectDeleteRequest.SerializeToString,
                response_deserializer=node__tracker__pb2.ObjectDeleteResponse.FromString,
                )


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

    def register_storage_server(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 unregister_storage_server(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 register_storage_client(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 register_object(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 server_info(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 object_info(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 object_delete(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_NodeTrackerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'register_storage_server': grpc.unary_unary_rpc_method_handler(
                    servicer.register_storage_server,
                    request_deserializer=node__tracker__pb2.StorageServer.FromString,
                    response_serializer=node__tracker__pb2.RegisterStorageServerResponse.SerializeToString,
            ),
            'unregister_storage_server': grpc.unary_unary_rpc_method_handler(
                    servicer.unregister_storage_server,
                    request_deserializer=node__tracker__pb2.StorageServer.FromString,
                    response_serializer=node__tracker__pb2.UnregisterStorageServerResponse.SerializeToString,
            ),
            'register_storage_client': grpc.unary_unary_rpc_method_handler(
                    servicer.register_storage_client,
                    request_deserializer=node__tracker__pb2.StorageClient.FromString,
                    response_serializer=node__tracker__pb2.RegisterStorageClientResponse.SerializeToString,
            ),
            'register_object': grpc.unary_unary_rpc_method_handler(
                    servicer.register_object,
                    request_deserializer=node__tracker__pb2.RegisterObjectRequest.FromString,
                    response_serializer=node__tracker__pb2.RegisterObjectResponse.SerializeToString,
            ),
            'server_info': grpc.unary_unary_rpc_method_handler(
                    servicer.server_info,
                    request_deserializer=node__tracker__pb2.ServerInfoRequest.FromString,
                    response_serializer=node__tracker__pb2.ServerInfoResponse.SerializeToString,
            ),
            'object_info': grpc.unary_unary_rpc_method_handler(
                    servicer.object_info,
                    request_deserializer=node__tracker__pb2.ObjectInfoRequest.FromString,
                    response_serializer=node__tracker__pb2.ObjectInfoResponse.SerializeToString,
            ),
            'object_delete': grpc.unary_unary_rpc_method_handler(
                    servicer.object_delete,
                    request_deserializer=node__tracker__pb2.ObjectDeleteRequest.FromString,
                    response_serializer=node__tracker__pb2.ObjectDeleteResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'di_store.node_tracker.NodeTracker', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def register_storage_server(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, '/di_store.node_tracker.NodeTracker/register_storage_server',
            node__tracker__pb2.StorageServer.SerializeToString,
            node__tracker__pb2.RegisterStorageServerResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def unregister_storage_server(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, '/di_store.node_tracker.NodeTracker/unregister_storage_server',
            node__tracker__pb2.StorageServer.SerializeToString,
            node__tracker__pb2.UnregisterStorageServerResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def register_storage_client(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, '/di_store.node_tracker.NodeTracker/register_storage_client',
            node__tracker__pb2.StorageClient.SerializeToString,
            node__tracker__pb2.RegisterStorageClientResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def register_object(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, '/di_store.node_tracker.NodeTracker/register_object',
            node__tracker__pb2.RegisterObjectRequest.SerializeToString,
            node__tracker__pb2.RegisterObjectResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def server_info(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, '/di_store.node_tracker.NodeTracker/server_info',
            node__tracker__pb2.ServerInfoRequest.SerializeToString,
            node__tracker__pb2.ServerInfoResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def object_info(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, '/di_store.node_tracker.NodeTracker/object_info',
            node__tracker__pb2.ObjectInfoRequest.SerializeToString,
            node__tracker__pb2.ObjectInfoResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def object_delete(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, '/di_store.node_tracker.NodeTracker/object_delete',
            node__tracker__pb2.ObjectDeleteRequest.SerializeToString,
            node__tracker__pb2.ObjectDeleteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
