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

from flwr.proto import appio_pb2 as flwr_dot_proto_dot_appio__pb2
from flwr.proto import heartbeat_pb2 as flwr_dot_proto_dot_heartbeat__pb2
from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListAppsToLaunch = channel.unary_unary(
                '/flwr.proto.SimulationIo/ListAppsToLaunch',
                request_serializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.FromString,
                )
        self.RequestToken = channel.unary_unary(
                '/flwr.proto.SimulationIo/RequestToken',
                request_serializer=flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.FromString,
                )
        self.GetRun = channel.unary_unary(
                '/flwr.proto.SimulationIo/GetRun',
                request_serializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
                )
        self.PullAppInputs = channel.unary_unary(
                '/flwr.proto.SimulationIo/PullAppInputs',
                request_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
                )
        self.PushAppOutputs = channel.unary_unary(
                '/flwr.proto.SimulationIo/PushAppOutputs',
                request_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
                )
        self.UpdateRunStatus = channel.unary_unary(
                '/flwr.proto.SimulationIo/UpdateRunStatus',
                request_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
                )
        self.PushLogs = channel.unary_unary(
                '/flwr.proto.SimulationIo/PushLogs',
                request_serializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
                )
        self.GetFederationOptions = channel.unary_unary(
                '/flwr.proto.SimulationIo/GetFederationOptions',
                request_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
                )
        self.GetRunStatus = channel.unary_unary(
                '/flwr.proto.SimulationIo/GetRunStatus',
                request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
                )
        self.SendAppHeartbeat = channel.unary_unary(
                '/flwr.proto.SimulationIo/SendAppHeartbeat',
                request_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
                )


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

    def ListAppsToLaunch(self, request, context):
        """List runs to launch
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RequestToken(self, request, context):
        """Request token for a run
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRun(self, request, context):
        """Get run details
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PullAppInputs(self, request, context):
        """Pull Simulation inputs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PushAppOutputs(self, request, context):
        """Push Simulation outputs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateRunStatus(self, request, context):
        """Update the status of a given run
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PushLogs(self, request, context):
        """Push ServerApp logs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetFederationOptions(self, request, context):
        """Get Federation Options
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRunStatus(self, request, context):
        """Get Run Status
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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


def add_SimulationIoServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListAppsToLaunch': grpc.unary_unary_rpc_method_handler(
                    servicer.ListAppsToLaunch,
                    request_deserializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.SerializeToString,
            ),
            'RequestToken': grpc.unary_unary_rpc_method_handler(
                    servicer.RequestToken,
                    request_deserializer=flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.SerializeToString,
            ),
            'GetRun': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRun,
                    request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.SerializeToString,
            ),
            'PullAppInputs': grpc.unary_unary_rpc_method_handler(
                    servicer.PullAppInputs,
                    request_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.SerializeToString,
            ),
            'PushAppOutputs': grpc.unary_unary_rpc_method_handler(
                    servicer.PushAppOutputs,
                    request_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.SerializeToString,
            ),
            'UpdateRunStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateRunStatus,
                    request_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.SerializeToString,
            ),
            'PushLogs': grpc.unary_unary_rpc_method_handler(
                    servicer.PushLogs,
                    request_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.SerializeToString,
            ),
            'GetFederationOptions': grpc.unary_unary_rpc_method_handler(
                    servicer.GetFederationOptions,
                    request_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.SerializeToString,
            ),
            'GetRunStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRunStatus,
                    request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.SerializeToString,
            ),
            'SendAppHeartbeat': grpc.unary_unary_rpc_method_handler(
                    servicer.SendAppHeartbeat,
                    request_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'flwr.proto.SimulationIo', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListAppsToLaunch(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, '/flwr.proto.SimulationIo/ListAppsToLaunch',
            flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.SerializeToString,
            flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RequestToken(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, '/flwr.proto.SimulationIo/RequestToken',
            flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.SerializeToString,
            flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRun(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, '/flwr.proto.SimulationIo/GetRun',
            flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
            flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PullAppInputs(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, '/flwr.proto.SimulationIo/PullAppInputs',
            flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
            flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PushAppOutputs(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, '/flwr.proto.SimulationIo/PushAppOutputs',
            flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
            flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateRunStatus(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, '/flwr.proto.SimulationIo/UpdateRunStatus',
            flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
            flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PushLogs(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, '/flwr.proto.SimulationIo/PushLogs',
            flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
            flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetFederationOptions(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, '/flwr.proto.SimulationIo/GetFederationOptions',
            flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
            flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRunStatus(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, '/flwr.proto.SimulationIo/GetRunStatus',
            flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
            flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendAppHeartbeat(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, '/flwr.proto.SimulationIo/SendAppHeartbeat',
            flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
            flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
