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

import pb.central_pb2 as central__pb2


class CentralStub(object):
    """python3 -m grpc_tools.protoc --proto_path=./proto --python_out=./pb --grpc_python_out=./pb ./proto/central.proto

    Our central proto will offer 3 services
    defining two right now
    The first service : Tell the FSs which are active
    The second service : Broadcast a file creation message to all clients

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GiveFS = channel.unary_unary(
                '/central.Central/GiveFS',
                request_serializer=central__pb2.Request.SerializeToString,
                response_deserializer=central__pb2.Response2.FromString,
                )
        self.Registration = channel.unary_unary(
                '/central.Central/Registration',
                request_serializer=central__pb2.Request.SerializeToString,
                response_deserializer=central__pb2.Response2.FromString,
                )
        self.GenKey = channel.unary_unary(
                '/central.Central/GenKey',
                request_serializer=central__pb2.Request.SerializeToString,
                response_deserializer=central__pb2.Response2.FromString,
                )
        self.NewFile = channel.unary_unary(
                '/central.Central/NewFile',
                request_serializer=central__pb2.Request.SerializeToString,
                response_deserializer=central__pb2.Response2.FromString,
                )
        self.GetUpdate = channel.unary_unary(
                '/central.Central/GetUpdate',
                request_serializer=central__pb2.Request.SerializeToString,
                response_deserializer=central__pb2.Response2.FromString,
                )


class CentralServicer(object):
    """python3 -m grpc_tools.protoc --proto_path=./proto --python_out=./pb --grpc_python_out=./pb ./proto/central.proto

    Our central proto will offer 3 services
    defining two right now
    The first service : Tell the FSs which are active
    The second service : Broadcast a file creation message to all clients

    """

    def GiveFS(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 Registration(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 GenKey(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 NewFile(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 GetUpdate(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_CentralServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GiveFS': grpc.unary_unary_rpc_method_handler(
                    servicer.GiveFS,
                    request_deserializer=central__pb2.Request.FromString,
                    response_serializer=central__pb2.Response2.SerializeToString,
            ),
            'Registration': grpc.unary_unary_rpc_method_handler(
                    servicer.Registration,
                    request_deserializer=central__pb2.Request.FromString,
                    response_serializer=central__pb2.Response2.SerializeToString,
            ),
            'GenKey': grpc.unary_unary_rpc_method_handler(
                    servicer.GenKey,
                    request_deserializer=central__pb2.Request.FromString,
                    response_serializer=central__pb2.Response2.SerializeToString,
            ),
            'NewFile': grpc.unary_unary_rpc_method_handler(
                    servicer.NewFile,
                    request_deserializer=central__pb2.Request.FromString,
                    response_serializer=central__pb2.Response2.SerializeToString,
            ),
            'GetUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUpdate,
                    request_deserializer=central__pb2.Request.FromString,
                    response_serializer=central__pb2.Response2.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'central.Central', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Central(object):
    """python3 -m grpc_tools.protoc --proto_path=./proto --python_out=./pb --grpc_python_out=./pb ./proto/central.proto

    Our central proto will offer 3 services
    defining two right now
    The first service : Tell the FSs which are active
    The second service : Broadcast a file creation message to all clients

    """

    @staticmethod
    def GiveFS(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, '/central.Central/GiveFS',
            central__pb2.Request.SerializeToString,
            central__pb2.Response2.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Registration(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, '/central.Central/Registration',
            central__pb2.Request.SerializeToString,
            central__pb2.Response2.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GenKey(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, '/central.Central/GenKey',
            central__pb2.Request.SerializeToString,
            central__pb2.Response2.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def NewFile(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, '/central.Central/NewFile',
            central__pb2.Request.SerializeToString,
            central__pb2.Response2.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUpdate(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, '/central.Central/GetUpdate',
            central__pb2.Request.SerializeToString,
            central__pb2.Response2.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
