# 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
import test_services_pb2 as test__services__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Empty = channel.unary_unary(
                '/tavern.tests.v1.DummyService/Empty',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.SimpleTest = channel.unary_unary(
                '/tavern.tests.v1.DummyService/SimpleTest',
                request_serializer=test__services__pb2.DummyRequest.SerializeToString,
                response_deserializer=test__services__pb2.DummyResponse.FromString,
                )


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

    def Empty(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 SimpleTest(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_DummyServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Empty': grpc.unary_unary_rpc_method_handler(
                    servicer.Empty,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SimpleTest': grpc.unary_unary_rpc_method_handler(
                    servicer.SimpleTest,
                    request_deserializer=test__services__pb2.DummyRequest.FromString,
                    response_serializer=test__services__pb2.DummyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'tavern.tests.v1.DummyService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Empty(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, '/tavern.tests.v1.DummyService/Empty',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SimpleTest(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, '/tavern.tests.v1.DummyService/SimpleTest',
            test__services__pb2.DummyRequest.SerializeToString,
            test__services__pb2.DummyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
