• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: src/proto/grpc/testing/test.proto
4 // </auto-generated>
5 // Original file comments:
6 // Copyright 2015-2016 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 // An integration test service that covers all the method signature permutations
21 // of unary/streaming requests/responses.
22 //
23 #pragma warning disable 0414, 1591
24 #region Designer generated code
25 
26 using grpc = global::Grpc.Core;
27 
28 namespace Grpc.Testing {
29   /// <summary>
30   /// A simple service to test the various types of RPCs and experiment with
31   /// performance with various types of payload.
32   /// </summary>
33   public static partial class TestService
34   {
35     static readonly string __ServiceName = "grpc.testing.TestService";
36 
__Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)37     static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
38     {
39       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
40       if (message is global::Google.Protobuf.IBufferMessage)
41       {
42         context.SetPayloadLength(message.CalculateSize());
43         global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
44         context.Complete();
45         return;
46       }
47       #endif
48       context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
49     }
50 
51     static class __Helper_MessageCache<T>
52     {
53       public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
54     }
55 
56     static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
57     {
58       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
59       if (__Helper_MessageCache<T>.IsBufferMessage)
60       {
61         return parser.ParseFrom(context.PayloadAsReadOnlySequence());
62       }
63       #endif
64       return parser.ParseFrom(context.PayloadAsNewBuffer());
65     }
66 
67     static readonly grpc::Marshaller<global::Grpc.Testing.Empty> __Marshaller_grpc_testing_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Empty.Parser));
68     static readonly grpc::Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_grpc_testing_SimpleRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.SimpleRequest.Parser));
69     static readonly grpc::Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_grpc_testing_SimpleResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.SimpleResponse.Parser));
70     static readonly grpc::Marshaller<global::Grpc.Testing.StreamingOutputCallRequest> __Marshaller_grpc_testing_StreamingOutputCallRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.StreamingOutputCallRequest.Parser));
71     static readonly grpc::Marshaller<global::Grpc.Testing.StreamingOutputCallResponse> __Marshaller_grpc_testing_StreamingOutputCallResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.StreamingOutputCallResponse.Parser));
72     static readonly grpc::Marshaller<global::Grpc.Testing.StreamingInputCallRequest> __Marshaller_grpc_testing_StreamingInputCallRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.StreamingInputCallRequest.Parser));
73     static readonly grpc::Marshaller<global::Grpc.Testing.StreamingInputCallResponse> __Marshaller_grpc_testing_StreamingInputCallResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.StreamingInputCallResponse.Parser));
74 
75     static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_EmptyCall = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
76         grpc::MethodType.Unary,
77         __ServiceName,
78         "EmptyCall",
79         __Marshaller_grpc_testing_Empty,
80         __Marshaller_grpc_testing_Empty);
81 
82     static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
83         grpc::MethodType.Unary,
84         __ServiceName,
85         "UnaryCall",
86         __Marshaller_grpc_testing_SimpleRequest,
87         __Marshaller_grpc_testing_SimpleResponse);
88 
89     static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_CacheableUnaryCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
90         grpc::MethodType.Unary,
91         __ServiceName,
92         "CacheableUnaryCall",
93         __Marshaller_grpc_testing_SimpleRequest,
94         __Marshaller_grpc_testing_SimpleResponse);
95 
96     static readonly grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_StreamingOutputCall = new grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
97         grpc::MethodType.ServerStreaming,
98         __ServiceName,
99         "StreamingOutputCall",
100         __Marshaller_grpc_testing_StreamingOutputCallRequest,
101         __Marshaller_grpc_testing_StreamingOutputCallResponse);
102 
103     static readonly grpc::Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> __Method_StreamingInputCall = new grpc::Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse>(
104         grpc::MethodType.ClientStreaming,
105         __ServiceName,
106         "StreamingInputCall",
107         __Marshaller_grpc_testing_StreamingInputCallRequest,
108         __Marshaller_grpc_testing_StreamingInputCallResponse);
109 
110     static readonly grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_FullDuplexCall = new grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
111         grpc::MethodType.DuplexStreaming,
112         __ServiceName,
113         "FullDuplexCall",
114         __Marshaller_grpc_testing_StreamingOutputCallRequest,
115         __Marshaller_grpc_testing_StreamingOutputCallResponse);
116 
117     static readonly grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_HalfDuplexCall = new grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
118         grpc::MethodType.DuplexStreaming,
119         __ServiceName,
120         "HalfDuplexCall",
121         __Marshaller_grpc_testing_StreamingOutputCallRequest,
122         __Marshaller_grpc_testing_StreamingOutputCallResponse);
123 
124     static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
125         grpc::MethodType.Unary,
126         __ServiceName,
127         "UnimplementedCall",
128         __Marshaller_grpc_testing_Empty,
129         __Marshaller_grpc_testing_Empty);
130 
131     /// <summary>Service descriptor</summary>
132     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
133     {
134       get { return global::Grpc.Testing.TestReflection.Descriptor.Services[0]; }
135     }
136 
137     /// <summary>Base class for server-side implementations of TestService</summary>
138     [grpc::BindServiceMethod(typeof(TestService), "BindService")]
139     public abstract partial class TestServiceBase
140     {
141       /// <summary>
142       /// One empty request followed by one empty response.
143       /// </summary>
144       /// <param name="request">The request received from the client.</param>
145       /// <param name="context">The context of the server-side call handler being invoked.</param>
146       /// <returns>The response to send back to the client (wrapped by a task).</returns>
EmptyCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)147       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)
148       {
149         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
150       }
151 
152       /// <summary>
153       /// One request followed by one response.
154       /// </summary>
155       /// <param name="request">The request received from the client.</param>
156       /// <param name="context">The context of the server-side call handler being invoked.</param>
157       /// <returns>The response to send back to the client (wrapped by a task).</returns>
UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context)158       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context)
159       {
160         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
161       }
162 
163       /// <summary>
164       /// One request followed by one response. Response has cache control
165       /// headers set such that a caching HTTP proxy (such as GFE) can
166       /// satisfy subsequent requests.
167       /// </summary>
168       /// <param name="request">The request received from the client.</param>
169       /// <param name="context">The context of the server-side call handler being invoked.</param>
170       /// <returns>The response to send back to the client (wrapped by a task).</returns>
CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context)171       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context)
172       {
173         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
174       }
175 
176       /// <summary>
177       /// One request followed by a sequence of responses (streamed download).
178       /// The server returns the payload with client desired type and sizes.
179       /// </summary>
180       /// <param name="request">The request received from the client.</param>
181       /// <param name="responseStream">Used for sending responses back to the client.</param>
182       /// <param name="context">The context of the server-side call handler being invoked.</param>
183       /// <returns>A task indicating completion of the handler.</returns>
StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context)184       public virtual global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context)
185       {
186         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
187       }
188 
189       /// <summary>
190       /// A sequence of requests followed by one response (streamed upload).
191       /// The server returns the aggregated size of client payload as the result.
192       /// </summary>
193       /// <param name="requestStream">Used for reading requests from the client.</param>
194       /// <param name="context">The context of the server-side call handler being invoked.</param>
195       /// <returns>The response to send back to the client (wrapped by a task).</returns>
StreamingInputCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, grpc::ServerCallContext context)196       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, grpc::ServerCallContext context)
197       {
198         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
199       }
200 
201       /// <summary>
202       /// A sequence of requests with each request served by the server immediately.
203       /// As one request could lead to multiple responses, this interface
204       /// demonstrates the idea of full duplexing.
205       /// </summary>
206       /// <param name="requestStream">Used for reading requests from the client.</param>
207       /// <param name="responseStream">Used for sending responses back to the client.</param>
208       /// <param name="context">The context of the server-side call handler being invoked.</param>
209       /// <returns>A task indicating completion of the handler.</returns>
FullDuplexCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context)210       public virtual global::System.Threading.Tasks.Task FullDuplexCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context)
211       {
212         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
213       }
214 
215       /// <summary>
216       /// A sequence of requests followed by a sequence of responses.
217       /// The server buffers all the client requests and then serves them in order. A
218       /// stream of responses are returned to the client when the server starts with
219       /// first request.
220       /// </summary>
221       /// <param name="requestStream">Used for reading requests from the client.</param>
222       /// <param name="responseStream">Used for sending responses back to the client.</param>
223       /// <param name="context">The context of the server-side call handler being invoked.</param>
224       /// <returns>A task indicating completion of the handler.</returns>
HalfDuplexCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context)225       public virtual global::System.Threading.Tasks.Task HalfDuplexCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context)
226       {
227         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
228       }
229 
230       /// <summary>
231       /// The test server will not implement this method. It will be used
232       /// to test the behavior when clients call unimplemented methods.
233       /// </summary>
234       /// <param name="request">The request received from the client.</param>
235       /// <param name="context">The context of the server-side call handler being invoked.</param>
236       /// <returns>The response to send back to the client (wrapped by a task).</returns>
UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)237       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)
238       {
239         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
240       }
241 
242     }
243 
244     /// <summary>Client for TestService</summary>
245     public partial class TestServiceClient : grpc::ClientBase<TestServiceClient>
246     {
247       /// <summary>Creates a new client for TestService</summary>
248       /// <param name="channel">The channel to use to make remote calls.</param>
TestServiceClient(grpc::ChannelBase channel)249       public TestServiceClient(grpc::ChannelBase channel) : base(channel)
250       {
251       }
252       /// <summary>Creates a new client for TestService that uses a custom <c>CallInvoker</c>.</summary>
253       /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
TestServiceClient(grpc::CallInvoker callInvoker)254       public TestServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
255       {
256       }
257       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
TestServiceClient()258       protected TestServiceClient() : base()
259       {
260       }
261       /// <summary>Protected constructor to allow creation of configured clients.</summary>
262       /// <param name="configuration">The client configuration.</param>
TestServiceClient(ClientBaseConfiguration configuration)263       protected TestServiceClient(ClientBaseConfiguration configuration) : base(configuration)
264       {
265       }
266 
267       /// <summary>
268       /// One empty request followed by one empty response.
269       /// </summary>
270       /// <param name="request">The request to send to the server.</param>
271       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
272       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
273       /// <param name="cancellationToken">An optional token for canceling the call.</param>
274       /// <returns>The response received from the server.</returns>
EmptyCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))275       public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
276       {
277         return EmptyCall(request, new grpc::CallOptions(headers, deadline, cancellationToken));
278       }
279       /// <summary>
280       /// One empty request followed by one empty response.
281       /// </summary>
282       /// <param name="request">The request to send to the server.</param>
283       /// <param name="options">The options for the call.</param>
284       /// <returns>The response received from the server.</returns>
EmptyCall(global::Grpc.Testing.Empty request, grpc::CallOptions options)285       public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, grpc::CallOptions options)
286       {
287         return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request);
288       }
289       /// <summary>
290       /// One empty request followed by one empty response.
291       /// </summary>
292       /// <param name="request">The request to send to the server.</param>
293       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
294       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
295       /// <param name="cancellationToken">An optional token for canceling the call.</param>
296       /// <returns>The call object.</returns>
EmptyCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))297       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
298       {
299         return EmptyCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
300       }
301       /// <summary>
302       /// One empty request followed by one empty response.
303       /// </summary>
304       /// <param name="request">The request to send to the server.</param>
305       /// <param name="options">The options for the call.</param>
306       /// <returns>The call object.</returns>
EmptyCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)307       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)
308       {
309         return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request);
310       }
311       /// <summary>
312       /// One request followed by one response.
313       /// </summary>
314       /// <param name="request">The request to send to the server.</param>
315       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
316       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
317       /// <param name="cancellationToken">An optional token for canceling the call.</param>
318       /// <returns>The response received from the server.</returns>
UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))319       public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
320       {
321         return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken));
322       }
323       /// <summary>
324       /// One request followed by one response.
325       /// </summary>
326       /// <param name="request">The request to send to the server.</param>
327       /// <param name="options">The options for the call.</param>
328       /// <returns>The response received from the server.</returns>
UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)329       public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
330       {
331         return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
332       }
333       /// <summary>
334       /// One request followed by one response.
335       /// </summary>
336       /// <param name="request">The request to send to the server.</param>
337       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
338       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
339       /// <param name="cancellationToken">An optional token for canceling the call.</param>
340       /// <returns>The call object.</returns>
UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))341       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
342       {
343         return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
344       }
345       /// <summary>
346       /// One request followed by one response.
347       /// </summary>
348       /// <param name="request">The request to send to the server.</param>
349       /// <param name="options">The options for the call.</param>
350       /// <returns>The call object.</returns>
UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)351       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
352       {
353         return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
354       }
355       /// <summary>
356       /// One request followed by one response. Response has cache control
357       /// headers set such that a caching HTTP proxy (such as GFE) can
358       /// satisfy subsequent requests.
359       /// </summary>
360       /// <param name="request">The request to send to the server.</param>
361       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
362       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
363       /// <param name="cancellationToken">An optional token for canceling the call.</param>
364       /// <returns>The response received from the server.</returns>
CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))365       public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
366       {
367         return CacheableUnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken));
368       }
369       /// <summary>
370       /// One request followed by one response. Response has cache control
371       /// headers set such that a caching HTTP proxy (such as GFE) can
372       /// satisfy subsequent requests.
373       /// </summary>
374       /// <param name="request">The request to send to the server.</param>
375       /// <param name="options">The options for the call.</param>
376       /// <returns>The response received from the server.</returns>
CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)377       public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
378       {
379         return CallInvoker.BlockingUnaryCall(__Method_CacheableUnaryCall, null, options, request);
380       }
381       /// <summary>
382       /// One request followed by one response. Response has cache control
383       /// headers set such that a caching HTTP proxy (such as GFE) can
384       /// satisfy subsequent requests.
385       /// </summary>
386       /// <param name="request">The request to send to the server.</param>
387       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
388       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
389       /// <param name="cancellationToken">An optional token for canceling the call.</param>
390       /// <returns>The call object.</returns>
CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))391       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
392       {
393         return CacheableUnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
394       }
395       /// <summary>
396       /// One request followed by one response. Response has cache control
397       /// headers set such that a caching HTTP proxy (such as GFE) can
398       /// satisfy subsequent requests.
399       /// </summary>
400       /// <param name="request">The request to send to the server.</param>
401       /// <param name="options">The options for the call.</param>
402       /// <returns>The call object.</returns>
CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)403       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options)
404       {
405         return CallInvoker.AsyncUnaryCall(__Method_CacheableUnaryCall, null, options, request);
406       }
407       /// <summary>
408       /// One request followed by a sequence of responses (streamed download).
409       /// The server returns the payload with client desired type and sizes.
410       /// </summary>
411       /// <param name="request">The request to send to the server.</param>
412       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
413       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
414       /// <param name="cancellationToken">An optional token for canceling the call.</param>
415       /// <returns>The call object.</returns>
StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))416       public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
417       {
418         return StreamingOutputCall(request, new grpc::CallOptions(headers, deadline, cancellationToken));
419       }
420       /// <summary>
421       /// One request followed by a sequence of responses (streamed download).
422       /// The server returns the payload with client desired type and sizes.
423       /// </summary>
424       /// <param name="request">The request to send to the server.</param>
425       /// <param name="options">The options for the call.</param>
426       /// <returns>The call object.</returns>
StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::CallOptions options)427       public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::CallOptions options)
428       {
429         return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request);
430       }
431       /// <summary>
432       /// A sequence of requests followed by one response (streamed upload).
433       /// The server returns the aggregated size of client payload as the result.
434       /// </summary>
435       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
436       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
437       /// <param name="cancellationToken">An optional token for canceling the call.</param>
438       /// <returns>The call object.</returns>
StreamingInputCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))439       public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
440       {
441         return StreamingInputCall(new grpc::CallOptions(headers, deadline, cancellationToken));
442       }
443       /// <summary>
444       /// A sequence of requests followed by one response (streamed upload).
445       /// The server returns the aggregated size of client payload as the result.
446       /// </summary>
447       /// <param name="options">The options for the call.</param>
448       /// <returns>The call object.</returns>
StreamingInputCall(grpc::CallOptions options)449       public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(grpc::CallOptions options)
450       {
451         return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options);
452       }
453       /// <summary>
454       /// A sequence of requests with each request served by the server immediately.
455       /// As one request could lead to multiple responses, this interface
456       /// demonstrates the idea of full duplexing.
457       /// </summary>
458       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
459       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
460       /// <param name="cancellationToken">An optional token for canceling the call.</param>
461       /// <returns>The call object.</returns>
FullDuplexCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))462       public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
463       {
464         return FullDuplexCall(new grpc::CallOptions(headers, deadline, cancellationToken));
465       }
466       /// <summary>
467       /// A sequence of requests with each request served by the server immediately.
468       /// As one request could lead to multiple responses, this interface
469       /// demonstrates the idea of full duplexing.
470       /// </summary>
471       /// <param name="options">The options for the call.</param>
472       /// <returns>The call object.</returns>
FullDuplexCall(grpc::CallOptions options)473       public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(grpc::CallOptions options)
474       {
475         return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options);
476       }
477       /// <summary>
478       /// A sequence of requests followed by a sequence of responses.
479       /// The server buffers all the client requests and then serves them in order. A
480       /// stream of responses are returned to the client when the server starts with
481       /// first request.
482       /// </summary>
483       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
484       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
485       /// <param name="cancellationToken">An optional token for canceling the call.</param>
486       /// <returns>The call object.</returns>
HalfDuplexCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))487       public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
488       {
489         return HalfDuplexCall(new grpc::CallOptions(headers, deadline, cancellationToken));
490       }
491       /// <summary>
492       /// A sequence of requests followed by a sequence of responses.
493       /// The server buffers all the client requests and then serves them in order. A
494       /// stream of responses are returned to the client when the server starts with
495       /// first request.
496       /// </summary>
497       /// <param name="options">The options for the call.</param>
498       /// <returns>The call object.</returns>
HalfDuplexCall(grpc::CallOptions options)499       public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(grpc::CallOptions options)
500       {
501         return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options);
502       }
503       /// <summary>
504       /// The test server will not implement this method. It will be used
505       /// to test the behavior when clients call unimplemented methods.
506       /// </summary>
507       /// <param name="request">The request to send to the server.</param>
508       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
509       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
510       /// <param name="cancellationToken">An optional token for canceling the call.</param>
511       /// <returns>The response received from the server.</returns>
UnimplementedCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))512       public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
513       {
514         return UnimplementedCall(request, new grpc::CallOptions(headers, deadline, cancellationToken));
515       }
516       /// <summary>
517       /// The test server will not implement this method. It will be used
518       /// to test the behavior when clients call unimplemented methods.
519       /// </summary>
520       /// <param name="request">The request to send to the server.</param>
521       /// <param name="options">The options for the call.</param>
522       /// <returns>The response received from the server.</returns>
UnimplementedCall(global::Grpc.Testing.Empty request, grpc::CallOptions options)523       public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::CallOptions options)
524       {
525         return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request);
526       }
527       /// <summary>
528       /// The test server will not implement this method. It will be used
529       /// to test the behavior when clients call unimplemented methods.
530       /// </summary>
531       /// <param name="request">The request to send to the server.</param>
532       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
533       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
534       /// <param name="cancellationToken">An optional token for canceling the call.</param>
535       /// <returns>The call object.</returns>
UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))536       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
537       {
538         return UnimplementedCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
539       }
540       /// <summary>
541       /// The test server will not implement this method. It will be used
542       /// to test the behavior when clients call unimplemented methods.
543       /// </summary>
544       /// <param name="request">The request to send to the server.</param>
545       /// <param name="options">The options for the call.</param>
546       /// <returns>The call object.</returns>
UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)547       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)
548       {
549         return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request);
550       }
551       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
NewInstance(ClientBaseConfiguration configuration)552       protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration)
553       {
554         return new TestServiceClient(configuration);
555       }
556     }
557 
558     /// <summary>Creates service definition that can be registered with a server</summary>
559     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(TestServiceBase serviceImpl)560     public static grpc::ServerServiceDefinition BindService(TestServiceBase serviceImpl)
561     {
562       return grpc::ServerServiceDefinition.CreateBuilder()
563           .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
564           .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
565           .AddMethod(__Method_CacheableUnaryCall, serviceImpl.CacheableUnaryCall)
566           .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
567           .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
568           .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
569           .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall)
570           .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
571     }
572 
573     /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
574     /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
575     /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
576     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(grpc::ServiceBinderBase serviceBinder, TestServiceBase serviceImpl)577     public static void BindService(grpc::ServiceBinderBase serviceBinder, TestServiceBase serviceImpl)
578     {
579       serviceBinder.AddMethod(__Method_EmptyCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(serviceImpl.EmptyCall));
580       serviceBinder.AddMethod(__Method_UnaryCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(serviceImpl.UnaryCall));
581       serviceBinder.AddMethod(__Method_CacheableUnaryCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(serviceImpl.CacheableUnaryCall));
582       serviceBinder.AddMethod(__Method_StreamingOutputCall, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(serviceImpl.StreamingOutputCall));
583       serviceBinder.AddMethod(__Method_StreamingInputCall, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse>(serviceImpl.StreamingInputCall));
584       serviceBinder.AddMethod(__Method_FullDuplexCall, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(serviceImpl.FullDuplexCall));
585       serviceBinder.AddMethod(__Method_HalfDuplexCall, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(serviceImpl.HalfDuplexCall));
586       serviceBinder.AddMethod(__Method_UnimplementedCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(serviceImpl.UnimplementedCall));
587     }
588 
589   }
590   /// <summary>
591   /// A simple service NOT implemented at servers so clients can test for
592   /// that case.
593   /// </summary>
594   public static partial class UnimplementedService
595   {
596     static readonly string __ServiceName = "grpc.testing.UnimplementedService";
597 
__Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)598     static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
599     {
600       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
601       if (message is global::Google.Protobuf.IBufferMessage)
602       {
603         context.SetPayloadLength(message.CalculateSize());
604         global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
605         context.Complete();
606         return;
607       }
608       #endif
609       context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
610     }
611 
612     static class __Helper_MessageCache<T>
613     {
614       public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
615     }
616 
617     static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
618     {
619       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
620       if (__Helper_MessageCache<T>.IsBufferMessage)
621       {
622         return parser.ParseFrom(context.PayloadAsReadOnlySequence());
623       }
624       #endif
625       return parser.ParseFrom(context.PayloadAsNewBuffer());
626     }
627 
628     static readonly grpc::Marshaller<global::Grpc.Testing.Empty> __Marshaller_grpc_testing_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Empty.Parser));
629 
630     static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
631         grpc::MethodType.Unary,
632         __ServiceName,
633         "UnimplementedCall",
634         __Marshaller_grpc_testing_Empty,
635         __Marshaller_grpc_testing_Empty);
636 
637     /// <summary>Service descriptor</summary>
638     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
639     {
640       get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; }
641     }
642 
643     /// <summary>Base class for server-side implementations of UnimplementedService</summary>
644     [grpc::BindServiceMethod(typeof(UnimplementedService), "BindService")]
645     public abstract partial class UnimplementedServiceBase
646     {
647       /// <summary>
648       /// A call that no server should implement
649       /// </summary>
650       /// <param name="request">The request received from the client.</param>
651       /// <param name="context">The context of the server-side call handler being invoked.</param>
652       /// <returns>The response to send back to the client (wrapped by a task).</returns>
UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)653       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)
654       {
655         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
656       }
657 
658     }
659 
660     /// <summary>Client for UnimplementedService</summary>
661     public partial class UnimplementedServiceClient : grpc::ClientBase<UnimplementedServiceClient>
662     {
663       /// <summary>Creates a new client for UnimplementedService</summary>
664       /// <param name="channel">The channel to use to make remote calls.</param>
UnimplementedServiceClient(grpc::ChannelBase channel)665       public UnimplementedServiceClient(grpc::ChannelBase channel) : base(channel)
666       {
667       }
668       /// <summary>Creates a new client for UnimplementedService that uses a custom <c>CallInvoker</c>.</summary>
669       /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
UnimplementedServiceClient(grpc::CallInvoker callInvoker)670       public UnimplementedServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
671       {
672       }
673       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
UnimplementedServiceClient()674       protected UnimplementedServiceClient() : base()
675       {
676       }
677       /// <summary>Protected constructor to allow creation of configured clients.</summary>
678       /// <param name="configuration">The client configuration.</param>
UnimplementedServiceClient(ClientBaseConfiguration configuration)679       protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration)
680       {
681       }
682 
683       /// <summary>
684       /// A call that no server should implement
685       /// </summary>
686       /// <param name="request">The request to send to the server.</param>
687       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
688       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
689       /// <param name="cancellationToken">An optional token for canceling the call.</param>
690       /// <returns>The response received from the server.</returns>
UnimplementedCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))691       public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
692       {
693         return UnimplementedCall(request, new grpc::CallOptions(headers, deadline, cancellationToken));
694       }
695       /// <summary>
696       /// A call that no server should implement
697       /// </summary>
698       /// <param name="request">The request to send to the server.</param>
699       /// <param name="options">The options for the call.</param>
700       /// <returns>The response received from the server.</returns>
UnimplementedCall(global::Grpc.Testing.Empty request, grpc::CallOptions options)701       public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::CallOptions options)
702       {
703         return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request);
704       }
705       /// <summary>
706       /// A call that no server should implement
707       /// </summary>
708       /// <param name="request">The request to send to the server.</param>
709       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
710       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
711       /// <param name="cancellationToken">An optional token for canceling the call.</param>
712       /// <returns>The call object.</returns>
UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))713       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
714       {
715         return UnimplementedCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
716       }
717       /// <summary>
718       /// A call that no server should implement
719       /// </summary>
720       /// <param name="request">The request to send to the server.</param>
721       /// <param name="options">The options for the call.</param>
722       /// <returns>The call object.</returns>
UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)723       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)
724       {
725         return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request);
726       }
727       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
NewInstance(ClientBaseConfiguration configuration)728       protected override UnimplementedServiceClient NewInstance(ClientBaseConfiguration configuration)
729       {
730         return new UnimplementedServiceClient(configuration);
731       }
732     }
733 
734     /// <summary>Creates service definition that can be registered with a server</summary>
735     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(UnimplementedServiceBase serviceImpl)736     public static grpc::ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl)
737     {
738       return grpc::ServerServiceDefinition.CreateBuilder()
739           .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
740     }
741 
742     /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
743     /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
744     /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
745     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(grpc::ServiceBinderBase serviceBinder, UnimplementedServiceBase serviceImpl)746     public static void BindService(grpc::ServiceBinderBase serviceBinder, UnimplementedServiceBase serviceImpl)
747     {
748       serviceBinder.AddMethod(__Method_UnimplementedCall, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(serviceImpl.UnimplementedCall));
749     }
750 
751   }
752   /// <summary>
753   /// A service used to control reconnect server.
754   /// </summary>
755   public static partial class ReconnectService
756   {
757     static readonly string __ServiceName = "grpc.testing.ReconnectService";
758 
__Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)759     static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
760     {
761       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
762       if (message is global::Google.Protobuf.IBufferMessage)
763       {
764         context.SetPayloadLength(message.CalculateSize());
765         global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
766         context.Complete();
767         return;
768       }
769       #endif
770       context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
771     }
772 
773     static class __Helper_MessageCache<T>
774     {
775       public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
776     }
777 
778     static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
779     {
780       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
781       if (__Helper_MessageCache<T>.IsBufferMessage)
782       {
783         return parser.ParseFrom(context.PayloadAsReadOnlySequence());
784       }
785       #endif
786       return parser.ParseFrom(context.PayloadAsNewBuffer());
787     }
788 
789     static readonly grpc::Marshaller<global::Grpc.Testing.ReconnectParams> __Marshaller_grpc_testing_ReconnectParams = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ReconnectParams.Parser));
790     static readonly grpc::Marshaller<global::Grpc.Testing.Empty> __Marshaller_grpc_testing_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Empty.Parser));
791     static readonly grpc::Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_grpc_testing_ReconnectInfo = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ReconnectInfo.Parser));
792 
793     static readonly grpc::Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty> __Method_Start = new grpc::Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty>(
794         grpc::MethodType.Unary,
795         __ServiceName,
796         "Start",
797         __Marshaller_grpc_testing_ReconnectParams,
798         __Marshaller_grpc_testing_Empty);
799 
800     static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(
801         grpc::MethodType.Unary,
802         __ServiceName,
803         "Stop",
804         __Marshaller_grpc_testing_Empty,
805         __Marshaller_grpc_testing_ReconnectInfo);
806 
807     /// <summary>Service descriptor</summary>
808     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
809     {
810       get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; }
811     }
812 
813     /// <summary>Base class for server-side implementations of ReconnectService</summary>
814     [grpc::BindServiceMethod(typeof(ReconnectService), "BindService")]
815     public abstract partial class ReconnectServiceBase
816     {
Start(global::Grpc.Testing.ReconnectParams request, grpc::ServerCallContext context)817       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, grpc::ServerCallContext context)
818       {
819         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
820       }
821 
Stop(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)822       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)
823       {
824         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
825       }
826 
827     }
828 
829     /// <summary>Client for ReconnectService</summary>
830     public partial class ReconnectServiceClient : grpc::ClientBase<ReconnectServiceClient>
831     {
832       /// <summary>Creates a new client for ReconnectService</summary>
833       /// <param name="channel">The channel to use to make remote calls.</param>
ReconnectServiceClient(grpc::ChannelBase channel)834       public ReconnectServiceClient(grpc::ChannelBase channel) : base(channel)
835       {
836       }
837       /// <summary>Creates a new client for ReconnectService that uses a custom <c>CallInvoker</c>.</summary>
838       /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
ReconnectServiceClient(grpc::CallInvoker callInvoker)839       public ReconnectServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
840       {
841       }
842       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
ReconnectServiceClient()843       protected ReconnectServiceClient() : base()
844       {
845       }
846       /// <summary>Protected constructor to allow creation of configured clients.</summary>
847       /// <param name="configuration">The client configuration.</param>
ReconnectServiceClient(ClientBaseConfiguration configuration)848       protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration)
849       {
850       }
851 
Start(global::Grpc.Testing.ReconnectParams request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))852       public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
853       {
854         return Start(request, new grpc::CallOptions(headers, deadline, cancellationToken));
855       }
Start(global::Grpc.Testing.ReconnectParams request, grpc::CallOptions options)856       public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, grpc::CallOptions options)
857       {
858         return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request);
859       }
StartAsync(global::Grpc.Testing.ReconnectParams request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))860       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
861       {
862         return StartAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
863       }
StartAsync(global::Grpc.Testing.ReconnectParams request, grpc::CallOptions options)864       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, grpc::CallOptions options)
865       {
866         return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request);
867       }
Stop(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))868       public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
869       {
870         return Stop(request, new grpc::CallOptions(headers, deadline, cancellationToken));
871       }
Stop(global::Grpc.Testing.Empty request, grpc::CallOptions options)872       public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, grpc::CallOptions options)
873       {
874         return CallInvoker.BlockingUnaryCall(__Method_Stop, null, options, request);
875       }
StopAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))876       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
877       {
878         return StopAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
879       }
StopAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)880       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)
881       {
882         return CallInvoker.AsyncUnaryCall(__Method_Stop, null, options, request);
883       }
884       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
NewInstance(ClientBaseConfiguration configuration)885       protected override ReconnectServiceClient NewInstance(ClientBaseConfiguration configuration)
886       {
887         return new ReconnectServiceClient(configuration);
888       }
889     }
890 
891     /// <summary>Creates service definition that can be registered with a server</summary>
892     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(ReconnectServiceBase serviceImpl)893     public static grpc::ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl)
894     {
895       return grpc::ServerServiceDefinition.CreateBuilder()
896           .AddMethod(__Method_Start, serviceImpl.Start)
897           .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
898     }
899 
900     /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
901     /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
902     /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
903     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(grpc::ServiceBinderBase serviceBinder, ReconnectServiceBase serviceImpl)904     public static void BindService(grpc::ServiceBinderBase serviceBinder, ReconnectServiceBase serviceImpl)
905     {
906       serviceBinder.AddMethod(__Method_Start, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty>(serviceImpl.Start));
907       serviceBinder.AddMethod(__Method_Stop, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(serviceImpl.Stop));
908     }
909 
910   }
911   /// <summary>
912   /// A service used to obtain stats for verifying LB behavior.
913   /// </summary>
914   public static partial class LoadBalancerStatsService
915   {
916     static readonly string __ServiceName = "grpc.testing.LoadBalancerStatsService";
917 
__Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)918     static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
919     {
920       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
921       if (message is global::Google.Protobuf.IBufferMessage)
922       {
923         context.SetPayloadLength(message.CalculateSize());
924         global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
925         context.Complete();
926         return;
927       }
928       #endif
929       context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
930     }
931 
932     static class __Helper_MessageCache<T>
933     {
934       public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
935     }
936 
937     static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
938     {
939       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
940       if (__Helper_MessageCache<T>.IsBufferMessage)
941       {
942         return parser.ParseFrom(context.PayloadAsReadOnlySequence());
943       }
944       #endif
945       return parser.ParseFrom(context.PayloadAsNewBuffer());
946     }
947 
948     static readonly grpc::Marshaller<global::Grpc.Testing.LoadBalancerStatsRequest> __Marshaller_grpc_testing_LoadBalancerStatsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerStatsRequest.Parser));
949     static readonly grpc::Marshaller<global::Grpc.Testing.LoadBalancerStatsResponse> __Marshaller_grpc_testing_LoadBalancerStatsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerStatsResponse.Parser));
950     static readonly grpc::Marshaller<global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest> __Marshaller_grpc_testing_LoadBalancerAccumulatedStatsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest.Parser));
951     static readonly grpc::Marshaller<global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> __Marshaller_grpc_testing_LoadBalancerAccumulatedStatsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse.Parser));
952 
953     static readonly grpc::Method<global::Grpc.Testing.LoadBalancerStatsRequest, global::Grpc.Testing.LoadBalancerStatsResponse> __Method_GetClientStats = new grpc::Method<global::Grpc.Testing.LoadBalancerStatsRequest, global::Grpc.Testing.LoadBalancerStatsResponse>(
954         grpc::MethodType.Unary,
955         __ServiceName,
956         "GetClientStats",
957         __Marshaller_grpc_testing_LoadBalancerStatsRequest,
958         __Marshaller_grpc_testing_LoadBalancerStatsResponse);
959 
960     static readonly grpc::Method<global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> __Method_GetClientAccumulatedStats = new grpc::Method<global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse>(
961         grpc::MethodType.Unary,
962         __ServiceName,
963         "GetClientAccumulatedStats",
964         __Marshaller_grpc_testing_LoadBalancerAccumulatedStatsRequest,
965         __Marshaller_grpc_testing_LoadBalancerAccumulatedStatsResponse);
966 
967     /// <summary>Service descriptor</summary>
968     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
969     {
970       get { return global::Grpc.Testing.TestReflection.Descriptor.Services[3]; }
971     }
972 
973     /// <summary>Base class for server-side implementations of LoadBalancerStatsService</summary>
974     [grpc::BindServiceMethod(typeof(LoadBalancerStatsService), "BindService")]
975     public abstract partial class LoadBalancerStatsServiceBase
976     {
977       /// <summary>
978       /// Gets the backend distribution for RPCs sent by a test client.
979       /// </summary>
980       /// <param name="request">The request received from the client.</param>
981       /// <param name="context">The context of the server-side call handler being invoked.</param>
982       /// <returns>The response to send back to the client (wrapped by a task).</returns>
GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::ServerCallContext context)983       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.LoadBalancerStatsResponse> GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::ServerCallContext context)
984       {
985         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
986       }
987 
988       /// <summary>
989       /// Gets the accumulated stats for RPCs sent by a test client.
990       /// </summary>
991       /// <param name="request">The request received from the client.</param>
992       /// <param name="context">The context of the server-side call handler being invoked.</param>
993       /// <returns>The response to send back to the client (wrapped by a task).</returns>
GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::ServerCallContext context)994       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::ServerCallContext context)
995       {
996         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
997       }
998 
999     }
1000 
1001     /// <summary>Client for LoadBalancerStatsService</summary>
1002     public partial class LoadBalancerStatsServiceClient : grpc::ClientBase<LoadBalancerStatsServiceClient>
1003     {
1004       /// <summary>Creates a new client for LoadBalancerStatsService</summary>
1005       /// <param name="channel">The channel to use to make remote calls.</param>
LoadBalancerStatsServiceClient(grpc::ChannelBase channel)1006       public LoadBalancerStatsServiceClient(grpc::ChannelBase channel) : base(channel)
1007       {
1008       }
1009       /// <summary>Creates a new client for LoadBalancerStatsService that uses a custom <c>CallInvoker</c>.</summary>
1010       /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
LoadBalancerStatsServiceClient(grpc::CallInvoker callInvoker)1011       public LoadBalancerStatsServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
1012       {
1013       }
1014       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
LoadBalancerStatsServiceClient()1015       protected LoadBalancerStatsServiceClient() : base()
1016       {
1017       }
1018       /// <summary>Protected constructor to allow creation of configured clients.</summary>
1019       /// <param name="configuration">The client configuration.</param>
LoadBalancerStatsServiceClient(ClientBaseConfiguration configuration)1020       protected LoadBalancerStatsServiceClient(ClientBaseConfiguration configuration) : base(configuration)
1021       {
1022       }
1023 
1024       /// <summary>
1025       /// Gets the backend distribution for RPCs sent by a test client.
1026       /// </summary>
1027       /// <param name="request">The request to send to the server.</param>
1028       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
1029       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
1030       /// <param name="cancellationToken">An optional token for canceling the call.</param>
1031       /// <returns>The response received from the server.</returns>
GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1032       public virtual global::Grpc.Testing.LoadBalancerStatsResponse GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1033       {
1034         return GetClientStats(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1035       }
1036       /// <summary>
1037       /// Gets the backend distribution for RPCs sent by a test client.
1038       /// </summary>
1039       /// <param name="request">The request to send to the server.</param>
1040       /// <param name="options">The options for the call.</param>
1041       /// <returns>The response received from the server.</returns>
GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::CallOptions options)1042       public virtual global::Grpc.Testing.LoadBalancerStatsResponse GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::CallOptions options)
1043       {
1044         return CallInvoker.BlockingUnaryCall(__Method_GetClientStats, null, options, request);
1045       }
1046       /// <summary>
1047       /// Gets the backend distribution for RPCs sent by a test client.
1048       /// </summary>
1049       /// <param name="request">The request to send to the server.</param>
1050       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
1051       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
1052       /// <param name="cancellationToken">An optional token for canceling the call.</param>
1053       /// <returns>The call object.</returns>
GetClientStatsAsync(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1054       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.LoadBalancerStatsResponse> GetClientStatsAsync(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1055       {
1056         return GetClientStatsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1057       }
1058       /// <summary>
1059       /// Gets the backend distribution for RPCs sent by a test client.
1060       /// </summary>
1061       /// <param name="request">The request to send to the server.</param>
1062       /// <param name="options">The options for the call.</param>
1063       /// <returns>The call object.</returns>
GetClientStatsAsync(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::CallOptions options)1064       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.LoadBalancerStatsResponse> GetClientStatsAsync(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::CallOptions options)
1065       {
1066         return CallInvoker.AsyncUnaryCall(__Method_GetClientStats, null, options, request);
1067       }
1068       /// <summary>
1069       /// Gets the accumulated stats for RPCs sent by a test client.
1070       /// </summary>
1071       /// <param name="request">The request to send to the server.</param>
1072       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
1073       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
1074       /// <param name="cancellationToken">An optional token for canceling the call.</param>
1075       /// <returns>The response received from the server.</returns>
GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1076       public virtual global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1077       {
1078         return GetClientAccumulatedStats(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1079       }
1080       /// <summary>
1081       /// Gets the accumulated stats for RPCs sent by a test client.
1082       /// </summary>
1083       /// <param name="request">The request to send to the server.</param>
1084       /// <param name="options">The options for the call.</param>
1085       /// <returns>The response received from the server.</returns>
GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::CallOptions options)1086       public virtual global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::CallOptions options)
1087       {
1088         return CallInvoker.BlockingUnaryCall(__Method_GetClientAccumulatedStats, null, options, request);
1089       }
1090       /// <summary>
1091       /// Gets the accumulated stats for RPCs sent by a test client.
1092       /// </summary>
1093       /// <param name="request">The request to send to the server.</param>
1094       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
1095       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
1096       /// <param name="cancellationToken">An optional token for canceling the call.</param>
1097       /// <returns>The call object.</returns>
GetClientAccumulatedStatsAsync(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1098       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> GetClientAccumulatedStatsAsync(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1099       {
1100         return GetClientAccumulatedStatsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1101       }
1102       /// <summary>
1103       /// Gets the accumulated stats for RPCs sent by a test client.
1104       /// </summary>
1105       /// <param name="request">The request to send to the server.</param>
1106       /// <param name="options">The options for the call.</param>
1107       /// <returns>The call object.</returns>
GetClientAccumulatedStatsAsync(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::CallOptions options)1108       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> GetClientAccumulatedStatsAsync(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::CallOptions options)
1109       {
1110         return CallInvoker.AsyncUnaryCall(__Method_GetClientAccumulatedStats, null, options, request);
1111       }
1112       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
NewInstance(ClientBaseConfiguration configuration)1113       protected override LoadBalancerStatsServiceClient NewInstance(ClientBaseConfiguration configuration)
1114       {
1115         return new LoadBalancerStatsServiceClient(configuration);
1116       }
1117     }
1118 
1119     /// <summary>Creates service definition that can be registered with a server</summary>
1120     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(LoadBalancerStatsServiceBase serviceImpl)1121     public static grpc::ServerServiceDefinition BindService(LoadBalancerStatsServiceBase serviceImpl)
1122     {
1123       return grpc::ServerServiceDefinition.CreateBuilder()
1124           .AddMethod(__Method_GetClientStats, serviceImpl.GetClientStats)
1125           .AddMethod(__Method_GetClientAccumulatedStats, serviceImpl.GetClientAccumulatedStats).Build();
1126     }
1127 
1128     /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
1129     /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
1130     /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
1131     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(grpc::ServiceBinderBase serviceBinder, LoadBalancerStatsServiceBase serviceImpl)1132     public static void BindService(grpc::ServiceBinderBase serviceBinder, LoadBalancerStatsServiceBase serviceImpl)
1133     {
1134       serviceBinder.AddMethod(__Method_GetClientStats, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.LoadBalancerStatsRequest, global::Grpc.Testing.LoadBalancerStatsResponse>(serviceImpl.GetClientStats));
1135       serviceBinder.AddMethod(__Method_GetClientAccumulatedStats, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse>(serviceImpl.GetClientAccumulatedStats));
1136     }
1137 
1138   }
1139   /// <summary>
1140   /// A service to remotely control health status of an xDS test server.
1141   /// </summary>
1142   public static partial class XdsUpdateHealthService
1143   {
1144     static readonly string __ServiceName = "grpc.testing.XdsUpdateHealthService";
1145 
__Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)1146     static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
1147     {
1148       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
1149       if (message is global::Google.Protobuf.IBufferMessage)
1150       {
1151         context.SetPayloadLength(message.CalculateSize());
1152         global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
1153         context.Complete();
1154         return;
1155       }
1156       #endif
1157       context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
1158     }
1159 
1160     static class __Helper_MessageCache<T>
1161     {
1162       public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
1163     }
1164 
1165     static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
1166     {
1167       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
1168       if (__Helper_MessageCache<T>.IsBufferMessage)
1169       {
1170         return parser.ParseFrom(context.PayloadAsReadOnlySequence());
1171       }
1172       #endif
1173       return parser.ParseFrom(context.PayloadAsNewBuffer());
1174     }
1175 
1176     static readonly grpc::Marshaller<global::Grpc.Testing.Empty> __Marshaller_grpc_testing_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Empty.Parser));
1177 
1178     static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_SetServing = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
1179         grpc::MethodType.Unary,
1180         __ServiceName,
1181         "SetServing",
1182         __Marshaller_grpc_testing_Empty,
1183         __Marshaller_grpc_testing_Empty);
1184 
1185     static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_SetNotServing = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
1186         grpc::MethodType.Unary,
1187         __ServiceName,
1188         "SetNotServing",
1189         __Marshaller_grpc_testing_Empty,
1190         __Marshaller_grpc_testing_Empty);
1191 
1192     /// <summary>Service descriptor</summary>
1193     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
1194     {
1195       get { return global::Grpc.Testing.TestReflection.Descriptor.Services[4]; }
1196     }
1197 
1198     /// <summary>Base class for server-side implementations of XdsUpdateHealthService</summary>
1199     [grpc::BindServiceMethod(typeof(XdsUpdateHealthService), "BindService")]
1200     public abstract partial class XdsUpdateHealthServiceBase
1201     {
SetServing(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)1202       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> SetServing(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)
1203       {
1204         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
1205       }
1206 
SetNotServing(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)1207       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> SetNotServing(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)
1208       {
1209         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
1210       }
1211 
1212     }
1213 
1214     /// <summary>Client for XdsUpdateHealthService</summary>
1215     public partial class XdsUpdateHealthServiceClient : grpc::ClientBase<XdsUpdateHealthServiceClient>
1216     {
1217       /// <summary>Creates a new client for XdsUpdateHealthService</summary>
1218       /// <param name="channel">The channel to use to make remote calls.</param>
XdsUpdateHealthServiceClient(grpc::ChannelBase channel)1219       public XdsUpdateHealthServiceClient(grpc::ChannelBase channel) : base(channel)
1220       {
1221       }
1222       /// <summary>Creates a new client for XdsUpdateHealthService that uses a custom <c>CallInvoker</c>.</summary>
1223       /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
XdsUpdateHealthServiceClient(grpc::CallInvoker callInvoker)1224       public XdsUpdateHealthServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
1225       {
1226       }
1227       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
XdsUpdateHealthServiceClient()1228       protected XdsUpdateHealthServiceClient() : base()
1229       {
1230       }
1231       /// <summary>Protected constructor to allow creation of configured clients.</summary>
1232       /// <param name="configuration">The client configuration.</param>
XdsUpdateHealthServiceClient(ClientBaseConfiguration configuration)1233       protected XdsUpdateHealthServiceClient(ClientBaseConfiguration configuration) : base(configuration)
1234       {
1235       }
1236 
SetServing(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1237       public virtual global::Grpc.Testing.Empty SetServing(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1238       {
1239         return SetServing(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1240       }
SetServing(global::Grpc.Testing.Empty request, grpc::CallOptions options)1241       public virtual global::Grpc.Testing.Empty SetServing(global::Grpc.Testing.Empty request, grpc::CallOptions options)
1242       {
1243         return CallInvoker.BlockingUnaryCall(__Method_SetServing, null, options, request);
1244       }
SetServingAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1245       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> SetServingAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1246       {
1247         return SetServingAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1248       }
SetServingAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)1249       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> SetServingAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)
1250       {
1251         return CallInvoker.AsyncUnaryCall(__Method_SetServing, null, options, request);
1252       }
SetNotServing(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1253       public virtual global::Grpc.Testing.Empty SetNotServing(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1254       {
1255         return SetNotServing(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1256       }
SetNotServing(global::Grpc.Testing.Empty request, grpc::CallOptions options)1257       public virtual global::Grpc.Testing.Empty SetNotServing(global::Grpc.Testing.Empty request, grpc::CallOptions options)
1258       {
1259         return CallInvoker.BlockingUnaryCall(__Method_SetNotServing, null, options, request);
1260       }
SetNotServingAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1261       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> SetNotServingAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1262       {
1263         return SetNotServingAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1264       }
SetNotServingAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)1265       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> SetNotServingAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options)
1266       {
1267         return CallInvoker.AsyncUnaryCall(__Method_SetNotServing, null, options, request);
1268       }
1269       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
NewInstance(ClientBaseConfiguration configuration)1270       protected override XdsUpdateHealthServiceClient NewInstance(ClientBaseConfiguration configuration)
1271       {
1272         return new XdsUpdateHealthServiceClient(configuration);
1273       }
1274     }
1275 
1276     /// <summary>Creates service definition that can be registered with a server</summary>
1277     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(XdsUpdateHealthServiceBase serviceImpl)1278     public static grpc::ServerServiceDefinition BindService(XdsUpdateHealthServiceBase serviceImpl)
1279     {
1280       return grpc::ServerServiceDefinition.CreateBuilder()
1281           .AddMethod(__Method_SetServing, serviceImpl.SetServing)
1282           .AddMethod(__Method_SetNotServing, serviceImpl.SetNotServing).Build();
1283     }
1284 
1285     /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
1286     /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
1287     /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
1288     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(grpc::ServiceBinderBase serviceBinder, XdsUpdateHealthServiceBase serviceImpl)1289     public static void BindService(grpc::ServiceBinderBase serviceBinder, XdsUpdateHealthServiceBase serviceImpl)
1290     {
1291       serviceBinder.AddMethod(__Method_SetServing, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(serviceImpl.SetServing));
1292       serviceBinder.AddMethod(__Method_SetNotServing, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(serviceImpl.SetNotServing));
1293     }
1294 
1295   }
1296   /// <summary>
1297   /// A service to dynamically update the configuration of an xDS test client.
1298   /// </summary>
1299   public static partial class XdsUpdateClientConfigureService
1300   {
1301     static readonly string __ServiceName = "grpc.testing.XdsUpdateClientConfigureService";
1302 
__Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)1303     static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
1304     {
1305       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
1306       if (message is global::Google.Protobuf.IBufferMessage)
1307       {
1308         context.SetPayloadLength(message.CalculateSize());
1309         global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
1310         context.Complete();
1311         return;
1312       }
1313       #endif
1314       context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
1315     }
1316 
1317     static class __Helper_MessageCache<T>
1318     {
1319       public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
1320     }
1321 
1322     static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
1323     {
1324       #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
1325       if (__Helper_MessageCache<T>.IsBufferMessage)
1326       {
1327         return parser.ParseFrom(context.PayloadAsReadOnlySequence());
1328       }
1329       #endif
1330       return parser.ParseFrom(context.PayloadAsNewBuffer());
1331     }
1332 
1333     static readonly grpc::Marshaller<global::Grpc.Testing.ClientConfigureRequest> __Marshaller_grpc_testing_ClientConfigureRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ClientConfigureRequest.Parser));
1334     static readonly grpc::Marshaller<global::Grpc.Testing.ClientConfigureResponse> __Marshaller_grpc_testing_ClientConfigureResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ClientConfigureResponse.Parser));
1335 
1336     static readonly grpc::Method<global::Grpc.Testing.ClientConfigureRequest, global::Grpc.Testing.ClientConfigureResponse> __Method_Configure = new grpc::Method<global::Grpc.Testing.ClientConfigureRequest, global::Grpc.Testing.ClientConfigureResponse>(
1337         grpc::MethodType.Unary,
1338         __ServiceName,
1339         "Configure",
1340         __Marshaller_grpc_testing_ClientConfigureRequest,
1341         __Marshaller_grpc_testing_ClientConfigureResponse);
1342 
1343     /// <summary>Service descriptor</summary>
1344     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
1345     {
1346       get { return global::Grpc.Testing.TestReflection.Descriptor.Services[5]; }
1347     }
1348 
1349     /// <summary>Base class for server-side implementations of XdsUpdateClientConfigureService</summary>
1350     [grpc::BindServiceMethod(typeof(XdsUpdateClientConfigureService), "BindService")]
1351     public abstract partial class XdsUpdateClientConfigureServiceBase
1352     {
1353       /// <summary>
1354       /// Update the tes client's configuration.
1355       /// </summary>
1356       /// <param name="request">The request received from the client.</param>
1357       /// <param name="context">The context of the server-side call handler being invoked.</param>
1358       /// <returns>The response to send back to the client (wrapped by a task).</returns>
Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::ServerCallContext context)1359       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.ClientConfigureResponse> Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::ServerCallContext context)
1360       {
1361         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
1362       }
1363 
1364     }
1365 
1366     /// <summary>Client for XdsUpdateClientConfigureService</summary>
1367     public partial class XdsUpdateClientConfigureServiceClient : grpc::ClientBase<XdsUpdateClientConfigureServiceClient>
1368     {
1369       /// <summary>Creates a new client for XdsUpdateClientConfigureService</summary>
1370       /// <param name="channel">The channel to use to make remote calls.</param>
XdsUpdateClientConfigureServiceClient(grpc::ChannelBase channel)1371       public XdsUpdateClientConfigureServiceClient(grpc::ChannelBase channel) : base(channel)
1372       {
1373       }
1374       /// <summary>Creates a new client for XdsUpdateClientConfigureService that uses a custom <c>CallInvoker</c>.</summary>
1375       /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
XdsUpdateClientConfigureServiceClient(grpc::CallInvoker callInvoker)1376       public XdsUpdateClientConfigureServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
1377       {
1378       }
1379       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
XdsUpdateClientConfigureServiceClient()1380       protected XdsUpdateClientConfigureServiceClient() : base()
1381       {
1382       }
1383       /// <summary>Protected constructor to allow creation of configured clients.</summary>
1384       /// <param name="configuration">The client configuration.</param>
XdsUpdateClientConfigureServiceClient(ClientBaseConfiguration configuration)1385       protected XdsUpdateClientConfigureServiceClient(ClientBaseConfiguration configuration) : base(configuration)
1386       {
1387       }
1388 
1389       /// <summary>
1390       /// Update the tes client's configuration.
1391       /// </summary>
1392       /// <param name="request">The request to send to the server.</param>
1393       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
1394       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
1395       /// <param name="cancellationToken">An optional token for canceling the call.</param>
1396       /// <returns>The response received from the server.</returns>
Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1397       public virtual global::Grpc.Testing.ClientConfigureResponse Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1398       {
1399         return Configure(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1400       }
1401       /// <summary>
1402       /// Update the tes client's configuration.
1403       /// </summary>
1404       /// <param name="request">The request to send to the server.</param>
1405       /// <param name="options">The options for the call.</param>
1406       /// <returns>The response received from the server.</returns>
Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::CallOptions options)1407       public virtual global::Grpc.Testing.ClientConfigureResponse Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::CallOptions options)
1408       {
1409         return CallInvoker.BlockingUnaryCall(__Method_Configure, null, options, request);
1410       }
1411       /// <summary>
1412       /// Update the tes client's configuration.
1413       /// </summary>
1414       /// <param name="request">The request to send to the server.</param>
1415       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
1416       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
1417       /// <param name="cancellationToken">An optional token for canceling the call.</param>
1418       /// <returns>The call object.</returns>
ConfigureAsync(global::Grpc.Testing.ClientConfigureRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))1419       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.ClientConfigureResponse> ConfigureAsync(global::Grpc.Testing.ClientConfigureRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
1420       {
1421         return ConfigureAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
1422       }
1423       /// <summary>
1424       /// Update the tes client's configuration.
1425       /// </summary>
1426       /// <param name="request">The request to send to the server.</param>
1427       /// <param name="options">The options for the call.</param>
1428       /// <returns>The call object.</returns>
ConfigureAsync(global::Grpc.Testing.ClientConfigureRequest request, grpc::CallOptions options)1429       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.ClientConfigureResponse> ConfigureAsync(global::Grpc.Testing.ClientConfigureRequest request, grpc::CallOptions options)
1430       {
1431         return CallInvoker.AsyncUnaryCall(__Method_Configure, null, options, request);
1432       }
1433       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
NewInstance(ClientBaseConfiguration configuration)1434       protected override XdsUpdateClientConfigureServiceClient NewInstance(ClientBaseConfiguration configuration)
1435       {
1436         return new XdsUpdateClientConfigureServiceClient(configuration);
1437       }
1438     }
1439 
1440     /// <summary>Creates service definition that can be registered with a server</summary>
1441     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(XdsUpdateClientConfigureServiceBase serviceImpl)1442     public static grpc::ServerServiceDefinition BindService(XdsUpdateClientConfigureServiceBase serviceImpl)
1443     {
1444       return grpc::ServerServiceDefinition.CreateBuilder()
1445           .AddMethod(__Method_Configure, serviceImpl.Configure).Build();
1446     }
1447 
1448     /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
1449     /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
1450     /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
1451     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(grpc::ServiceBinderBase serviceBinder, XdsUpdateClientConfigureServiceBase serviceImpl)1452     public static void BindService(grpc::ServiceBinderBase serviceBinder, XdsUpdateClientConfigureServiceBase serviceImpl)
1453     {
1454       serviceBinder.AddMethod(__Method_Configure, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.ClientConfigureRequest, global::Grpc.Testing.ClientConfigureResponse>(serviceImpl.Configure));
1455     }
1456 
1457   }
1458 }
1459 #endregion
1460