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

from fedn.network.grpc import fedn_pb2 as network_dot_grpc_dot_fedn__pb2

GRPC_GENERATED_VERSION = '1.66.2'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in network/grpc/fedn_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Upload = channel.stream_unary(
                '/fedn.ModelService/Upload',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ModelRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ModelResponse.FromString,
                _registered_method=True)
        self.Download = channel.unary_stream(
                '/fedn.ModelService/Download',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ModelRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ModelResponse.FromString,
                _registered_method=True)


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

    def Upload(self, request_iterator, 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 Download(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_ModelServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Upload': grpc.stream_unary_rpc_method_handler(
                    servicer.Upload,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ModelRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ModelResponse.SerializeToString,
            ),
            'Download': grpc.unary_stream_rpc_method_handler(
                    servicer.Download,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ModelRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ModelResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fedn.ModelService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('fedn.ModelService', rpc_method_handlers)


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

    @staticmethod
    def Upload(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,
            '/fedn.ModelService/Upload',
            network_dot_grpc_dot_fedn__pb2.ModelRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ModelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Download(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,
            '/fedn.ModelService/Download',
            network_dot_grpc_dot_fedn__pb2.ModelRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ModelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Start = channel.unary_unary(
                '/fedn.Control/Start',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
                _registered_method=True)
        self.Stop = channel.unary_unary(
                '/fedn.Control/Stop',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
                _registered_method=True)
        self.FlushAggregationQueue = channel.unary_unary(
                '/fedn.Control/FlushAggregationQueue',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
                _registered_method=True)
        self.SetAggregator = channel.unary_unary(
                '/fedn.Control/SetAggregator',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
                _registered_method=True)
        self.SetServerFunctions = channel.unary_unary(
                '/fedn.Control/SetServerFunctions',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
                _registered_method=True)


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

    def Start(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 Stop(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 FlushAggregationQueue(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 SetAggregator(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 SetServerFunctions(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_ControlServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Start': grpc.unary_unary_rpc_method_handler(
                    servicer.Start,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.SerializeToString,
            ),
            'Stop': grpc.unary_unary_rpc_method_handler(
                    servicer.Stop,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.SerializeToString,
            ),
            'FlushAggregationQueue': grpc.unary_unary_rpc_method_handler(
                    servicer.FlushAggregationQueue,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.SerializeToString,
            ),
            'SetAggregator': grpc.unary_unary_rpc_method_handler(
                    servicer.SetAggregator,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.SerializeToString,
            ),
            'SetServerFunctions': grpc.unary_unary_rpc_method_handler(
                    servicer.SetServerFunctions,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ControlRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ControlResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fedn.Control', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('fedn.Control', rpc_method_handlers)


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

    @staticmethod
    def Start(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,
            '/fedn.Control/Start',
            network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Stop(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,
            '/fedn.Control/Stop',
            network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def FlushAggregationQueue(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,
            '/fedn.Control/FlushAggregationQueue',
            network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetAggregator(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,
            '/fedn.Control/SetAggregator',
            network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetServerFunctions(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,
            '/fedn.Control/SetServerFunctions',
            network_dot_grpc_dot_fedn__pb2.ControlRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ControlResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetGlobalModel = channel.unary_unary(
                '/fedn.Reducer/GetGlobalModel',
                request_serializer=network_dot_grpc_dot_fedn__pb2.GetGlobalModelRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.GetGlobalModelResponse.FromString,
                _registered_method=True)


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

    def GetGlobalModel(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_ReducerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetGlobalModel': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGlobalModel,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.GetGlobalModelRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.GetGlobalModelResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fedn.Reducer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('fedn.Reducer', rpc_method_handlers)


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

    @staticmethod
    def GetGlobalModel(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,
            '/fedn.Reducer/GetGlobalModel',
            network_dot_grpc_dot_fedn__pb2.GetGlobalModelRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.GetGlobalModelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.AllianceStatusStream = channel.unary_stream(
                '/fedn.Connector/AllianceStatusStream',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ClientAvailableMessage.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.Status.FromString,
                _registered_method=True)
        self.SendStatus = channel.unary_unary(
                '/fedn.Connector/SendStatus',
                request_serializer=network_dot_grpc_dot_fedn__pb2.Status.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.Response.FromString,
                _registered_method=True)
        self.ListActiveClients = channel.unary_unary(
                '/fedn.Connector/ListActiveClients',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ListClientsRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ClientList.FromString,
                _registered_method=True)
        self.AcceptingClients = channel.unary_unary(
                '/fedn.Connector/AcceptingClients',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ConnectionRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ConnectionResponse.FromString,
                _registered_method=True)
        self.SendHeartbeat = channel.unary_unary(
                '/fedn.Connector/SendHeartbeat',
                request_serializer=network_dot_grpc_dot_fedn__pb2.Heartbeat.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.Response.FromString,
                _registered_method=True)
        self.ReassignClient = channel.unary_unary(
                '/fedn.Connector/ReassignClient',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ReassignRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.Response.FromString,
                _registered_method=True)
        self.ReconnectClient = channel.unary_unary(
                '/fedn.Connector/ReconnectClient',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ReconnectRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.Response.FromString,
                _registered_method=True)


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

    def AllianceStatusStream(self, request, context):
        """Stream endpoint for status updates
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendStatus(self, request, context):
        """Report endpoint
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListActiveClients(self, request, context):
        """rpc RegisterClient (ClientAvailableMessage) returns (Response);
        List active clients endpoint
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AcceptingClients(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 SendHeartbeat(self, request, context):
        """Client messaging to stay engaged.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReassignClient(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 ReconnectClient(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_ConnectorServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AllianceStatusStream': grpc.unary_stream_rpc_method_handler(
                    servicer.AllianceStatusStream,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ClientAvailableMessage.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.Status.SerializeToString,
            ),
            'SendStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.SendStatus,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.Status.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.Response.SerializeToString,
            ),
            'ListActiveClients': grpc.unary_unary_rpc_method_handler(
                    servicer.ListActiveClients,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ListClientsRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ClientList.SerializeToString,
            ),
            'AcceptingClients': grpc.unary_unary_rpc_method_handler(
                    servicer.AcceptingClients,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ConnectionRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ConnectionResponse.SerializeToString,
            ),
            'SendHeartbeat': grpc.unary_unary_rpc_method_handler(
                    servicer.SendHeartbeat,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.Heartbeat.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.Response.SerializeToString,
            ),
            'ReassignClient': grpc.unary_unary_rpc_method_handler(
                    servicer.ReassignClient,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ReassignRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.Response.SerializeToString,
            ),
            'ReconnectClient': grpc.unary_unary_rpc_method_handler(
                    servicer.ReconnectClient,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ReconnectRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.Response.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fedn.Connector', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('fedn.Connector', rpc_method_handlers)


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

    @staticmethod
    def AllianceStatusStream(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,
            '/fedn.Connector/AllianceStatusStream',
            network_dot_grpc_dot_fedn__pb2.ClientAvailableMessage.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.Status.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendStatus(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,
            '/fedn.Connector/SendStatus',
            network_dot_grpc_dot_fedn__pb2.Status.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListActiveClients(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,
            '/fedn.Connector/ListActiveClients',
            network_dot_grpc_dot_fedn__pb2.ListClientsRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ClientList.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AcceptingClients(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,
            '/fedn.Connector/AcceptingClients',
            network_dot_grpc_dot_fedn__pb2.ConnectionRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ConnectionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendHeartbeat(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,
            '/fedn.Connector/SendHeartbeat',
            network_dot_grpc_dot_fedn__pb2.Heartbeat.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ReassignClient(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,
            '/fedn.Connector/ReassignClient',
            network_dot_grpc_dot_fedn__pb2.ReassignRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ReconnectClient(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,
            '/fedn.Connector/ReconnectClient',
            network_dot_grpc_dot_fedn__pb2.ReconnectRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.TaskStream = channel.unary_stream(
                '/fedn.Combiner/TaskStream',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ClientAvailableMessage.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.TaskRequest.FromString,
                _registered_method=True)
        self.SendModelUpdate = channel.unary_unary(
                '/fedn.Combiner/SendModelUpdate',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ModelUpdate.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.Response.FromString,
                _registered_method=True)
        self.SendModelValidation = channel.unary_unary(
                '/fedn.Combiner/SendModelValidation',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ModelValidation.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.Response.FromString,
                _registered_method=True)
        self.SendModelPrediction = channel.unary_unary(
                '/fedn.Combiner/SendModelPrediction',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ModelPrediction.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.Response.FromString,
                _registered_method=True)


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

    def TaskStream(self, request, context):
        """Stream endpoints for training/validation pub/sub
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendModelUpdate(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 SendModelValidation(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 SendModelPrediction(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_CombinerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'TaskStream': grpc.unary_stream_rpc_method_handler(
                    servicer.TaskStream,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ClientAvailableMessage.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.TaskRequest.SerializeToString,
            ),
            'SendModelUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.SendModelUpdate,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ModelUpdate.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.Response.SerializeToString,
            ),
            'SendModelValidation': grpc.unary_unary_rpc_method_handler(
                    servicer.SendModelValidation,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ModelValidation.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.Response.SerializeToString,
            ),
            'SendModelPrediction': grpc.unary_unary_rpc_method_handler(
                    servicer.SendModelPrediction,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ModelPrediction.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.Response.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fedn.Combiner', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('fedn.Combiner', rpc_method_handlers)


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

    @staticmethod
    def TaskStream(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,
            '/fedn.Combiner/TaskStream',
            network_dot_grpc_dot_fedn__pb2.ClientAvailableMessage.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.TaskRequest.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendModelUpdate(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,
            '/fedn.Combiner/SendModelUpdate',
            network_dot_grpc_dot_fedn__pb2.ModelUpdate.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendModelValidation(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,
            '/fedn.Combiner/SendModelValidation',
            network_dot_grpc_dot_fedn__pb2.ModelValidation.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendModelPrediction(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,
            '/fedn.Combiner/SendModelPrediction',
            network_dot_grpc_dot_fedn__pb2.ModelPrediction.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.HandleProvidedFunctions = channel.unary_unary(
                '/fedn.FunctionService/HandleProvidedFunctions',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ProvidedFunctionsRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ProvidedFunctionsResponse.FromString,
                _registered_method=True)
        self.HandleClientConfig = channel.stream_unary(
                '/fedn.FunctionService/HandleClientConfig',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ClientConfigRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ClientConfigResponse.FromString,
                _registered_method=True)
        self.HandleClientSelection = channel.unary_unary(
                '/fedn.FunctionService/HandleClientSelection',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ClientSelectionRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ClientSelectionResponse.FromString,
                _registered_method=True)
        self.HandleMetadata = channel.unary_unary(
                '/fedn.FunctionService/HandleMetadata',
                request_serializer=network_dot_grpc_dot_fedn__pb2.ClientMetaRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.ClientMetaResponse.FromString,
                _registered_method=True)
        self.HandleStoreModel = channel.stream_unary(
                '/fedn.FunctionService/HandleStoreModel',
                request_serializer=network_dot_grpc_dot_fedn__pb2.StoreModelRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.StoreModelResponse.FromString,
                _registered_method=True)
        self.HandleAggregation = channel.unary_stream(
                '/fedn.FunctionService/HandleAggregation',
                request_serializer=network_dot_grpc_dot_fedn__pb2.AggregationRequest.SerializeToString,
                response_deserializer=network_dot_grpc_dot_fedn__pb2.AggregationResponse.FromString,
                _registered_method=True)


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

    def HandleProvidedFunctions(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 HandleClientConfig(self, request_iterator, 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 HandleClientSelection(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 HandleMetadata(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 HandleStoreModel(self, request_iterator, 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 HandleAggregation(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_FunctionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'HandleProvidedFunctions': grpc.unary_unary_rpc_method_handler(
                    servicer.HandleProvidedFunctions,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ProvidedFunctionsRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ProvidedFunctionsResponse.SerializeToString,
            ),
            'HandleClientConfig': grpc.stream_unary_rpc_method_handler(
                    servicer.HandleClientConfig,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ClientConfigRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ClientConfigResponse.SerializeToString,
            ),
            'HandleClientSelection': grpc.unary_unary_rpc_method_handler(
                    servicer.HandleClientSelection,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ClientSelectionRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ClientSelectionResponse.SerializeToString,
            ),
            'HandleMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.HandleMetadata,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.ClientMetaRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.ClientMetaResponse.SerializeToString,
            ),
            'HandleStoreModel': grpc.stream_unary_rpc_method_handler(
                    servicer.HandleStoreModel,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.StoreModelRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.StoreModelResponse.SerializeToString,
            ),
            'HandleAggregation': grpc.unary_stream_rpc_method_handler(
                    servicer.HandleAggregation,
                    request_deserializer=network_dot_grpc_dot_fedn__pb2.AggregationRequest.FromString,
                    response_serializer=network_dot_grpc_dot_fedn__pb2.AggregationResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fedn.FunctionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('fedn.FunctionService', rpc_method_handlers)


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

    @staticmethod
    def HandleProvidedFunctions(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,
            '/fedn.FunctionService/HandleProvidedFunctions',
            network_dot_grpc_dot_fedn__pb2.ProvidedFunctionsRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ProvidedFunctionsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HandleClientConfig(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,
            '/fedn.FunctionService/HandleClientConfig',
            network_dot_grpc_dot_fedn__pb2.ClientConfigRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ClientConfigResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HandleClientSelection(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,
            '/fedn.FunctionService/HandleClientSelection',
            network_dot_grpc_dot_fedn__pb2.ClientSelectionRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ClientSelectionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HandleMetadata(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,
            '/fedn.FunctionService/HandleMetadata',
            network_dot_grpc_dot_fedn__pb2.ClientMetaRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.ClientMetaResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HandleStoreModel(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,
            '/fedn.FunctionService/HandleStoreModel',
            network_dot_grpc_dot_fedn__pb2.StoreModelRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.StoreModelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HandleAggregation(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,
            '/fedn.FunctionService/HandleAggregation',
            network_dot_grpc_dot_fedn__pb2.AggregationRequest.SerializeToString,
            network_dot_grpc_dot_fedn__pb2.AggregationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
