# 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 mcp_pb2 as capiscio_dot_v1_dot_mcp__pb2


class MCPServiceStub(object):
    """MCPService provides unified MCP security operations (RFC-006 + RFC-007)
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.EvaluateToolAccess = channel.unary_unary(
                '/capiscio.v1.MCPService/EvaluateToolAccess',
                request_serializer=capiscio_dot_v1_dot_mcp__pb2.EvaluateToolAccessRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_mcp__pb2.EvaluateToolAccessResponse.FromString,
                _registered_method=True)
        self.VerifyServerIdentity = channel.unary_unary(
                '/capiscio.v1.MCPService/VerifyServerIdentity',
                request_serializer=capiscio_dot_v1_dot_mcp__pb2.VerifyServerIdentityRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_mcp__pb2.VerifyServerIdentityResponse.FromString,
                _registered_method=True)
        self.ParseServerIdentity = channel.unary_unary(
                '/capiscio.v1.MCPService/ParseServerIdentity',
                request_serializer=capiscio_dot_v1_dot_mcp__pb2.ParseServerIdentityRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_mcp__pb2.ParseServerIdentityResponse.FromString,
                _registered_method=True)
        self.Health = channel.unary_unary(
                '/capiscio.v1.MCPService/Health',
                request_serializer=capiscio_dot_v1_dot_mcp__pb2.MCPHealthRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_mcp__pb2.MCPHealthResponse.FromString,
                _registered_method=True)


class MCPServiceServicer(object):
    """MCPService provides unified MCP security operations (RFC-006 + RFC-007)
    """

    def EvaluateToolAccess(self, request, context):
        """RFC-006: Evaluate tool access and emit evidence atomically
        Single RPC returns both decision and evidence to avoid partial failures
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyServerIdentity(self, request, context):
        """RFC-007: Verify server identity from disclosed DID + badge
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ParseServerIdentity(self, request, context):
        """RFC-007: Extract server identity from transport headers/meta
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Health(self, request, context):
        """Health check for client supervision and version handshake
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MCPServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'EvaluateToolAccess': grpc.unary_unary_rpc_method_handler(
                    servicer.EvaluateToolAccess,
                    request_deserializer=capiscio_dot_v1_dot_mcp__pb2.EvaluateToolAccessRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_mcp__pb2.EvaluateToolAccessResponse.SerializeToString,
            ),
            'VerifyServerIdentity': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyServerIdentity,
                    request_deserializer=capiscio_dot_v1_dot_mcp__pb2.VerifyServerIdentityRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_mcp__pb2.VerifyServerIdentityResponse.SerializeToString,
            ),
            'ParseServerIdentity': grpc.unary_unary_rpc_method_handler(
                    servicer.ParseServerIdentity,
                    request_deserializer=capiscio_dot_v1_dot_mcp__pb2.ParseServerIdentityRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_mcp__pb2.ParseServerIdentityResponse.SerializeToString,
            ),
            'Health': grpc.unary_unary_rpc_method_handler(
                    servicer.Health,
                    request_deserializer=capiscio_dot_v1_dot_mcp__pb2.MCPHealthRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_mcp__pb2.MCPHealthResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'capiscio.v1.MCPService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('capiscio.v1.MCPService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class MCPService(object):
    """MCPService provides unified MCP security operations (RFC-006 + RFC-007)
    """

    @staticmethod
    def EvaluateToolAccess(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.MCPService/EvaluateToolAccess',
            capiscio_dot_v1_dot_mcp__pb2.EvaluateToolAccessRequest.SerializeToString,
            capiscio_dot_v1_dot_mcp__pb2.EvaluateToolAccessResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VerifyServerIdentity(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.MCPService/VerifyServerIdentity',
            capiscio_dot_v1_dot_mcp__pb2.VerifyServerIdentityRequest.SerializeToString,
            capiscio_dot_v1_dot_mcp__pb2.VerifyServerIdentityResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ParseServerIdentity(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.MCPService/ParseServerIdentity',
            capiscio_dot_v1_dot_mcp__pb2.ParseServerIdentityRequest.SerializeToString,
            capiscio_dot_v1_dot_mcp__pb2.ParseServerIdentityResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Health(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.MCPService/Health',
            capiscio_dot_v1_dot_mcp__pb2.MCPHealthRequest.SerializeToString,
            capiscio_dot_v1_dot_mcp__pb2.MCPHealthResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
