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

try:
    import benchmark_pb2 as benchmark__pb2
except:
    from . import benchmark_pb2 as benchmark__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.meta_run = channel.unary_unary(
                '/benchmark.GRPCBenchmark/meta_run',
                request_serializer=benchmark__pb2.Request.SerializeToString,
                response_deserializer=benchmark__pb2.Response.FromString,
                )
        self.terminate = channel.unary_unary(
                '/benchmark.GRPCBenchmark/terminate',
                request_serializer=benchmark__pb2.EmptyMessage.SerializeToString,
                response_deserializer=benchmark__pb2.EmptyMessage.FromString,
                )


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

    def meta_run(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 terminate(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_GRPCBenchmarkServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'meta_run': grpc.unary_unary_rpc_method_handler(
                    servicer.meta_run,
                    request_deserializer=benchmark__pb2.Request.FromString,
                    response_serializer=benchmark__pb2.Response.SerializeToString,
            ),
            'terminate': grpc.unary_unary_rpc_method_handler(
                    servicer.terminate,
                    request_deserializer=benchmark__pb2.EmptyMessage.FromString,
                    response_serializer=benchmark__pb2.EmptyMessage.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'benchmark.GRPCBenchmark', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def meta_run(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, '/benchmark.GRPCBenchmark/meta_run',
            benchmark__pb2.Request.SerializeToString,
            benchmark__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def terminate(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, '/benchmark.GRPCBenchmark/terminate',
            benchmark__pb2.EmptyMessage.SerializeToString,
            benchmark__pb2.EmptyMessage.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
