# 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 grpcadapter_pb2 as flwr_dot_proto_dot_grpcadapter__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SendReceive = channel.unary_unary(
                '/flwr.proto.GrpcAdapter/SendReceive',
                request_serializer=flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.SerializeToString,
                response_deserializer=flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.FromString,
                )


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

    def SendReceive(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_GrpcAdapterServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SendReceive': grpc.unary_unary_rpc_method_handler(
                    servicer.SendReceive,
                    request_deserializer=flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.FromString,
                    response_serializer=flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'flwr.proto.GrpcAdapter', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def SendReceive(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.GrpcAdapter/SendReceive',
            flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.SerializeToString,
            flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
