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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from th2_grpc_check1 import check1_pb2 as th2__grpc__check1_dot_check1__pb2

GRPC_GENERATED_VERSION = '1.78.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in th2_grpc_check1/check1_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.createCheckpoint = channel.unary_unary(
                '/Check1/createCheckpoint',
                request_serializer=th2__grpc__check1_dot_check1__pb2.CheckpointRequest.SerializeToString,
                response_deserializer=th2__grpc__check1_dot_check1__pb2.CheckpointResponse.FromString,
                _registered_method=True)
        self.submitCheckRule = channel.unary_unary(
                '/Check1/submitCheckRule',
                request_serializer=th2__grpc__check1_dot_check1__pb2.CheckRuleRequest.SerializeToString,
                response_deserializer=th2__grpc__check1_dot_check1__pb2.CheckRuleResponse.FromString,
                _registered_method=True)
        self.submitCheckSequenceRule = channel.unary_unary(
                '/Check1/submitCheckSequenceRule',
                request_serializer=th2__grpc__check1_dot_check1__pb2.CheckSequenceRuleRequest.SerializeToString,
                response_deserializer=th2__grpc__check1_dot_check1__pb2.CheckSequenceRuleResponse.FromString,
                _registered_method=True)
        self.submitNoMessageCheck = channel.unary_unary(
                '/Check1/submitNoMessageCheck',
                request_serializer=th2__grpc__check1_dot_check1__pb2.NoMessageCheckRequest.SerializeToString,
                response_deserializer=th2__grpc__check1_dot_check1__pb2.NoMessageCheckResponse.FromString,
                _registered_method=True)
        self.waitForResult = channel.unary_unary(
                '/Check1/waitForResult',
                request_serializer=th2__grpc__check1_dot_check1__pb2.WaitForResultRequest.SerializeToString,
                response_deserializer=th2__grpc__check1_dot_check1__pb2.WaitForResultResponse.FromString,
                _registered_method=True)
        self.submitMultipleRules = channel.unary_unary(
                '/Check1/submitMultipleRules',
                request_serializer=th2__grpc__check1_dot_check1__pb2.MultiRulesRequest.SerializeToString,
                response_deserializer=th2__grpc__check1_dot_check1__pb2.MultiRulesResponse.FromString,
                _registered_method=True)
        self.postMultipleRules = channel.unary_unary(
                '/Check1/postMultipleRules',
                request_serializer=th2__grpc__check1_dot_check1__pb2.MultiRulesRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)


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

    def createCheckpoint(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 submitCheckRule(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 submitCheckSequenceRule(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 submitNoMessageCheck(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 waitForResult(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 submitMultipleRules(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 postMultipleRules(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 add_Check1Servicer_to_server(servicer, server):
    rpc_method_handlers = {
            'createCheckpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.createCheckpoint,
                    request_deserializer=th2__grpc__check1_dot_check1__pb2.CheckpointRequest.FromString,
                    response_serializer=th2__grpc__check1_dot_check1__pb2.CheckpointResponse.SerializeToString,
            ),
            'submitCheckRule': grpc.unary_unary_rpc_method_handler(
                    servicer.submitCheckRule,
                    request_deserializer=th2__grpc__check1_dot_check1__pb2.CheckRuleRequest.FromString,
                    response_serializer=th2__grpc__check1_dot_check1__pb2.CheckRuleResponse.SerializeToString,
            ),
            'submitCheckSequenceRule': grpc.unary_unary_rpc_method_handler(
                    servicer.submitCheckSequenceRule,
                    request_deserializer=th2__grpc__check1_dot_check1__pb2.CheckSequenceRuleRequest.FromString,
                    response_serializer=th2__grpc__check1_dot_check1__pb2.CheckSequenceRuleResponse.SerializeToString,
            ),
            'submitNoMessageCheck': grpc.unary_unary_rpc_method_handler(
                    servicer.submitNoMessageCheck,
                    request_deserializer=th2__grpc__check1_dot_check1__pb2.NoMessageCheckRequest.FromString,
                    response_serializer=th2__grpc__check1_dot_check1__pb2.NoMessageCheckResponse.SerializeToString,
            ),
            'waitForResult': grpc.unary_unary_rpc_method_handler(
                    servicer.waitForResult,
                    request_deserializer=th2__grpc__check1_dot_check1__pb2.WaitForResultRequest.FromString,
                    response_serializer=th2__grpc__check1_dot_check1__pb2.WaitForResultResponse.SerializeToString,
            ),
            'submitMultipleRules': grpc.unary_unary_rpc_method_handler(
                    servicer.submitMultipleRules,
                    request_deserializer=th2__grpc__check1_dot_check1__pb2.MultiRulesRequest.FromString,
                    response_serializer=th2__grpc__check1_dot_check1__pb2.MultiRulesResponse.SerializeToString,
            ),
            'postMultipleRules': grpc.unary_unary_rpc_method_handler(
                    servicer.postMultipleRules,
                    request_deserializer=th2__grpc__check1_dot_check1__pb2.MultiRulesRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Check1', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('Check1', rpc_method_handlers)


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

    @staticmethod
    def createCheckpoint(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,
            '/Check1/createCheckpoint',
            th2__grpc__check1_dot_check1__pb2.CheckpointRequest.SerializeToString,
            th2__grpc__check1_dot_check1__pb2.CheckpointResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def submitCheckRule(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,
            '/Check1/submitCheckRule',
            th2__grpc__check1_dot_check1__pb2.CheckRuleRequest.SerializeToString,
            th2__grpc__check1_dot_check1__pb2.CheckRuleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def submitCheckSequenceRule(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,
            '/Check1/submitCheckSequenceRule',
            th2__grpc__check1_dot_check1__pb2.CheckSequenceRuleRequest.SerializeToString,
            th2__grpc__check1_dot_check1__pb2.CheckSequenceRuleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def submitNoMessageCheck(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,
            '/Check1/submitNoMessageCheck',
            th2__grpc__check1_dot_check1__pb2.NoMessageCheckRequest.SerializeToString,
            th2__grpc__check1_dot_check1__pb2.NoMessageCheckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def waitForResult(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,
            '/Check1/waitForResult',
            th2__grpc__check1_dot_check1__pb2.WaitForResultRequest.SerializeToString,
            th2__grpc__check1_dot_check1__pb2.WaitForResultResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def submitMultipleRules(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,
            '/Check1/submitMultipleRules',
            th2__grpc__check1_dot_check1__pb2.MultiRulesRequest.SerializeToString,
            th2__grpc__check1_dot_check1__pb2.MultiRulesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def postMultipleRules(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,
            '/Check1/postMultipleRules',
            th2__grpc__check1_dot_check1__pb2.MultiRulesRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
