Imported Upstream version 1.22.0
[platform/upstream/grpc.git] / src / csharp / Grpc.Examples / MathWithProtocOptionsGrpc.cs
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: math_with_protoc_options.proto
4 // </auto-generated>
5 // Original file comments:
6 // Copyright 2015 gRPC authors.
7 //
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
11 //
12 //     http://www.apache.org/licenses/LICENSE-2.0
13 //
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.
19 //
20 #pragma warning disable 0414, 1591
21 #region Designer generated code
22
23 using grpc = global::Grpc.Core;
24
25 namespace MathWithProtocOptions {
26   public static partial class Math
27   {
28     static readonly string __ServiceName = "math_with_protoc_options.Math";
29
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);
34
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,
37         __ServiceName,
38         "Div",
39         __Marshaller_math_with_protoc_options_DivArgs,
40         __Marshaller_math_with_protoc_options_DivReply);
41
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,
44         __ServiceName,
45         "DivMany",
46         __Marshaller_math_with_protoc_options_DivArgs,
47         __Marshaller_math_with_protoc_options_DivReply);
48
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,
51         __ServiceName,
52         "Fib",
53         __Marshaller_math_with_protoc_options_FibArgs,
54         __Marshaller_math_with_protoc_options_Num);
55
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,
58         __ServiceName,
59         "Sum",
60         __Marshaller_math_with_protoc_options_Num,
61         __Marshaller_math_with_protoc_options_Num);
62
63     /// <summary>Service descriptor</summary>
64     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
65     {
66       get { return global::MathWithProtocOptions.MathWithProtocOptionsReflection.Descriptor.Services[0]; }
67     }
68
69     /// <summary>Lite client for Math</summary>
70     public partial class MathClient : grpc::LiteClientBase
71     {
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)
75       {
76       }
77       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
78       protected MathClient() : base()
79       {
80       }
81
82       /// <summary>
83       /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
84       /// and remainder.
85       /// </summary>
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))
92       {
93         return Div(request, new grpc::CallOptions(headers, deadline, cancellationToken));
94       }
95       /// <summary>
96       /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
97       /// and remainder.
98       /// </summary>
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)
103       {
104         return CallInvoker.BlockingUnaryCall(__Method_Div, null, options, request);
105       }
106       /// <summary>
107       /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
108       /// and remainder.
109       /// </summary>
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))
116       {
117         return DivAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
118       }
119       /// <summary>
120       /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient
121       /// and remainder.
122       /// </summary>
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)
127       {
128         return CallInvoker.AsyncUnaryCall(__Method_Div, null, options, request);
129       }
130       /// <summary>
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.
135       /// </summary>
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))
141       {
142         return DivMany(new grpc::CallOptions(headers, deadline, cancellationToken));
143       }
144       /// <summary>
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.
149       /// </summary>
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)
153       {
154         return CallInvoker.AsyncDuplexStreamingCall(__Method_DivMany, null, options);
155       }
156       /// <summary>
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.
160       /// </summary>
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))
167       {
168         return Fib(request, new grpc::CallOptions(headers, deadline, cancellationToken));
169       }
170       /// <summary>
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.
174       /// </summary>
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)
179       {
180         return CallInvoker.AsyncServerStreamingCall(__Method_Fib, null, options, request);
181       }
182       /// <summary>
183       /// Sum sums a stream of numbers, returning the final result once the stream
184       /// is closed.
185       /// </summary>
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))
191       {
192         return Sum(new grpc::CallOptions(headers, deadline, cancellationToken));
193       }
194       /// <summary>
195       /// Sum sums a stream of numbers, returning the final result once the stream
196       /// is closed.
197       /// </summary>
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)
201       {
202         return CallInvoker.AsyncClientStreamingCall(__Method_Sum, null, options);
203       }
204     }
205
206   }
207 }
208 #endregion