# 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 trust_pb2 as capiscio_dot_v1_dot_trust__pb2


class TrustStoreServiceStub(object):
    """TrustStoreService manages trusted keys and certificates
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddKey = channel.unary_unary(
                '/capiscio.v1.TrustStoreService/AddKey',
                request_serializer=capiscio_dot_v1_dot_trust__pb2.AddKeyRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_trust__pb2.AddKeyResponse.FromString,
                _registered_method=True)
        self.RemoveKey = channel.unary_unary(
                '/capiscio.v1.TrustStoreService/RemoveKey',
                request_serializer=capiscio_dot_v1_dot_trust__pb2.RemoveKeyRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_trust__pb2.RemoveKeyResponse.FromString,
                _registered_method=True)
        self.GetKey = channel.unary_unary(
                '/capiscio.v1.TrustStoreService/GetKey',
                request_serializer=capiscio_dot_v1_dot_trust__pb2.GetKeyRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_trust__pb2.GetKeyResponse.FromString,
                _registered_method=True)
        self.ListKeys = channel.unary_unary(
                '/capiscio.v1.TrustStoreService/ListKeys',
                request_serializer=capiscio_dot_v1_dot_trust__pb2.ListKeysRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_trust__pb2.ListKeysResponse.FromString,
                _registered_method=True)
        self.IsTrusted = channel.unary_unary(
                '/capiscio.v1.TrustStoreService/IsTrusted',
                request_serializer=capiscio_dot_v1_dot_trust__pb2.IsTrustedRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_trust__pb2.IsTrustedResponse.FromString,
                _registered_method=True)
        self.ImportFromDirectory = channel.unary_unary(
                '/capiscio.v1.TrustStoreService/ImportFromDirectory',
                request_serializer=capiscio_dot_v1_dot_trust__pb2.ImportFromDirectoryRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_trust__pb2.ImportFromDirectoryResponse.FromString,
                _registered_method=True)
        self.ExportToDirectory = channel.unary_unary(
                '/capiscio.v1.TrustStoreService/ExportToDirectory',
                request_serializer=capiscio_dot_v1_dot_trust__pb2.ExportToDirectoryRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_trust__pb2.ExportToDirectoryResponse.FromString,
                _registered_method=True)
        self.Clear = channel.unary_unary(
                '/capiscio.v1.TrustStoreService/Clear',
                request_serializer=capiscio_dot_v1_dot_trust__pb2.ClearKeysRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_trust__pb2.ClearKeysResponse.FromString,
                _registered_method=True)


class TrustStoreServiceServicer(object):
    """TrustStoreService manages trusted keys and certificates
    """

    def AddKey(self, request, context):
        """Add a trusted public key
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveKey(self, request, context):
        """Remove a trusted key
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def ListKeys(self, request, context):
        """List all trusted keys
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IsTrusted(self, request, context):
        """Check if a key is trusted
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ImportFromDirectory(self, request, context):
        """Import keys from a directory
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ExportToDirectory(self, request, context):
        """Export keys to a directory
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Clear(self, request, context):
        """Clear all keys
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TrustStoreServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddKey': grpc.unary_unary_rpc_method_handler(
                    servicer.AddKey,
                    request_deserializer=capiscio_dot_v1_dot_trust__pb2.AddKeyRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_trust__pb2.AddKeyResponse.SerializeToString,
            ),
            'RemoveKey': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveKey,
                    request_deserializer=capiscio_dot_v1_dot_trust__pb2.RemoveKeyRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_trust__pb2.RemoveKeyResponse.SerializeToString,
            ),
            'GetKey': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKey,
                    request_deserializer=capiscio_dot_v1_dot_trust__pb2.GetKeyRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_trust__pb2.GetKeyResponse.SerializeToString,
            ),
            'ListKeys': grpc.unary_unary_rpc_method_handler(
                    servicer.ListKeys,
                    request_deserializer=capiscio_dot_v1_dot_trust__pb2.ListKeysRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_trust__pb2.ListKeysResponse.SerializeToString,
            ),
            'IsTrusted': grpc.unary_unary_rpc_method_handler(
                    servicer.IsTrusted,
                    request_deserializer=capiscio_dot_v1_dot_trust__pb2.IsTrustedRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_trust__pb2.IsTrustedResponse.SerializeToString,
            ),
            'ImportFromDirectory': grpc.unary_unary_rpc_method_handler(
                    servicer.ImportFromDirectory,
                    request_deserializer=capiscio_dot_v1_dot_trust__pb2.ImportFromDirectoryRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_trust__pb2.ImportFromDirectoryResponse.SerializeToString,
            ),
            'ExportToDirectory': grpc.unary_unary_rpc_method_handler(
                    servicer.ExportToDirectory,
                    request_deserializer=capiscio_dot_v1_dot_trust__pb2.ExportToDirectoryRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_trust__pb2.ExportToDirectoryResponse.SerializeToString,
            ),
            'Clear': grpc.unary_unary_rpc_method_handler(
                    servicer.Clear,
                    request_deserializer=capiscio_dot_v1_dot_trust__pb2.ClearKeysRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_trust__pb2.ClearKeysResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'capiscio.v1.TrustStoreService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('capiscio.v1.TrustStoreService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class TrustStoreService(object):
    """TrustStoreService manages trusted keys and certificates
    """

    @staticmethod
    def AddKey(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.TrustStoreService/AddKey',
            capiscio_dot_v1_dot_trust__pb2.AddKeyRequest.SerializeToString,
            capiscio_dot_v1_dot_trust__pb2.AddKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RemoveKey(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.TrustStoreService/RemoveKey',
            capiscio_dot_v1_dot_trust__pb2.RemoveKeyRequest.SerializeToString,
            capiscio_dot_v1_dot_trust__pb2.RemoveKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetKey(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.TrustStoreService/GetKey',
            capiscio_dot_v1_dot_trust__pb2.GetKeyRequest.SerializeToString,
            capiscio_dot_v1_dot_trust__pb2.GetKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListKeys(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.TrustStoreService/ListKeys',
            capiscio_dot_v1_dot_trust__pb2.ListKeysRequest.SerializeToString,
            capiscio_dot_v1_dot_trust__pb2.ListKeysResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IsTrusted(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.TrustStoreService/IsTrusted',
            capiscio_dot_v1_dot_trust__pb2.IsTrustedRequest.SerializeToString,
            capiscio_dot_v1_dot_trust__pb2.IsTrustedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ImportFromDirectory(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.TrustStoreService/ImportFromDirectory',
            capiscio_dot_v1_dot_trust__pb2.ImportFromDirectoryRequest.SerializeToString,
            capiscio_dot_v1_dot_trust__pb2.ImportFromDirectoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExportToDirectory(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.TrustStoreService/ExportToDirectory',
            capiscio_dot_v1_dot_trust__pb2.ExportToDirectoryRequest.SerializeToString,
            capiscio_dot_v1_dot_trust__pb2.ExportToDirectoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Clear(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.TrustStoreService/Clear',
            capiscio_dot_v1_dot_trust__pb2.ClearKeysRequest.SerializeToString,
            capiscio_dot_v1_dot_trust__pb2.ClearKeysResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
