blob: bd5971e296f96cf0aa21da7e678ddfac5b5f8f49 [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 Tattermuschd0c1bfa2015-10-22 19:14:57 -070020#region Designer generated code
21
22using System;
23using System.Threading;
24using System.Threading.Tasks;
Jan Tattermuschff4fc132017-03-14 09:27:50 +010025using grpc = global::Grpc.Core;
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070026
27namespace Grpc.Testing {
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080028 public static partial class BenchmarkService
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070029 {
30 static readonly string __ServiceName = "grpc.testing.BenchmarkService";
31
Jan Tattermuschff4fc132017-03-14 09:27:50 +010032 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);
33 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 -070034
Jan Tattermuschff4fc132017-03-14 09:27:50 +010035 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>(
36 grpc::MethodType.Unary,
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070037 __ServiceName,
38 "UnaryCall",
39 __Marshaller_SimpleRequest,
40 __Marshaller_SimpleResponse);
41
Jan Tattermuschff4fc132017-03-14 09:27:50 +010042 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>(
43 grpc::MethodType.DuplexStreaming,
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070044 __ServiceName,
45 "StreamingCall",
46 __Marshaller_SimpleRequest,
47 __Marshaller_SimpleResponse);
48
Jan Tattermuscheb0219b2017-06-27 17:04:04 +020049 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>(
50 grpc::MethodType.ClientStreaming,
51 __ServiceName,
52 "StreamingFromClient",
53 __Marshaller_SimpleRequest,
54 __Marshaller_SimpleResponse);
55
56 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>(
57 grpc::MethodType.ServerStreaming,
58 __ServiceName,
59 "StreamingFromServer",
60 __Marshaller_SimpleRequest,
61 __Marshaller_SimpleResponse);
62
63 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>(
64 grpc::MethodType.DuplexStreaming,
65 __ServiceName,
66 "StreamingBothWays",
67 __Marshaller_SimpleRequest,
68 __Marshaller_SimpleResponse);
69
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070070 /// <summary>Service descriptor</summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070071 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
72 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080073 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070074 }
75
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070076 /// <summary>Base class for server-side implementations of BenchmarkService</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080077 public abstract partial class BenchmarkServiceBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070078 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070079 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +010080 /// One request followed by one response.
81 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070082 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +010083 /// <param name="request">The request received from the client.</param>
84 /// <param name="context">The context of the server-side call handler being invoked.</param>
85 /// <returns>The response to send back to the client (wrapped by a task).</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010086 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 -070087 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010088 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070089 }
90
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070091 /// <summary>
Jan Tattermuscheb0219b2017-06-27 17:04:04 +020092 /// Repeated sequence of one request followed by one response.
93 /// Should be called streaming ping-pong
94 /// The server returns the client payload as-is on each response
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070095 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +010096 /// <param name="requestStream">Used for reading requests from the client.</param>
97 /// <param name="responseStream">Used for sending responses back to the client.</param>
98 /// <param name="context">The context of the server-side call handler being invoked.</param>
99 /// <returns>A task indicating completion of the handler.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100100 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 -0700101 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100102 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700103 }
104
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200105 /// <summary>
106 /// Single-sided unbounded streaming from client to server
107 /// The server returns the client payload as-is once the client does WritesDone
108 /// </summary>
109 /// <param name="requestStream">Used for reading requests from the client.</param>
110 /// <param name="context">The context of the server-side call handler being invoked.</param>
111 /// <returns>The response to send back to the client (wrapped by a task).</returns>
112 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::ServerCallContext context)
113 {
114 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
115 }
116
117 /// <summary>
118 /// Single-sided unbounded streaming from server to client
119 /// The server repeatedly returns the client payload as-is
120 /// </summary>
121 /// <param name="request">The request received from the client.</param>
122 /// <param name="responseStream">Used for sending responses back to the client.</param>
123 /// <param name="context">The context of the server-side call handler being invoked.</param>
124 /// <returns>A task indicating completion of the handler.</returns>
125 public virtual global::System.Threading.Tasks.Task StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context)
126 {
127 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
128 }
129
130 /// <summary>
131 /// Two-sided unbounded streaming between server to client
132 /// Both sides send the content of their own choice to the other
133 /// </summary>
134 /// <param name="requestStream">Used for reading requests from the client.</param>
135 /// <param name="responseStream">Used for sending responses back to the client.</param>
136 /// <param name="context">The context of the server-side call handler being invoked.</param>
137 /// <returns>A task indicating completion of the handler.</returns>
138 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)
139 {
140 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
141 }
142
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700143 }
144
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700145 /// <summary>Client for BenchmarkService</summary>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100146 public partial class BenchmarkServiceClient : grpc::ClientBase<BenchmarkServiceClient>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700147 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700148 /// <summary>Creates a new client for BenchmarkService</summary>
149 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100150 public BenchmarkServiceClient(grpc::Channel channel) : base(channel)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700151 {
152 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700153 /// <summary>Creates a new client for BenchmarkService that uses a custom <c>CallInvoker</c>.</summary>
154 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100155 public BenchmarkServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700156 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700157 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700158 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700159 protected BenchmarkServiceClient() : base()
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700160 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700161 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700162 /// <summary>Protected constructor to allow creation of configured clients.</summary>
163 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700164 protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700165 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700166 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700167
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700168 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100169 /// One request followed by one response.
170 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700171 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100172 /// <param name="request">The request to send to the server.</param>
173 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
174 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
175 /// <param name="cancellationToken">An optional token for canceling the call.</param>
176 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100177 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 -0700178 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100179 return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700180 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700181 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100182 /// One request followed by one response.
183 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700184 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100185 /// <param name="request">The request to send to the server.</param>
186 /// <param name="options">The options for the call.</param>
187 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100188 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700189 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700190 return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700191 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700192 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100193 /// One request followed by one response.
194 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700195 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100196 /// <param name="request">The request to send to the server.</param>
197 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
198 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
199 /// <param name="cancellationToken">An optional token for canceling the call.</param>
200 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100201 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 -0700202 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100203 return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700204 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700205 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100206 /// One request followed by one response.
207 /// The server returns the client payload as-is.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700208 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100209 /// <param name="request">The request to send to the server.</param>
210 /// <param name="options">The options for the call.</param>
211 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100212 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700213 {
214 return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
215 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700216 /// <summary>
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200217 /// Repeated sequence of one request followed by one response.
218 /// Should be called streaming ping-pong
219 /// The server returns the client payload as-is on each response
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700220 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100221 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
222 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
223 /// <param name="cancellationToken">An optional token for canceling the call.</param>
224 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100225 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 -0700226 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100227 return StreamingCall(new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700228 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700229 /// <summary>
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200230 /// Repeated sequence of one request followed by one response.
231 /// Should be called streaming ping-pong
232 /// The server returns the client payload as-is on each response
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700233 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100234 /// <param name="options">The options for the call.</param>
235 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100236 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700237 {
238 return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options);
239 }
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200240 /// <summary>
241 /// Single-sided unbounded streaming from client to server
242 /// The server returns the client payload as-is once the client does WritesDone
243 /// </summary>
244 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
245 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
246 /// <param name="cancellationToken">An optional token for canceling the call.</param>
247 /// <returns>The call object.</returns>
248 public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
249 {
250 return StreamingFromClient(new grpc::CallOptions(headers, deadline, cancellationToken));
251 }
252 /// <summary>
253 /// Single-sided unbounded streaming from client to server
254 /// The server returns the client payload as-is once the client does WritesDone
255 /// </summary>
256 /// <param name="options">The options for the call.</param>
257 /// <returns>The call object.</returns>
258 public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::CallOptions options)
259 {
260 return CallInvoker.AsyncClientStreamingCall(__Method_StreamingFromClient, null, options);
261 }
262 /// <summary>
263 /// Single-sided unbounded streaming from server to client
264 /// The server repeatedly returns the client payload as-is
265 /// </summary>
266 /// <param name="request">The request to send to the server.</param>
267 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
268 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
269 /// <param name="cancellationToken">An optional token for canceling the call.</param>
270 /// <returns>The call object.</returns>
271 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))
272 {
273 return StreamingFromServer(request, new grpc::CallOptions(headers, deadline, cancellationToken));
274 }
275 /// <summary>
276 /// Single-sided unbounded streaming from server to client
277 /// The server repeatedly returns the client payload as-is
278 /// </summary>
279 /// <param name="request">The request to send to the server.</param>
280 /// <param name="options">The options for the call.</param>
281 /// <returns>The call object.</returns>
282 public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.SimpleResponse> StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
283 {
284 return CallInvoker.AsyncServerStreamingCall(__Method_StreamingFromServer, null, options, request);
285 }
286 /// <summary>
287 /// Two-sided unbounded streaming between server to client
288 /// Both sides send the content of their own choice to the other
289 /// </summary>
290 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
291 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
292 /// <param name="cancellationToken">An optional token for canceling the call.</param>
293 /// <returns>The call object.</returns>
294 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingBothWays(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
295 {
296 return StreamingBothWays(new grpc::CallOptions(headers, deadline, cancellationToken));
297 }
298 /// <summary>
299 /// Two-sided unbounded streaming between server to client
300 /// Both sides send the content of their own choice to the other
301 /// </summary>
302 /// <param name="options">The options for the call.</param>
303 /// <returns>The call object.</returns>
304 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingBothWays(grpc::CallOptions options)
305 {
306 return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingBothWays, null, options);
307 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200308 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700309 protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration)
310 {
311 return new BenchmarkServiceClient(configuration);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700312 }
313 }
314
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700315 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100316 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100317 public static grpc::ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700318 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100319 return grpc::ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700320 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200321 .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall)
322 .AddMethod(__Method_StreamingFromClient, serviceImpl.StreamingFromClient)
323 .AddMethod(__Method_StreamingFromServer, serviceImpl.StreamingFromServer)
324 .AddMethod(__Method_StreamingBothWays, serviceImpl.StreamingBothWays).Build();
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700325 }
326
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700327 }
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800328 public static partial class WorkerService
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700329 {
330 static readonly string __ServiceName = "grpc.testing.WorkerService";
331
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100332 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);
333 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);
334 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);
335 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);
336 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);
337 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);
338 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 -0700339
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100340 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>(
341 grpc::MethodType.DuplexStreaming,
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700342 __ServiceName,
343 "RunServer",
344 __Marshaller_ServerArgs,
345 __Marshaller_ServerStatus);
346
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100347 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>(
348 grpc::MethodType.DuplexStreaming,
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700349 __ServiceName,
350 "RunClient",
351 __Marshaller_ClientArgs,
352 __Marshaller_ClientStatus);
353
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100354 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>(
355 grpc::MethodType.Unary,
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800356 __ServiceName,
357 "CoreCount",
358 __Marshaller_CoreRequest,
359 __Marshaller_CoreResponse);
360
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100361 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>(
362 grpc::MethodType.Unary,
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800363 __ServiceName,
364 "QuitWorker",
365 __Marshaller_Void,
366 __Marshaller_Void);
367
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700368 /// <summary>Service descriptor</summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700369 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
370 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800371 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700372 }
373
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700374 /// <summary>Base class for server-side implementations of WorkerService</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800375 public abstract partial class WorkerServiceBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700376 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700377 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100378 /// Start server with specified workload.
379 /// First request sent specifies the ServerConfig followed by ServerStatus
380 /// response. After that, a "Mark" can be sent anytime to request the latest
381 /// stats. Closing the stream will initiate shutdown of the test server
382 /// and once the shutdown has finished, the OK status is sent to terminate
383 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700384 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100385 /// <param name="requestStream">Used for reading requests from the client.</param>
386 /// <param name="responseStream">Used for sending responses back to the client.</param>
387 /// <param name="context">The context of the server-side call handler being invoked.</param>
388 /// <returns>A task indicating completion of the handler.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100389 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 -0700390 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100391 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700392 }
393
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700394 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100395 /// Start client with specified workload.
396 /// First request sent specifies the ClientConfig followed by ClientStatus
397 /// response. After that, a "Mark" can be sent anytime to request the latest
398 /// stats. Closing the stream will initiate shutdown of the test client
399 /// and once the shutdown has finished, the OK status is sent to terminate
400 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700401 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100402 /// <param name="requestStream">Used for reading requests from the client.</param>
403 /// <param name="responseStream">Used for sending responses back to the client.</param>
404 /// <param name="context">The context of the server-side call handler being invoked.</param>
405 /// <returns>A task indicating completion of the handler.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100406 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 -0700407 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100408 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700409 }
410
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700411 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100412 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700413 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100414 /// <param name="request">The request received from the client.</param>
415 /// <param name="context">The context of the server-side call handler being invoked.</param>
416 /// <returns>The response to send back to the client (wrapped by a task).</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100417 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 -0700418 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100419 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700420 }
421
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700422 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100423 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700424 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100425 /// <param name="request">The request received from the client.</param>
426 /// <param name="context">The context of the server-side call handler being invoked.</param>
427 /// <returns>The response to send back to the client (wrapped by a task).</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100428 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 -0700429 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100430 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700431 }
432
433 }
434
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700435 /// <summary>Client for WorkerService</summary>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100436 public partial class WorkerServiceClient : grpc::ClientBase<WorkerServiceClient>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700437 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700438 /// <summary>Creates a new client for WorkerService</summary>
439 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100440 public WorkerServiceClient(grpc::Channel channel) : base(channel)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700441 {
442 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700443 /// <summary>Creates a new client for WorkerService that uses a custom <c>CallInvoker</c>.</summary>
444 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100445 public WorkerServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700446 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700447 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700448 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700449 protected WorkerServiceClient() : base()
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700450 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700451 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700452 /// <summary>Protected constructor to allow creation of configured clients.</summary>
453 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700454 protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700455 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700456 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700457
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700458 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100459 /// Start server with specified workload.
460 /// First request sent specifies the ServerConfig followed by ServerStatus
461 /// response. After that, a "Mark" can be sent anytime to request the latest
462 /// stats. Closing the stream will initiate shutdown of the test server
463 /// and once the shutdown has finished, the OK status is sent to terminate
464 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700465 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100466 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
467 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
468 /// <param name="cancellationToken">An optional token for canceling the call.</param>
469 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100470 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 -0700471 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100472 return RunServer(new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700473 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700474 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100475 /// Start server with specified workload.
476 /// First request sent specifies the ServerConfig followed by ServerStatus
477 /// response. After that, a "Mark" can be sent anytime to request the latest
478 /// stats. Closing the stream will initiate shutdown of the test server
479 /// and once the shutdown has finished, the OK status is sent to terminate
480 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700481 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100482 /// <param name="options">The options for the call.</param>
483 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100484 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(grpc::CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800485 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700486 return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800487 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700488 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100489 /// Start client with specified workload.
490 /// First request sent specifies the ClientConfig followed by ClientStatus
491 /// response. After that, a "Mark" can be sent anytime to request the latest
492 /// stats. Closing the stream will initiate shutdown of the test client
493 /// and once the shutdown has finished, the OK status is sent to terminate
494 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700495 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100496 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
497 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
498 /// <param name="cancellationToken">An optional token for canceling the call.</param>
499 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100500 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 -0800501 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100502 return RunClient(new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800503 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700504 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100505 /// Start client with specified workload.
506 /// First request sent specifies the ClientConfig followed by ClientStatus
507 /// response. After that, a "Mark" can be sent anytime to request the latest
508 /// stats. Closing the stream will initiate shutdown of the test client
509 /// and once the shutdown has finished, the OK status is sent to terminate
510 /// this RPC.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700511 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100512 /// <param name="options">The options for the call.</param>
513 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100514 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(grpc::CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800515 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700516 return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800517 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700518 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100519 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700520 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100521 /// <param name="request">The request to send to the server.</param>
522 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
523 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
524 /// <param name="cancellationToken">An optional token for canceling the call.</param>
525 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100526 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 -0800527 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100528 return CoreCount(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800529 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700530 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100531 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700532 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100533 /// <param name="request">The request to send to the server.</param>
534 /// <param name="options">The options for the call.</param>
535 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100536 public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800537 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700538 return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800539 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700540 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100541 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700542 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100543 /// <param name="request">The request to send to the server.</param>
544 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
545 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
546 /// <param name="cancellationToken">An optional token for canceling the call.</param>
547 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100548 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 -0800549 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100550 return CoreCountAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800551 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700552 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100553 /// Just return the core count - unary call
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700554 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100555 /// <param name="request">The request to send to the server.</param>
556 /// <param name="options">The options for the call.</param>
557 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100558 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800559 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700560 return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800561 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700562 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100563 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700564 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100565 /// <param name="request">The request to send to the server.</param>
566 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
567 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
568 /// <param name="cancellationToken">An optional token for canceling the call.</param>
569 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100570 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 -0800571 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100572 return QuitWorker(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700573 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700574 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100575 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700576 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100577 /// <param name="request">The request to send to the server.</param>
578 /// <param name="options">The options for the call.</param>
579 /// <returns>The response received from the server.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100580 public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700581 {
582 return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request);
583 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700584 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100585 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700586 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100587 /// <param name="request">The request to send to the server.</param>
588 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
589 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
590 /// <param name="cancellationToken">An optional token for canceling the call.</param>
591 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100592 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 -0700593 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100594 return QuitWorkerAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700595 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700596 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100597 /// Quit this worker
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700598 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100599 /// <param name="request">The request to send to the server.</param>
600 /// <param name="options">The options for the call.</param>
601 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100602 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700603 {
604 return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request);
605 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200606 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700607 protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration)
608 {
609 return new WorkerServiceClient(configuration);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800610 }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700611 }
612
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700613 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100614 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100615 public static grpc::ServerServiceDefinition BindService(WorkerServiceBase serviceImpl)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700616 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100617 return grpc::ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700618 .AddMethod(__Method_RunServer, serviceImpl.RunServer)
619 .AddMethod(__Method_RunClient, serviceImpl.RunClient)
620 .AddMethod(__Method_CoreCount, serviceImpl.CoreCount)
621 .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build();
622 }
623
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700624 }
Jan Tattermuscheb0219b2017-06-27 17:04:04 +0200625 public static partial class ReportQpsScenarioService
626 {
627 static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService";
628
629 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);
630 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);
631
632 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>(
633 grpc::MethodType.Unary,
634 __ServiceName,
635 "ReportScenario",
636 __Marshaller_ScenarioResult,
637 __Marshaller_Void);
638
639 /// <summary>Service descriptor</summary>
640 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
641 {
642 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[2]; }
643 }
644
645 /// <summary>Base class for server-side implementations of ReportQpsScenarioService</summary>
646 public abstract partial class ReportQpsScenarioServiceBase
647 {
648 /// <summary>
649 /// Report results of a QPS test benchmark scenario.
650 /// </summary>
651 /// <param name="request">The request received from the client.</param>
652 /// <param name="context">The context of the server-side call handler being invoked.</param>
653 /// <returns>The response to send back to the client (wrapped by a task).</returns>
654 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context)
655 {
656 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
657 }
658
659 }
660
661 /// <summary>Client for ReportQpsScenarioService</summary>
662 public partial class ReportQpsScenarioServiceClient : grpc::ClientBase<ReportQpsScenarioServiceClient>
663 {
664 /// <summary>Creates a new client for ReportQpsScenarioService</summary>
665 /// <param name="channel">The channel to use to make remote calls.</param>
666 public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel)
667 {
668 }
669 /// <summary>Creates a new client for ReportQpsScenarioService that uses a custom <c>CallInvoker</c>.</summary>
670 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
671 public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
672 {
673 }
674 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
675 protected ReportQpsScenarioServiceClient() : base()
676 {
677 }
678 /// <summary>Protected constructor to allow creation of configured clients.</summary>
679 /// <param name="configuration">The client configuration.</param>
680 protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration)
681 {
682 }
683
684 /// <summary>
685 /// Report results of a QPS test benchmark scenario.
686 /// </summary>
687 /// <param name="request">The request to send to the server.</param>
688 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
689 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
690 /// <param name="cancellationToken">An optional token for canceling the call.</param>
691 /// <returns>The response received from the server.</returns>
692 public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
693 {
694 return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken));
695 }
696 /// <summary>
697 /// Report results of a QPS test benchmark scenario.
698 /// </summary>
699 /// <param name="request">The request to send to the server.</param>
700 /// <param name="options">The options for the call.</param>
701 /// <returns>The response received from the server.</returns>
702 public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options)
703 {
704 return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request);
705 }
706 /// <summary>
707 /// Report results of a QPS test benchmark scenario.
708 /// </summary>
709 /// <param name="request">The request to send to the server.</param>
710 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
711 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
712 /// <param name="cancellationToken">An optional token for canceling the call.</param>
713 /// <returns>The call object.</returns>
714 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))
715 {
716 return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
717 }
718 /// <summary>
719 /// Report results of a QPS test benchmark scenario.
720 /// </summary>
721 /// <param name="request">The request to send to the server.</param>
722 /// <param name="options">The options for the call.</param>
723 /// <returns>The call object.</returns>
724 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options)
725 {
726 return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request);
727 }
728 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
729 protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration)
730 {
731 return new ReportQpsScenarioServiceClient(configuration);
732 }
733 }
734
735 /// <summary>Creates service definition that can be registered with a server</summary>
736 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
737 public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl)
738 {
739 return grpc::ServerServiceDefinition.CreateBuilder()
740 .AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build();
741 }
742
743 }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700744}
745#endregion