blob: ee539548f7a41ec37b9004c68b4b48306b178c26 [file] [log] [blame]
Jan Tattermusch7eb3a762015-05-07 14:26:13 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: test.proto
3#region Designer generated code
4
5using System;
6using System.Threading;
7using System.Threading.Tasks;
8using Grpc.Core;
9
10namespace grpc.testing {
11 public static class TestService
12 {
13 static readonly string __ServiceName = "grpc.testing.TestService";
14
Jan Tattermusch3fffe602015-05-20 08:56:24 -070015 static readonly Marshaller<global::grpc.testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.Empty.ParseFrom);
16 static readonly Marshaller<global::grpc.testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.SimpleRequest.ParseFrom);
17 static readonly Marshaller<global::grpc.testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.SimpleResponse.ParseFrom);
18 static readonly Marshaller<global::grpc.testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingOutputCallRequest.ParseFrom);
19 static readonly Marshaller<global::grpc.testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingOutputCallResponse.ParseFrom);
20 static readonly Marshaller<global::grpc.testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingInputCallRequest.ParseFrom);
21 static readonly Marshaller<global::grpc.testing.StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = Marshallers.Create((arg) => arg.ToByteArray(), global::grpc.testing.StreamingInputCallResponse.ParseFrom);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070022
Jan Tattermusch3fffe602015-05-20 08:56:24 -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 Tattermusch3fffe602015-05-20 08:56:24 -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 Tattermusch3fffe602015-05-20 08:56:24 -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 Tattermusch3fffe602015-05-20 08:56:24 -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 Tattermusch3fffe602015-05-20 08:56:24 -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 Tattermusch3fffe602015-05-20 08:56:24 -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 Tattermuschb5332812015-07-14 19:29:35 -070065 // client interface
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070066 public interface ITestServiceClient
67 {
Jan Tattermusch74529562015-07-23 14:04:51 -070068 global::grpc.testing.Empty EmptyCall(global::grpc.testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070069 global::grpc.testing.Empty EmptyCall(global::grpc.testing.Empty request, CallContext context);
Jan Tattermusch74529562015-07-23 14:04:51 -070070 AsyncUnaryCall<global::grpc.testing.Empty> EmptyCallAsync(global::grpc.testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070071 AsyncUnaryCall<global::grpc.testing.Empty> EmptyCallAsync(global::grpc.testing.Empty request, CallContext context);
Jan Tattermusch74529562015-07-23 14:04:51 -070072 global::grpc.testing.SimpleResponse UnaryCall(global::grpc.testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070073 global::grpc.testing.SimpleResponse UnaryCall(global::grpc.testing.SimpleRequest request, CallContext context);
Jan Tattermusch74529562015-07-23 14:04:51 -070074 AsyncUnaryCall<global::grpc.testing.SimpleResponse> UnaryCallAsync(global::grpc.testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070075 AsyncUnaryCall<global::grpc.testing.SimpleResponse> UnaryCallAsync(global::grpc.testing.SimpleRequest request, CallContext context);
Jan Tattermusch74529562015-07-23 14:04:51 -070076 AsyncServerStreamingCall<global::grpc.testing.StreamingOutputCallResponse> StreamingOutputCall(global::grpc.testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070077 AsyncServerStreamingCall<global::grpc.testing.StreamingOutputCallResponse> StreamingOutputCall(global::grpc.testing.StreamingOutputCallRequest request, CallContext context);
Jan Tattermusch74529562015-07-23 14:04:51 -070078 AsyncClientStreamingCall<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070079 AsyncClientStreamingCall<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(CallContext context);
Jan Tattermusch74529562015-07-23 14:04:51 -070080 AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070081 AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> FullDuplexCall(CallContext context);
Jan Tattermusch74529562015-07-23 14:04:51 -070082 AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070083 AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> HalfDuplexCall(CallContext context);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070084 }
85
86 // server-side interface
87 public interface ITestService
88 {
Jan Tattermusch25bb2ef2015-07-21 12:15:53 -070089 Task<global::grpc.testing.Empty> EmptyCall(global::grpc.testing.Empty request, ServerCallContext context);
90 Task<global::grpc.testing.SimpleResponse> UnaryCall(global::grpc.testing.SimpleRequest request, ServerCallContext context);
91 Task StreamingOutputCall(global::grpc.testing.StreamingOutputCallRequest request, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
92 Task<global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::grpc.testing.StreamingInputCallRequest> requestStream, ServerCallContext context);
93 Task FullDuplexCall(IAsyncStreamReader<global::grpc.testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
94 Task HalfDuplexCall(IAsyncStreamReader<global::grpc.testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::grpc.testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070095 }
96
97 // client stub
Jan Tattermuschb5332812015-07-14 19:29:35 -070098 public class TestServiceClient : ClientBase, ITestServiceClient
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070099 {
Jan Tattermuschb5332812015-07-14 19:29:35 -0700100 public TestServiceClient(Channel channel) : base(channel)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700101 {
102 }
Jan Tattermusch74529562015-07-23 14:04:51 -0700103 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 -0700104 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700105 var call = CreateCall(__Method_EmptyCall, new CallContext(headers, deadline, cancellationToken));
106 return Calls.BlockingUnaryCall(call, request);
107 }
108 public global::grpc.testing.Empty EmptyCall(global::grpc.testing.Empty request, CallContext context)
109 {
110 var call = CreateCall(__Method_EmptyCall, context);
111 return Calls.BlockingUnaryCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700112 }
Jan Tattermusch74529562015-07-23 14:04:51 -0700113 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 -0700114 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700115 var call = CreateCall(__Method_EmptyCall, new CallContext(headers, deadline, cancellationToken));
116 return Calls.AsyncUnaryCall(call, request);
117 }
118 public AsyncUnaryCall<global::grpc.testing.Empty> EmptyCallAsync(global::grpc.testing.Empty request, CallContext context)
119 {
120 var call = CreateCall(__Method_EmptyCall, context);
121 return Calls.AsyncUnaryCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700122 }
Jan Tattermusch74529562015-07-23 14:04:51 -0700123 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 -0700124 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700125 var call = CreateCall(__Method_UnaryCall, new CallContext(headers, deadline, cancellationToken));
126 return Calls.BlockingUnaryCall(call, request);
127 }
128 public global::grpc.testing.SimpleResponse UnaryCall(global::grpc.testing.SimpleRequest request, CallContext context)
129 {
130 var call = CreateCall(__Method_UnaryCall, context);
131 return Calls.BlockingUnaryCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700132 }
Jan Tattermusch74529562015-07-23 14:04:51 -0700133 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 -0700134 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700135 var call = CreateCall(__Method_UnaryCall, new CallContext(headers, deadline, cancellationToken));
136 return Calls.AsyncUnaryCall(call, request);
137 }
138 public AsyncUnaryCall<global::grpc.testing.SimpleResponse> UnaryCallAsync(global::grpc.testing.SimpleRequest request, CallContext context)
139 {
140 var call = CreateCall(__Method_UnaryCall, context);
141 return Calls.AsyncUnaryCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700142 }
Jan Tattermusch74529562015-07-23 14:04:51 -0700143 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 -0700144 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700145 var call = CreateCall(__Method_StreamingOutputCall, new CallContext(headers, deadline, cancellationToken));
146 return Calls.AsyncServerStreamingCall(call, request);
147 }
148 public AsyncServerStreamingCall<global::grpc.testing.StreamingOutputCallResponse> StreamingOutputCall(global::grpc.testing.StreamingOutputCallRequest request, CallContext context)
149 {
150 var call = CreateCall(__Method_StreamingOutputCall, context);
151 return Calls.AsyncServerStreamingCall(call, request);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700152 }
Jan Tattermusch74529562015-07-23 14:04:51 -0700153 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 -0700154 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700155 var call = CreateCall(__Method_StreamingInputCall, new CallContext(headers, deadline, cancellationToken));
156 return Calls.AsyncClientStreamingCall(call);
157 }
158 public AsyncClientStreamingCall<global::grpc.testing.StreamingInputCallRequest, global::grpc.testing.StreamingInputCallResponse> StreamingInputCall(CallContext context)
159 {
160 var call = CreateCall(__Method_StreamingInputCall, context);
161 return Calls.AsyncClientStreamingCall(call);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700162 }
Jan Tattermusch74529562015-07-23 14:04:51 -0700163 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 -0700164 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700165 var call = CreateCall(__Method_FullDuplexCall, new CallContext(headers, deadline, cancellationToken));
166 return Calls.AsyncDuplexStreamingCall(call);
167 }
168 public AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> FullDuplexCall(CallContext context)
169 {
170 var call = CreateCall(__Method_FullDuplexCall, context);
171 return Calls.AsyncDuplexStreamingCall(call);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700172 }
Jan Tattermusch74529562015-07-23 14:04:51 -0700173 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 -0700174 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700175 var call = CreateCall(__Method_HalfDuplexCall, new CallContext(headers, deadline, cancellationToken));
176 return Calls.AsyncDuplexStreamingCall(call);
177 }
178 public AsyncDuplexStreamingCall<global::grpc.testing.StreamingOutputCallRequest, global::grpc.testing.StreamingOutputCallResponse> HalfDuplexCall(CallContext context)
179 {
180 var call = CreateCall(__Method_HalfDuplexCall, context);
181 return Calls.AsyncDuplexStreamingCall(call);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700182 }
183 }
184
185 // creates service definition that can be registered with a server
186 public static ServerServiceDefinition BindService(ITestService serviceImpl)
187 {
188 return ServerServiceDefinition.CreateBuilder(__ServiceName)
189 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
190 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
191 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
192 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
193 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
194 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build();
195 }
196
Jan Tattermuschb5332812015-07-14 19:29:35 -0700197 // creates a new client
198 public static TestServiceClient NewClient(Channel channel)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700199 {
200 return new TestServiceClient(channel);
201 }
202
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700203 }
204}
Jan Tattermuschcd7e3132015-05-07 15:10:23 -0700205#endregion