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

from cakes.proto import cakes_pb2 as cakes__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ClientPubkey = channel.unary_unary(
                '/CAKES.CAKES/ClientPubkey',
                request_serializer=cakes__pb2.ECDHKey.SerializeToString,
                response_deserializer=cakes__pb2.Ack.FromString,
                )
        self.ServerPubkey = channel.unary_unary(
                '/CAKES.CAKES/ServerPubkey',
                request_serializer=cakes__pb2.Ack.SerializeToString,
                response_deserializer=cakes__pb2.ECDHKey.FromString,
                )
        self.IssueCertificate = channel.unary_unary(
                '/CAKES.CAKES/IssueCertificate',
                request_serializer=cakes__pb2.IssueCertificateRequest.SerializeToString,
                response_deserializer=cakes__pb2.IssueCertificateReply.FromString,
                )


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

    def ClientPubkey(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 ServerPubkey(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 IssueCertificate(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_CAKESServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ClientPubkey': grpc.unary_unary_rpc_method_handler(
                    servicer.ClientPubkey,
                    request_deserializer=cakes__pb2.ECDHKey.FromString,
                    response_serializer=cakes__pb2.Ack.SerializeToString,
            ),
            'ServerPubkey': grpc.unary_unary_rpc_method_handler(
                    servicer.ServerPubkey,
                    request_deserializer=cakes__pb2.Ack.FromString,
                    response_serializer=cakes__pb2.ECDHKey.SerializeToString,
            ),
            'IssueCertificate': grpc.unary_unary_rpc_method_handler(
                    servicer.IssueCertificate,
                    request_deserializer=cakes__pb2.IssueCertificateRequest.FromString,
                    response_serializer=cakes__pb2.IssueCertificateReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'CAKES.CAKES', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ClientPubkey(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, '/CAKES.CAKES/ClientPubkey',
            cakes__pb2.ECDHKey.SerializeToString,
            cakes__pb2.Ack.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ServerPubkey(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, '/CAKES.CAKES/ServerPubkey',
            cakes__pb2.Ack.SerializeToString,
            cakes__pb2.ECDHKey.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def IssueCertificate(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, '/CAKES.CAKES/IssueCertificate',
            cakes__pb2.IssueCertificateRequest.SerializeToString,
            cakes__pb2.IssueCertificateReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
