# 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 scoring_pb2 as capiscio_dot_v1_dot_scoring__pb2


class ScoringServiceStub(object):
    """ScoringService evaluates agent cards and generates trust scores
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ScoreAgentCard = channel.unary_unary(
                '/capiscio.v1.ScoringService/ScoreAgentCard',
                request_serializer=capiscio_dot_v1_dot_scoring__pb2.ScoreAgentCardRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_scoring__pb2.ScoreAgentCardResponse.FromString,
                _registered_method=True)
        self.ValidateRule = channel.unary_unary(
                '/capiscio.v1.ScoringService/ValidateRule',
                request_serializer=capiscio_dot_v1_dot_scoring__pb2.ValidateRuleRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_scoring__pb2.ValidateRuleResponse.FromString,
                _registered_method=True)
        self.ListRuleSets = channel.unary_unary(
                '/capiscio.v1.ScoringService/ListRuleSets',
                request_serializer=capiscio_dot_v1_dot_scoring__pb2.ListRuleSetsRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_scoring__pb2.ListRuleSetsResponse.FromString,
                _registered_method=True)
        self.GetRuleSet = channel.unary_unary(
                '/capiscio.v1.ScoringService/GetRuleSet',
                request_serializer=capiscio_dot_v1_dot_scoring__pb2.GetRuleSetRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_scoring__pb2.GetRuleSetResponse.FromString,
                _registered_method=True)
        self.AggregateScores = channel.unary_unary(
                '/capiscio.v1.ScoringService/AggregateScores',
                request_serializer=capiscio_dot_v1_dot_scoring__pb2.AggregateScoresRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_scoring__pb2.AggregateScoresResponse.FromString,
                _registered_method=True)


class ScoringServiceServicer(object):
    """ScoringService evaluates agent cards and generates trust scores
    """

    def ScoreAgentCard(self, request, context):
        """Validate an agent card and generate a score
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ValidateRule(self, request, context):
        """Validate a single rule
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListRuleSets(self, request, context):
        """Get available rule sets
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRuleSet(self, request, context):
        """Get rule set details
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AggregateScores(self, request, context):
        """Calculate aggregate score from multiple validations
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ScoringServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ScoreAgentCard': grpc.unary_unary_rpc_method_handler(
                    servicer.ScoreAgentCard,
                    request_deserializer=capiscio_dot_v1_dot_scoring__pb2.ScoreAgentCardRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_scoring__pb2.ScoreAgentCardResponse.SerializeToString,
            ),
            'ValidateRule': grpc.unary_unary_rpc_method_handler(
                    servicer.ValidateRule,
                    request_deserializer=capiscio_dot_v1_dot_scoring__pb2.ValidateRuleRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_scoring__pb2.ValidateRuleResponse.SerializeToString,
            ),
            'ListRuleSets': grpc.unary_unary_rpc_method_handler(
                    servicer.ListRuleSets,
                    request_deserializer=capiscio_dot_v1_dot_scoring__pb2.ListRuleSetsRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_scoring__pb2.ListRuleSetsResponse.SerializeToString,
            ),
            'GetRuleSet': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRuleSet,
                    request_deserializer=capiscio_dot_v1_dot_scoring__pb2.GetRuleSetRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_scoring__pb2.GetRuleSetResponse.SerializeToString,
            ),
            'AggregateScores': grpc.unary_unary_rpc_method_handler(
                    servicer.AggregateScores,
                    request_deserializer=capiscio_dot_v1_dot_scoring__pb2.AggregateScoresRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_scoring__pb2.AggregateScoresResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'capiscio.v1.ScoringService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('capiscio.v1.ScoringService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class ScoringService(object):
    """ScoringService evaluates agent cards and generates trust scores
    """

    @staticmethod
    def ScoreAgentCard(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.ScoringService/ScoreAgentCard',
            capiscio_dot_v1_dot_scoring__pb2.ScoreAgentCardRequest.SerializeToString,
            capiscio_dot_v1_dot_scoring__pb2.ScoreAgentCardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ValidateRule(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.ScoringService/ValidateRule',
            capiscio_dot_v1_dot_scoring__pb2.ValidateRuleRequest.SerializeToString,
            capiscio_dot_v1_dot_scoring__pb2.ValidateRuleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListRuleSets(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.ScoringService/ListRuleSets',
            capiscio_dot_v1_dot_scoring__pb2.ListRuleSetsRequest.SerializeToString,
            capiscio_dot_v1_dot_scoring__pb2.ListRuleSetsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetRuleSet(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.ScoringService/GetRuleSet',
            capiscio_dot_v1_dot_scoring__pb2.GetRuleSetRequest.SerializeToString,
            capiscio_dot_v1_dot_scoring__pb2.GetRuleSetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AggregateScores(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.ScoringService/AggregateScores',
            capiscio_dot_v1_dot_scoring__pb2.AggregateScoresRequest.SerializeToString,
            capiscio_dot_v1_dot_scoring__pb2.AggregateScoresResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
