blob: bfae4ee6acec04991bb0079320ce263b280e35fc [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 Tattermuschbfee01d2016-04-28 10:52:41 -07003// Original file comments:
Jan Tattermusch4d5c3102017-06-07 10:23:56 +02004// Copyright 2015 gRPC authors.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07005//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +02006// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07009//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020010// http://www.apache.org/licenses/LICENSE-2.0
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070011//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020012// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070017//
18// An integration test service that covers all the method signature permutations
19// of unary/streaming requests/responses.
Jan Tattermuschca254732017-08-09 08:47:34 +020020#pragma warning disable 1591
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070021#region Designer generated code
22
23using System;
24using System.Threading;
25using System.Threading.Tasks;
Jan Tattermuschff4fc132017-03-14 09:27:50 +010026using grpc = global::Grpc.Core;
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070027
28namespace Grpc.Testing {
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080029 public static partial class BenchmarkService
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070030 {
31 static readonly string __ServiceName = "grpc.testing.BenchmarkService";
32
Jan Tattermuschff4fc132017-03-14 09:27:50 +010033 static readonly grpc::Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom);
34 static readonly grpc::Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070035
Jan Tattermuschff4fc132017-03-14 09:27:50 +010036 static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
37 grpc::MethodType.Unary,
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070038 __ServiceName,
39 "UnaryCall",
40 __Marshaller_SimpleRequest,
41 __Marshaller_SimpleResponse);
42
Jan Tattermuschff4fc132017-03-14 09:27:50 +010043 static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
44 grpc::MethodType.DuplexStreaming,
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070045 __ServiceName,
46 "StreamingCall",
47 __Marshaller_SimpleRequest,
48 __Marshaller_SimpleResponse);
49
Jan Tattermuscheb0219b2017-06-27 17:04:04 +020050 static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingFromClient = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
51 grpc::MethodType.ClientStreaming,
52 __ServiceName,
53 "StreamingFromClient",
54 __Marshaller_SimpleRequest,
55 __Marshaller_SimpleResponse);
56
57 static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingFromServer = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
58 grpc::MethodType.ServerStreaming,
59 __ServiceName,
60 "StreamingFromServer",
61 __Marshaller_SimpleRequest,
62 __Marshaller_SimpleResponse);
63
64 static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingBothWays = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
65 grpc::MethodType.DuplexStreaming,
66 __ServiceName,
67 "StreamingBothWays",
68 __Marshaller_SimpleRequest,
69 __Marshaller_SimpleResponse);
70
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070071 /// <summary>Service descriptor</summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070072 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
73 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080074 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070075 }
76
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070077 /// <summary>Base class for server-side implementations of BenchmarkService</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080078 public abstract partial class BenchmarkServiceBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070079 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070080 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +010081 /// One request followed by one response.
82 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070083 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +010084 /// <param name="request">The request received from the client.</param>
85 /// <param name="context">The context of the server-side call handler being invoked.</param>
86 /// <returns>The response to send back to the client (wrapped by a task).</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010087 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070088 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010089 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070090 }
91
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070092 /// <summary>
Jan Tattermuscheb0219b2017-06-27 17:04:04 +020093 /// Repeated sequence of one request followed by one response.
94 /// Should be called streaming ping-pong
95 /// The server returns the client payload as-is on each response
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070096 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +010097 /// <param name="requestStream">Used for reading requests from the client.</param>
98 /// <param name="responseStream">Used for sending responses back to the client.</param>
99 /// <param name="context">The context of the server-side call handler being invoked.</param>
100 /// <returns>A task indicating completion of the handler.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100101 public virtual global::System.Threading.Tasks.Task StreamingCall(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700102 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100103 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700104 }
105
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200106 /// <summary>
107 /// Single-sided unbounded streaming from client to server
108 /// The server returns the client payload as-is once the client does WritesDone
109 /// </summary>
110 /// <param name="requestStream">Used for reading requests from the client.</param>
111 /// <param name="context">The context of the server-side call handler being invoked.</param>
112 /// <returns>The response to send back to the client (wrapped by a task).</returns>
113 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::ServerCallContext context)
114 {
115 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
116 }
117
118 /// <summary>
119 /// Single-sided unbounded streaming from server to client
120 /// The server repeatedly returns the client payload as-is
121 /// </summary>
122 /// <param name="request">The request received from the client.</param>
123 /// <param name="responseStream">Used for sending responses back to the client.</param>
124 /// <param name="context">The context of the server-side call handler being invoked.</param>
125 /// <returns>A task indicating completion of the handler.</returns>
126 public virtual global::System.Threading.Tasks.Task StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context)
127 {
128 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
129 }
130
131 /// <summary>
132 /// Two-sided unbounded streaming between server to client
133 /// Both sides send the content of their own choice to the other
134 /// </summary>
135 /// <param name="requestStream">Used for reading requests from the client.</param>
136 /// <param name="responseStream">Used for sending responses back to the client.</param>
137 /// <param name="context">The context of the server-side call handler being invoked.</param>
138 /// <returns>A task indicating completion of the handler.</returns>
139 public virtual global::System.Threading.Tasks.Task StreamingBothWays(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context)
140 {
141 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
142 }
143
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700144 }
145
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700146 /// <summary>Client for BenchmarkService</summary>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100147 public partial class BenchmarkServiceClient : grpc::ClientBase<BenchmarkServiceClient>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700148 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700149 /// <summary>Creates a new client for BenchmarkService</summary>
150 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100151 public BenchmarkServiceClient(grpc::Channel channel) : base(channel)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700152 {
153 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700154 /// <summary>Creates a new client for BenchmarkService that uses a custom <c>CallInvoker</c>.</summary>
155 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100156 public BenchmarkServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700157 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700158 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700159 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700160 protected BenchmarkServiceClient() : base()
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700161 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700162 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700163 /// <summary>Protected constructor to allow creation of configured clients.</summary>
164 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700165 protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700166 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700167 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700168
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700169 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100170 /// One request followed by one response.
171 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700172 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100173 /// <param name="request">The request to send to the server.</param>
174 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
175 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
176 /// <param name="cancellationToken">An optional token for canceling the call.</param>
177 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100178 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700179 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100180 return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700181 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700182 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100183 /// One request followed by one response.
184 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700185 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100186 /// <param name="request">The request to send to the server.</param>
187 /// <param name="options">The options for the call.</param>
188 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100189 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700190 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700191 return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700192 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700193 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100194 /// One request followed by one response.
195 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700196 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100197 /// <param name="request">The request to send to the server.</param>
198 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
199 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
200 /// <param name="cancellationToken">An optional token for canceling the call.</param>
201 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100202 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700203 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100204 return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700205 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700206 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100207 /// One request followed by one response.
208 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700209 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100210 /// <param name="request">The request to send to the server.</param>
211 /// <param name="options">The options for the call.</param>
212 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100213 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700214 {
215 return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
216 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700217 /// <summary>
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200218 /// Repeated sequence of one request followed by one response.
219 /// Should be called streaming ping-pong
220 /// The server returns the client payload as-is on each response
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700221 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100222 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
223 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
224 /// <param name="cancellationToken">An optional token for canceling the call.</param>
225 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100226 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700227 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100228 return StreamingCall(new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700229 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700230 /// <summary>
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200231 /// Repeated sequence of one request followed by one response.
232 /// Should be called streaming ping-pong
233 /// The server returns the client payload as-is on each response
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700234 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100235 /// <param name="options">The options for the call.</param>
236 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100237 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700238 {
239 return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options);
240 }
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200241 /// <summary>
242 /// Single-sided unbounded streaming from client to server
243 /// The server returns the client payload as-is once the client does WritesDone
244 /// </summary>
245 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
246 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
247 /// <param name="cancellationToken">An optional token for canceling the call.</param>
248 /// <returns>The call object.</returns>
249 public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
250 {
251 return StreamingFromClient(new grpc::CallOptions(headers, deadline, cancellationToken));
252 }
253 /// <summary>
254 /// Single-sided unbounded streaming from client to server
255 /// The server returns the client payload as-is once the client does WritesDone
256 /// </summary>
257 /// <param name="options">The options for the call.</param>
258 /// <returns>The call object.</returns>
259 public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::CallOptions options)
260 {
261 return CallInvoker.AsyncClientStreamingCall(__Method_StreamingFromClient, null, options);
262 }
263 /// <summary>
264 /// Single-sided unbounded streaming from server to client
265 /// The server repeatedly returns the client payload as-is
266 /// </summary>
267 /// <param name="request">The request to send to the server.</param>
268 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
269 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
270 /// <param name="cancellationToken">An optional token for canceling the call.</param>
271 /// <returns>The call object.</returns>
272 public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.SimpleResponse> StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
273 {
274 return StreamingFromServer(request, new grpc::CallOptions(headers, deadline, cancellationToken));
275 }
276 /// <summary>
277 /// Single-sided unbounded streaming from server to client
278 /// The server repeatedly returns the client payload as-is
279 /// </summary>
280 /// <param name="request">The request to send to the server.</param>
281 /// <param name="options">The options for the call.</param>
282 /// <returns>The call object.</returns>
283 public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.SimpleResponse> StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
284 {
285 return CallInvoker.AsyncServerStreamingCall(__Method_StreamingFromServer, null, options, request);
286 }
287 /// <summary>
288 /// Two-sided unbounded streaming between server to client
289 /// Both sides send the content of their own choice to the other
290 /// </summary>
291 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
292 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
293 /// <param name="cancellationToken">An optional token for canceling the call.</param>
294 /// <returns>The call object.</returns>
295 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingBothWays(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
296 {
297 return StreamingBothWays(new grpc::CallOptions(headers, deadline, cancellationToken));
298 }
299 /// <summary>
300 /// Two-sided unbounded streaming between server to client
301 /// Both sides send the content of their own choice to the other
302 /// </summary>
303 /// <param name="options">The options for the call.</param>
304 /// <returns>The call object.</returns>
305 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingBothWays(grpc::CallOptions options)
306 {
307 return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingBothWays, null, options);
308 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200309 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700310 protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration)
311 {
312 return new BenchmarkServiceClient(configuration);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700313 }
314 }
315
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700316 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100317 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100318 public static grpc::ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700319 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100320 return grpc::ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700321 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200322 .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall)
323 .AddMethod(__Method_StreamingFromClient, serviceImpl.StreamingFromClient)
324 .AddMethod(__Method_StreamingFromServer, serviceImpl.StreamingFromServer)
325 .AddMethod(__Method_StreamingBothWays, serviceImpl.StreamingBothWays).Build();
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700326 }
327
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700328 }
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800329 public static partial class WorkerService
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700330 {
331 static readonly string __ServiceName = "grpc.testing.WorkerService";
332
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100333 static readonly grpc::Marshaller<global::Grpc.Testing.ServerArgs> __Marshaller_ServerArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerArgs.Parser.ParseFrom);
334 static readonly grpc::Marshaller<global::Grpc.Testing.ServerStatus> __Marshaller_ServerStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom);
335 static readonly grpc::Marshaller<global::Grpc.Testing.ClientArgs> __Marshaller_ClientArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom);
336 static readonly grpc::Marshaller<global::Grpc.Testing.ClientStatus> __Marshaller_ClientStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom);
337 static readonly grpc::Marshaller<global::Grpc.Testing.CoreRequest> __Marshaller_CoreRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom);
338 static readonly grpc::Marshaller<global::Grpc.Testing.CoreResponse> __Marshaller_CoreResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom);
339 static readonly grpc::Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700340
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100341 static readonly grpc::Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> __Method_RunServer = new grpc::Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus>(
342 grpc::MethodType.DuplexStreaming,
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700343 __ServiceName,
344 "RunServer",
345 __Marshaller_ServerArgs,
346 __Marshaller_ServerStatus);
347
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100348 static readonly grpc::Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> __Method_RunClient = new grpc::Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus>(
349 grpc::MethodType.DuplexStreaming,
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700350 __ServiceName,
351 "RunClient",
352 __Marshaller_ClientArgs,
353 __Marshaller_ClientStatus);
354
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100355 static readonly grpc::Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse> __Method_CoreCount = new grpc::Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse>(
356 grpc::MethodType.Unary,
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800357 __ServiceName,
358 "CoreCount",
359 __Marshaller_CoreRequest,
360 __Marshaller_CoreResponse);
361
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100362 static readonly grpc::Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void> __Method_QuitWorker = new grpc::Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void>(
363 grpc::MethodType.Unary,
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800364 __ServiceName,
365 "QuitWorker",
366 __Marshaller_Void,
367 __Marshaller_Void);
368
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700369 /// <summary>Service descriptor</summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700370 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
371 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800372 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700373 }
374
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700375 /// <summary>Base class for server-side implementations of WorkerService</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800376 public abstract partial class WorkerServiceBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700377 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700378 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100379 /// Start server with specified workload.
380 /// First request sent specifies the ServerConfig followed by ServerStatus
381 /// response. After that, a "Mark" can be sent anytime to request the latest
382 /// stats. Closing the stream will initiate shutdown of the test server
383 /// and once the shutdown has finished, the OK status is sent to terminate
384 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700385 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100386 /// <param name="requestStream">Used for reading requests from the client.</param>
387 /// <param name="responseStream">Used for sending responses back to the client.</param>
388 /// <param name="context">The context of the server-side call handler being invoked.</param>
389 /// <returns>A task indicating completion of the handler.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100390 public virtual global::System.Threading.Tasks.Task RunServer(grpc::IAsyncStreamReader<global::Grpc.Testing.ServerArgs> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.ServerStatus> responseStream, grpc::ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700391 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100392 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700393 }
394
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700395 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100396 /// Start client with specified workload.
397 /// First request sent specifies the ClientConfig followed by ClientStatus
398 /// response. After that, a "Mark" can be sent anytime to request the latest
399 /// stats. Closing the stream will initiate shutdown of the test client
400 /// and once the shutdown has finished, the OK status is sent to terminate
401 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700402 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100403 /// <param name="requestStream">Used for reading requests from the client.</param>
404 /// <param name="responseStream">Used for sending responses back to the client.</param>
405 /// <param name="context">The context of the server-side call handler being invoked.</param>
406 /// <returns>A task indicating completion of the handler.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100407 public virtual global::System.Threading.Tasks.Task RunClient(grpc::IAsyncStreamReader<global::Grpc.Testing.ClientArgs> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.ClientStatus> responseStream, grpc::ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700408 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100409 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700410 }
411
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700412 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100413 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700414 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100415 /// <param name="request">The request received from the client.</param>
416 /// <param name="context">The context of the server-side call handler being invoked.</param>
417 /// <returns>The response to send back to the client (wrapped by a task).</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100418 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.CoreResponse> CoreCount(global::Grpc.Testing.CoreRequest request, grpc::ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700419 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100420 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700421 }
422
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700423 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100424 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700425 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100426 /// <param name="request">The request received from the client.</param>
427 /// <param name="context">The context of the server-side call handler being invoked.</param>
428 /// <returns>The response to send back to the client (wrapped by a task).</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100429 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> QuitWorker(global::Grpc.Testing.Void request, grpc::ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700430 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100431 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700432 }
433
434 }
435
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700436 /// <summary>Client for WorkerService</summary>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100437 public partial class WorkerServiceClient : grpc::ClientBase<WorkerServiceClient>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700438 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700439 /// <summary>Creates a new client for WorkerService</summary>
440 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100441 public WorkerServiceClient(grpc::Channel channel) : base(channel)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700442 {
443 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700444 /// <summary>Creates a new client for WorkerService that uses a custom <c>CallInvoker</c>.</summary>
445 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100446 public WorkerServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700447 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700448 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700449 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700450 protected WorkerServiceClient() : base()
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700451 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700452 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700453 /// <summary>Protected constructor to allow creation of configured clients.</summary>
454 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700455 protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700456 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700457 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700458
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700459 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100460 /// Start server with specified workload.
461 /// First request sent specifies the ServerConfig followed by ServerStatus
462 /// response. After that, a "Mark" can be sent anytime to request the latest
463 /// stats. Closing the stream will initiate shutdown of the test server
464 /// and once the shutdown has finished, the OK status is sent to terminate
465 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700466 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100467 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
468 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
469 /// <param name="cancellationToken">An optional token for canceling the call.</param>
470 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100471 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700472 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100473 return RunServer(new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700474 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700475 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100476 /// Start server with specified workload.
477 /// First request sent specifies the ServerConfig followed by ServerStatus
478 /// response. After that, a "Mark" can be sent anytime to request the latest
479 /// stats. Closing the stream will initiate shutdown of the test server
480 /// and once the shutdown has finished, the OK status is sent to terminate
481 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700482 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100483 /// <param name="options">The options for the call.</param>
484 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100485 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(grpc::CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800486 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700487 return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800488 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700489 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100490 /// Start client with specified workload.
491 /// First request sent specifies the ClientConfig followed by ClientStatus
492 /// response. After that, a "Mark" can be sent anytime to request the latest
493 /// stats. Closing the stream will initiate shutdown of the test client
494 /// and once the shutdown has finished, the OK status is sent to terminate
495 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700496 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100497 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
498 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
499 /// <param name="cancellationToken">An optional token for canceling the call.</param>
500 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100501 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800502 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100503 return RunClient(new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800504 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700505 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100506 /// Start client with specified workload.
507 /// First request sent specifies the ClientConfig followed by ClientStatus
508 /// response. After that, a "Mark" can be sent anytime to request the latest
509 /// stats. Closing the stream will initiate shutdown of the test client
510 /// and once the shutdown has finished, the OK status is sent to terminate
511 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700512 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100513 /// <param name="options">The options for the call.</param>
514 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100515 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(grpc::CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800516 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700517 return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800518 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700519 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100520 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700521 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100522 /// <param name="request">The request to send to the server.</param>
523 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
524 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
525 /// <param name="cancellationToken">An optional token for canceling the call.</param>
526 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100527 public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800528 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100529 return CoreCount(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800530 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700531 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100532 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700533 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100534 /// <param name="request">The request to send to the server.</param>
535 /// <param name="options">The options for the call.</param>
536 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100537 public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800538 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700539 return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800540 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700541 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100542 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700543 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100544 /// <param name="request">The request to send to the server.</param>
545 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
546 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
547 /// <param name="cancellationToken">An optional token for canceling the call.</param>
548 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100549 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800550 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100551 return CoreCountAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800552 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700553 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100554 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700555 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100556 /// <param name="request">The request to send to the server.</param>
557 /// <param name="options">The options for the call.</param>
558 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100559 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800560 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700561 return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800562 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700563 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100564 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700565 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100566 /// <param name="request">The request to send to the server.</param>
567 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
568 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
569 /// <param name="cancellationToken">An optional token for canceling the call.</param>
570 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100571 public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800572 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100573 return QuitWorker(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700574 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700575 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100576 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700577 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100578 /// <param name="request">The request to send to the server.</param>
579 /// <param name="options">The options for the call.</param>
580 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100581 public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700582 {
583 return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request);
584 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700585 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100586 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700587 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100588 /// <param name="request">The request to send to the server.</param>
589 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
590 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
591 /// <param name="cancellationToken">An optional token for canceling the call.</param>
592 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100593 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700594 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100595 return QuitWorkerAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700596 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700597 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100598 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700599 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100600 /// <param name="request">The request to send to the server.</param>
601 /// <param name="options">The options for the call.</param>
602 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100603 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700604 {
605 return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request);
606 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200607 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700608 protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration)
609 {
610 return new WorkerServiceClient(configuration);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800611 }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700612 }
613
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700614 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100615 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100616 public static grpc::ServerServiceDefinition BindService(WorkerServiceBase serviceImpl)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700617 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100618 return grpc::ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700619 .AddMethod(__Method_RunServer, serviceImpl.RunServer)
620 .AddMethod(__Method_RunClient, serviceImpl.RunClient)
621 .AddMethod(__Method_CoreCount, serviceImpl.CoreCount)
622 .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build();
623 }
624
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700625 }
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200626 public static partial class ReportQpsScenarioService
627 {
628 static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService";
629
630 static readonly grpc::Marshaller<global::Grpc.Testing.ScenarioResult> __Marshaller_ScenarioResult = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ScenarioResult.Parser.ParseFrom);
631 static readonly grpc::Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom);
632
633 static readonly grpc::Method<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void> __Method_ReportScenario = new grpc::Method<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void>(
634 grpc::MethodType.Unary,
635 __ServiceName,
636 "ReportScenario",
637 __Marshaller_ScenarioResult,
638 __Marshaller_Void);
639
640 /// <summary>Service descriptor</summary>
641 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
642 {
643 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[2]; }
644 }
645
646 /// <summary>Base class for server-side implementations of ReportQpsScenarioService</summary>
647 public abstract partial class ReportQpsScenarioServiceBase
648 {
649 /// <summary>
650 /// Report results of a QPS test benchmark scenario.
651 /// </summary>
652 /// <param name="request">The request received from the client.</param>
653 /// <param name="context">The context of the server-side call handler being invoked.</param>
654 /// <returns>The response to send back to the client (wrapped by a task).</returns>
655 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context)
656 {
657 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
658 }
659
660 }
661
662 /// <summary>Client for ReportQpsScenarioService</summary>
663 public partial class ReportQpsScenarioServiceClient : grpc::ClientBase<ReportQpsScenarioServiceClient>
664 {
665 /// <summary>Creates a new client for ReportQpsScenarioService</summary>
666 /// <param name="channel">The channel to use to make remote calls.</param>
667 public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel)
668 {
669 }
670 /// <summary>Creates a new client for ReportQpsScenarioService that uses a custom <c>CallInvoker</c>.</summary>
671 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
672 public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
673 {
674 }
675 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
676 protected ReportQpsScenarioServiceClient() : base()
677 {
678 }
679 /// <summary>Protected constructor to allow creation of configured clients.</summary>
680 /// <param name="configuration">The client configuration.</param>
681 protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration)
682 {
683 }
684
685 /// <summary>
686 /// Report results of a QPS test benchmark scenario.
687 /// </summary>
688 /// <param name="request">The request to send to the server.</param>
689 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
690 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
691 /// <param name="cancellationToken">An optional token for canceling the call.</param>
692 /// <returns>The response received from the server.</returns>
693 public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
694 {
695 return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken));
696 }
697 /// <summary>
698 /// Report results of a QPS test benchmark scenario.
699 /// </summary>
700 /// <param name="request">The request to send to the server.</param>
701 /// <param name="options">The options for the call.</param>
702 /// <returns>The response received from the server.</returns>
703 public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options)
704 {
705 return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request);
706 }
707 /// <summary>
708 /// Report results of a QPS test benchmark scenario.
709 /// </summary>
710 /// <param name="request">The request to send to the server.</param>
711 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
712 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
713 /// <param name="cancellationToken">An optional token for canceling the call.</param>
714 /// <returns>The call object.</returns>
715 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
716 {
717 return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
718 }
719 /// <summary>
720 /// Report results of a QPS test benchmark scenario.
721 /// </summary>
722 /// <param name="request">The request to send to the server.</param>
723 /// <param name="options">The options for the call.</param>
724 /// <returns>The call object.</returns>
725 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options)
726 {
727 return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request);
728 }
729 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
730 protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration)
731 {
732 return new ReportQpsScenarioServiceClient(configuration);
733 }
734 }
735
736 /// <summary>Creates service definition that can be registered with a server</summary>
737 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
738 public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl)
739 {
740 return grpc::ServerServiceDefinition.CreateBuilder()
741 .AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build();
742 }
743
744 }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700745}
746#endregion