You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

242 lines
15 KiB

8 months ago
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: Models/SHTCMessage.proto
  4. // </auto-generated>
  5. // Original file comments:
  6. // See README.txt for information and build instructions.
  7. //
  8. // Note: START and END tags are used in comments to define sections used in
  9. // tutorials. They are not part of the syntax for Protocol Buffers.
  10. //
  11. // To get an in-depth walkthrough of this file and the related examples, see:
  12. // https://developers.google.com/protocol-buffers/docs/tutorials
  13. //
  14. // [START declaration]
  15. //
  16. #pragma warning disable 0414, 1591, 8981, 0612
  17. #region Designer generated code
  18. using grpc = global::Grpc.Core;
  19. namespace Mirle.Component.API.ShuttleCarController.Models {
  20. public static partial class WCSGreeter
  21. {
  22. static readonly string __ServiceName = "tutorial.WCSGreeter";
  23. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  24. static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
  25. {
  26. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  27. if (message is global::Google.Protobuf.IBufferMessage)
  28. {
  29. context.SetPayloadLength(message.CalculateSize());
  30. global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
  31. context.Complete();
  32. return;
  33. }
  34. #endif
  35. context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
  36. }
  37. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  38. static class __Helper_MessageCache<T>
  39. {
  40. public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
  41. }
  42. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  43. static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
  44. {
  45. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  46. if (__Helper_MessageCache<T>.IsBufferMessage)
  47. {
  48. return parser.ParseFrom(context.PayloadAsReadOnlySequence());
  49. }
  50. #endif
  51. return parser.ParseFrom(context.PayloadAsNewBuffer());
  52. }
  53. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  54. static readonly grpc::Marshaller<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> __Marshaller_tutorial_WrapperMessage = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage.Parser));
  55. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  56. static readonly grpc::Method<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> __Method_UnaryMessage = new grpc::Method<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage>(
  57. grpc::MethodType.Unary,
  58. __ServiceName,
  59. "UnaryMessage",
  60. __Marshaller_tutorial_WrapperMessage,
  61. __Marshaller_tutorial_WrapperMessage);
  62. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  63. static readonly grpc::Method<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> __Method_ClientSteamMessage = new grpc::Method<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage>(
  64. grpc::MethodType.ClientStreaming,
  65. __ServiceName,
  66. "ClientSteamMessage",
  67. __Marshaller_tutorial_WrapperMessage,
  68. __Marshaller_tutorial_WrapperMessage);
  69. /// <summary>Service descriptor</summary>
  70. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  71. {
  72. get { return global::Mirle.Component.API.ShuttleCarController.Models.SHTCMessageReflection.Descriptor.Services[0]; }
  73. }
  74. /// <summary>Base class for server-side implementations of WCSGreeter</summary>
  75. [grpc::BindServiceMethod(typeof(WCSGreeter), "BindService")]
  76. public abstract partial class WCSGreeterBase
  77. {
  78. /// <summary>
  79. ///138 136 132
  80. /// </summary>
  81. /// <param name="request">The request received from the client.</param>
  82. /// <param name="context">The context of the server-side call handler being invoked.</param>
  83. /// <returns>The response to send back to the client (wrapped by a task).</returns>
  84. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  85. public virtual global::System.Threading.Tasks.Task<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> UnaryMessage(global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage request, grpc::ServerCallContext context)
  86. {
  87. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  88. }
  89. /// <summary>
  90. ///134 144
  91. /// </summary>
  92. /// <param name="requestStream">Used for reading requests from the client.</param>
  93. /// <param name="context">The context of the server-side call handler being invoked.</param>
  94. /// <returns>The response to send back to the client (wrapped by a task).</returns>
  95. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  96. public virtual global::System.Threading.Tasks.Task<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> ClientSteamMessage(grpc::IAsyncStreamReader<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> requestStream, grpc::ServerCallContext context)
  97. {
  98. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  99. }
  100. }
  101. /// <summary>Client for WCSGreeter</summary>
  102. public partial class WCSGreeterClient : grpc::ClientBase<WCSGreeterClient>
  103. {
  104. /// <summary>Creates a new client for WCSGreeter</summary>
  105. /// <param name="channel">The channel to use to make remote calls.</param>
  106. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  107. public WCSGreeterClient(grpc::ChannelBase channel) : base(channel)
  108. {
  109. }
  110. /// <summary>Creates a new client for WCSGreeter that uses a custom <c>CallInvoker</c>.</summary>
  111. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  112. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  113. public WCSGreeterClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  114. {
  115. }
  116. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  117. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  118. protected WCSGreeterClient() : base()
  119. {
  120. }
  121. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  122. /// <param name="configuration">The client configuration.</param>
  123. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  124. protected WCSGreeterClient(ClientBaseConfiguration configuration) : base(configuration)
  125. {
  126. }
  127. /// <summary>
  128. ///138 136 132
  129. /// </summary>
  130. /// <param name="request">The request to send to the server.</param>
  131. /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
  132. /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
  133. /// <param name="cancellationToken">An optional token for canceling the call.</param>
  134. /// <returns>The response received from the server.</returns>
  135. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  136. public virtual global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage UnaryMessage(global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  137. {
  138. return UnaryMessage(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  139. }
  140. /// <summary>
  141. ///138 136 132
  142. /// </summary>
  143. /// <param name="request">The request to send to the server.</param>
  144. /// <param name="options">The options for the call.</param>
  145. /// <returns>The response received from the server.</returns>
  146. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  147. public virtual global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage UnaryMessage(global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage request, grpc::CallOptions options)
  148. {
  149. return CallInvoker.BlockingUnaryCall(__Method_UnaryMessage, null, options, request);
  150. }
  151. /// <summary>
  152. ///138 136 132
  153. /// </summary>
  154. /// <param name="request">The request to send to the server.</param>
  155. /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
  156. /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
  157. /// <param name="cancellationToken">An optional token for canceling the call.</param>
  158. /// <returns>The call object.</returns>
  159. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  160. public virtual grpc::AsyncUnaryCall<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> UnaryMessageAsync(global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  161. {
  162. return UnaryMessageAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  163. }
  164. /// <summary>
  165. ///138 136 132
  166. /// </summary>
  167. /// <param name="request">The request to send to the server.</param>
  168. /// <param name="options">The options for the call.</param>
  169. /// <returns>The call object.</returns>
  170. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  171. public virtual grpc::AsyncUnaryCall<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> UnaryMessageAsync(global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage request, grpc::CallOptions options)
  172. {
  173. return CallInvoker.AsyncUnaryCall(__Method_UnaryMessage, null, options, request);
  174. }
  175. /// <summary>
  176. ///134 144
  177. /// </summary>
  178. /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
  179. /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
  180. /// <param name="cancellationToken">An optional token for canceling the call.</param>
  181. /// <returns>The call object.</returns>
  182. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  183. public virtual grpc::AsyncClientStreamingCall<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> ClientSteamMessage(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  184. {
  185. return ClientSteamMessage(new grpc::CallOptions(headers, deadline, cancellationToken));
  186. }
  187. /// <summary>
  188. ///134 144
  189. /// </summary>
  190. /// <param name="options">The options for the call.</param>
  191. /// <returns>The call object.</returns>
  192. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  193. public virtual grpc::AsyncClientStreamingCall<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage> ClientSteamMessage(grpc::CallOptions options)
  194. {
  195. return CallInvoker.AsyncClientStreamingCall(__Method_ClientSteamMessage, null, options);
  196. }
  197. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  198. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  199. protected override WCSGreeterClient NewInstance(ClientBaseConfiguration configuration)
  200. {
  201. return new WCSGreeterClient(configuration);
  202. }
  203. }
  204. /// <summary>Creates service definition that can be registered with a server</summary>
  205. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  206. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  207. public static grpc::ServerServiceDefinition BindService(WCSGreeterBase serviceImpl)
  208. {
  209. return grpc::ServerServiceDefinition.CreateBuilder()
  210. .AddMethod(__Method_UnaryMessage, serviceImpl.UnaryMessage)
  211. .AddMethod(__Method_ClientSteamMessage, serviceImpl.ClientSteamMessage).Build();
  212. }
  213. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  214. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  215. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  216. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  217. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  218. public static void BindService(grpc::ServiceBinderBase serviceBinder, WCSGreeterBase serviceImpl)
  219. {
  220. serviceBinder.AddMethod(__Method_UnaryMessage, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage>(serviceImpl.UnaryMessage));
  221. serviceBinder.AddMethod(__Method_ClientSteamMessage, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod<global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage, global::Mirle.Component.API.ShuttleCarController.Models.WrapperMessage>(serviceImpl.ClientSteamMessage));
  222. }
  223. }
  224. }
  225. #endregion