# 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 message_pb2 as flwr_dot_proto_dot_message__pb2
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2


class ClientAppIoStub(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.ClientAppIo/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.ClientAppIo/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.ClientAppIo/GetRun',
                request_serializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
                )
        self.PullClientAppInputs = channel.unary_unary(
                '/flwr.proto.ClientAppIo/PullClientAppInputs',
                request_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
                )
        self.PushClientAppOutputs = channel.unary_unary(
                '/flwr.proto.ClientAppIo/PushClientAppOutputs',
                request_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
                )
        self.PushMessage = channel.unary_unary(
                '/flwr.proto.ClientAppIo/PushMessage',
                request_serializer=flwr_dot_proto_dot_appio__pb2.PushAppMessagesRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppMessagesResponse.FromString,
                )
        self.PullMessage = channel.unary_unary(
                '/flwr.proto.ClientAppIo/PullMessage',
                request_serializer=flwr_dot_proto_dot_appio__pb2.PullAppMessagesRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppMessagesResponse.FromString,
                )
        self.PushObject = channel.unary_unary(
                '/flwr.proto.ClientAppIo/PushObject',
                request_serializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
                )
        self.PullObject = channel.unary_unary(
                '/flwr.proto.ClientAppIo/PullObject',
                request_serializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
                )
        self.ConfirmMessageReceived = channel.unary_unary(
                '/flwr.proto.ClientAppIo/ConfirmMessageReceived',
                request_serializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.FromString,
                )


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

    def ListAppsToLaunch(self, request, context):
        """Get run IDs with pending messages
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RequestToken(self, request, context):
        """Request token
        """
        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 PullClientAppInputs(self, request, context):
        """Pull client app inputs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

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

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

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

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

    def ConfirmMessageReceived(self, request, context):
        """Confirm Message Received
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ClientAppIoServicer_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,
            ),
            'PullClientAppInputs': grpc.unary_unary_rpc_method_handler(
                    servicer.PullClientAppInputs,
                    request_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.SerializeToString,
            ),
            'PushClientAppOutputs': grpc.unary_unary_rpc_method_handler(
                    servicer.PushClientAppOutputs,
                    request_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.SerializeToString,
            ),
            'PushMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.PushMessage,
                    request_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppMessagesRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_appio__pb2.PushAppMessagesResponse.SerializeToString,
            ),
            'PullMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.PullMessage,
                    request_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppMessagesRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_appio__pb2.PullAppMessagesResponse.SerializeToString,
            ),
            'PushObject': grpc.unary_unary_rpc_method_handler(
                    servicer.PushObject,
                    request_deserializer=flwr_dot_proto_dot_message__pb2.PushObjectRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_message__pb2.PushObjectResponse.SerializeToString,
            ),
            'PullObject': grpc.unary_unary_rpc_method_handler(
                    servicer.PullObject,
                    request_deserializer=flwr_dot_proto_dot_message__pb2.PullObjectRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_message__pb2.PullObjectResponse.SerializeToString,
            ),
            'ConfirmMessageReceived': grpc.unary_unary_rpc_method_handler(
                    servicer.ConfirmMessageReceived,
                    request_deserializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'flwr.proto.ClientAppIo', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ClientAppIo(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.ClientAppIo/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.ClientAppIo/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.ClientAppIo/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 PullClientAppInputs(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.ClientAppIo/PullClientAppInputs',
            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 PushClientAppOutputs(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.ClientAppIo/PushClientAppOutputs',
            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 PushMessage(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.ClientAppIo/PushMessage',
            flwr_dot_proto_dot_appio__pb2.PushAppMessagesRequest.SerializeToString,
            flwr_dot_proto_dot_appio__pb2.PushAppMessagesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PullMessage(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.ClientAppIo/PullMessage',
            flwr_dot_proto_dot_appio__pb2.PullAppMessagesRequest.SerializeToString,
            flwr_dot_proto_dot_appio__pb2.PullAppMessagesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PushObject(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.ClientAppIo/PushObject',
            flwr_dot_proto_dot_message__pb2.PushObjectRequest.SerializeToString,
            flwr_dot_proto_dot_message__pb2.PushObjectResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PullObject(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.ClientAppIo/PullObject',
            flwr_dot_proto_dot_message__pb2.PullObjectRequest.SerializeToString,
            flwr_dot_proto_dot_message__pb2.PullObjectResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ConfirmMessageReceived(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.ClientAppIo/ConfirmMessageReceived',
            flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedRequest.SerializeToString,
            flwr_dot_proto_dot_message__pb2.ConfirmMessageReceivedResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
