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

from chromiumos.test.api import cros_test_finder_cli_pb2 as chromiumos_dot_test_dot_api_dot_cros__test__finder__cli__pb2


class TestFinderServiceStub(object):
    """TestFinderService defines interactions with the test finder service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.FindTests = channel.unary_unary(
                '/chromiumos.test.api.TestFinderService/FindTests',
                request_serializer=chromiumos_dot_test_dot_api_dot_cros__test__finder__cli__pb2.CrosTestFinderRequest.SerializeToString,
                response_deserializer=chromiumos_dot_test_dot_api_dot_cros__test__finder__cli__pb2.CrosTestFinderResponse.FromString,
                )


class TestFinderServiceServicer(object):
    """TestFinderService defines interactions with the test finder service.
    """

    def FindTests(self, request, context):
        """FindTests finds test associated with the provided input.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TestFinderServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'FindTests': grpc.unary_unary_rpc_method_handler(
                    servicer.FindTests,
                    request_deserializer=chromiumos_dot_test_dot_api_dot_cros__test__finder__cli__pb2.CrosTestFinderRequest.FromString,
                    response_serializer=chromiumos_dot_test_dot_api_dot_cros__test__finder__cli__pb2.CrosTestFinderResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'chromiumos.test.api.TestFinderService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class TestFinderService(object):
    """TestFinderService defines interactions with the test finder service.
    """

    @staticmethod
    def FindTests(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, '/chromiumos.test.api.TestFinderService/FindTests',
            chromiumos_dot_test_dot_api_dot_cros__test__finder__cli__pb2.CrosTestFinderRequest.SerializeToString,
            chromiumos_dot_test_dot_api_dot_cros__test__finder__cli__pb2.CrosTestFinderResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
