# 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 revocation_pb2 as capiscio_dot_v1_dot_revocation__pb2


class RevocationServiceStub(object):
    """RevocationService manages revocation lists and checks
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.IsRevoked = channel.unary_unary(
                '/capiscio.v1.RevocationService/IsRevoked',
                request_serializer=capiscio_dot_v1_dot_revocation__pb2.IsRevokedRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_revocation__pb2.IsRevokedResponse.FromString,
                _registered_method=True)
        self.Revoke = channel.unary_unary(
                '/capiscio.v1.RevocationService/Revoke',
                request_serializer=capiscio_dot_v1_dot_revocation__pb2.RevokeRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_revocation__pb2.RevokeResponse.FromString,
                _registered_method=True)
        self.Unrevoke = channel.unary_unary(
                '/capiscio.v1.RevocationService/Unrevoke',
                request_serializer=capiscio_dot_v1_dot_revocation__pb2.UnrevokeRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_revocation__pb2.UnrevokeResponse.FromString,
                _registered_method=True)
        self.ListRevocations = channel.unary_unary(
                '/capiscio.v1.RevocationService/ListRevocations',
                request_serializer=capiscio_dot_v1_dot_revocation__pb2.ListRevocationsRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_revocation__pb2.ListRevocationsResponse.FromString,
                _registered_method=True)
        self.FetchRevocationList = channel.unary_unary(
                '/capiscio.v1.RevocationService/FetchRevocationList',
                request_serializer=capiscio_dot_v1_dot_revocation__pb2.FetchRevocationListRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_revocation__pb2.FetchRevocationListResponse.FromString,
                _registered_method=True)
        self.ClearCache = channel.unary_unary(
                '/capiscio.v1.RevocationService/ClearCache',
                request_serializer=capiscio_dot_v1_dot_revocation__pb2.ClearCacheRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_revocation__pb2.ClearCacheResponse.FromString,
                _registered_method=True)
        self.GetCacheStats = channel.unary_unary(
                '/capiscio.v1.RevocationService/GetCacheStats',
                request_serializer=capiscio_dot_v1_dot_revocation__pb2.GetCacheStatsRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_revocation__pb2.GetCacheStatsResponse.FromString,
                _registered_method=True)


class RevocationServiceServicer(object):
    """RevocationService manages revocation lists and checks
    """

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

    def Revoke(self, request, context):
        """Add a revocation entry
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def ListRevocations(self, request, context):
        """List revoked entries
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def FetchRevocationList(self, request, context):
        """Fetch revocation list from URL
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ClearCache(self, request, context):
        """Clear the revocation cache
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCacheStats(self, request, context):
        """Get cache statistics
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RevocationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'IsRevoked': grpc.unary_unary_rpc_method_handler(
                    servicer.IsRevoked,
                    request_deserializer=capiscio_dot_v1_dot_revocation__pb2.IsRevokedRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_revocation__pb2.IsRevokedResponse.SerializeToString,
            ),
            'Revoke': grpc.unary_unary_rpc_method_handler(
                    servicer.Revoke,
                    request_deserializer=capiscio_dot_v1_dot_revocation__pb2.RevokeRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_revocation__pb2.RevokeResponse.SerializeToString,
            ),
            'Unrevoke': grpc.unary_unary_rpc_method_handler(
                    servicer.Unrevoke,
                    request_deserializer=capiscio_dot_v1_dot_revocation__pb2.UnrevokeRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_revocation__pb2.UnrevokeResponse.SerializeToString,
            ),
            'ListRevocations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListRevocations,
                    request_deserializer=capiscio_dot_v1_dot_revocation__pb2.ListRevocationsRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_revocation__pb2.ListRevocationsResponse.SerializeToString,
            ),
            'FetchRevocationList': grpc.unary_unary_rpc_method_handler(
                    servicer.FetchRevocationList,
                    request_deserializer=capiscio_dot_v1_dot_revocation__pb2.FetchRevocationListRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_revocation__pb2.FetchRevocationListResponse.SerializeToString,
            ),
            'ClearCache': grpc.unary_unary_rpc_method_handler(
                    servicer.ClearCache,
                    request_deserializer=capiscio_dot_v1_dot_revocation__pb2.ClearCacheRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_revocation__pb2.ClearCacheResponse.SerializeToString,
            ),
            'GetCacheStats': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCacheStats,
                    request_deserializer=capiscio_dot_v1_dot_revocation__pb2.GetCacheStatsRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_revocation__pb2.GetCacheStatsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'capiscio.v1.RevocationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('capiscio.v1.RevocationService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class RevocationService(object):
    """RevocationService manages revocation lists and checks
    """

    @staticmethod
    def IsRevoked(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.RevocationService/IsRevoked',
            capiscio_dot_v1_dot_revocation__pb2.IsRevokedRequest.SerializeToString,
            capiscio_dot_v1_dot_revocation__pb2.IsRevokedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Revoke(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.RevocationService/Revoke',
            capiscio_dot_v1_dot_revocation__pb2.RevokeRequest.SerializeToString,
            capiscio_dot_v1_dot_revocation__pb2.RevokeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Unrevoke(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.RevocationService/Unrevoke',
            capiscio_dot_v1_dot_revocation__pb2.UnrevokeRequest.SerializeToString,
            capiscio_dot_v1_dot_revocation__pb2.UnrevokeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListRevocations(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.RevocationService/ListRevocations',
            capiscio_dot_v1_dot_revocation__pb2.ListRevocationsRequest.SerializeToString,
            capiscio_dot_v1_dot_revocation__pb2.ListRevocationsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def FetchRevocationList(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.RevocationService/FetchRevocationList',
            capiscio_dot_v1_dot_revocation__pb2.FetchRevocationListRequest.SerializeToString,
            capiscio_dot_v1_dot_revocation__pb2.FetchRevocationListResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClearCache(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.RevocationService/ClearCache',
            capiscio_dot_v1_dot_revocation__pb2.ClearCacheRequest.SerializeToString,
            capiscio_dot_v1_dot_revocation__pb2.ClearCacheResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetCacheStats(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.RevocationService/GetCacheStats',
            capiscio_dot_v1_dot_revocation__pb2.GetCacheStatsRequest.SerializeToString,
            capiscio_dot_v1_dot_revocation__pb2.GetCacheStatsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
