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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from th2_grpc_sim import sim_pb2 as th2__grpc__sim_dot_sim__pb2


class SimStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.removeRule = channel.unary_unary(
                '/Sim/removeRule',
                request_serializer=th2__grpc__sim_dot_sim__pb2.RuleID.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.getRulesInfo = channel.unary_unary(
                '/Sim/getRulesInfo',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=th2__grpc__sim_dot_sim__pb2.RulesInfo.FromString,
                )
        self.getRelatedRules = channel.unary_unary(
                '/Sim/getRelatedRules',
                request_serializer=th2__grpc__sim_dot_sim__pb2.RuleRelation.SerializeToString,
                response_deserializer=th2__grpc__sim_dot_sim__pb2.RulesInfo.FromString,
                )
        self.touchRule = channel.unary_unary(
                '/Sim/touchRule',
                request_serializer=th2__grpc__sim_dot_sim__pb2.TouchRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class SimServicer(object):
    """Missing associated documentation comment in .proto file."""

    def removeRule(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getRulesInfo(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getRelatedRules(self, request, context):
        """
        getRelatedRules method will return all rules configured with the given relation attribute
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def touchRule(self, request, context):
        """
        Calling 'touch' method on a rule that can send messages.
        You can set your own arguments for this request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SimServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'removeRule': grpc.unary_unary_rpc_method_handler(
                    servicer.removeRule,
                    request_deserializer=th2__grpc__sim_dot_sim__pb2.RuleID.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'getRulesInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.getRulesInfo,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=th2__grpc__sim_dot_sim__pb2.RulesInfo.SerializeToString,
            ),
            'getRelatedRules': grpc.unary_unary_rpc_method_handler(
                    servicer.getRelatedRules,
                    request_deserializer=th2__grpc__sim_dot_sim__pb2.RuleRelation.FromString,
                    response_serializer=th2__grpc__sim_dot_sim__pb2.RulesInfo.SerializeToString,
            ),
            'touchRule': grpc.unary_unary_rpc_method_handler(
                    servicer.touchRule,
                    request_deserializer=th2__grpc__sim_dot_sim__pb2.TouchRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Sim', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Sim(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def removeRule(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, '/Sim/removeRule',
            th2__grpc__sim_dot_sim__pb2.RuleID.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getRulesInfo(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, '/Sim/getRulesInfo',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            th2__grpc__sim_dot_sim__pb2.RulesInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getRelatedRules(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, '/Sim/getRelatedRules',
            th2__grpc__sim_dot_sim__pb2.RuleRelation.SerializeToString,
            th2__grpc__sim_dot_sim__pb2.RulesInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def touchRule(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, '/Sim/touchRule',
            th2__grpc__sim_dot_sim__pb2.TouchRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
