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

from agntcy.dir.sign.v1 import sign_service_pb2 as agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2


class SignServiceStub(object):
    """SignService provides methods to sign and verify records.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Sign = channel.unary_unary(
                '/agntcy.dir.sign.v1.SignService/Sign',
                request_serializer=agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.SignRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.SignResponse.FromString,
                _registered_method=True)
        self.Verify = channel.unary_unary(
                '/agntcy.dir.sign.v1.SignService/Verify',
                request_serializer=agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.VerifyRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.VerifyResponse.FromString,
                _registered_method=True)


class SignServiceServicer(object):
    """SignService provides methods to sign and verify records.
    """

    def Sign(self, request, context):
        """Sign record using keyless OIDC based provider or using PEM-encoded private key with an optional passphrase
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Verify(self, request, context):
        """Verify signed record using keyless OIDC based provider or using PEM-encoded formatted PEM public key encrypted
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SignServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Sign': grpc.unary_unary_rpc_method_handler(
                    servicer.Sign,
                    request_deserializer=agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.SignRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.SignResponse.SerializeToString,
            ),
            'Verify': grpc.unary_unary_rpc_method_handler(
                    servicer.Verify,
                    request_deserializer=agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.VerifyRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.VerifyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'agntcy.dir.sign.v1.SignService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('agntcy.dir.sign.v1.SignService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class SignService(object):
    """SignService provides methods to sign and verify records.
    """

    @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,
            '/agntcy.dir.sign.v1.SignService/Sign',
            agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.SignRequest.SerializeToString,
            agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__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,
            '/agntcy.dir.sign.v1.SignService/Verify',
            agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.VerifyRequest.SerializeToString,
            agntcy_dot_dir_dot_sign_dot_v1_dot_sign__service__pb2.VerifyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
