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

from openfl.protocols import director_pb2 as openfl_dot_protocols_dot_director__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.UpdateShardInfo = channel.unary_unary(
                '/openfl.director.Director/UpdateShardInfo',
                request_serializer=openfl_dot_protocols_dot_director__pb2.UpdateShardInfoRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.UpdateShardInfoResponse.FromString,
                )
        self.WaitExperiment = channel.stream_stream(
                '/openfl.director.Director/WaitExperiment',
                request_serializer=openfl_dot_protocols_dot_director__pb2.WaitExperimentRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.WaitExperimentResponse.FromString,
                )
        self.GetExperimentData = channel.unary_stream(
                '/openfl.director.Director/GetExperimentData',
                request_serializer=openfl_dot_protocols_dot_director__pb2.GetExperimentDataRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.ExperimentData.FromString,
                )
        self.UpdateEnvoyStatus = channel.unary_unary(
                '/openfl.director.Director/UpdateEnvoyStatus',
                request_serializer=openfl_dot_protocols_dot_director__pb2.UpdateEnvoyStatusRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.UpdateEnvoyStatusResponse.FromString,
                )
        self.SetExperimentFailed = channel.unary_unary(
                '/openfl.director.Director/SetExperimentFailed',
                request_serializer=openfl_dot_protocols_dot_director__pb2.SetExperimentFailedRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.SetExperimentFailedResponse.FromString,
                )
        self.GetExperimentDescription = channel.unary_unary(
                '/openfl.director.Director/GetExperimentDescription',
                request_serializer=openfl_dot_protocols_dot_director__pb2.GetExperimentDescriptionRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.GetExperimentDescriptionResponse.FromString,
                )
        self.GetExperimentsList = channel.unary_unary(
                '/openfl.director.Director/GetExperimentsList',
                request_serializer=openfl_dot_protocols_dot_director__pb2.GetExperimentsListRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.GetExperimentsListResponse.FromString,
                )
        self.SetNewExperiment = channel.stream_unary(
                '/openfl.director.Director/SetNewExperiment',
                request_serializer=openfl_dot_protocols_dot_director__pb2.ExperimentInfo.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.SetNewExperimentResponse.FromString,
                )
        self.GetDatasetInfo = channel.unary_unary(
                '/openfl.director.Director/GetDatasetInfo',
                request_serializer=openfl_dot_protocols_dot_director__pb2.GetDatasetInfoRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.GetDatasetInfoResponse.FromString,
                )
        self.GetTrainedModel = channel.unary_unary(
                '/openfl.director.Director/GetTrainedModel',
                request_serializer=openfl_dot_protocols_dot_director__pb2.GetTrainedModelRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.TrainedModelResponse.FromString,
                )
        self.GetMetricStream = channel.unary_stream(
                '/openfl.director.Director/GetMetricStream',
                request_serializer=openfl_dot_protocols_dot_director__pb2.GetMetricStreamRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.GetMetricStreamResponse.FromString,
                )
        self.RemoveExperimentData = channel.unary_unary(
                '/openfl.director.Director/RemoveExperimentData',
                request_serializer=openfl_dot_protocols_dot_director__pb2.RemoveExperimentRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.RemoveExperimentResponse.FromString,
                )
        self.GetEnvoys = channel.unary_unary(
                '/openfl.director.Director/GetEnvoys',
                request_serializer=openfl_dot_protocols_dot_director__pb2.GetEnvoysRequest.SerializeToString,
                response_deserializer=openfl_dot_protocols_dot_director__pb2.GetEnvoysResponse.FromString,
                )


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

    def UpdateShardInfo(self, request, context):
        """1. Envoy RPCs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WaitExperiment(self, request_iterator, context):
        """Shard owner could also provide some public data for tests
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetExperimentData(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 UpdateEnvoyStatus(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 SetExperimentFailed(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 GetExperimentDescription(self, request, context):
        """2. Frontend RPCs
        2.1 Extension RPCs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetExperimentsList(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 SetNewExperiment(self, request_iterator, context):
        """2.2 API RPCs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDatasetInfo(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 GetTrainedModel(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 GetMetricStream(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 RemoveExperimentData(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 GetEnvoys(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_DirectorServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'UpdateShardInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateShardInfo,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.UpdateShardInfoRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.UpdateShardInfoResponse.SerializeToString,
            ),
            'WaitExperiment': grpc.stream_stream_rpc_method_handler(
                    servicer.WaitExperiment,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.WaitExperimentRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.WaitExperimentResponse.SerializeToString,
            ),
            'GetExperimentData': grpc.unary_stream_rpc_method_handler(
                    servicer.GetExperimentData,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.GetExperimentDataRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.ExperimentData.SerializeToString,
            ),
            'UpdateEnvoyStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateEnvoyStatus,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.UpdateEnvoyStatusRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.UpdateEnvoyStatusResponse.SerializeToString,
            ),
            'SetExperimentFailed': grpc.unary_unary_rpc_method_handler(
                    servicer.SetExperimentFailed,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.SetExperimentFailedRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.SetExperimentFailedResponse.SerializeToString,
            ),
            'GetExperimentDescription': grpc.unary_unary_rpc_method_handler(
                    servicer.GetExperimentDescription,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.GetExperimentDescriptionRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.GetExperimentDescriptionResponse.SerializeToString,
            ),
            'GetExperimentsList': grpc.unary_unary_rpc_method_handler(
                    servicer.GetExperimentsList,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.GetExperimentsListRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.GetExperimentsListResponse.SerializeToString,
            ),
            'SetNewExperiment': grpc.stream_unary_rpc_method_handler(
                    servicer.SetNewExperiment,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.ExperimentInfo.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.SetNewExperimentResponse.SerializeToString,
            ),
            'GetDatasetInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDatasetInfo,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.GetDatasetInfoRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.GetDatasetInfoResponse.SerializeToString,
            ),
            'GetTrainedModel': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTrainedModel,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.GetTrainedModelRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.TrainedModelResponse.SerializeToString,
            ),
            'GetMetricStream': grpc.unary_stream_rpc_method_handler(
                    servicer.GetMetricStream,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.GetMetricStreamRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.GetMetricStreamResponse.SerializeToString,
            ),
            'RemoveExperimentData': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveExperimentData,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.RemoveExperimentRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.RemoveExperimentResponse.SerializeToString,
            ),
            'GetEnvoys': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEnvoys,
                    request_deserializer=openfl_dot_protocols_dot_director__pb2.GetEnvoysRequest.FromString,
                    response_serializer=openfl_dot_protocols_dot_director__pb2.GetEnvoysResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'openfl.director.Director', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def UpdateShardInfo(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, '/openfl.director.Director/UpdateShardInfo',
            openfl_dot_protocols_dot_director__pb2.UpdateShardInfoRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.UpdateShardInfoResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def WaitExperiment(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/openfl.director.Director/WaitExperiment',
            openfl_dot_protocols_dot_director__pb2.WaitExperimentRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.WaitExperimentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetExperimentData(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, '/openfl.director.Director/GetExperimentData',
            openfl_dot_protocols_dot_director__pb2.GetExperimentDataRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.ExperimentData.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateEnvoyStatus(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, '/openfl.director.Director/UpdateEnvoyStatus',
            openfl_dot_protocols_dot_director__pb2.UpdateEnvoyStatusRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.UpdateEnvoyStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetExperimentFailed(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, '/openfl.director.Director/SetExperimentFailed',
            openfl_dot_protocols_dot_director__pb2.SetExperimentFailedRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.SetExperimentFailedResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetExperimentDescription(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, '/openfl.director.Director/GetExperimentDescription',
            openfl_dot_protocols_dot_director__pb2.GetExperimentDescriptionRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.GetExperimentDescriptionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetExperimentsList(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, '/openfl.director.Director/GetExperimentsList',
            openfl_dot_protocols_dot_director__pb2.GetExperimentsListRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.GetExperimentsListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetNewExperiment(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, '/openfl.director.Director/SetNewExperiment',
            openfl_dot_protocols_dot_director__pb2.ExperimentInfo.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.SetNewExperimentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDatasetInfo(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, '/openfl.director.Director/GetDatasetInfo',
            openfl_dot_protocols_dot_director__pb2.GetDatasetInfoRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.GetDatasetInfoResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTrainedModel(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, '/openfl.director.Director/GetTrainedModel',
            openfl_dot_protocols_dot_director__pb2.GetTrainedModelRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.TrainedModelResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMetricStream(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, '/openfl.director.Director/GetMetricStream',
            openfl_dot_protocols_dot_director__pb2.GetMetricStreamRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.GetMetricStreamResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveExperimentData(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, '/openfl.director.Director/RemoveExperimentData',
            openfl_dot_protocols_dot_director__pb2.RemoveExperimentRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.RemoveExperimentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEnvoys(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, '/openfl.director.Director/GetEnvoys',
            openfl_dot_protocols_dot_director__pb2.GetEnvoysRequest.SerializeToString,
            openfl_dot_protocols_dot_director__pb2.GetEnvoysResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
