blob: 8d649bf5c521a9edc75cd82c32789d1ff1a56693 [file] [log] [blame]
Jan Tattermusch7eb3a762015-05-07 14:26:13 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch72ce4422016-01-20 13:54:38 -08002// source: src/proto/grpc/testing/test.proto
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07003// Original file comments:
4// Copyright 2015-2016, Google Inc.
5// All rights reserved.
6//
7// Redistribution and use in source and binary forms, with or without
8// modification, are permitted provided that the following conditions are
9// met:
10//
11// * Redistributions of source code must retain the above copyright
12// notice, this list of conditions and the following disclaimer.
13// * Redistributions in binary form must reproduce the above
14// copyright notice, this list of conditions and the following disclaimer
15// in the documentation and/or other materials provided with the
16// distribution.
17// * Neither the name of Google Inc. nor the names of its
18// contributors may be used to endorse or promote products derived from
19// this software without specific prior written permission.
20//
21// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32//
33// An integration test service that covers all the method signature permutations
34// of unary/streaming requests/responses.
35//
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070036#region Designer generated code
37
38using System;
39using System.Threading;
40using System.Threading.Tasks;
41using Grpc.Core;
42
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070043namespace Grpc.Testing {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070044 /// <summary>
45 /// A simple service to test the various types of RPCs and experiment with
46 /// performance with various types of payload.
47 /// </summary>
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070048 public static class TestService
49 {
50 static readonly string __ServiceName = "grpc.testing.TestService";
51
Jan Tattermusch475f75a2015-08-03 09:46:04 -070052 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
53 static readonly Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom);
54 static readonly Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom);
55 static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallRequest.Parser.ParseFrom);
56 static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallResponse.Parser.ParseFrom);
57 static readonly Marshaller<global::Grpc.Testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallRequest.Parser.ParseFrom);
58 static readonly Marshaller<global::Grpc.Testing.StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallResponse.Parser.ParseFrom);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070059
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070060 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_EmptyCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070061 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070062 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070063 "EmptyCall",
64 __Marshaller_Empty,
65 __Marshaller_Empty);
66
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070067 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070068 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070069 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070070 "UnaryCall",
71 __Marshaller_SimpleRequest,
72 __Marshaller_SimpleResponse);
73
Noah Eisenb2a26472016-10-21 16:43:57 -070074 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_CacheableUnaryCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
75 MethodType.Unary,
76 __ServiceName,
77 "CacheableUnaryCall",
78 __Marshaller_SimpleRequest,
79 __Marshaller_SimpleResponse);
80
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070081 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_StreamingOutputCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070082 MethodType.ServerStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070083 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070084 "StreamingOutputCall",
85 __Marshaller_StreamingOutputCallRequest,
86 __Marshaller_StreamingOutputCallResponse);
87
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070088 static readonly Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> __Method_StreamingInputCall = new Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070089 MethodType.ClientStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070090 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070091 "StreamingInputCall",
92 __Marshaller_StreamingInputCallRequest,
93 __Marshaller_StreamingInputCallResponse);
94
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070095 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_FullDuplexCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070096 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070097 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070098 "FullDuplexCall",
99 __Marshaller_StreamingOutputCallRequest,
100 __Marshaller_StreamingOutputCallResponse);
101
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700102 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_HalfDuplexCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700103 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700104 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700105 "HalfDuplexCall",
106 __Marshaller_StreamingOutputCallRequest,
107 __Marshaller_StreamingOutputCallResponse);
108
Noah Eisenb2a26472016-10-21 16:43:57 -0700109 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
110 MethodType.Unary,
111 __ServiceName,
112 "UnimplementedCall",
113 __Marshaller_Empty,
114 __Marshaller_Empty);
115
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700116 /// <summary>Service descriptor</summary>
Jan Tattermusche6af5d12015-08-03 10:57:43 -0700117 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
118 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800119 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[0]; }
Jan Tattermusche6af5d12015-08-03 10:57:43 -0700120 }
121
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700122 /// <summary>Base class for server-side implementations of TestService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700123 public abstract class TestServiceBase
124 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700125 /// <summary>
126 /// One empty request followed by one empty response.
127 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700128 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700129 {
130 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
131 }
132
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700133 /// <summary>
134 /// One request followed by one response.
135 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700136 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700137 {
138 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
139 }
140
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700141 /// <summary>
Noah Eisenb2a26472016-10-21 16:43:57 -0700142 /// One request followed by one response. Response has cache control
143 /// headers set such that a caching HTTP proxy (such as GFE) can
144 /// satisfy subsequent requests.
145 /// </summary>
146 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context)
147 {
148 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
149 }
150
151 /// <summary>
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700152 /// One request followed by a sequence of responses (streamed download).
153 /// The server returns the payload with client desired type and sizes.
154 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700155 public virtual global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700156 {
157 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
158 }
159
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700160 /// <summary>
161 /// A sequence of requests followed by one response (streamed upload).
162 /// The server returns the aggregated size of client payload as the result.
163 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700164 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700165 {
166 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
167 }
168
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700169 /// <summary>
170 /// A sequence of requests with each request served by the server immediately.
171 /// As one request could lead to multiple responses, this interface
172 /// demonstrates the idea of full duplexing.
173 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700174 public virtual global::System.Threading.Tasks.Task FullDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700175 {
176 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
177 }
178
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700179 /// <summary>
180 /// A sequence of requests followed by a sequence of responses.
181 /// The server buffers all the client requests and then serves them in order. A
182 /// stream of responses are returned to the client when the server starts with
183 /// first request.
184 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700185 public virtual global::System.Threading.Tasks.Task HalfDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700186 {
187 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
188 }
189
Noah Eisenb2a26472016-10-21 16:43:57 -0700190 /// <summary>
191 /// The test server will not implement this method. It will be used
192 /// to test the behavior when clients call unimplemented methods.
193 /// </summary>
194 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context)
195 {
196 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
197 }
198
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700199 }
200
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700201 /// <summary>Client for TestService</summary>
Jan Tattermuschfcc8d972016-06-06 09:44:02 -0700202 public class TestServiceClient : ClientBase<TestServiceClient>
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700203 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700204 /// <summary>Creates a new client for TestService</summary>
205 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschb5332812015-07-14 19:29:35 -0700206 public TestServiceClient(Channel channel) : base(channel)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700207 {
208 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700209 /// <summary>Creates a new client for TestService that uses a custom <c>CallInvoker</c>.</summary>
210 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700211 public TestServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700212 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700213 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700214 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700215 protected TestServiceClient() : base()
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700216 {
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700217 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700218 /// <summary>Protected constructor to allow creation of configured clients.</summary>
219 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700220 protected TestServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700221 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700222 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700223
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700224 /// <summary>
225 /// One empty request followed by one empty response.
226 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700227 public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700228 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700229 return EmptyCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700230 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700231 /// <summary>
232 /// One empty request followed by one empty response.
233 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700234 public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700235 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700236 return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700237 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700238 /// <summary>
239 /// One empty request followed by one empty response.
240 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700241 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700242 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700243 return EmptyCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700244 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700245 /// <summary>
246 /// One empty request followed by one empty response.
247 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700248 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700249 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700250 return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700251 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700252 /// <summary>
253 /// One request followed by one response.
254 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700255 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700256 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700257 return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700258 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700259 /// <summary>
260 /// One request followed by one response.
261 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700262 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700263 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700264 return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700265 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700266 /// <summary>
267 /// One request followed by one response.
268 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700269 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700270 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700271 return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700272 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700273 /// <summary>
274 /// One request followed by one response.
275 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700276 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700277 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700278 return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700279 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700280 /// <summary>
Noah Eisenb2a26472016-10-21 16:43:57 -0700281 /// One request followed by one response. Response has cache control
282 /// headers set such that a caching HTTP proxy (such as GFE) can
283 /// satisfy subsequent requests.
284 /// </summary>
285 public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
286 {
287 return CacheableUnaryCall(request, new CallOptions(headers, deadline, cancellationToken));
288 }
289 /// <summary>
290 /// One request followed by one response. Response has cache control
291 /// headers set such that a caching HTTP proxy (such as GFE) can
292 /// satisfy subsequent requests.
293 /// </summary>
294 public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
295 {
296 return CallInvoker.BlockingUnaryCall(__Method_CacheableUnaryCall, null, options, request);
297 }
298 /// <summary>
299 /// One request followed by one response. Response has cache control
300 /// headers set such that a caching HTTP proxy (such as GFE) can
301 /// satisfy subsequent requests.
302 /// </summary>
303 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
304 {
305 return CacheableUnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
306 }
307 /// <summary>
308 /// One request followed by one response. Response has cache control
309 /// headers set such that a caching HTTP proxy (such as GFE) can
310 /// satisfy subsequent requests.
311 /// </summary>
312 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
313 {
314 return CallInvoker.AsyncUnaryCall(__Method_CacheableUnaryCall, null, options, request);
315 }
316 /// <summary>
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700317 /// One request followed by a sequence of responses (streamed download).
318 /// The server returns the payload with client desired type and sizes.
319 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700320 public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700321 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700322 return StreamingOutputCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700323 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700324 /// <summary>
325 /// One request followed by a sequence of responses (streamed download).
326 /// The server returns the payload with client desired type and sizes.
327 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700328 public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700329 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700330 return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700331 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700332 /// <summary>
333 /// A sequence of requests followed by one response (streamed upload).
334 /// The server returns the aggregated size of client payload as the result.
335 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700336 public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700337 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700338 return StreamingInputCall(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700339 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700340 /// <summary>
341 /// A sequence of requests followed by one response (streamed upload).
342 /// The server returns the aggregated size of client payload as the result.
343 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700344 public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700345 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700346 return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700347 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700348 /// <summary>
349 /// A sequence of requests with each request served by the server immediately.
350 /// As one request could lead to multiple responses, this interface
351 /// demonstrates the idea of full duplexing.
352 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700353 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700354 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700355 return FullDuplexCall(new CallOptions(headers, deadline, cancellationToken));
356 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700357 /// <summary>
358 /// A sequence of requests with each request served by the server immediately.
359 /// As one request could lead to multiple responses, this interface
360 /// demonstrates the idea of full duplexing.
361 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700362 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options)
363 {
364 return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options);
365 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700366 /// <summary>
367 /// A sequence of requests followed by a sequence of responses.
368 /// The server buffers all the client requests and then serves them in order. A
369 /// stream of responses are returned to the client when the server starts with
370 /// first request.
371 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700372 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
373 {
374 return HalfDuplexCall(new CallOptions(headers, deadline, cancellationToken));
375 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700376 /// <summary>
377 /// A sequence of requests followed by a sequence of responses.
378 /// The server buffers all the client requests and then serves them in order. A
379 /// stream of responses are returned to the client when the server starts with
380 /// first request.
381 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700382 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options)
383 {
384 return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options);
385 }
Noah Eisenb2a26472016-10-21 16:43:57 -0700386 /// <summary>
387 /// The test server will not implement this method. It will be used
388 /// to test the behavior when clients call unimplemented methods.
389 /// </summary>
390 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
391 {
392 return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken));
393 }
394 /// <summary>
395 /// The test server will not implement this method. It will be used
396 /// to test the behavior when clients call unimplemented methods.
397 /// </summary>
398 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options)
399 {
400 return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request);
401 }
402 /// <summary>
403 /// The test server will not implement this method. It will be used
404 /// to test the behavior when clients call unimplemented methods.
405 /// </summary>
406 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
407 {
408 return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
409 }
410 /// <summary>
411 /// The test server will not implement this method. It will be used
412 /// to test the behavior when clients call unimplemented methods.
413 /// </summary>
414 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
415 {
416 return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request);
417 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200418 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700419 protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration)
420 {
421 return new TestServiceClient(configuration);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700422 }
423 }
424
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700425 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700426 public static ServerServiceDefinition BindService(TestServiceBase serviceImpl)
427 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700428 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700429 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
430 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
Noah Eisenb2a26472016-10-21 16:43:57 -0700431 .AddMethod(__Method_CacheableUnaryCall, serviceImpl.CacheableUnaryCall)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700432 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
433 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
434 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
Noah Eisenb2a26472016-10-21 16:43:57 -0700435 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall)
436 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700437 }
438
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700439 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700440 /// <summary>
441 /// A simple service NOT implemented at servers so clients can test for
442 /// that case.
443 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700444 public static class UnimplementedService
445 {
446 static readonly string __ServiceName = "grpc.testing.UnimplementedService";
447
448 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
449
450 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
451 MethodType.Unary,
452 __ServiceName,
453 "UnimplementedCall",
454 __Marshaller_Empty,
455 __Marshaller_Empty);
456
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700457 /// <summary>Service descriptor</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700458 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
459 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800460 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700461 }
462
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700463 /// <summary>Base class for server-side implementations of UnimplementedService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700464 public abstract class UnimplementedServiceBase
465 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700466 /// <summary>
467 /// A call that no server should implement
468 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700469 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700470 {
471 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
472 }
473
474 }
475
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700476 /// <summary>Client for UnimplementedService</summary>
Jan Tattermuschfcc8d972016-06-06 09:44:02 -0700477 public class UnimplementedServiceClient : ClientBase<UnimplementedServiceClient>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700478 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700479 /// <summary>Creates a new client for UnimplementedService</summary>
480 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700481 public UnimplementedServiceClient(Channel channel) : base(channel)
482 {
483 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700484 /// <summary>Creates a new client for UnimplementedService that uses a custom <c>CallInvoker</c>.</summary>
485 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700486 public UnimplementedServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700487 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700488 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700489 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700490 protected UnimplementedServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700491 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700492 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700493 /// <summary>Protected constructor to allow creation of configured clients.</summary>
494 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700495 protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700496 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700497 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700498
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700499 /// <summary>
500 /// A call that no server should implement
501 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700502 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch70f86522015-10-07 18:23:51 -0700503 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700504 return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken));
505 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700506 /// <summary>
507 /// A call that no server should implement
508 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700509 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options)
510 {
511 return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request);
512 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700513 /// <summary>
514 /// A call that no server should implement
515 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700516 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
517 {
518 return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
519 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700520 /// <summary>
521 /// A call that no server should implement
522 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700523 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
524 {
525 return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request);
526 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200527 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700528 protected override UnimplementedServiceClient NewInstance(ClientBaseConfiguration configuration)
529 {
530 return new UnimplementedServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700531 }
532 }
533
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700534 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700535 public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl)
536 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700537 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700538 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
539 }
540
Jan Tattermusch70f86522015-10-07 18:23:51 -0700541 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700542 /// <summary>
543 /// A service used to control reconnect server.
544 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700545 public static class ReconnectService
546 {
547 static readonly string __ServiceName = "grpc.testing.ReconnectService";
548
vjpai87bac952016-04-20 09:35:35 -0700549 static readonly Marshaller<global::Grpc.Testing.ReconnectParams> __Marshaller_ReconnectParams = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectParams.Parser.ParseFrom);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700550 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
551 static readonly Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_ReconnectInfo = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom);
552
vjpai87bac952016-04-20 09:35:35 -0700553 static readonly Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty> __Method_Start = new Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty>(
Jan Tattermusch70f86522015-10-07 18:23:51 -0700554 MethodType.Unary,
555 __ServiceName,
556 "Start",
vjpai87bac952016-04-20 09:35:35 -0700557 __Marshaller_ReconnectParams,
Jan Tattermusch70f86522015-10-07 18:23:51 -0700558 __Marshaller_Empty);
559
560 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(
561 MethodType.Unary,
562 __ServiceName,
563 "Stop",
564 __Marshaller_Empty,
565 __Marshaller_ReconnectInfo);
566
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700567 /// <summary>Service descriptor</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700568 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
569 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800570 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700571 }
572
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700573 /// <summary>Base class for server-side implementations of ReconnectService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700574 public abstract class ReconnectServiceBase
575 {
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700576 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700577 {
578 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
579 }
580
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700581 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700582 {
583 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
584 }
585
586 }
587
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700588 /// <summary>Client for ReconnectService</summary>
Jan Tattermuschfcc8d972016-06-06 09:44:02 -0700589 public class ReconnectServiceClient : ClientBase<ReconnectServiceClient>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700590 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700591 /// <summary>Creates a new client for ReconnectService</summary>
592 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700593 public ReconnectServiceClient(Channel channel) : base(channel)
594 {
595 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700596 /// <summary>Creates a new client for ReconnectService that uses a custom <c>CallInvoker</c>.</summary>
597 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700598 public ReconnectServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700599 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700600 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700601 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700602 protected ReconnectServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700603 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700604 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700605 /// <summary>Protected constructor to allow creation of configured clients.</summary>
606 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700607 protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700608 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700609 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700610
vjpai87bac952016-04-20 09:35:35 -0700611 public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch70f86522015-10-07 18:23:51 -0700612 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700613 return Start(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700614 }
vjpai87bac952016-04-20 09:35:35 -0700615 public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700616 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700617 return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700618 }
vjpai87bac952016-04-20 09:35:35 -0700619 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch70f86522015-10-07 18:23:51 -0700620 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700621 return StartAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700622 }
vjpai87bac952016-04-20 09:35:35 -0700623 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700624 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700625 return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700626 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700627 public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch70f86522015-10-07 18:23:51 -0700628 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700629 return Stop(request, new CallOptions(headers, deadline, cancellationToken));
630 }
631 public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options)
632 {
633 return CallInvoker.BlockingUnaryCall(__Method_Stop, null, options, request);
634 }
635 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
636 {
637 return StopAsync(request, new CallOptions(headers, deadline, cancellationToken));
638 }
639 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options)
640 {
641 return CallInvoker.AsyncUnaryCall(__Method_Stop, null, options, request);
642 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200643 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700644 protected override ReconnectServiceClient NewInstance(ClientBaseConfiguration configuration)
645 {
646 return new ReconnectServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700647 }
648 }
649
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700650 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700651 public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl)
652 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700653 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700654 .AddMethod(__Method_Start, serviceImpl.Start)
655 .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
656 }
657
Jan Tattermusch70f86522015-10-07 18:23:51 -0700658 }
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700659}
Jan Tattermuschcd7e3132015-05-07 15:10:23 -0700660#endregion