blob: 996439afbf1395f4d8f64ae3a47d20a43ef6998d [file] [log] [blame]
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch72ce4422016-01-20 13:54:38 -08002// source: src/proto/grpc/testing/services.proto
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -07003#region Designer generated code
4
5using System;
6using System.Threading;
7using System.Threading.Tasks;
8using Grpc.Core;
9
10namespace Grpc.Testing {
11 public static class BenchmarkService
12 {
13 static readonly string __ServiceName = "grpc.testing.BenchmarkService";
14
15 static readonly Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom);
16 static readonly Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom);
17
18 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
19 MethodType.Unary,
20 __ServiceName,
21 "UnaryCall",
22 __Marshaller_SimpleRequest,
23 __Marshaller_SimpleResponse);
24
25 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
26 MethodType.DuplexStreaming,
27 __ServiceName,
28 "StreamingCall",
29 __Marshaller_SimpleRequest,
30 __Marshaller_SimpleResponse);
31
32 // service descriptor
33 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
34 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080035 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070036 }
37
38 // client interface
39 public interface IBenchmarkServiceClient
40 {
41 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
42 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options);
43 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
44 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options);
45 AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
46 AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(CallOptions options);
47 }
48
49 // server-side interface
50 public interface IBenchmarkService
51 {
52 Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context);
53 Task StreamingCall(IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, ServerCallContext context);
54 }
55
56 // client stub
57 public class BenchmarkServiceClient : ClientBase, IBenchmarkServiceClient
58 {
59 public BenchmarkServiceClient(Channel channel) : base(channel)
60 {
61 }
62 public global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
63 {
64 var call = CreateCall(__Method_UnaryCall, new CallOptions(headers, deadline, cancellationToken));
65 return Calls.BlockingUnaryCall(call, request);
66 }
67 public global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
68 {
69 var call = CreateCall(__Method_UnaryCall, options);
70 return Calls.BlockingUnaryCall(call, request);
71 }
72 public AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
73 {
74 var call = CreateCall(__Method_UnaryCall, new CallOptions(headers, deadline, cancellationToken));
75 return Calls.AsyncUnaryCall(call, request);
76 }
77 public AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
78 {
79 var call = CreateCall(__Method_UnaryCall, options);
80 return Calls.AsyncUnaryCall(call, request);
81 }
82 public AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
83 {
84 var call = CreateCall(__Method_StreamingCall, new CallOptions(headers, deadline, cancellationToken));
85 return Calls.AsyncDuplexStreamingCall(call);
86 }
87 public AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(CallOptions options)
88 {
89 var call = CreateCall(__Method_StreamingCall, options);
90 return Calls.AsyncDuplexStreamingCall(call);
91 }
92 }
93
94 // creates service definition that can be registered with a server
95 public static ServerServiceDefinition BindService(IBenchmarkService serviceImpl)
96 {
97 return ServerServiceDefinition.CreateBuilder(__ServiceName)
98 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
99 .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build();
100 }
101
102 // creates a new client
103 public static BenchmarkServiceClient NewClient(Channel channel)
104 {
105 return new BenchmarkServiceClient(channel);
106 }
107
108 }
109 public static class WorkerService
110 {
111 static readonly string __ServiceName = "grpc.testing.WorkerService";
112
113 static readonly Marshaller<global::Grpc.Testing.ServerArgs> __Marshaller_ServerArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerArgs.Parser.ParseFrom);
114 static readonly Marshaller<global::Grpc.Testing.ServerStatus> __Marshaller_ServerStatus = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom);
115 static readonly Marshaller<global::Grpc.Testing.ClientArgs> __Marshaller_ClientArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom);
116 static readonly Marshaller<global::Grpc.Testing.ClientStatus> __Marshaller_ClientStatus = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800117 static readonly Marshaller<global::Grpc.Testing.CoreRequest> __Marshaller_CoreRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom);
118 static readonly Marshaller<global::Grpc.Testing.CoreResponse> __Marshaller_CoreResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom);
119 static readonly Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700120
121 static readonly Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> __Method_RunServer = new Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus>(
122 MethodType.DuplexStreaming,
123 __ServiceName,
124 "RunServer",
125 __Marshaller_ServerArgs,
126 __Marshaller_ServerStatus);
127
128 static readonly Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> __Method_RunClient = new Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus>(
129 MethodType.DuplexStreaming,
130 __ServiceName,
131 "RunClient",
132 __Marshaller_ClientArgs,
133 __Marshaller_ClientStatus);
134
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800135 static readonly Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse> __Method_CoreCount = new Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse>(
136 MethodType.Unary,
137 __ServiceName,
138 "CoreCount",
139 __Marshaller_CoreRequest,
140 __Marshaller_CoreResponse);
141
142 static readonly Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void> __Method_QuitWorker = new Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void>(
143 MethodType.Unary,
144 __ServiceName,
145 "QuitWorker",
146 __Marshaller_Void,
147 __Marshaller_Void);
148
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700149 // service descriptor
150 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
151 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800152 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700153 }
154
155 // client interface
156 public interface IWorkerServiceClient
157 {
158 AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
159 AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(CallOptions options);
160 AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
161 AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(CallOptions options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800162 global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
163 global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options);
164 AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
165 AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options);
166 global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
167 global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options);
168 AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
169 AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700170 }
171
172 // server-side interface
173 public interface IWorkerService
174 {
175 Task RunServer(IAsyncStreamReader<global::Grpc.Testing.ServerArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ServerStatus> responseStream, ServerCallContext context);
176 Task RunClient(IAsyncStreamReader<global::Grpc.Testing.ClientArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ClientStatus> responseStream, ServerCallContext context);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800177 Task<global::Grpc.Testing.CoreResponse> CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context);
178 Task<global::Grpc.Testing.Void> QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700179 }
180
181 // client stub
182 public class WorkerServiceClient : ClientBase, IWorkerServiceClient
183 {
184 public WorkerServiceClient(Channel channel) : base(channel)
185 {
186 }
187 public AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
188 {
189 var call = CreateCall(__Method_RunServer, new CallOptions(headers, deadline, cancellationToken));
190 return Calls.AsyncDuplexStreamingCall(call);
191 }
192 public AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(CallOptions options)
193 {
194 var call = CreateCall(__Method_RunServer, options);
195 return Calls.AsyncDuplexStreamingCall(call);
196 }
197 public AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
198 {
199 var call = CreateCall(__Method_RunClient, new CallOptions(headers, deadline, cancellationToken));
200 return Calls.AsyncDuplexStreamingCall(call);
201 }
202 public AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(CallOptions options)
203 {
204 var call = CreateCall(__Method_RunClient, options);
205 return Calls.AsyncDuplexStreamingCall(call);
206 }
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800207 public global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
208 {
209 var call = CreateCall(__Method_CoreCount, new CallOptions(headers, deadline, cancellationToken));
210 return Calls.BlockingUnaryCall(call, request);
211 }
212 public global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options)
213 {
214 var call = CreateCall(__Method_CoreCount, options);
215 return Calls.BlockingUnaryCall(call, request);
216 }
217 public AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
218 {
219 var call = CreateCall(__Method_CoreCount, new CallOptions(headers, deadline, cancellationToken));
220 return Calls.AsyncUnaryCall(call, request);
221 }
222 public AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options)
223 {
224 var call = CreateCall(__Method_CoreCount, options);
225 return Calls.AsyncUnaryCall(call, request);
226 }
227 public global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
228 {
229 var call = CreateCall(__Method_QuitWorker, new CallOptions(headers, deadline, cancellationToken));
230 return Calls.BlockingUnaryCall(call, request);
231 }
232 public global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options)
233 {
234 var call = CreateCall(__Method_QuitWorker, options);
235 return Calls.BlockingUnaryCall(call, request);
236 }
237 public AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
238 {
239 var call = CreateCall(__Method_QuitWorker, new CallOptions(headers, deadline, cancellationToken));
240 return Calls.AsyncUnaryCall(call, request);
241 }
242 public AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options)
243 {
244 var call = CreateCall(__Method_QuitWorker, options);
245 return Calls.AsyncUnaryCall(call, request);
246 }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700247 }
248
249 // creates service definition that can be registered with a server
250 public static ServerServiceDefinition BindService(IWorkerService serviceImpl)
251 {
252 return ServerServiceDefinition.CreateBuilder(__ServiceName)
253 .AddMethod(__Method_RunServer, serviceImpl.RunServer)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800254 .AddMethod(__Method_RunClient, serviceImpl.RunClient)
255 .AddMethod(__Method_CoreCount, serviceImpl.CoreCount)
256 .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build();
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700257 }
258
259 // creates a new client
260 public static WorkerServiceClient NewClient(Channel channel)
261 {
262 return new WorkerServiceClient(channel);
263 }
264
265 }
266}
267#endregion