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

from capiscio_mcp._proto.gen.capiscio.v1 import simpleguard_pb2 as capiscio_dot_v1_dot_simpleguard__pb2


class SimpleGuardServiceStub(object):
    """SimpleGuardService provides simplified signing and verification
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Sign = channel.unary_unary(
                '/capiscio.v1.SimpleGuardService/Sign',
                request_serializer=capiscio_dot_v1_dot_simpleguard__pb2.SignRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.SignResponse.FromString,
                _registered_method=True)
        self.Verify = channel.unary_unary(
                '/capiscio.v1.SimpleGuardService/Verify',
                request_serializer=capiscio_dot_v1_dot_simpleguard__pb2.VerifyRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.VerifyResponse.FromString,
                _registered_method=True)
        self.SignAttached = channel.unary_unary(
                '/capiscio.v1.SimpleGuardService/SignAttached',
                request_serializer=capiscio_dot_v1_dot_simpleguard__pb2.SignAttachedRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.SignAttachedResponse.FromString,
                _registered_method=True)
        self.VerifyAttached = channel.unary_unary(
                '/capiscio.v1.SimpleGuardService/VerifyAttached',
                request_serializer=capiscio_dot_v1_dot_simpleguard__pb2.VerifyAttachedRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.VerifyAttachedResponse.FromString,
                _registered_method=True)
        self.GenerateKeyPair = channel.unary_unary(
                '/capiscio.v1.SimpleGuardService/GenerateKeyPair',
                request_serializer=capiscio_dot_v1_dot_simpleguard__pb2.GenerateKeyPairRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.GenerateKeyPairResponse.FromString,
                _registered_method=True)
        self.LoadKey = channel.unary_unary(
                '/capiscio.v1.SimpleGuardService/LoadKey',
                request_serializer=capiscio_dot_v1_dot_simpleguard__pb2.LoadKeyRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.LoadKeyResponse.FromString,
                _registered_method=True)
        self.ExportKey = channel.unary_unary(
                '/capiscio.v1.SimpleGuardService/ExportKey',
                request_serializer=capiscio_dot_v1_dot_simpleguard__pb2.ExportKeyRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.ExportKeyResponse.FromString,
                _registered_method=True)
        self.GetKeyInfo = channel.unary_unary(
                '/capiscio.v1.SimpleGuardService/GetKeyInfo',
                request_serializer=capiscio_dot_v1_dot_simpleguard__pb2.GetKeyInfoRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.GetKeyInfoResponse.FromString,
                _registered_method=True)


class SimpleGuardServiceServicer(object):
    """SimpleGuardService provides simplified signing and verification
    """

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

    def Verify(self, request, context):
        """Verify a signed message
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SignAttached(self, request, context):
        """Sign with attached payload (creates JWS)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyAttached(self, request, context):
        """Verify with attached payload
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GenerateKeyPair(self, request, context):
        """Generate a new key pair
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LoadKey(self, request, context):
        """Load key from file
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ExportKey(self, request, context):
        """Export key to file
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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


def add_SimpleGuardServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Sign': grpc.unary_unary_rpc_method_handler(
                    servicer.Sign,
                    request_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.SignRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_simpleguard__pb2.SignResponse.SerializeToString,
            ),
            'Verify': grpc.unary_unary_rpc_method_handler(
                    servicer.Verify,
                    request_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.VerifyRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_simpleguard__pb2.VerifyResponse.SerializeToString,
            ),
            'SignAttached': grpc.unary_unary_rpc_method_handler(
                    servicer.SignAttached,
                    request_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.SignAttachedRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_simpleguard__pb2.SignAttachedResponse.SerializeToString,
            ),
            'VerifyAttached': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyAttached,
                    request_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.VerifyAttachedRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_simpleguard__pb2.VerifyAttachedResponse.SerializeToString,
            ),
            'GenerateKeyPair': grpc.unary_unary_rpc_method_handler(
                    servicer.GenerateKeyPair,
                    request_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.GenerateKeyPairRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_simpleguard__pb2.GenerateKeyPairResponse.SerializeToString,
            ),
            'LoadKey': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadKey,
                    request_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.LoadKeyRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_simpleguard__pb2.LoadKeyResponse.SerializeToString,
            ),
            'ExportKey': grpc.unary_unary_rpc_method_handler(
                    servicer.ExportKey,
                    request_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.ExportKeyRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_simpleguard__pb2.ExportKeyResponse.SerializeToString,
            ),
            'GetKeyInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKeyInfo,
                    request_deserializer=capiscio_dot_v1_dot_simpleguard__pb2.GetKeyInfoRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_simpleguard__pb2.GetKeyInfoResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'capiscio.v1.SimpleGuardService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('capiscio.v1.SimpleGuardService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class SimpleGuardService(object):
    """SimpleGuardService provides simplified signing and verification
    """

    @staticmethod
    def Sign(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,
            '/capiscio.v1.SimpleGuardService/Sign',
            capiscio_dot_v1_dot_simpleguard__pb2.SignRequest.SerializeToString,
            capiscio_dot_v1_dot_simpleguard__pb2.SignResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Verify(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,
            '/capiscio.v1.SimpleGuardService/Verify',
            capiscio_dot_v1_dot_simpleguard__pb2.VerifyRequest.SerializeToString,
            capiscio_dot_v1_dot_simpleguard__pb2.VerifyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SignAttached(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,
            '/capiscio.v1.SimpleGuardService/SignAttached',
            capiscio_dot_v1_dot_simpleguard__pb2.SignAttachedRequest.SerializeToString,
            capiscio_dot_v1_dot_simpleguard__pb2.SignAttachedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VerifyAttached(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,
            '/capiscio.v1.SimpleGuardService/VerifyAttached',
            capiscio_dot_v1_dot_simpleguard__pb2.VerifyAttachedRequest.SerializeToString,
            capiscio_dot_v1_dot_simpleguard__pb2.VerifyAttachedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GenerateKeyPair(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,
            '/capiscio.v1.SimpleGuardService/GenerateKeyPair',
            capiscio_dot_v1_dot_simpleguard__pb2.GenerateKeyPairRequest.SerializeToString,
            capiscio_dot_v1_dot_simpleguard__pb2.GenerateKeyPairResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def LoadKey(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,
            '/capiscio.v1.SimpleGuardService/LoadKey',
            capiscio_dot_v1_dot_simpleguard__pb2.LoadKeyRequest.SerializeToString,
            capiscio_dot_v1_dot_simpleguard__pb2.LoadKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExportKey(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,
            '/capiscio.v1.SimpleGuardService/ExportKey',
            capiscio_dot_v1_dot_simpleguard__pb2.ExportKeyRequest.SerializeToString,
            capiscio_dot_v1_dot_simpleguard__pb2.ExportKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetKeyInfo(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,
            '/capiscio.v1.SimpleGuardService/GetKeyInfo',
            capiscio_dot_v1_dot_simpleguard__pb2.GetKeyInfoRequest.SerializeToString,
            capiscio_dot_v1_dot_simpleguard__pb2.GetKeyInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
