phone_pb2_grpc.py 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2. import grpc
  3. import phone_pb2 as phone__pb2
  4. class PhoneStub(object):
  5. """Missing associated documentation comment in .proto file"""
  6. def __init__(self, channel):
  7. """Constructor.
  8. Args:
  9. channel: A grpc.Channel.
  10. """
  11. self.StreamCall = channel.stream_stream(
  12. '/grpc.testing.Phone/StreamCall',
  13. request_serializer=phone__pb2.StreamCallRequest.SerializeToString,
  14. response_deserializer=phone__pb2.StreamCallResponse.FromString,
  15. )
  16. class PhoneServicer(object):
  17. """Missing associated documentation comment in .proto file"""
  18. def StreamCall(self, request_iterator, context):
  19. """Makes a phone call and communicate states via a stream.
  20. """
  21. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  22. context.set_details('Method not implemented!')
  23. raise NotImplementedError('Method not implemented!')
  24. def add_PhoneServicer_to_server(servicer, server):
  25. rpc_method_handlers = {
  26. 'StreamCall': grpc.stream_stream_rpc_method_handler(
  27. servicer.StreamCall,
  28. request_deserializer=phone__pb2.StreamCallRequest.FromString,
  29. response_serializer=phone__pb2.StreamCallResponse.SerializeToString,
  30. ),
  31. }
  32. generic_handler = grpc.method_handlers_generic_handler(
  33. 'grpc.testing.Phone', rpc_method_handlers)
  34. server.add_generic_rpc_handlers((generic_handler,))
  35. # This class is part of an EXPERIMENTAL API.
  36. class Phone(object):
  37. """Missing associated documentation comment in .proto file"""
  38. @staticmethod
  39. def StreamCall(request_iterator,
  40. target,
  41. options=(),
  42. channel_credentials=None,
  43. call_credentials=None,
  44. compression=None,
  45. wait_for_ready=None,
  46. timeout=None,
  47. metadata=None):
  48. return grpc.experimental.stream_stream(request_iterator, target, '/grpc.testing.Phone/StreamCall',
  49. phone__pb2.StreamCallRequest.SerializeToString,
  50. phone__pb2.StreamCallResponse.FromString,
  51. options, channel_credentials,
  52. call_credentials, compression, wait_for_ready, timeout, metadata)