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

from proto import zhiyan_rpc_pb2 as proto_dot_zhiyan__rpc__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.zymod = channel.unary_unary(
                '/zhiyan_rpc.ZhiYanService/zymod',
                request_serializer=proto_dot_zhiyan__rpc__pb2.ZhiYanRequest.SerializeToString,
                response_deserializer=proto_dot_zhiyan__rpc__pb2.ZhiYanResponse.FromString,
                )
        self.zyregistermod = channel.unary_unary(
                '/zhiyan_rpc.ZhiYanService/zyregistermod',
                request_serializer=proto_dot_zhiyan__rpc__pb2.ZhiYanRegisterModuleRequest.SerializeToString,
                response_deserializer=proto_dot_zhiyan__rpc__pb2.ZhiYanRegisterModuleResponse.FromString,
                )
        self.zyevent = channel.unary_unary(
                '/zhiyan_rpc.ZhiYanService/zyevent',
                request_serializer=proto_dot_zhiyan__rpc__pb2.ZhiYanEventRequest.SerializeToString,
                response_deserializer=proto_dot_zhiyan__rpc__pb2.ZhiYanEventResponse.FromString,
                )


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

    def zymod(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 zyregistermod(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 zyevent(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_ZhiYanServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'zymod': grpc.unary_unary_rpc_method_handler(
                    servicer.zymod,
                    request_deserializer=proto_dot_zhiyan__rpc__pb2.ZhiYanRequest.FromString,
                    response_serializer=proto_dot_zhiyan__rpc__pb2.ZhiYanResponse.SerializeToString,
            ),
            'zyregistermod': grpc.unary_unary_rpc_method_handler(
                    servicer.zyregistermod,
                    request_deserializer=proto_dot_zhiyan__rpc__pb2.ZhiYanRegisterModuleRequest.FromString,
                    response_serializer=proto_dot_zhiyan__rpc__pb2.ZhiYanRegisterModuleResponse.SerializeToString,
            ),
            'zyevent': grpc.unary_unary_rpc_method_handler(
                    servicer.zyevent,
                    request_deserializer=proto_dot_zhiyan__rpc__pb2.ZhiYanEventRequest.FromString,
                    response_serializer=proto_dot_zhiyan__rpc__pb2.ZhiYanEventResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'zhiyan_rpc.ZhiYanService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def zymod(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, '/zhiyan_rpc.ZhiYanService/zymod',
            proto_dot_zhiyan__rpc__pb2.ZhiYanRequest.SerializeToString,
            proto_dot_zhiyan__rpc__pb2.ZhiYanResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def zyregistermod(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, '/zhiyan_rpc.ZhiYanService/zyregistermod',
            proto_dot_zhiyan__rpc__pb2.ZhiYanRegisterModuleRequest.SerializeToString,
            proto_dot_zhiyan__rpc__pb2.ZhiYanRegisterModuleResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def zyevent(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, '/zhiyan_rpc.ZhiYanService/zyevent',
            proto_dot_zhiyan__rpc__pb2.ZhiYanEventRequest.SerializeToString,
            proto_dot_zhiyan__rpc__pb2.ZhiYanEventResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
