Skip to content

Commit 54ec170

Browse files
anton-cornak“anton-cornak”
and
“anton-cornak”
authored
Purchase Lines service proto (#242)
* Plines service * protogen * removed healthcheck * protogen * better naming * protogen * cleanup * protogen * cleanup * protogen --------- Co-authored-by: “anton-cornak” <“[email protected]”>
1 parent cd969ac commit 54ec170

18 files changed

+3663
-0
lines changed

gen/csharp/LinesserviceGrpc.cs

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
// <auto-generated>
2+
// Generated by the protocol buffer compiler. DO NOT EDIT!
3+
// source: ssn/linesservice/v1/linesservice.proto
4+
// </auto-generated>
5+
#pragma warning disable 0414, 1591, 8981, 0612
6+
#region Designer generated code
7+
8+
using grpc = global::Grpc.Core;
9+
10+
namespace Ssn.Linesservice.V1 {
11+
public static partial class LinesService
12+
{
13+
static readonly string __ServiceName = "ssn.linesservice.v1.LinesService";
14+
15+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
16+
static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
17+
{
18+
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
19+
if (message is global::Google.Protobuf.IBufferMessage)
20+
{
21+
context.SetPayloadLength(message.CalculateSize());
22+
global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
23+
context.Complete();
24+
return;
25+
}
26+
#endif
27+
context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
28+
}
29+
30+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
31+
static class __Helper_MessageCache<T>
32+
{
33+
public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
34+
}
35+
36+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
37+
static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
38+
{
39+
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
40+
if (__Helper_MessageCache<T>.IsBufferMessage)
41+
{
42+
return parser.ParseFrom(context.PayloadAsReadOnlySequence());
43+
}
44+
#endif
45+
return parser.ParseFrom(context.PayloadAsNewBuffer());
46+
}
47+
48+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
49+
static readonly grpc::Marshaller<global::Ssn.Linesservice.V1.LinesRequest> __Marshaller_ssn_linesservice_v1_LinesRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Ssn.Linesservice.V1.LinesRequest.Parser));
50+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
51+
static readonly grpc::Marshaller<global::Ssn.Linesservice.V1.LinesResponse> __Marshaller_ssn_linesservice_v1_LinesResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Ssn.Linesservice.V1.LinesResponse.Parser));
52+
53+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
54+
static readonly grpc::Method<global::Ssn.Linesservice.V1.LinesRequest, global::Ssn.Linesservice.V1.LinesResponse> __Method_Predict = new grpc::Method<global::Ssn.Linesservice.V1.LinesRequest, global::Ssn.Linesservice.V1.LinesResponse>(
55+
grpc::MethodType.Unary,
56+
__ServiceName,
57+
"Predict",
58+
__Marshaller_ssn_linesservice_v1_LinesRequest,
59+
__Marshaller_ssn_linesservice_v1_LinesResponse);
60+
61+
/// <summary>Service descriptor</summary>
62+
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
63+
{
64+
get { return global::Ssn.Linesservice.V1.LinesserviceReflection.Descriptor.Services[0]; }
65+
}
66+
67+
/// <summary>Base class for server-side implementations of LinesService</summary>
68+
[grpc::BindServiceMethod(typeof(LinesService), "BindService")]
69+
public abstract partial class LinesServiceBase
70+
{
71+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
72+
public virtual global::System.Threading.Tasks.Task<global::Ssn.Linesservice.V1.LinesResponse> Predict(global::Ssn.Linesservice.V1.LinesRequest request, grpc::ServerCallContext context)
73+
{
74+
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
75+
}
76+
77+
}
78+
79+
/// <summary>Client for LinesService</summary>
80+
public partial class LinesServiceClient : grpc::ClientBase<LinesServiceClient>
81+
{
82+
/// <summary>Creates a new client for LinesService</summary>
83+
/// <param name="channel">The channel to use to make remote calls.</param>
84+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
85+
public LinesServiceClient(grpc::ChannelBase channel) : base(channel)
86+
{
87+
}
88+
/// <summary>Creates a new client for LinesService that uses a custom <c>CallInvoker</c>.</summary>
89+
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
90+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
91+
public LinesServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
92+
{
93+
}
94+
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
95+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
96+
protected LinesServiceClient() : base()
97+
{
98+
}
99+
/// <summary>Protected constructor to allow creation of configured clients.</summary>
100+
/// <param name="configuration">The client configuration.</param>
101+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
102+
protected LinesServiceClient(ClientBaseConfiguration configuration) : base(configuration)
103+
{
104+
}
105+
106+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
107+
public virtual global::Ssn.Linesservice.V1.LinesResponse Predict(global::Ssn.Linesservice.V1.LinesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
108+
{
109+
return Predict(request, new grpc::CallOptions(headers, deadline, cancellationToken));
110+
}
111+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
112+
public virtual global::Ssn.Linesservice.V1.LinesResponse Predict(global::Ssn.Linesservice.V1.LinesRequest request, grpc::CallOptions options)
113+
{
114+
return CallInvoker.BlockingUnaryCall(__Method_Predict, null, options, request);
115+
}
116+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
117+
public virtual grpc::AsyncUnaryCall<global::Ssn.Linesservice.V1.LinesResponse> PredictAsync(global::Ssn.Linesservice.V1.LinesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
118+
{
119+
return PredictAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
120+
}
121+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
122+
public virtual grpc::AsyncUnaryCall<global::Ssn.Linesservice.V1.LinesResponse> PredictAsync(global::Ssn.Linesservice.V1.LinesRequest request, grpc::CallOptions options)
123+
{
124+
return CallInvoker.AsyncUnaryCall(__Method_Predict, null, options, request);
125+
}
126+
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
127+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
128+
protected override LinesServiceClient NewInstance(ClientBaseConfiguration configuration)
129+
{
130+
return new LinesServiceClient(configuration);
131+
}
132+
}
133+
134+
/// <summary>Creates service definition that can be registered with a server</summary>
135+
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
136+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
137+
public static grpc::ServerServiceDefinition BindService(LinesServiceBase serviceImpl)
138+
{
139+
return grpc::ServerServiceDefinition.CreateBuilder()
140+
.AddMethod(__Method_Predict, serviceImpl.Predict).Build();
141+
}
142+
143+
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
144+
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
145+
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
146+
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
147+
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
148+
public static void BindService(grpc::ServiceBinderBase serviceBinder, LinesServiceBase serviceImpl)
149+
{
150+
serviceBinder.AddMethod(__Method_Predict, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Ssn.Linesservice.V1.LinesRequest, global::Ssn.Linesservice.V1.LinesResponse>(serviceImpl.Predict));
151+
}
152+
153+
}
154+
}
155+
#endregion

0 commit comments

Comments
 (0)