2
0

LilyGrpc.cs 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: lily.proto
  4. // </auto-generated>
  5. #pragma warning disable 0414, 1591, 8981, 0612
  6. #region Designer generated code
  7. using grpc = global::Grpc.Core;
  8. namespace Palm.Lily.V1 {
  9. public static partial class Excel
  10. {
  11. static readonly string __ServiceName = "palm.lily.v1.Excel";
  12. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  13. static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
  14. {
  15. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  16. if (message is global::Google.Protobuf.IBufferMessage)
  17. {
  18. context.SetPayloadLength(message.CalculateSize());
  19. global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
  20. context.Complete();
  21. return;
  22. }
  23. #endif
  24. context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
  25. }
  26. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  27. static class __Helper_MessageCache<T>
  28. {
  29. public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
  30. }
  31. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  32. static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
  33. {
  34. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  35. if (__Helper_MessageCache<T>.IsBufferMessage)
  36. {
  37. return parser.ParseFrom(context.PayloadAsReadOnlySequence());
  38. }
  39. #endif
  40. return parser.ParseFrom(context.PayloadAsNewBuffer());
  41. }
  42. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  43. static readonly grpc::Marshaller<global::Palm.Lily.V1.S3File> __Marshaller_palm_lily_v1_S3File = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.S3File.Parser));
  44. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  45. static readonly grpc::Marshaller<global::Palm.Lily.V1.ExcelModel> __Marshaller_palm_lily_v1_ExcelModel = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.ExcelModel.Parser));
  46. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  47. static readonly grpc::Method<global::Palm.Lily.V1.S3File, global::Palm.Lily.V1.ExcelModel> __Method_Parse = new grpc::Method<global::Palm.Lily.V1.S3File, global::Palm.Lily.V1.ExcelModel>(
  48. grpc::MethodType.Unary,
  49. __ServiceName,
  50. "Parse",
  51. __Marshaller_palm_lily_v1_S3File,
  52. __Marshaller_palm_lily_v1_ExcelModel);
  53. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  54. static readonly grpc::Method<global::Palm.Lily.V1.ExcelModel, global::Palm.Lily.V1.S3File> __Method_Generate = new grpc::Method<global::Palm.Lily.V1.ExcelModel, global::Palm.Lily.V1.S3File>(
  55. grpc::MethodType.Unary,
  56. __ServiceName,
  57. "Generate",
  58. __Marshaller_palm_lily_v1_ExcelModel,
  59. __Marshaller_palm_lily_v1_S3File);
  60. /// <summary>Service descriptor</summary>
  61. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  62. {
  63. get { return global::Palm.Lily.V1.LilyReflection.Descriptor.Services[0]; }
  64. }
  65. /// <summary>Base class for server-side implementations of Excel</summary>
  66. [grpc::BindServiceMethod(typeof(Excel), "BindService")]
  67. public abstract partial class ExcelBase
  68. {
  69. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  70. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.ExcelModel> Parse(global::Palm.Lily.V1.S3File request, grpc::ServerCallContext context)
  71. {
  72. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  73. }
  74. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  75. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.S3File> Generate(global::Palm.Lily.V1.ExcelModel request, grpc::ServerCallContext context)
  76. {
  77. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  78. }
  79. }
  80. /// <summary>Client for Excel</summary>
  81. public partial class ExcelClient : grpc::ClientBase<ExcelClient>
  82. {
  83. /// <summary>Creates a new client for Excel</summary>
  84. /// <param name="channel">The channel to use to make remote calls.</param>
  85. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  86. public ExcelClient(grpc::ChannelBase channel) : base(channel)
  87. {
  88. }
  89. /// <summary>Creates a new client for Excel that uses a custom <c>CallInvoker</c>.</summary>
  90. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  91. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  92. public ExcelClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  93. {
  94. }
  95. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  96. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  97. protected ExcelClient() : base()
  98. {
  99. }
  100. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  101. /// <param name="configuration">The client configuration.</param>
  102. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  103. protected ExcelClient(ClientBaseConfiguration configuration) : base(configuration)
  104. {
  105. }
  106. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  107. public virtual global::Palm.Lily.V1.ExcelModel Parse(global::Palm.Lily.V1.S3File request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  108. {
  109. return Parse(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  110. }
  111. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  112. public virtual global::Palm.Lily.V1.ExcelModel Parse(global::Palm.Lily.V1.S3File request, grpc::CallOptions options)
  113. {
  114. return CallInvoker.BlockingUnaryCall(__Method_Parse, null, options, request);
  115. }
  116. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  117. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.ExcelModel> ParseAsync(global::Palm.Lily.V1.S3File request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  118. {
  119. return ParseAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  120. }
  121. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  122. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.ExcelModel> ParseAsync(global::Palm.Lily.V1.S3File request, grpc::CallOptions options)
  123. {
  124. return CallInvoker.AsyncUnaryCall(__Method_Parse, null, options, request);
  125. }
  126. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  127. public virtual global::Palm.Lily.V1.S3File Generate(global::Palm.Lily.V1.ExcelModel request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  128. {
  129. return Generate(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  130. }
  131. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  132. public virtual global::Palm.Lily.V1.S3File Generate(global::Palm.Lily.V1.ExcelModel request, grpc::CallOptions options)
  133. {
  134. return CallInvoker.BlockingUnaryCall(__Method_Generate, null, options, request);
  135. }
  136. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  137. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3File> GenerateAsync(global::Palm.Lily.V1.ExcelModel request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  138. {
  139. return GenerateAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  140. }
  141. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  142. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3File> GenerateAsync(global::Palm.Lily.V1.ExcelModel request, grpc::CallOptions options)
  143. {
  144. return CallInvoker.AsyncUnaryCall(__Method_Generate, null, options, request);
  145. }
  146. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  147. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  148. protected override ExcelClient NewInstance(ClientBaseConfiguration configuration)
  149. {
  150. return new ExcelClient(configuration);
  151. }
  152. }
  153. /// <summary>Creates service definition that can be registered with a server</summary>
  154. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  155. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  156. public static grpc::ServerServiceDefinition BindService(ExcelBase serviceImpl)
  157. {
  158. return grpc::ServerServiceDefinition.CreateBuilder()
  159. .AddMethod(__Method_Parse, serviceImpl.Parse)
  160. .AddMethod(__Method_Generate, serviceImpl.Generate).Build();
  161. }
  162. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  163. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  164. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  165. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  166. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  167. public static void BindService(grpc::ServiceBinderBase serviceBinder, ExcelBase serviceImpl)
  168. {
  169. serviceBinder.AddMethod(__Method_Parse, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.S3File, global::Palm.Lily.V1.ExcelModel>(serviceImpl.Parse));
  170. serviceBinder.AddMethod(__Method_Generate, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.ExcelModel, global::Palm.Lily.V1.S3File>(serviceImpl.Generate));
  171. }
  172. }
  173. public static partial class S3
  174. {
  175. static readonly string __ServiceName = "palm.lily.v1.S3";
  176. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  177. static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
  178. {
  179. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  180. if (message is global::Google.Protobuf.IBufferMessage)
  181. {
  182. context.SetPayloadLength(message.CalculateSize());
  183. global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
  184. context.Complete();
  185. return;
  186. }
  187. #endif
  188. context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
  189. }
  190. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  191. static class __Helper_MessageCache<T>
  192. {
  193. public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
  194. }
  195. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  196. static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
  197. {
  198. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  199. if (__Helper_MessageCache<T>.IsBufferMessage)
  200. {
  201. return parser.ParseFrom(context.PayloadAsReadOnlySequence());
  202. }
  203. #endif
  204. return parser.ParseFrom(context.PayloadAsNewBuffer());
  205. }
  206. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  207. static readonly grpc::Marshaller<global::Palm.Lily.V1.S3GetFileRequest> __Marshaller_palm_lily_v1_S3GetFileRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.S3GetFileRequest.Parser));
  208. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  209. static readonly grpc::Marshaller<global::Palm.Lily.V1.S3GetFileResponse> __Marshaller_palm_lily_v1_S3GetFileResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.S3GetFileResponse.Parser));
  210. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  211. static readonly grpc::Method<global::Palm.Lily.V1.S3GetFileRequest, global::Palm.Lily.V1.S3GetFileResponse> __Method_GetFile = new grpc::Method<global::Palm.Lily.V1.S3GetFileRequest, global::Palm.Lily.V1.S3GetFileResponse>(
  212. grpc::MethodType.Unary,
  213. __ServiceName,
  214. "GetFile",
  215. __Marshaller_palm_lily_v1_S3GetFileRequest,
  216. __Marshaller_palm_lily_v1_S3GetFileResponse);
  217. /// <summary>Service descriptor</summary>
  218. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  219. {
  220. get { return global::Palm.Lily.V1.LilyReflection.Descriptor.Services[1]; }
  221. }
  222. /// <summary>Base class for server-side implementations of S3</summary>
  223. [grpc::BindServiceMethod(typeof(S3), "BindService")]
  224. public abstract partial class S3Base
  225. {
  226. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  227. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.S3GetFileResponse> GetFile(global::Palm.Lily.V1.S3GetFileRequest request, grpc::ServerCallContext context)
  228. {
  229. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  230. }
  231. }
  232. /// <summary>Client for S3</summary>
  233. public partial class S3Client : grpc::ClientBase<S3Client>
  234. {
  235. /// <summary>Creates a new client for S3</summary>
  236. /// <param name="channel">The channel to use to make remote calls.</param>
  237. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  238. public S3Client(grpc::ChannelBase channel) : base(channel)
  239. {
  240. }
  241. /// <summary>Creates a new client for S3 that uses a custom <c>CallInvoker</c>.</summary>
  242. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  243. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  244. public S3Client(grpc::CallInvoker callInvoker) : base(callInvoker)
  245. {
  246. }
  247. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  248. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  249. protected S3Client() : base()
  250. {
  251. }
  252. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  253. /// <param name="configuration">The client configuration.</param>
  254. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  255. protected S3Client(ClientBaseConfiguration configuration) : base(configuration)
  256. {
  257. }
  258. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  259. public virtual global::Palm.Lily.V1.S3GetFileResponse GetFile(global::Palm.Lily.V1.S3GetFileRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  260. {
  261. return GetFile(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  262. }
  263. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  264. public virtual global::Palm.Lily.V1.S3GetFileResponse GetFile(global::Palm.Lily.V1.S3GetFileRequest request, grpc::CallOptions options)
  265. {
  266. return CallInvoker.BlockingUnaryCall(__Method_GetFile, null, options, request);
  267. }
  268. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  269. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3GetFileResponse> GetFileAsync(global::Palm.Lily.V1.S3GetFileRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  270. {
  271. return GetFileAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  272. }
  273. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  274. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3GetFileResponse> GetFileAsync(global::Palm.Lily.V1.S3GetFileRequest request, grpc::CallOptions options)
  275. {
  276. return CallInvoker.AsyncUnaryCall(__Method_GetFile, null, options, request);
  277. }
  278. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  279. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  280. protected override S3Client NewInstance(ClientBaseConfiguration configuration)
  281. {
  282. return new S3Client(configuration);
  283. }
  284. }
  285. /// <summary>Creates service definition that can be registered with a server</summary>
  286. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  287. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  288. public static grpc::ServerServiceDefinition BindService(S3Base serviceImpl)
  289. {
  290. return grpc::ServerServiceDefinition.CreateBuilder()
  291. .AddMethod(__Method_GetFile, serviceImpl.GetFile).Build();
  292. }
  293. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  294. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  295. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  296. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  297. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  298. public static void BindService(grpc::ServiceBinderBase serviceBinder, S3Base serviceImpl)
  299. {
  300. serviceBinder.AddMethod(__Method_GetFile, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.S3GetFileRequest, global::Palm.Lily.V1.S3GetFileResponse>(serviceImpl.GetFile));
  301. }
  302. }
  303. public static partial class Tex
  304. {
  305. static readonly string __ServiceName = "palm.lily.v1.Tex";
  306. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  307. static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
  308. {
  309. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  310. if (message is global::Google.Protobuf.IBufferMessage)
  311. {
  312. context.SetPayloadLength(message.CalculateSize());
  313. global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
  314. context.Complete();
  315. return;
  316. }
  317. #endif
  318. context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
  319. }
  320. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  321. static class __Helper_MessageCache<T>
  322. {
  323. public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
  324. }
  325. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  326. static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
  327. {
  328. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  329. if (__Helper_MessageCache<T>.IsBufferMessage)
  330. {
  331. return parser.ParseFrom(context.PayloadAsReadOnlySequence());
  332. }
  333. #endif
  334. return parser.ParseFrom(context.PayloadAsNewBuffer());
  335. }
  336. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  337. static readonly grpc::Marshaller<global::Palm.Lily.V1.TexToRequest> __Marshaller_palm_lily_v1_TexToRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.TexToRequest.Parser));
  338. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  339. static readonly grpc::Marshaller<global::Palm.Lily.V1.S3File> __Marshaller_palm_lily_v1_S3File = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.S3File.Parser));
  340. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  341. static readonly grpc::Method<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.S3File> __Method_ToPdf = new grpc::Method<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.S3File>(
  342. grpc::MethodType.Unary,
  343. __ServiceName,
  344. "ToPdf",
  345. __Marshaller_palm_lily_v1_TexToRequest,
  346. __Marshaller_palm_lily_v1_S3File);
  347. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  348. static readonly grpc::Method<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.S3File> __Method_ToWord = new grpc::Method<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.S3File>(
  349. grpc::MethodType.Unary,
  350. __ServiceName,
  351. "ToWord",
  352. __Marshaller_palm_lily_v1_TexToRequest,
  353. __Marshaller_palm_lily_v1_S3File);
  354. /// <summary>Service descriptor</summary>
  355. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  356. {
  357. get { return global::Palm.Lily.V1.LilyReflection.Descriptor.Services[2]; }
  358. }
  359. /// <summary>Base class for server-side implementations of Tex</summary>
  360. [grpc::BindServiceMethod(typeof(Tex), "BindService")]
  361. public abstract partial class TexBase
  362. {
  363. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  364. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.S3File> ToPdf(global::Palm.Lily.V1.TexToRequest request, grpc::ServerCallContext context)
  365. {
  366. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  367. }
  368. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  369. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.S3File> ToWord(global::Palm.Lily.V1.TexToRequest request, grpc::ServerCallContext context)
  370. {
  371. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  372. }
  373. }
  374. /// <summary>Client for Tex</summary>
  375. public partial class TexClient : grpc::ClientBase<TexClient>
  376. {
  377. /// <summary>Creates a new client for Tex</summary>
  378. /// <param name="channel">The channel to use to make remote calls.</param>
  379. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  380. public TexClient(grpc::ChannelBase channel) : base(channel)
  381. {
  382. }
  383. /// <summary>Creates a new client for Tex that uses a custom <c>CallInvoker</c>.</summary>
  384. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  385. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  386. public TexClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  387. {
  388. }
  389. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  390. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  391. protected TexClient() : base()
  392. {
  393. }
  394. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  395. /// <param name="configuration">The client configuration.</param>
  396. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  397. protected TexClient(ClientBaseConfiguration configuration) : base(configuration)
  398. {
  399. }
  400. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  401. public virtual global::Palm.Lily.V1.S3File ToPdf(global::Palm.Lily.V1.TexToRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  402. {
  403. return ToPdf(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  404. }
  405. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  406. public virtual global::Palm.Lily.V1.S3File ToPdf(global::Palm.Lily.V1.TexToRequest request, grpc::CallOptions options)
  407. {
  408. return CallInvoker.BlockingUnaryCall(__Method_ToPdf, null, options, request);
  409. }
  410. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  411. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3File> ToPdfAsync(global::Palm.Lily.V1.TexToRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  412. {
  413. return ToPdfAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  414. }
  415. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  416. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3File> ToPdfAsync(global::Palm.Lily.V1.TexToRequest request, grpc::CallOptions options)
  417. {
  418. return CallInvoker.AsyncUnaryCall(__Method_ToPdf, null, options, request);
  419. }
  420. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  421. public virtual global::Palm.Lily.V1.S3File ToWord(global::Palm.Lily.V1.TexToRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  422. {
  423. return ToWord(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  424. }
  425. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  426. public virtual global::Palm.Lily.V1.S3File ToWord(global::Palm.Lily.V1.TexToRequest request, grpc::CallOptions options)
  427. {
  428. return CallInvoker.BlockingUnaryCall(__Method_ToWord, null, options, request);
  429. }
  430. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  431. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3File> ToWordAsync(global::Palm.Lily.V1.TexToRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  432. {
  433. return ToWordAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  434. }
  435. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  436. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3File> ToWordAsync(global::Palm.Lily.V1.TexToRequest request, grpc::CallOptions options)
  437. {
  438. return CallInvoker.AsyncUnaryCall(__Method_ToWord, null, options, request);
  439. }
  440. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  441. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  442. protected override TexClient NewInstance(ClientBaseConfiguration configuration)
  443. {
  444. return new TexClient(configuration);
  445. }
  446. }
  447. /// <summary>Creates service definition that can be registered with a server</summary>
  448. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  449. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  450. public static grpc::ServerServiceDefinition BindService(TexBase serviceImpl)
  451. {
  452. return grpc::ServerServiceDefinition.CreateBuilder()
  453. .AddMethod(__Method_ToPdf, serviceImpl.ToPdf)
  454. .AddMethod(__Method_ToWord, serviceImpl.ToWord).Build();
  455. }
  456. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  457. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  458. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  459. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  460. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  461. public static void BindService(grpc::ServiceBinderBase serviceBinder, TexBase serviceImpl)
  462. {
  463. serviceBinder.AddMethod(__Method_ToPdf, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.S3File>(serviceImpl.ToPdf));
  464. serviceBinder.AddMethod(__Method_ToWord, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.S3File>(serviceImpl.ToWord));
  465. }
  466. }
  467. public static partial class Epub
  468. {
  469. static readonly string __ServiceName = "palm.lily.v1.Epub";
  470. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  471. static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
  472. {
  473. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  474. if (message is global::Google.Protobuf.IBufferMessage)
  475. {
  476. context.SetPayloadLength(message.CalculateSize());
  477. global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
  478. context.Complete();
  479. return;
  480. }
  481. #endif
  482. context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
  483. }
  484. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  485. static class __Helper_MessageCache<T>
  486. {
  487. public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
  488. }
  489. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  490. static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
  491. {
  492. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  493. if (__Helper_MessageCache<T>.IsBufferMessage)
  494. {
  495. return parser.ParseFrom(context.PayloadAsReadOnlySequence());
  496. }
  497. #endif
  498. return parser.ParseFrom(context.PayloadAsNewBuffer());
  499. }
  500. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  501. static readonly grpc::Marshaller<global::Palm.Lily.V1.EpubBuildRequest> __Marshaller_palm_lily_v1_EpubBuildRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.EpubBuildRequest.Parser));
  502. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  503. static readonly grpc::Marshaller<global::Palm.Lily.V1.S3File> __Marshaller_palm_lily_v1_S3File = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.S3File.Parser));
  504. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  505. static readonly grpc::Method<global::Palm.Lily.V1.EpubBuildRequest, global::Palm.Lily.V1.S3File> __Method_Build = new grpc::Method<global::Palm.Lily.V1.EpubBuildRequest, global::Palm.Lily.V1.S3File>(
  506. grpc::MethodType.Unary,
  507. __ServiceName,
  508. "Build",
  509. __Marshaller_palm_lily_v1_EpubBuildRequest,
  510. __Marshaller_palm_lily_v1_S3File);
  511. /// <summary>Service descriptor</summary>
  512. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  513. {
  514. get { return global::Palm.Lily.V1.LilyReflection.Descriptor.Services[3]; }
  515. }
  516. /// <summary>Base class for server-side implementations of Epub</summary>
  517. [grpc::BindServiceMethod(typeof(Epub), "BindService")]
  518. public abstract partial class EpubBase
  519. {
  520. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  521. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.S3File> Build(global::Palm.Lily.V1.EpubBuildRequest request, grpc::ServerCallContext context)
  522. {
  523. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  524. }
  525. }
  526. /// <summary>Client for Epub</summary>
  527. public partial class EpubClient : grpc::ClientBase<EpubClient>
  528. {
  529. /// <summary>Creates a new client for Epub</summary>
  530. /// <param name="channel">The channel to use to make remote calls.</param>
  531. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  532. public EpubClient(grpc::ChannelBase channel) : base(channel)
  533. {
  534. }
  535. /// <summary>Creates a new client for Epub that uses a custom <c>CallInvoker</c>.</summary>
  536. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  537. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  538. public EpubClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  539. {
  540. }
  541. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  542. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  543. protected EpubClient() : base()
  544. {
  545. }
  546. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  547. /// <param name="configuration">The client configuration.</param>
  548. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  549. protected EpubClient(ClientBaseConfiguration configuration) : base(configuration)
  550. {
  551. }
  552. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  553. public virtual global::Palm.Lily.V1.S3File Build(global::Palm.Lily.V1.EpubBuildRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  554. {
  555. return Build(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  556. }
  557. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  558. public virtual global::Palm.Lily.V1.S3File Build(global::Palm.Lily.V1.EpubBuildRequest request, grpc::CallOptions options)
  559. {
  560. return CallInvoker.BlockingUnaryCall(__Method_Build, null, options, request);
  561. }
  562. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  563. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3File> BuildAsync(global::Palm.Lily.V1.EpubBuildRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  564. {
  565. return BuildAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  566. }
  567. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  568. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.S3File> BuildAsync(global::Palm.Lily.V1.EpubBuildRequest request, grpc::CallOptions options)
  569. {
  570. return CallInvoker.AsyncUnaryCall(__Method_Build, null, options, request);
  571. }
  572. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  573. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  574. protected override EpubClient NewInstance(ClientBaseConfiguration configuration)
  575. {
  576. return new EpubClient(configuration);
  577. }
  578. }
  579. /// <summary>Creates service definition that can be registered with a server</summary>
  580. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  581. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  582. public static grpc::ServerServiceDefinition BindService(EpubBase serviceImpl)
  583. {
  584. return grpc::ServerServiceDefinition.CreateBuilder()
  585. .AddMethod(__Method_Build, serviceImpl.Build).Build();
  586. }
  587. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  588. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  589. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  590. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  591. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  592. public static void BindService(grpc::ServiceBinderBase serviceBinder, EpubBase serviceImpl)
  593. {
  594. serviceBinder.AddMethod(__Method_Build, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.EpubBuildRequest, global::Palm.Lily.V1.S3File>(serviceImpl.Build));
  595. }
  596. }
  597. }
  598. #endregion