blob: 8c884b74086e5a29a95c0c69874a02f6e03aa8b6 [file] [log] [blame]
Jan Tattermusch7eb3a762015-05-07 14:26:13 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch70f86522015-10-07 18:23:51 -07002// source: test/proto/test.proto
Jan Tattermusch7eb3a762015-05-07 14:26:13 -07003#region Designer generated code
4
5using System;
6using System.Threading;
7using System.Threading.Tasks;
8using Grpc.Core;
9
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070010namespace Grpc.Testing {
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070011 public static class TestService
12 {
13 static readonly string __ServiceName = "grpc.testing.TestService";
14
Jan Tattermusch475f75a2015-08-03 09:46:04 -070015 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
16 static readonly Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom);
17 static readonly Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom);
18 static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallRequest.Parser.ParseFrom);
19 static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallResponse.Parser.ParseFrom);
20 static readonly Marshaller<global::Grpc.Testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallRequest.Parser.ParseFrom);
21 static readonly Marshaller<global::Grpc.Testing.StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallResponse.Parser.ParseFrom);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070022
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070023 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_EmptyCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070024 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070025 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070026 "EmptyCall",
27 __Marshaller_Empty,
28 __Marshaller_Empty);
29
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070030 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070031 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070032 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070033 "UnaryCall",
34 __Marshaller_SimpleRequest,
35 __Marshaller_SimpleResponse);
36
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070037 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_StreamingOutputCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070038 MethodType.ServerStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070039 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070040 "StreamingOutputCall",
41 __Marshaller_StreamingOutputCallRequest,
42 __Marshaller_StreamingOutputCallResponse);
43
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070044 static readonly Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> __Method_StreamingInputCall = new Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070045 MethodType.ClientStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070046 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070047 "StreamingInputCall",
48 __Marshaller_StreamingInputCallRequest,
49 __Marshaller_StreamingInputCallResponse);
50
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070051 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_FullDuplexCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070052 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070053 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070054 "FullDuplexCall",
55 __Marshaller_StreamingOutputCallRequest,
56 __Marshaller_StreamingOutputCallResponse);
57
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070058 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_HalfDuplexCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070059 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070060 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070061 "HalfDuplexCall",
62 __Marshaller_StreamingOutputCallRequest,
63 __Marshaller_StreamingOutputCallResponse);
64
Jan Tattermusche6af5d12015-08-03 10:57:43 -070065 // service descriptor
66 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
67 {
68 get { return global::Grpc.Testing.Test.Descriptor.Services[0]; }
69 }
70
Jan Tattermuschb5332812015-07-14 19:29:35 -070071 // client interface
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070072 public interface ITestServiceClient
73 {
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070074 global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070075 global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070076 AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070077 AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070078 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070079 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070080 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070081 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070082 AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070083 AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070084 AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070085 AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070086 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070087 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070088 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070089 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070090 }
91
92 // server-side interface
93 public interface ITestService
94 {
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070095 Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context);
96 Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context);
97 Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
98 Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, ServerCallContext context);
99 Task FullDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
100 Task HalfDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700101 }
102
103 // client stub
Jan Tattermuschb5332812015-07-14 19:29:35 -0700104 public class TestServiceClient : ClientBase, ITestServiceClient
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700105 {
Jan Tattermuschb5332812015-07-14 19:29:35 -0700106 public TestServiceClient(Channel channel) : base(channel)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700107 {
108 }
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700109 public global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700110 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700111 var call = CreateCall(__Method_EmptyCall, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700112 return Calls.BlockingUnaryCall(call, request);
113 }
Jan Tattermusch38536a72015-08-08 00:45:52 -0700114 public global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700115 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700116 var call = CreateCall(__Method_EmptyCall, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700117 return Calls.BlockingUnaryCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700118 }
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700119 public AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700120 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700121 var call = CreateCall(__Method_EmptyCall, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700122 return Calls.AsyncUnaryCall(call, request);
123 }
Jan Tattermusch38536a72015-08-08 00:45:52 -0700124 public AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700125 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700126 var call = CreateCall(__Method_EmptyCall, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700127 return Calls.AsyncUnaryCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700128 }
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700129 public global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700130 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700131 var call = CreateCall(__Method_UnaryCall, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700132 return Calls.BlockingUnaryCall(call, request);
133 }
Jan Tattermusch38536a72015-08-08 00:45:52 -0700134 public global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700135 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700136 var call = CreateCall(__Method_UnaryCall, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700137 return Calls.BlockingUnaryCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700138 }
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700139 public AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700140 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700141 var call = CreateCall(__Method_UnaryCall, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700142 return Calls.AsyncUnaryCall(call, request);
143 }
Jan Tattermusch38536a72015-08-08 00:45:52 -0700144 public AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700145 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700146 var call = CreateCall(__Method_UnaryCall, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700147 return Calls.AsyncUnaryCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700148 }
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700149 public AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700150 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700151 var call = CreateCall(__Method_StreamingOutputCall, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700152 return Calls.AsyncServerStreamingCall(call, request);
153 }
Jan Tattermusch38536a72015-08-08 00:45:52 -0700154 public AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options)
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700155 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700156 var call = CreateCall(__Method_StreamingOutputCall, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700157 return Calls.AsyncServerStreamingCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700158 }
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700159 public AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700160 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700161 var call = CreateCall(__Method_StreamingInputCall, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700162 return Calls.AsyncClientStreamingCall(call);
163 }
Jan Tattermusch38536a72015-08-08 00:45:52 -0700164 public AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options)
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700165 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700166 var call = CreateCall(__Method_StreamingInputCall, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700167 return Calls.AsyncClientStreamingCall(call);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700168 }
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700169 public AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700170 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700171 var call = CreateCall(__Method_FullDuplexCall, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700172 return Calls.AsyncDuplexStreamingCall(call);
173 }
Jan Tattermusch38536a72015-08-08 00:45:52 -0700174 public AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options)
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700175 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700176 var call = CreateCall(__Method_FullDuplexCall, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700177 return Calls.AsyncDuplexStreamingCall(call);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700178 }
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -0700179 public AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700180 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700181 var call = CreateCall(__Method_HalfDuplexCall, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700182 return Calls.AsyncDuplexStreamingCall(call);
183 }
Jan Tattermusch38536a72015-08-08 00:45:52 -0700184 public AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options)
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700185 {
Jan Tattermuschffa17b12015-08-05 14:56:59 -0700186 var call = CreateCall(__Method_HalfDuplexCall, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700187 return Calls.AsyncDuplexStreamingCall(call);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700188 }
189 }
190
191 // creates service definition that can be registered with a server
192 public static ServerServiceDefinition BindService(ITestService serviceImpl)
193 {
194 return ServerServiceDefinition.CreateBuilder(__ServiceName)
195 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
196 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
197 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
198 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
199 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
200 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build();
201 }
202
Jan Tattermuschb5332812015-07-14 19:29:35 -0700203 // creates a new client
204 public static TestServiceClient NewClient(Channel channel)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700205 {
206 return new TestServiceClient(channel);
207 }
208
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700209 }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700210 public static class UnimplementedService
211 {
212 static readonly string __ServiceName = "grpc.testing.UnimplementedService";
213
214 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
215
216 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
217 MethodType.Unary,
218 __ServiceName,
219 "UnimplementedCall",
220 __Marshaller_Empty,
221 __Marshaller_Empty);
222
223 // service descriptor
224 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
225 {
226 get { return global::Grpc.Testing.Test.Descriptor.Services[1]; }
227 }
228
229 // client interface
230 public interface IUnimplementedServiceClient
231 {
232 global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
233 global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options);
234 AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
235 AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options);
236 }
237
238 // server-side interface
239 public interface IUnimplementedService
240 {
241 Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context);
242 }
243
244 // client stub
245 public class UnimplementedServiceClient : ClientBase, IUnimplementedServiceClient
246 {
247 public UnimplementedServiceClient(Channel channel) : base(channel)
248 {
249 }
250 public global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
251 {
252 var call = CreateCall(__Method_UnimplementedCall, new CallOptions(headers, deadline, cancellationToken));
253 return Calls.BlockingUnaryCall(call, request);
254 }
255 public global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options)
256 {
257 var call = CreateCall(__Method_UnimplementedCall, options);
258 return Calls.BlockingUnaryCall(call, request);
259 }
260 public AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
261 {
262 var call = CreateCall(__Method_UnimplementedCall, new CallOptions(headers, deadline, cancellationToken));
263 return Calls.AsyncUnaryCall(call, request);
264 }
265 public AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
266 {
267 var call = CreateCall(__Method_UnimplementedCall, options);
268 return Calls.AsyncUnaryCall(call, request);
269 }
270 }
271
272 // creates service definition that can be registered with a server
273 public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl)
274 {
275 return ServerServiceDefinition.CreateBuilder(__ServiceName)
276 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
277 }
278
279 // creates a new client
280 public static UnimplementedServiceClient NewClient(Channel channel)
281 {
282 return new UnimplementedServiceClient(channel);
283 }
284
285 }
286 public static class ReconnectService
287 {
288 static readonly string __ServiceName = "grpc.testing.ReconnectService";
289
290 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
291 static readonly Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_ReconnectInfo = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom);
292
293 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_Start = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
294 MethodType.Unary,
295 __ServiceName,
296 "Start",
297 __Marshaller_Empty,
298 __Marshaller_Empty);
299
300 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(
301 MethodType.Unary,
302 __ServiceName,
303 "Stop",
304 __Marshaller_Empty,
305 __Marshaller_ReconnectInfo);
306
307 // service descriptor
308 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
309 {
310 get { return global::Grpc.Testing.Test.Descriptor.Services[2]; }
311 }
312
313 // client interface
314 public interface IReconnectServiceClient
315 {
316 global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
317 global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, CallOptions options);
318 AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
319 AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.Empty request, CallOptions options);
320 global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
321 global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options);
322 AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
323 AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options);
324 }
325
326 // server-side interface
327 public interface IReconnectService
328 {
329 Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.Empty request, ServerCallContext context);
330 Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, ServerCallContext context);
331 }
332
333 // client stub
334 public class ReconnectServiceClient : ClientBase, IReconnectServiceClient
335 {
336 public ReconnectServiceClient(Channel channel) : base(channel)
337 {
338 }
339 public global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
340 {
341 var call = CreateCall(__Method_Start, new CallOptions(headers, deadline, cancellationToken));
342 return Calls.BlockingUnaryCall(call, request);
343 }
344 public global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, CallOptions options)
345 {
346 var call = CreateCall(__Method_Start, options);
347 return Calls.BlockingUnaryCall(call, request);
348 }
349 public AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
350 {
351 var call = CreateCall(__Method_Start, new CallOptions(headers, deadline, cancellationToken));
352 return Calls.AsyncUnaryCall(call, request);
353 }
354 public AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.Empty request, CallOptions options)
355 {
356 var call = CreateCall(__Method_Start, options);
357 return Calls.AsyncUnaryCall(call, request);
358 }
359 public global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
360 {
361 var call = CreateCall(__Method_Stop, new CallOptions(headers, deadline, cancellationToken));
362 return Calls.BlockingUnaryCall(call, request);
363 }
364 public global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options)
365 {
366 var call = CreateCall(__Method_Stop, options);
367 return Calls.BlockingUnaryCall(call, request);
368 }
369 public AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
370 {
371 var call = CreateCall(__Method_Stop, new CallOptions(headers, deadline, cancellationToken));
372 return Calls.AsyncUnaryCall(call, request);
373 }
374 public AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options)
375 {
376 var call = CreateCall(__Method_Stop, options);
377 return Calls.AsyncUnaryCall(call, request);
378 }
379 }
380
381 // creates service definition that can be registered with a server
382 public static ServerServiceDefinition BindService(IReconnectService serviceImpl)
383 {
384 return ServerServiceDefinition.CreateBuilder(__ServiceName)
385 .AddMethod(__Method_Start, serviceImpl.Start)
386 .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
387 }
388
389 // creates a new client
390 public static ReconnectServiceClient NewClient(Channel channel)
391 {
392 return new ReconnectServiceClient(channel);
393 }
394
395 }
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700396}
Jan Tattermuschcd7e3132015-05-07 15:10:23 -0700397#endregion