text_data_pb2_grpc.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2. """Client and server classes corresponding to protobuf-defined services."""
  3. import grpc
  4. import fish_speech.datasets.protos.text_data_pb2 as text__data__pb2
  5. class DataServiceStub(object):
  6. """Missing associated documentation comment in .proto file."""
  7. def __init__(self, channel):
  8. """Constructor.
  9. Args:
  10. channel: A grpc.Channel.
  11. """
  12. self.SampleData = channel.unary_unary(
  13. "/text_data.DataService/SampleData",
  14. request_serializer=text__data__pb2.SampleDataRequest.SerializeToString,
  15. response_deserializer=text__data__pb2.SampledData.FromString,
  16. )
  17. class DataServiceServicer(object):
  18. """Missing associated documentation comment in .proto file."""
  19. def SampleData(self, request, context):
  20. """Missing associated documentation comment in .proto file."""
  21. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  22. context.set_details("Method not implemented!")
  23. raise NotImplementedError("Method not implemented!")
  24. def add_DataServiceServicer_to_server(servicer, server):
  25. rpc_method_handlers = {
  26. "SampleData": grpc.unary_unary_rpc_method_handler(
  27. servicer.SampleData,
  28. request_deserializer=text__data__pb2.SampleDataRequest.FromString,
  29. response_serializer=text__data__pb2.SampledData.SerializeToString,
  30. ),
  31. }
  32. generic_handler = grpc.method_handlers_generic_handler(
  33. "text_data.DataService", rpc_method_handlers
  34. )
  35. server.add_generic_rpc_handlers((generic_handler,))
  36. # This class is part of an EXPERIMENTAL API.
  37. class DataService(object):
  38. """Missing associated documentation comment in .proto file."""
  39. @staticmethod
  40. def SampleData(
  41. request,
  42. target,
  43. options=(),
  44. channel_credentials=None,
  45. call_credentials=None,
  46. insecure=False,
  47. compression=None,
  48. wait_for_ready=None,
  49. timeout=None,
  50. metadata=None,
  51. ):
  52. return grpc.experimental.unary_unary(
  53. request,
  54. target,
  55. "/text_data.DataService/SampleData",
  56. text__data__pb2.SampleDataRequest.SerializeToString,
  57. text__data__pb2.SampledData.FromString,
  58. options,
  59. channel_credentials,
  60. insecure,
  61. call_credentials,
  62. compression,
  63. wait_for_ready,
  64. timeout,
  65. metadata,
  66. )