TulipGrpc.cs 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tulip.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 Mint.Tulip.V1 {
  9. public static partial class Search
  10. {
  11. static readonly string __ServiceName = "mint.tulip.v1.Search";
  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::Mint.Tulip.V1.SearchRequest> __Marshaller_mint_tulip_v1_SearchRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Mint.Tulip.V1.SearchRequest.Parser));
  44. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  45. static readonly grpc::Marshaller<global::Mint.Tulip.V1.SearchResponse> __Marshaller_mint_tulip_v1_SearchResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Mint.Tulip.V1.SearchResponse.Parser));
  46. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  47. static readonly grpc::Method<global::Mint.Tulip.V1.SearchRequest, global::Mint.Tulip.V1.SearchResponse> __Method_Pali = new grpc::Method<global::Mint.Tulip.V1.SearchRequest, global::Mint.Tulip.V1.SearchResponse>(
  48. grpc::MethodType.Unary,
  49. __ServiceName,
  50. "Pali",
  51. __Marshaller_mint_tulip_v1_SearchRequest,
  52. __Marshaller_mint_tulip_v1_SearchResponse);
  53. /// <summary>Service descriptor</summary>
  54. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  55. {
  56. get { return global::Mint.Tulip.V1.TulipReflection.Descriptor.Services[0]; }
  57. }
  58. /// <summary>Base class for server-side implementations of Search</summary>
  59. [grpc::BindServiceMethod(typeof(Search), "BindService")]
  60. public abstract partial class SearchBase
  61. {
  62. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  63. public virtual global::System.Threading.Tasks.Task<global::Mint.Tulip.V1.SearchResponse> Pali(global::Mint.Tulip.V1.SearchRequest request, grpc::ServerCallContext context)
  64. {
  65. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  66. }
  67. }
  68. /// <summary>Client for Search</summary>
  69. public partial class SearchClient : grpc::ClientBase<SearchClient>
  70. {
  71. /// <summary>Creates a new client for Search</summary>
  72. /// <param name="channel">The channel to use to make remote calls.</param>
  73. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  74. public SearchClient(grpc::ChannelBase channel) : base(channel)
  75. {
  76. }
  77. /// <summary>Creates a new client for Search that uses a custom <c>CallInvoker</c>.</summary>
  78. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  79. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  80. public SearchClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  81. {
  82. }
  83. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  84. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  85. protected SearchClient() : base()
  86. {
  87. }
  88. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  89. /// <param name="configuration">The client configuration.</param>
  90. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  91. protected SearchClient(ClientBaseConfiguration configuration) : base(configuration)
  92. {
  93. }
  94. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  95. public virtual global::Mint.Tulip.V1.SearchResponse Pali(global::Mint.Tulip.V1.SearchRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  96. {
  97. return Pali(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  98. }
  99. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  100. public virtual global::Mint.Tulip.V1.SearchResponse Pali(global::Mint.Tulip.V1.SearchRequest request, grpc::CallOptions options)
  101. {
  102. return CallInvoker.BlockingUnaryCall(__Method_Pali, null, options, request);
  103. }
  104. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  105. public virtual grpc::AsyncUnaryCall<global::Mint.Tulip.V1.SearchResponse> PaliAsync(global::Mint.Tulip.V1.SearchRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  106. {
  107. return PaliAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  108. }
  109. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  110. public virtual grpc::AsyncUnaryCall<global::Mint.Tulip.V1.SearchResponse> PaliAsync(global::Mint.Tulip.V1.SearchRequest request, grpc::CallOptions options)
  111. {
  112. return CallInvoker.AsyncUnaryCall(__Method_Pali, null, options, request);
  113. }
  114. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  115. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  116. protected override SearchClient NewInstance(ClientBaseConfiguration configuration)
  117. {
  118. return new SearchClient(configuration);
  119. }
  120. }
  121. /// <summary>Creates service definition that can be registered with a server</summary>
  122. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  123. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  124. public static grpc::ServerServiceDefinition BindService(SearchBase serviceImpl)
  125. {
  126. return grpc::ServerServiceDefinition.CreateBuilder()
  127. .AddMethod(__Method_Pali, serviceImpl.Pali).Build();
  128. }
  129. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  130. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  131. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  132. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  133. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  134. public static void BindService(grpc::ServiceBinderBase serviceBinder, SearchBase serviceImpl)
  135. {
  136. serviceBinder.AddMethod(__Method_Pali, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Mint.Tulip.V1.SearchRequest, global::Mint.Tulip.V1.SearchResponse>(serviceImpl.Pali));
  137. }
  138. }
  139. }
  140. #endregion