blob: d700a18778bb7a0ea18c1d162117bdebcdbe1150 [file] [log] [blame]
Jan Tattermusch085533e2015-05-07 14:34:45 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: math.proto
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07003// Original file comments:
4// Copyright 2015, 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//
Jan Tattermusch085533e2015-05-07 14:34:45 -070033#region Designer generated code
Jan Tattermuscha7fff862015-02-13 11:08:08 -080034
Jan Tattermusch15111f52015-02-05 18:15:14 -080035using System;
Jan Tattermusch30868622015-02-19 09:22:33 -080036using System.Threading;
37using System.Threading.Tasks;
38using Grpc.Core;
Jan Tattermusch15111f52015-02-05 18:15:14 -080039
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070040namespace Math {
Jan Tattermusch085533e2015-05-07 14:34:45 -070041 public static class Math
42 {
43 static readonly string __ServiceName = "math.Math";
44
Jan Tattermusch7db46132015-08-03 09:25:38 -070045 static readonly Marshaller<global::Math.DivArgs> __Marshaller_DivArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Math.DivArgs.Parser.ParseFrom);
Jan Tattermusch475f75a2015-08-03 09:46:04 -070046 static readonly Marshaller<global::Math.DivReply> __Marshaller_DivReply = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Math.DivReply.Parser.ParseFrom);
47 static readonly Marshaller<global::Math.FibArgs> __Marshaller_FibArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Math.FibArgs.Parser.ParseFrom);
48 static readonly Marshaller<global::Math.Num> __Marshaller_Num = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Math.Num.Parser.ParseFrom);
Jan Tattermusch085533e2015-05-07 14:34:45 -070049
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070050 static readonly Method<global::Math.DivArgs, global::Math.DivReply> __Method_Div = new Method<global::Math.DivArgs, global::Math.DivReply>(
Jan Tattermusch085533e2015-05-07 14:34:45 -070051 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070052 __ServiceName,
Jan Tattermusch085533e2015-05-07 14:34:45 -070053 "Div",
54 __Marshaller_DivArgs,
55 __Marshaller_DivReply);
56
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070057 static readonly Method<global::Math.DivArgs, global::Math.DivReply> __Method_DivMany = new Method<global::Math.DivArgs, global::Math.DivReply>(
Jan Tattermusch085533e2015-05-07 14:34:45 -070058 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070059 __ServiceName,
Jan Tattermusch085533e2015-05-07 14:34:45 -070060 "DivMany",
61 __Marshaller_DivArgs,
62 __Marshaller_DivReply);
63
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070064 static readonly Method<global::Math.FibArgs, global::Math.Num> __Method_Fib = new Method<global::Math.FibArgs, global::Math.Num>(
Jan Tattermusch085533e2015-05-07 14:34:45 -070065 MethodType.ServerStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070066 __ServiceName,
Jan Tattermusch085533e2015-05-07 14:34:45 -070067 "Fib",
68 __Marshaller_FibArgs,
69 __Marshaller_Num);
70
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070071 static readonly Method<global::Math.Num, global::Math.Num> __Method_Sum = new Method<global::Math.Num, global::Math.Num>(
Jan Tattermusch085533e2015-05-07 14:34:45 -070072 MethodType.ClientStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070073 __ServiceName,
Jan Tattermusch085533e2015-05-07 14:34:45 -070074 "Sum",
75 __Marshaller_Num,
76 __Marshaller_Num);
77
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070078 /// <summary>Service descriptor</summary>
Jan Tattermusch9ee27e12015-08-03 10:32:48 -070079 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
80 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080081 get { return global::Math.MathReflection.Descriptor.Services[0]; }
Jan Tattermusch9ee27e12015-08-03 10:32:48 -070082 }
83
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070084 /// <summary>Client for Math</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -070085 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermusch085533e2015-05-07 14:34:45 -070086 public interface IMathClient
Jan Tattermusch15111f52015-02-05 18:15:14 -080087 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070088 /// <summary>
89 /// Div divides args.dividend by args.divisor and returns the quotient and
90 /// remainder.
91 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070092 global::Math.DivReply Div(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070093 /// <summary>
94 /// Div divides args.dividend by args.divisor and returns the quotient and
95 /// remainder.
96 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -070097 global::Math.DivReply Div(global::Math.DivArgs request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070098 /// <summary>
99 /// Div divides args.dividend by args.divisor and returns the quotient and
100 /// remainder.
101 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700102 AsyncUnaryCall<global::Math.DivReply> DivAsync(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700103 /// <summary>
104 /// Div divides args.dividend by args.divisor and returns the quotient and
105 /// remainder.
106 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700107 AsyncUnaryCall<global::Math.DivReply> DivAsync(global::Math.DivArgs request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700108 /// <summary>
109 /// DivMany accepts an arbitrary number of division args from the client stream
110 /// and sends back the results in the reply stream. The stream continues until
111 /// the client closes its end; the server does the same after sending all the
112 /// replies. The stream ends immediately if either end aborts.
113 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700114 AsyncDuplexStreamingCall<global::Math.DivArgs, global::Math.DivReply> DivMany(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700115 /// <summary>
116 /// DivMany accepts an arbitrary number of division args from the client stream
117 /// and sends back the results in the reply stream. The stream continues until
118 /// the client closes its end; the server does the same after sending all the
119 /// replies. The stream ends immediately if either end aborts.
120 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700121 AsyncDuplexStreamingCall<global::Math.DivArgs, global::Math.DivReply> DivMany(CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700122 /// <summary>
123 /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib
124 /// generates up to limit numbers; otherwise it continues until the call is
125 /// canceled. Unlike Fib above, Fib has no final FibReply.
126 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700127 AsyncServerStreamingCall<global::Math.Num> Fib(global::Math.FibArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700128 /// <summary>
129 /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib
130 /// generates up to limit numbers; otherwise it continues until the call is
131 /// canceled. Unlike Fib above, Fib has no final FibReply.
132 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700133 AsyncServerStreamingCall<global::Math.Num> Fib(global::Math.FibArgs request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700134 /// <summary>
135 /// Sum sums a stream of numbers, returning the final result once the stream
136 /// is closed.
137 /// </summary>
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700138 AsyncClientStreamingCall<global::Math.Num, global::Math.Num> Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700139 /// <summary>
140 /// Sum sums a stream of numbers, returning the final result once the stream
141 /// is closed.
142 /// </summary>
Jan Tattermusch38536a72015-08-08 00:45:52 -0700143 AsyncClientStreamingCall<global::Math.Num, global::Math.Num> Sum(CallOptions options);
Jan Tattermusch15111f52015-02-05 18:15:14 -0800144 }
Jan Tattermusch085533e2015-05-07 14:34:45 -0700145
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700146 /// <summary>Interface of server-side implementations of Math</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700147 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermusch085533e2015-05-07 14:34:45 -0700148 public interface IMath
149 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700150 /// <summary>
151 /// Div divides args.dividend by args.divisor and returns the quotient and
152 /// remainder.
153 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700154 global::System.Threading.Tasks.Task<global::Math.DivReply> Div(global::Math.DivArgs request, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700155 /// <summary>
156 /// DivMany accepts an arbitrary number of division args from the client stream
157 /// and sends back the results in the reply stream. The stream continues until
158 /// the client closes its end; the server does the same after sending all the
159 /// replies. The stream ends immediately if either end aborts.
160 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700161 global::System.Threading.Tasks.Task DivMany(IAsyncStreamReader<global::Math.DivArgs> requestStream, IServerStreamWriter<global::Math.DivReply> responseStream, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700162 /// <summary>
163 /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib
164 /// generates up to limit numbers; otherwise it continues until the call is
165 /// canceled. Unlike Fib above, Fib has no final FibReply.
166 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700167 global::System.Threading.Tasks.Task Fib(global::Math.FibArgs request, IServerStreamWriter<global::Math.Num> responseStream, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700168 /// <summary>
169 /// Sum sums a stream of numbers, returning the final result once the stream
170 /// is closed.
171 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700172 global::System.Threading.Tasks.Task<global::Math.Num> Sum(IAsyncStreamReader<global::Math.Num> requestStream, ServerCallContext context);
Jan Tattermusch085533e2015-05-07 14:34:45 -0700173 }
174
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700175 /// <summary>Base class for server-side implementations of Math</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700176 public abstract class MathBase
177 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700178 /// <summary>
179 /// Div divides args.dividend by args.divisor and returns the quotient and
180 /// remainder.
181 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700182 public virtual global::System.Threading.Tasks.Task<global::Math.DivReply> Div(global::Math.DivArgs request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700183 {
184 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
185 }
186
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700187 /// <summary>
188 /// DivMany accepts an arbitrary number of division args from the client stream
189 /// and sends back the results in the reply stream. The stream continues until
190 /// the client closes its end; the server does the same after sending all the
191 /// replies. The stream ends immediately if either end aborts.
192 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700193 public virtual global::System.Threading.Tasks.Task DivMany(IAsyncStreamReader<global::Math.DivArgs> requestStream, IServerStreamWriter<global::Math.DivReply> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700194 {
195 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
196 }
197
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700198 /// <summary>
199 /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib
200 /// generates up to limit numbers; otherwise it continues until the call is
201 /// canceled. Unlike Fib above, Fib has no final FibReply.
202 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700203 public virtual global::System.Threading.Tasks.Task Fib(global::Math.FibArgs request, IServerStreamWriter<global::Math.Num> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700204 {
205 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
206 }
207
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700208 /// <summary>
209 /// Sum sums a stream of numbers, returning the final result once the stream
210 /// is closed.
211 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700212 public virtual global::System.Threading.Tasks.Task<global::Math.Num> Sum(IAsyncStreamReader<global::Math.Num> requestStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700213 {
214 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
215 }
216
217 }
218
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700219 /// <summary>Client for Math</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700220 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700221 public class MathClient : ClientBase<MathClient>, IMathClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700222 #pragma warning restore 0618
Jan Tattermusch085533e2015-05-07 14:34:45 -0700223 {
Jan Tattermuschb5332812015-07-14 19:29:35 -0700224 public MathClient(Channel channel) : base(channel)
Jan Tattermusch085533e2015-05-07 14:34:45 -0700225 {
226 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700227 public MathClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch085533e2015-05-07 14:34:45 -0700228 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700229 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700230 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
231 protected MathClient() : base()
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700232 {
Jan Tattermusch085533e2015-05-07 14:34:45 -0700233 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700234 ///<summary>Protected constructor to allow creation of configured clients.</summary>
235 protected MathClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch085533e2015-05-07 14:34:45 -0700236 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700237 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700238
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700239 /// <summary>
240 /// Div divides args.dividend by args.divisor and returns the quotient and
241 /// remainder.
242 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700243 public virtual global::Math.DivReply Div(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700244 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700245 return Div(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch085533e2015-05-07 14:34:45 -0700246 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700247 /// <summary>
248 /// Div divides args.dividend by args.divisor and returns the quotient and
249 /// remainder.
250 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700251 public virtual global::Math.DivReply Div(global::Math.DivArgs request, CallOptions options)
Jan Tattermusch085533e2015-05-07 14:34:45 -0700252 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700253 return CallInvoker.BlockingUnaryCall(__Method_Div, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700254 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700255 /// <summary>
256 /// Div divides args.dividend by args.divisor and returns the quotient and
257 /// remainder.
258 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700259 public virtual AsyncUnaryCall<global::Math.DivReply> DivAsync(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700260 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700261 return DivAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch085533e2015-05-07 14:34:45 -0700262 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700263 /// <summary>
264 /// Div divides args.dividend by args.divisor and returns the quotient and
265 /// remainder.
266 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700267 public virtual AsyncUnaryCall<global::Math.DivReply> DivAsync(global::Math.DivArgs request, CallOptions options)
Jan Tattermusch085533e2015-05-07 14:34:45 -0700268 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700269 return CallInvoker.AsyncUnaryCall(__Method_Div, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700270 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700271 /// <summary>
272 /// DivMany accepts an arbitrary number of division args from the client stream
273 /// and sends back the results in the reply stream. The stream continues until
274 /// the client closes its end; the server does the same after sending all the
275 /// replies. The stream ends immediately if either end aborts.
276 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700277 public virtual AsyncDuplexStreamingCall<global::Math.DivArgs, global::Math.DivReply> DivMany(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700278 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700279 return DivMany(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch085533e2015-05-07 14:34:45 -0700280 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700281 /// <summary>
282 /// DivMany accepts an arbitrary number of division args from the client stream
283 /// and sends back the results in the reply stream. The stream continues until
284 /// the client closes its end; the server does the same after sending all the
285 /// replies. The stream ends immediately if either end aborts.
286 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700287 public virtual AsyncDuplexStreamingCall<global::Math.DivArgs, global::Math.DivReply> DivMany(CallOptions options)
Jan Tattermusch085533e2015-05-07 14:34:45 -0700288 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700289 return CallInvoker.AsyncDuplexStreamingCall(__Method_DivMany, null, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700290 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700291 /// <summary>
292 /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib
293 /// generates up to limit numbers; otherwise it continues until the call is
294 /// canceled. Unlike Fib above, Fib has no final FibReply.
295 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700296 public virtual AsyncServerStreamingCall<global::Math.Num> Fib(global::Math.FibArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700297 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700298 return Fib(request, new CallOptions(headers, deadline, cancellationToken));
299 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700300 /// <summary>
301 /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib
302 /// generates up to limit numbers; otherwise it continues until the call is
303 /// canceled. Unlike Fib above, Fib has no final FibReply.
304 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700305 public virtual AsyncServerStreamingCall<global::Math.Num> Fib(global::Math.FibArgs request, CallOptions options)
306 {
307 return CallInvoker.AsyncServerStreamingCall(__Method_Fib, null, options, request);
308 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700309 /// <summary>
310 /// Sum sums a stream of numbers, returning the final result once the stream
311 /// is closed.
312 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700313 public virtual AsyncClientStreamingCall<global::Math.Num, global::Math.Num> Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
314 {
315 return Sum(new CallOptions(headers, deadline, cancellationToken));
316 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700317 /// <summary>
318 /// Sum sums a stream of numbers, returning the final result once the stream
319 /// is closed.
320 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700321 public virtual AsyncClientStreamingCall<global::Math.Num, global::Math.Num> Sum(CallOptions options)
322 {
323 return CallInvoker.AsyncClientStreamingCall(__Method_Sum, null, options);
324 }
325 protected override MathClient NewInstance(ClientBaseConfiguration configuration)
326 {
327 return new MathClient(configuration);
Jan Tattermusch085533e2015-05-07 14:34:45 -0700328 }
329 }
330
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700331 /// <summary>Creates a new client for Math</summary>
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700332 public static MathClient NewClient(Channel channel)
333 {
334 return new MathClient(channel);
335 }
336
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700337 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700338 #pragma warning disable 0618
Jan Tattermusch085533e2015-05-07 14:34:45 -0700339 public static ServerServiceDefinition BindService(IMath serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700340 #pragma warning restore 0618
Jan Tattermusch085533e2015-05-07 14:34:45 -0700341 {
342 return ServerServiceDefinition.CreateBuilder(__ServiceName)
343 .AddMethod(__Method_Div, serviceImpl.Div)
344 .AddMethod(__Method_DivMany, serviceImpl.DivMany)
345 .AddMethod(__Method_Fib, serviceImpl.Fib)
346 .AddMethod(__Method_Sum, serviceImpl.Sum).Build();
347 }
348
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700349 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700350 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700351 public static ServerServiceDefinition BindService(MathBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700352 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700353 {
354 return ServerServiceDefinition.CreateBuilder(__ServiceName)
355 .AddMethod(__Method_Div, serviceImpl.Div)
356 .AddMethod(__Method_DivMany, serviceImpl.DivMany)
357 .AddMethod(__Method_Fib, serviceImpl.Fib)
358 .AddMethod(__Method_Sum, serviceImpl.Sum).Build();
359 }
360
Jan Tattermusch085533e2015-05-07 14:34:45 -0700361 }
Craig Tiller190d3602015-02-18 09:23:38 -0800362}
Jan Tattermuschcd7e3132015-05-07 15:10:23 -0700363#endregion