2 // Generated by the protocol buffer compiler. DO NOT EDIT!
3 // source: math_with_protoc_options.proto
5 // Original file comments:
6 // Copyright 2015 gRPC authors.
8 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
12 // http://www.apache.org/licenses/LICENSE-2.0
14 // Unless required by applicable law or agreed to in writing, software
15 // distributed under the License is distributed on an "AS IS" BASIS,
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 // See the License for the specific language governing permissions and
18 // limitations under the License.
20 #pragma warning disable 0414, 1591
21 #region Designer generated code
23 using grpc = global::Grpc.Core;
25 namespace MathWithProtocOptions {
26 public static partial class Math
28 static readonly string __ServiceName = "math_with_protoc_options.Math";
30 static readonly grpc::Marshaller<global::MathWithProtocOptions.DivArgs> __Marshaller_math_with_protoc_options_DivArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MathWithProtocOptions.DivArgs.Parser.ParseFrom);
31 static readonly grpc::Marshaller<global::MathWithProtocOptions.DivReply> __Marshaller_math_with_protoc_options_DivReply = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MathWithProtocOptions.DivReply.Parser.ParseFrom);
32 static readonly grpc::Marshaller<global::MathWithProtocOptions.FibArgs> __Marshaller_math_with_protoc_options_FibArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MathWithProtocOptions.FibArgs.Parser.ParseFrom);
33 static readonly grpc::Marshaller<global::MathWithProtocOptions.Num> __Marshaller_math_with_protoc_options_Num = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MathWithProtocOptions.Num.Parser.ParseFrom);
35 static readonly grpc::Method<global::MathWithProtocOptions.DivArgs, global::MathWithProtocOptions.DivReply> __Method_Div = new grpc::Method<global::MathWithProtocOptions.DivArgs, global::MathWithProtocOptions.DivReply>(
36 grpc::MethodType.Unary,
39 __Marshaller_math_with_protoc_options_DivArgs,
40 __Marshaller_math_with_protoc_options_DivReply);
42 static readonly grpc::Method<global::MathWithProtocOptions.DivArgs, global::MathWithProtocOptions.DivReply> __Method_DivMany = new grpc::Method<global::MathWithProtocOptions.DivArgs, global::MathWithProtocOptions.DivReply>(
43 grpc::MethodType.DuplexStreaming,
46 __Marshaller_math_with_protoc_options_DivArgs,
47 __Marshaller_math_with_protoc_options_DivReply);
49 static readonly grpc::Method<global::MathWithProtocOptions.FibArgs, global::MathWithProtocOptions.Num> __Method_Fib = new grpc::Method<global::MathWithProtocOptions.FibArgs, global::MathWithProtocOptions.Num>(
50 grpc::MethodType.ServerStreaming,
53 __Marshaller_math_with_protoc_options_FibArgs,
54 __Marshaller_math_with_protoc_options_Num);
56 static readonly grpc::Method<global::MathWithProtocOptions.Num, global::MathWithProtocOptions.Num> __Method_Sum = new grpc::Method<global::MathWithProtocOptions.Num, global::MathWithProtocOptions.Num>(
57 grpc::MethodType.ClientStreaming,
60 __Marshaller_math_with_protoc_options_Num,
61 __Marshaller_math_with_protoc_options_Num);
63 /// <summary>Service descriptor</summary>
64 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
66 get { return global::MathWithProtocOptions.MathWithProtocOptionsReflection.Descriptor.Services[0]; }
69 /// <summary>Lite client for Math</summary>
70 public partial class MathClient : grpc::LiteClientBase
72 /// <summary>Creates a new client for Math that uses a custom <c>CallInvoker</c>.</summary>
73 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
74 public MathClient(grpc::CallInvoker callInvoker) : base(callInvoker)
77 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
78 protected MathClient() : base()
83 /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
86 /// <param name="request">The request to send to the server.</param>
87 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
88 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
89 /// <param name="cancellationToken">An optional token for canceling the call.</param>
90 /// <returns>The response received from the server.</returns>
91 public virtual global::MathWithProtocOptions.DivReply Div(global::MathWithProtocOptions.DivArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
93 return Div(request, new grpc::CallOptions(headers, deadline, cancellationToken));
96 /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
99 /// <param name="request">The request to send to the server.</param>
100 /// <param name="options">The options for the call.</param>
101 /// <returns>The response received from the server.</returns>
102 public virtual global::MathWithProtocOptions.DivReply Div(global::MathWithProtocOptions.DivArgs request, grpc::CallOptions options)
104 return CallInvoker.BlockingUnaryCall(__Method_Div, null, options, request);
107 /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
110 /// <param name="request">The request to send to the server.</param>
111 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
112 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
113 /// <param name="cancellationToken">An optional token for canceling the call.</param>
114 /// <returns>The call object.</returns>
115 public virtual grpc::AsyncUnaryCall<global::MathWithProtocOptions.DivReply> DivAsync(global::MathWithProtocOptions.DivArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
117 return DivAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
120 /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
123 /// <param name="request">The request to send to the server.</param>
124 /// <param name="options">The options for the call.</param>
125 /// <returns>The call object.</returns>
126 public virtual grpc::AsyncUnaryCall<global::MathWithProtocOptions.DivReply> DivAsync(global::MathWithProtocOptions.DivArgs request, grpc::CallOptions options)
128 return CallInvoker.AsyncUnaryCall(__Method_Div, null, options, request);
131 /// DivMany accepts an arbitrary number of division args from the client stream
132 /// and sends back the results in the reply stream. The stream continues until
133 /// the client closes its end; the server does the same after sending all the
134 /// replies. The stream ends immediately if either end aborts.
136 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
137 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
138 /// <param name="cancellationToken">An optional token for canceling the call.</param>
139 /// <returns>The call object.</returns>
140 public virtual grpc::AsyncDuplexStreamingCall<global::MathWithProtocOptions.DivArgs, global::MathWithProtocOptions.DivReply> DivMany(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
142 return DivMany(new grpc::CallOptions(headers, deadline, cancellationToken));
145 /// DivMany accepts an arbitrary number of division args from the client stream
146 /// and sends back the results in the reply stream. The stream continues until
147 /// the client closes its end; the server does the same after sending all the
148 /// replies. The stream ends immediately if either end aborts.
150 /// <param name="options">The options for the call.</param>
151 /// <returns>The call object.</returns>
152 public virtual grpc::AsyncDuplexStreamingCall<global::MathWithProtocOptions.DivArgs, global::MathWithProtocOptions.DivReply> DivMany(grpc::CallOptions options)
154 return CallInvoker.AsyncDuplexStreamingCall(__Method_DivMany, null, options);
157 /// Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib
158 /// generates up to limit numbers; otherwise it continues until the call is
159 /// canceled. Unlike Fib above, Fib has no final FibReply.
161 /// <param name="request">The request to send to the server.</param>
162 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
163 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
164 /// <param name="cancellationToken">An optional token for canceling the call.</param>
165 /// <returns>The call object.</returns>
166 public virtual grpc::AsyncServerStreamingCall<global::MathWithProtocOptions.Num> Fib(global::MathWithProtocOptions.FibArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
168 return Fib(request, new grpc::CallOptions(headers, deadline, cancellationToken));
171 /// Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib
172 /// generates up to limit numbers; otherwise it continues until the call is
173 /// canceled. Unlike Fib above, Fib has no final FibReply.
175 /// <param name="request">The request to send to the server.</param>
176 /// <param name="options">The options for the call.</param>
177 /// <returns>The call object.</returns>
178 public virtual grpc::AsyncServerStreamingCall<global::MathWithProtocOptions.Num> Fib(global::MathWithProtocOptions.FibArgs request, grpc::CallOptions options)
180 return CallInvoker.AsyncServerStreamingCall(__Method_Fib, null, options, request);
183 /// Sum sums a stream of numbers, returning the final result once the stream
186 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
187 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
188 /// <param name="cancellationToken">An optional token for canceling the call.</param>
189 /// <returns>The call object.</returns>
190 public virtual grpc::AsyncClientStreamingCall<global::MathWithProtocOptions.Num, global::MathWithProtocOptions.Num> Sum(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
192 return Sum(new grpc::CallOptions(headers, deadline, cancellationToken));
195 /// Sum sums a stream of numbers, returning the final result once the stream
198 /// <param name="options">The options for the call.</param>
199 /// <returns>The call object.</returns>
200 public virtual grpc::AsyncClientStreamingCall<global::MathWithProtocOptions.Num, global::MathWithProtocOptions.Num> Sum(grpc::CallOptions options)
202 return CallInvoker.AsyncClientStreamingCall(__Method_Sum, null, options);