# 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 clientappio_pb2 as flwr_dot_proto_dot_clientappio__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetToken = channel.unary_unary(
                '/flwr.proto.ClientAppIo/GetToken',
                request_serializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenResponse.FromString,
                )
        self.PullClientAppInputs = channel.unary_unary(
                '/flwr.proto.ClientAppIo/PullClientAppInputs',
                request_serializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
                )
        self.PushClientAppOutputs = channel.unary_unary(
                '/flwr.proto.ClientAppIo/PushClientAppOutputs',
                request_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
                )


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

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

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

    def PushClientAppOutputs(self, request, context):
        """Send updated Message and Context
        """
        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 = {
            'GetToken': grpc.unary_unary_rpc_method_handler(
                    servicer.GetToken,
                    request_deserializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenResponse.SerializeToString,
            ),
            'PullClientAppInputs': grpc.unary_unary_rpc_method_handler(
                    servicer.PullClientAppInputs,
                    request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.SerializeToString,
            ),
            'PushClientAppOutputs': grpc.unary_unary_rpc_method_handler(
                    servicer.PushClientAppOutputs,
                    request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.FromString,
                    response_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.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 GetToken(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/GetToken',
            flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.SerializeToString,
            flwr_dot_proto_dot_clientappio__pb2.GetTokenResponse.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_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
            flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.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_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
            flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
