lily_pb2_grpc.py 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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 lily_pb2 as lily__pb2
  5. class ExcelStub(object):
  6. """----------------------------------------------------------------------------
  7. """
  8. def __init__(self, channel):
  9. """Constructor.
  10. Args:
  11. channel: A grpc.Channel.
  12. """
  13. self.Parse = channel.unary_unary(
  14. '/palm.lily.v1.Excel/Parse',
  15. request_serializer=lily__pb2.File.SerializeToString,
  16. response_deserializer=lily__pb2.ExcelModel.FromString,
  17. )
  18. self.Generate = channel.unary_unary(
  19. '/palm.lily.v1.Excel/Generate',
  20. request_serializer=lily__pb2.ExcelModel.SerializeToString,
  21. response_deserializer=lily__pb2.File.FromString,
  22. )
  23. class ExcelServicer(object):
  24. """----------------------------------------------------------------------------
  25. """
  26. def Parse(self, request, context):
  27. """Missing associated documentation comment in .proto file."""
  28. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  29. context.set_details('Method not implemented!')
  30. raise NotImplementedError('Method not implemented!')
  31. def Generate(self, request, context):
  32. """Missing associated documentation comment in .proto file."""
  33. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  34. context.set_details('Method not implemented!')
  35. raise NotImplementedError('Method not implemented!')
  36. def add_ExcelServicer_to_server(servicer, server):
  37. rpc_method_handlers = {
  38. 'Parse': grpc.unary_unary_rpc_method_handler(
  39. servicer.Parse,
  40. request_deserializer=lily__pb2.File.FromString,
  41. response_serializer=lily__pb2.ExcelModel.SerializeToString,
  42. ),
  43. 'Generate': grpc.unary_unary_rpc_method_handler(
  44. servicer.Generate,
  45. request_deserializer=lily__pb2.ExcelModel.FromString,
  46. response_serializer=lily__pb2.File.SerializeToString,
  47. ),
  48. }
  49. generic_handler = grpc.method_handlers_generic_handler(
  50. 'palm.lily.v1.Excel', rpc_method_handlers)
  51. server.add_generic_rpc_handlers((generic_handler,))
  52. # This class is part of an EXPERIMENTAL API.
  53. class Excel(object):
  54. """----------------------------------------------------------------------------
  55. """
  56. @staticmethod
  57. def Parse(request,
  58. target,
  59. options=(),
  60. channel_credentials=None,
  61. call_credentials=None,
  62. insecure=False,
  63. compression=None,
  64. wait_for_ready=None,
  65. timeout=None,
  66. metadata=None):
  67. return grpc.experimental.unary_unary(request, target, '/palm.lily.v1.Excel/Parse',
  68. lily__pb2.File.SerializeToString,
  69. lily__pb2.ExcelModel.FromString,
  70. options, channel_credentials,
  71. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  72. @staticmethod
  73. def Generate(request,
  74. target,
  75. options=(),
  76. channel_credentials=None,
  77. call_credentials=None,
  78. insecure=False,
  79. compression=None,
  80. wait_for_ready=None,
  81. timeout=None,
  82. metadata=None):
  83. return grpc.experimental.unary_unary(request, target, '/palm.lily.v1.Excel/Generate',
  84. lily__pb2.ExcelModel.SerializeToString,
  85. lily__pb2.File.FromString,
  86. options, channel_credentials,
  87. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  88. class TexStub(object):
  89. """----------------------------------------------------------------------------
  90. """
  91. def __init__(self, channel):
  92. """Constructor.
  93. Args:
  94. channel: A grpc.Channel.
  95. """
  96. self.ToPdf = channel.unary_unary(
  97. '/palm.lily.v1.Tex/ToPdf',
  98. request_serializer=lily__pb2.TexToRequest.SerializeToString,
  99. response_deserializer=lily__pb2.File.FromString,
  100. )
  101. self.ToWord = channel.unary_unary(
  102. '/palm.lily.v1.Tex/ToWord',
  103. request_serializer=lily__pb2.TexToRequest.SerializeToString,
  104. response_deserializer=lily__pb2.File.FromString,
  105. )
  106. class TexServicer(object):
  107. """----------------------------------------------------------------------------
  108. """
  109. def ToPdf(self, request, context):
  110. """Missing associated documentation comment in .proto file."""
  111. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  112. context.set_details('Method not implemented!')
  113. raise NotImplementedError('Method not implemented!')
  114. def ToWord(self, request, context):
  115. """Missing associated documentation comment in .proto file."""
  116. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  117. context.set_details('Method not implemented!')
  118. raise NotImplementedError('Method not implemented!')
  119. def add_TexServicer_to_server(servicer, server):
  120. rpc_method_handlers = {
  121. 'ToPdf': grpc.unary_unary_rpc_method_handler(
  122. servicer.ToPdf,
  123. request_deserializer=lily__pb2.TexToRequest.FromString,
  124. response_serializer=lily__pb2.File.SerializeToString,
  125. ),
  126. 'ToWord': grpc.unary_unary_rpc_method_handler(
  127. servicer.ToWord,
  128. request_deserializer=lily__pb2.TexToRequest.FromString,
  129. response_serializer=lily__pb2.File.SerializeToString,
  130. ),
  131. }
  132. generic_handler = grpc.method_handlers_generic_handler(
  133. 'palm.lily.v1.Tex', rpc_method_handlers)
  134. server.add_generic_rpc_handlers((generic_handler,))
  135. # This class is part of an EXPERIMENTAL API.
  136. class Tex(object):
  137. """----------------------------------------------------------------------------
  138. """
  139. @staticmethod
  140. def ToPdf(request,
  141. target,
  142. options=(),
  143. channel_credentials=None,
  144. call_credentials=None,
  145. insecure=False,
  146. compression=None,
  147. wait_for_ready=None,
  148. timeout=None,
  149. metadata=None):
  150. return grpc.experimental.unary_unary(request, target, '/palm.lily.v1.Tex/ToPdf',
  151. lily__pb2.TexToRequest.SerializeToString,
  152. lily__pb2.File.FromString,
  153. options, channel_credentials,
  154. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  155. @staticmethod
  156. def ToWord(request,
  157. target,
  158. options=(),
  159. channel_credentials=None,
  160. call_credentials=None,
  161. insecure=False,
  162. compression=None,
  163. wait_for_ready=None,
  164. timeout=None,
  165. metadata=None):
  166. return grpc.experimental.unary_unary(request, target, '/palm.lily.v1.Tex/ToWord',
  167. lily__pb2.TexToRequest.SerializeToString,
  168. lily__pb2.File.FromString,
  169. options, channel_credentials,
  170. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  171. class EpubStub(object):
  172. """----------------------------------------------------------------------------
  173. """
  174. def __init__(self, channel):
  175. """Constructor.
  176. Args:
  177. channel: A grpc.Channel.
  178. """
  179. self.Build = channel.unary_unary(
  180. '/palm.lily.v1.Epub/Build',
  181. request_serializer=lily__pb2.EpubBuildRequest.SerializeToString,
  182. response_deserializer=lily__pb2.File.FromString,
  183. )
  184. class EpubServicer(object):
  185. """----------------------------------------------------------------------------
  186. """
  187. def Build(self, request, context):
  188. """Missing associated documentation comment in .proto file."""
  189. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  190. context.set_details('Method not implemented!')
  191. raise NotImplementedError('Method not implemented!')
  192. def add_EpubServicer_to_server(servicer, server):
  193. rpc_method_handlers = {
  194. 'Build': grpc.unary_unary_rpc_method_handler(
  195. servicer.Build,
  196. request_deserializer=lily__pb2.EpubBuildRequest.FromString,
  197. response_serializer=lily__pb2.File.SerializeToString,
  198. ),
  199. }
  200. generic_handler = grpc.method_handlers_generic_handler(
  201. 'palm.lily.v1.Epub', rpc_method_handlers)
  202. server.add_generic_rpc_handlers((generic_handler,))
  203. # This class is part of an EXPERIMENTAL API.
  204. class Epub(object):
  205. """----------------------------------------------------------------------------
  206. """
  207. @staticmethod
  208. def Build(request,
  209. target,
  210. options=(),
  211. channel_credentials=None,
  212. call_credentials=None,
  213. insecure=False,
  214. compression=None,
  215. wait_for_ready=None,
  216. timeout=None,
  217. metadata=None):
  218. return grpc.experimental.unary_unary(request, target, '/palm.lily.v1.Epub/Build',
  219. lily__pb2.EpubBuildRequest.SerializeToString,
  220. lily__pb2.File.FromString,
  221. options, channel_credentials,
  222. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)