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

from bilireq.grpc.protos.bilibili.main.common.arch.doll.v1 import doll_pb2 as bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2


class EchoStub(object):
    """
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ping = channel.unary_unary(
                '/bilibili.main.common.arch.doll.v1.Echo/Ping',
                request_serializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.PingRequest.SerializeToString,
                response_deserializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.PingResponse.FromString,
                )
        self.Say = channel.unary_unary(
                '/bilibili.main.common.arch.doll.v1.Echo/Say',
                request_serializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.SayRequest.SerializeToString,
                response_deserializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.SayResponse.FromString,
                )
        self.Error = channel.unary_unary(
                '/bilibili.main.common.arch.doll.v1.Echo/Error',
                request_serializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.ErrorRequest.SerializeToString,
                response_deserializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.ErrorResponse.FromString,
                )


class EchoServicer(object):
    """
    """

    def Ping(self, request, context):
        """
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Say(self, request, context):
        """
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Error(self, request, context):
        """
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EchoServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Ping': grpc.unary_unary_rpc_method_handler(
                    servicer.Ping,
                    request_deserializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.PingRequest.FromString,
                    response_serializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.PingResponse.SerializeToString,
            ),
            'Say': grpc.unary_unary_rpc_method_handler(
                    servicer.Say,
                    request_deserializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.SayRequest.FromString,
                    response_serializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.SayResponse.SerializeToString,
            ),
            'Error': grpc.unary_unary_rpc_method_handler(
                    servicer.Error,
                    request_deserializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.ErrorRequest.FromString,
                    response_serializer=bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.ErrorResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.main.common.arch.doll.v1.Echo', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Echo(object):
    """
    """

    @staticmethod
    def Ping(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, '/bilibili.main.common.arch.doll.v1.Echo/Ping',
            bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.PingRequest.SerializeToString,
            bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.PingResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Say(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, '/bilibili.main.common.arch.doll.v1.Echo/Say',
            bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.SayRequest.SerializeToString,
            bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.SayResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Error(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, '/bilibili.main.common.arch.doll.v1.Echo/Error',
            bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.ErrorRequest.SerializeToString,
            bilibili_dot_main_dot_common_dot_arch_dot_doll_dot_v1_dot_doll__pb2.ErrorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
