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

import x_pb2 as x__pb2


class PrivateTransferProtocolStub(object):
    """互联互通如果使用异步传输协议作为标准参考，Header会复用metadata传输互联互通协议报头，且metadata中会传输异步场景下的消息相关属性
    互联互通如果使用其他协议作为参考标准，Header会复用metadata传输互联互通协议报头
    互联互通如果使用GRPC作为参考标准，Header会复用HTTP2的报头传输互联互通协议报头

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.transport = channel.stream_stream(
                '/org.ppc.ptp.PrivateTransferProtocol/transport',
                request_serializer=x__pb2.Inbound.SerializeToString,
                response_deserializer=x__pb2.Outbound.FromString,
                )
        self.invoke = channel.unary_unary(
                '/org.ppc.ptp.PrivateTransferProtocol/invoke',
                request_serializer=x__pb2.Inbound.SerializeToString,
                response_deserializer=x__pb2.Outbound.FromString,
                )


class PrivateTransferProtocolServicer(object):
    """互联互通如果使用异步传输协议作为标准参考，Header会复用metadata传输互联互通协议报头，且metadata中会传输异步场景下的消息相关属性
    互联互通如果使用其他协议作为参考标准，Header会复用metadata传输互联互通协议报头
    互联互通如果使用GRPC作为参考标准，Header会复用HTTP2的报头传输互联互通协议报头

    """

    def transport(self, request_iterator, 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 invoke(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_PrivateTransferProtocolServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'transport': grpc.stream_stream_rpc_method_handler(
                    servicer.transport,
                    request_deserializer=x__pb2.Inbound.FromString,
                    response_serializer=x__pb2.Outbound.SerializeToString,
            ),
            'invoke': grpc.unary_unary_rpc_method_handler(
                    servicer.invoke,
                    request_deserializer=x__pb2.Inbound.FromString,
                    response_serializer=x__pb2.Outbound.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.ppc.ptp.PrivateTransferProtocol', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class PrivateTransferProtocol(object):
    """互联互通如果使用异步传输协议作为标准参考，Header会复用metadata传输互联互通协议报头，且metadata中会传输异步场景下的消息相关属性
    互联互通如果使用其他协议作为参考标准，Header会复用metadata传输互联互通协议报头
    互联互通如果使用GRPC作为参考标准，Header会复用HTTP2的报头传输互联互通协议报头

    """

    @staticmethod
    def transport(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/org.ppc.ptp.PrivateTransferProtocol/transport',
            x__pb2.Inbound.SerializeToString,
            x__pb2.Outbound.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def invoke(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, '/org.ppc.ptp.PrivateTransferProtocol/invoke',
            x__pb2.Inbound.SerializeToString,
            x__pb2.Outbound.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
