# 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.api.probe.v1 import probe_pb2 as bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2


class ProbeStub(object):
    """服务可用性探针
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.TestCode = channel.unary_unary(
                '/bilibili.api.probe.v1.Probe/TestCode',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.CodeReq.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.CodeReply.FromString,
                )
        self.TestReq = channel.unary_unary(
                '/bilibili.api.probe.v1.Probe/TestReq',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeReq.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeReply.FromString,
                )
        self.TestStream = channel.unary_unary(
                '/bilibili.api.probe.v1.Probe/TestStream',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeStreamReq.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeStreamReply.FromString,
                )
        self.TestSub = channel.unary_unary(
                '/bilibili.api.probe.v1.Probe/TestSub',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeSubReq.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeSubReply.FromString,
                )


class ProbeServicer(object):
    """服务可用性探针
    """

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

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

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

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


def add_ProbeServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'TestCode': grpc.unary_unary_rpc_method_handler(
                    servicer.TestCode,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.CodeReq.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.CodeReply.SerializeToString,
            ),
            'TestReq': grpc.unary_unary_rpc_method_handler(
                    servicer.TestReq,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeReq.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeReply.SerializeToString,
            ),
            'TestStream': grpc.unary_unary_rpc_method_handler(
                    servicer.TestStream,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeStreamReq.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeStreamReply.SerializeToString,
            ),
            'TestSub': grpc.unary_unary_rpc_method_handler(
                    servicer.TestSub,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeSubReq.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeSubReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.api.probe.v1.Probe', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Probe(object):
    """服务可用性探针
    """

    @staticmethod
    def TestCode(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.api.probe.v1.Probe/TestCode',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.CodeReq.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.CodeReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def TestReq(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.api.probe.v1.Probe/TestReq',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeReq.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def TestStream(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.api.probe.v1.Probe/TestStream',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeStreamReq.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeStreamReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def TestSub(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.api.probe.v1.Probe/TestSub',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeSubReq.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ProbeSubReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


class ProbeServiceStub(object):
    """服务可用性探针
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Echo = channel.unary_unary(
                '/bilibili.api.probe.v1.ProbeService/Echo',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
                )
        self.EchoBody = channel.unary_unary(
                '/bilibili.api.probe.v1.ProbeService/EchoBody',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
                )
        self.EchoDelete = channel.unary_unary(
                '/bilibili.api.probe.v1.ProbeService/EchoDelete',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
                )
        self.EchoError = channel.unary_unary(
                '/bilibili.api.probe.v1.ProbeService/EchoError',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ErrorMessage.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ErrorMessage.FromString,
                )
        self.EchoPatch = channel.unary_unary(
                '/bilibili.api.probe.v1.ProbeService/EchoPatch',
                request_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.DynamicMessageUpdate.SerializeToString,
                response_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.DynamicMessageUpdate.FromString,
                )


class ProbeServiceServicer(object):
    """服务可用性探针
    """

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

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

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

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

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


def add_ProbeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Echo': grpc.unary_unary_rpc_method_handler(
                    servicer.Echo,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
            ),
            'EchoBody': grpc.unary_unary_rpc_method_handler(
                    servicer.EchoBody,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
            ),
            'EchoDelete': grpc.unary_unary_rpc_method_handler(
                    servicer.EchoDelete,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
            ),
            'EchoError': grpc.unary_unary_rpc_method_handler(
                    servicer.EchoError,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ErrorMessage.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ErrorMessage.SerializeToString,
            ),
            'EchoPatch': grpc.unary_unary_rpc_method_handler(
                    servicer.EchoPatch,
                    request_deserializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.DynamicMessageUpdate.FromString,
                    response_serializer=bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.DynamicMessageUpdate.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.api.probe.v1.ProbeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ProbeService(object):
    """服务可用性探针
    """

    @staticmethod
    def Echo(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.api.probe.v1.ProbeService/Echo',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EchoBody(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.api.probe.v1.ProbeService/EchoBody',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EchoDelete(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.api.probe.v1.ProbeService/EchoDelete',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.SimpleMessage.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EchoError(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.api.probe.v1.ProbeService/EchoError',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ErrorMessage.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.ErrorMessage.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EchoPatch(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.api.probe.v1.ProbeService/EchoPatch',
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.DynamicMessageUpdate.SerializeToString,
            bilibili_dot_api_dot_probe_dot_v1_dot_probe__pb2.DynamicMessageUpdate.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
