blob: 9e3565195569524df428acd66fa07fd9d56e3eea [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
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070074 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 -070075 MethodType.ServerStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070076 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070077 "StreamingOutputCall",
78 __Marshaller_StreamingOutputCallRequest,
79 __Marshaller_StreamingOutputCallResponse);
80
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070081 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 -070082 MethodType.ClientStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070083 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070084 "StreamingInputCall",
85 __Marshaller_StreamingInputCallRequest,
86 __Marshaller_StreamingInputCallResponse);
87
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070088 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 -070089 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070090 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070091 "FullDuplexCall",
92 __Marshaller_StreamingOutputCallRequest,
93 __Marshaller_StreamingOutputCallResponse);
94
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070095 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 -070096 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070097 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070098 "HalfDuplexCall",
99 __Marshaller_StreamingOutputCallRequest,
100 __Marshaller_StreamingOutputCallResponse);
101
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700102 /// <summary>Service descriptor</summary>
Jan Tattermusche6af5d12015-08-03 10:57:43 -0700103 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
104 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800105 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[0]; }
Jan Tattermusche6af5d12015-08-03 10:57:43 -0700106 }
107
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700108 /// <summary>Client for TestService</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700109 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700110 public interface ITestServiceClient
111 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700112 /// <summary>
113 /// One empty request followed by one empty response.
114 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700115 global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700116 /// <summary>
117 /// One empty request followed by one empty response.
118 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700119 global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700120 /// <summary>
121 /// One empty request followed by one empty response.
122 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700123 AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700124 /// <summary>
125 /// One empty request followed by one empty response.
126 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700127 AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700128 /// <summary>
129 /// One request followed by one response.
130 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700131 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700132 /// <summary>
133 /// One request followed by one response.
134 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700135 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700136 /// <summary>
137 /// One request followed by one response.
138 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700139 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700140 /// <summary>
141 /// One request followed by one response.
142 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700143 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700144 /// <summary>
145 /// One request followed by a sequence of responses (streamed download).
146 /// The server returns the payload with client desired type and sizes.
147 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700148 AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700149 /// <summary>
150 /// One request followed by a sequence of responses (streamed download).
151 /// The server returns the payload with client desired type and sizes.
152 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700153 AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700154 /// <summary>
155 /// A sequence of requests followed by one response (streamed upload).
156 /// The server returns the aggregated size of client payload as the result.
157 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700158 AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700159 /// <summary>
160 /// A sequence of requests followed by one response (streamed upload).
161 /// The server returns the aggregated size of client payload as the result.
162 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700163 AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700164 /// <summary>
165 /// A sequence of requests with each request served by the server immediately.
166 /// As one request could lead to multiple responses, this interface
167 /// demonstrates the idea of full duplexing.
168 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700169 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700170 /// <summary>
171 /// A sequence of requests with each request served by the server immediately.
172 /// As one request could lead to multiple responses, this interface
173 /// demonstrates the idea of full duplexing.
174 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700175 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700176 /// <summary>
177 /// A sequence of requests followed by a sequence of responses.
178 /// The server buffers all the client requests and then serves them in order. A
179 /// stream of responses are returned to the client when the server starts with
180 /// first request.
181 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700182 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700183 /// <summary>
184 /// A sequence of requests followed by a sequence of responses.
185 /// The server buffers all the client requests and then serves them in order. A
186 /// stream of responses are returned to the client when the server starts with
187 /// first request.
188 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700189 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700190 }
191
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700192 /// <summary>Interface of server-side implementations of TestService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700193 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700194 public interface ITestService
195 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700196 /// <summary>
197 /// One empty request followed by one empty response.
198 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700199 global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700200 /// <summary>
201 /// One request followed by one response.
202 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700203 global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700204 /// <summary>
205 /// One request followed by a sequence of responses (streamed download).
206 /// The server returns the payload with client desired type and sizes.
207 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700208 global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700209 /// <summary>
210 /// A sequence of requests followed by one response (streamed upload).
211 /// The server returns the aggregated size of client payload as the result.
212 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700213 global::System.Threading.Tasks.Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700214 /// <summary>
215 /// A sequence of requests with each request served by the server immediately.
216 /// As one request could lead to multiple responses, this interface
217 /// demonstrates the idea of full duplexing.
218 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700219 global::System.Threading.Tasks.Task FullDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700220 /// <summary>
221 /// A sequence of requests followed by a sequence of responses.
222 /// The server buffers all the client requests and then serves them in order. A
223 /// stream of responses are returned to the client when the server starts with
224 /// first request.
225 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700226 global::System.Threading.Tasks.Task HalfDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700227 }
228
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700229 /// <summary>Base class for server-side implementations of TestService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700230 public abstract class TestServiceBase
231 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700232 /// <summary>
233 /// One empty request followed by one empty response.
234 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700235 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 -0700236 {
237 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
238 }
239
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700240 /// <summary>
241 /// One request followed by one response.
242 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700243 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 -0700244 {
245 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
246 }
247
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700248 /// <summary>
249 /// One request followed by a sequence of responses (streamed download).
250 /// The server returns the payload with client desired type and sizes.
251 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700252 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 -0700253 {
254 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
255 }
256
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700257 /// <summary>
258 /// A sequence of requests followed by one response (streamed upload).
259 /// The server returns the aggregated size of client payload as the result.
260 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700261 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 -0700262 {
263 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
264 }
265
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700266 /// <summary>
267 /// A sequence of requests with each request served by the server immediately.
268 /// As one request could lead to multiple responses, this interface
269 /// demonstrates the idea of full duplexing.
270 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700271 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 -0700272 {
273 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
274 }
275
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700276 /// <summary>
277 /// A sequence of requests followed by a sequence of responses.
278 /// The server buffers all the client requests and then serves them in order. A
279 /// stream of responses are returned to the client when the server starts with
280 /// first request.
281 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700282 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 -0700283 {
284 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
285 }
286
287 }
288
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700289 /// <summary>Client for TestService</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700290 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700291 public class TestServiceClient : ClientBase<TestServiceClient>, ITestServiceClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700292 #pragma warning restore 0618
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700293 {
Jan Tattermuschb5332812015-07-14 19:29:35 -0700294 public TestServiceClient(Channel channel) : base(channel)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700295 {
296 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700297 public TestServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700298 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700299 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700300 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
301 protected TestServiceClient() : base()
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700302 {
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700303 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700304 ///<summary>Protected constructor to allow creation of configured clients.</summary>
305 protected TestServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700306 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700307 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700308
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700309 /// <summary>
310 /// One empty request followed by one empty response.
311 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700312 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 -0700313 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700314 return EmptyCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700315 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700316 /// <summary>
317 /// One empty request followed by one empty response.
318 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700319 public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700320 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700321 return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700322 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700323 /// <summary>
324 /// One empty request followed by one empty response.
325 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700326 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 -0700327 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700328 return EmptyCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700329 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700330 /// <summary>
331 /// One empty request followed by one empty response.
332 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700333 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700334 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700335 return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700336 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700337 /// <summary>
338 /// One request followed by one response.
339 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700340 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 -0700341 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700342 return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700343 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700344 /// <summary>
345 /// One request followed by one response.
346 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700347 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700348 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700349 return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700350 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700351 /// <summary>
352 /// One request followed by one response.
353 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700354 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 -0700355 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700356 return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700357 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700358 /// <summary>
359 /// One request followed by one response.
360 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700361 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700362 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700363 return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700364 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700365 /// <summary>
366 /// One request followed by a sequence of responses (streamed download).
367 /// The server returns the payload with client desired type and sizes.
368 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700369 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 -0700370 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700371 return StreamingOutputCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700372 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700373 /// <summary>
374 /// One request followed by a sequence of responses (streamed download).
375 /// The server returns the payload with client desired type and sizes.
376 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700377 public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700378 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700379 return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700380 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700381 /// <summary>
382 /// A sequence of requests followed by one response (streamed upload).
383 /// The server returns the aggregated size of client payload as the result.
384 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700385 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 -0700386 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700387 return StreamingInputCall(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700388 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700389 /// <summary>
390 /// A sequence of requests followed by one response (streamed upload).
391 /// The server returns the aggregated size of client payload as the result.
392 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700393 public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700394 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700395 return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700396 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700397 /// <summary>
398 /// A sequence of requests with each request served by the server immediately.
399 /// As one request could lead to multiple responses, this interface
400 /// demonstrates the idea of full duplexing.
401 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700402 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 -0700403 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700404 return FullDuplexCall(new CallOptions(headers, deadline, cancellationToken));
405 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700406 /// <summary>
407 /// A sequence of requests with each request served by the server immediately.
408 /// As one request could lead to multiple responses, this interface
409 /// demonstrates the idea of full duplexing.
410 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700411 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options)
412 {
413 return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options);
414 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700415 /// <summary>
416 /// A sequence of requests followed by a sequence of responses.
417 /// The server buffers all the client requests and then serves them in order. A
418 /// stream of responses are returned to the client when the server starts with
419 /// first request.
420 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700421 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
422 {
423 return HalfDuplexCall(new CallOptions(headers, deadline, cancellationToken));
424 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700425 /// <summary>
426 /// A sequence of requests followed by a sequence of responses.
427 /// The server buffers all the client requests and then serves them in order. A
428 /// stream of responses are returned to the client when the server starts with
429 /// first request.
430 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700431 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options)
432 {
433 return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options);
434 }
435 protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration)
436 {
437 return new TestServiceClient(configuration);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700438 }
439 }
440
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700441 /// <summary>Creates a new client for TestService</summary>
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700442 public static TestServiceClient NewClient(Channel channel)
443 {
444 return new TestServiceClient(channel);
445 }
446
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700447 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700448 #pragma warning disable 0618
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700449 public static ServerServiceDefinition BindService(ITestService serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700450 #pragma warning restore 0618
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700451 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700452 return ServerServiceDefinition.CreateBuilder()
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700453 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
454 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
455 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
456 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
457 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
458 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build();
459 }
460
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700461 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700462 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700463 public static ServerServiceDefinition BindService(TestServiceBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700464 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700465 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700466 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700467 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
468 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
469 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
470 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
471 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
472 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build();
473 }
474
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700475 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700476 /// <summary>
477 /// A simple service NOT implemented at servers so clients can test for
478 /// that case.
479 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700480 public static class UnimplementedService
481 {
482 static readonly string __ServiceName = "grpc.testing.UnimplementedService";
483
484 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
485
486 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
487 MethodType.Unary,
488 __ServiceName,
489 "UnimplementedCall",
490 __Marshaller_Empty,
491 __Marshaller_Empty);
492
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700493 /// <summary>Service descriptor</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700494 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
495 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800496 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700497 }
498
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700499 /// <summary>Client for UnimplementedService</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700500 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700501 public interface IUnimplementedServiceClient
502 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700503 /// <summary>
504 /// A call that no server should implement
505 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700506 global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700507 /// <summary>
508 /// A call that no server should implement
509 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700510 global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700511 /// <summary>
512 /// A call that no server should implement
513 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700514 AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700515 /// <summary>
516 /// A call that no server should implement
517 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700518 AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options);
519 }
520
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700521 /// <summary>Interface of server-side implementations of UnimplementedService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700522 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700523 public interface IUnimplementedService
524 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700525 /// <summary>
526 /// A call that no server should implement
527 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700528 global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700529 }
530
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700531 /// <summary>Base class for server-side implementations of UnimplementedService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700532 public abstract class UnimplementedServiceBase
533 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700534 /// <summary>
535 /// A call that no server should implement
536 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700537 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 -0700538 {
539 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
540 }
541
542 }
543
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700544 /// <summary>Client for UnimplementedService</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700545 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700546 public class UnimplementedServiceClient : ClientBase<UnimplementedServiceClient>, IUnimplementedServiceClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700547 #pragma warning restore 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700548 {
549 public UnimplementedServiceClient(Channel channel) : base(channel)
550 {
551 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700552 public UnimplementedServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700553 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700554 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700555 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
556 protected UnimplementedServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700557 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700558 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700559 ///<summary>Protected constructor to allow creation of configured clients.</summary>
560 protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700561 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700562 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700563
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700564 /// <summary>
565 /// A call that no server should implement
566 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700567 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 -0700568 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700569 return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken));
570 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700571 /// <summary>
572 /// A call that no server should implement
573 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700574 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options)
575 {
576 return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request);
577 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700578 /// <summary>
579 /// A call that no server should implement
580 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700581 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
582 {
583 return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
584 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700585 /// <summary>
586 /// A call that no server should implement
587 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700588 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
589 {
590 return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request);
591 }
592 protected override UnimplementedServiceClient NewInstance(ClientBaseConfiguration configuration)
593 {
594 return new UnimplementedServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700595 }
596 }
597
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700598 /// <summary>Creates a new client for UnimplementedService</summary>
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700599 public static UnimplementedServiceClient NewClient(Channel channel)
600 {
601 return new UnimplementedServiceClient(channel);
602 }
603
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700604 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700605 #pragma warning disable 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700606 public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700607 #pragma warning restore 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700608 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700609 return ServerServiceDefinition.CreateBuilder()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700610 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
611 }
612
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700613 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700614 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700615 public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700616 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700617 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700618 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700619 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
620 }
621
Jan Tattermusch70f86522015-10-07 18:23:51 -0700622 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700623 /// <summary>
624 /// A service used to control reconnect server.
625 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700626 public static class ReconnectService
627 {
628 static readonly string __ServiceName = "grpc.testing.ReconnectService";
629
vjpai87bac952016-04-20 09:35:35 -0700630 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 -0700631 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
632 static readonly Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_ReconnectInfo = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom);
633
vjpai87bac952016-04-20 09:35:35 -0700634 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 -0700635 MethodType.Unary,
636 __ServiceName,
637 "Start",
vjpai87bac952016-04-20 09:35:35 -0700638 __Marshaller_ReconnectParams,
Jan Tattermusch70f86522015-10-07 18:23:51 -0700639 __Marshaller_Empty);
640
641 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(
642 MethodType.Unary,
643 __ServiceName,
644 "Stop",
645 __Marshaller_Empty,
646 __Marshaller_ReconnectInfo);
647
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700648 /// <summary>Service descriptor</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700649 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
650 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800651 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700652 }
653
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700654 /// <summary>Client for ReconnectService</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700655 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700656 public interface IReconnectServiceClient
657 {
vjpai87bac952016-04-20 09:35:35 -0700658 global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
659 global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options);
660 AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
661 AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700662 global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
663 global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options);
664 AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
665 AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options);
666 }
667
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700668 /// <summary>Interface of server-side implementations of ReconnectService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700669 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700670 public interface IReconnectService
671 {
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700672 global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context);
673 global::System.Threading.Tasks.Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, ServerCallContext context);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700674 }
675
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700676 /// <summary>Base class for server-side implementations of ReconnectService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700677 public abstract class ReconnectServiceBase
678 {
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700679 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 -0700680 {
681 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
682 }
683
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700684 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 -0700685 {
686 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
687 }
688
689 }
690
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700691 /// <summary>Client for ReconnectService</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700692 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700693 public class ReconnectServiceClient : ClientBase<ReconnectServiceClient>, IReconnectServiceClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700694 #pragma warning restore 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700695 {
696 public ReconnectServiceClient(Channel channel) : base(channel)
697 {
698 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700699 public ReconnectServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700700 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700701 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700702 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
703 protected ReconnectServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700704 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700705 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700706 ///<summary>Protected constructor to allow creation of configured clients.</summary>
707 protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700708 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700709 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700710
vjpai87bac952016-04-20 09:35:35 -0700711 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 -0700712 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700713 return Start(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700714 }
vjpai87bac952016-04-20 09:35:35 -0700715 public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700716 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700717 return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700718 }
vjpai87bac952016-04-20 09:35:35 -0700719 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 -0700720 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700721 return StartAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700722 }
vjpai87bac952016-04-20 09:35:35 -0700723 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700724 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700725 return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700726 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700727 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 -0700728 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700729 return Stop(request, new CallOptions(headers, deadline, cancellationToken));
730 }
731 public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options)
732 {
733 return CallInvoker.BlockingUnaryCall(__Method_Stop, null, options, request);
734 }
735 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
736 {
737 return StopAsync(request, new CallOptions(headers, deadline, cancellationToken));
738 }
739 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options)
740 {
741 return CallInvoker.AsyncUnaryCall(__Method_Stop, null, options, request);
742 }
743 protected override ReconnectServiceClient NewInstance(ClientBaseConfiguration configuration)
744 {
745 return new ReconnectServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700746 }
747 }
748
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700749 /// <summary>Creates a new client for ReconnectService</summary>
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700750 public static ReconnectServiceClient NewClient(Channel channel)
751 {
752 return new ReconnectServiceClient(channel);
753 }
754
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700755 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700756 #pragma warning disable 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700757 public static ServerServiceDefinition BindService(IReconnectService serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700758 #pragma warning restore 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700759 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700760 return ServerServiceDefinition.CreateBuilder()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700761 .AddMethod(__Method_Start, serviceImpl.Start)
762 .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
763 }
764
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700765 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700766 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700767 public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700768 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700769 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700770 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700771 .AddMethod(__Method_Start, serviceImpl.Start)
772 .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
773 }
774
Jan Tattermusch70f86522015-10-07 18:23:51 -0700775 }
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700776}
Jan Tattermuschcd7e3132015-05-07 15:10:23 -0700777#endregion