OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / grpc / interop / grpc_testing / test.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: grpc_testing/test.proto
3
4 /*
5 Package grpc_testing is a generated protocol buffer package.
6
7 It is generated from these files:
8         grpc_testing/test.proto
9
10 It has these top-level messages:
11         Empty
12         Payload
13         EchoStatus
14         SimpleRequest
15         SimpleResponse
16         StreamingInputCallRequest
17         StreamingInputCallResponse
18         ResponseParameters
19         StreamingOutputCallRequest
20         StreamingOutputCallResponse
21 */
22 package grpc_testing
23
24 import proto "github.com/golang/protobuf/proto"
25 import fmt "fmt"
26 import math "math"
27
28 import (
29         context "golang.org/x/net/context"
30         grpc "google.golang.org/grpc"
31 )
32
33 // Reference imports to suppress errors if they are not otherwise used.
34 var _ = proto.Marshal
35 var _ = fmt.Errorf
36 var _ = math.Inf
37
38 // This is a compile-time assertion to ensure that this generated file
39 // is compatible with the proto package it is being compiled against.
40 // A compilation error at this line likely means your copy of the
41 // proto package needs to be updated.
42 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
43
44 // The type of payload that should be returned.
45 type PayloadType int32
46
47 const (
48         // Compressable text format.
49         PayloadType_COMPRESSABLE PayloadType = 0
50         // Uncompressable binary format.
51         PayloadType_UNCOMPRESSABLE PayloadType = 1
52         // Randomly chosen from all other formats defined in this enum.
53         PayloadType_RANDOM PayloadType = 2
54 )
55
56 var PayloadType_name = map[int32]string{
57         0: "COMPRESSABLE",
58         1: "UNCOMPRESSABLE",
59         2: "RANDOM",
60 }
61 var PayloadType_value = map[string]int32{
62         "COMPRESSABLE":   0,
63         "UNCOMPRESSABLE": 1,
64         "RANDOM":         2,
65 }
66
67 func (x PayloadType) String() string {
68         return proto.EnumName(PayloadType_name, int32(x))
69 }
70 func (PayloadType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
71
72 type Empty struct {
73 }
74
75 func (m *Empty) Reset()                    { *m = Empty{} }
76 func (m *Empty) String() string            { return proto.CompactTextString(m) }
77 func (*Empty) ProtoMessage()               {}
78 func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
79
80 // A block of data, to simply increase gRPC message size.
81 type Payload struct {
82         // The type of data in body.
83         Type PayloadType `protobuf:"varint,1,opt,name=type,enum=grpc.testing.PayloadType" json:"type,omitempty"`
84         // Primary contents of payload.
85         Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
86 }
87
88 func (m *Payload) Reset()                    { *m = Payload{} }
89 func (m *Payload) String() string            { return proto.CompactTextString(m) }
90 func (*Payload) ProtoMessage()               {}
91 func (*Payload) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
92
93 func (m *Payload) GetType() PayloadType {
94         if m != nil {
95                 return m.Type
96         }
97         return PayloadType_COMPRESSABLE
98 }
99
100 func (m *Payload) GetBody() []byte {
101         if m != nil {
102                 return m.Body
103         }
104         return nil
105 }
106
107 // A protobuf representation for grpc status. This is used by test
108 // clients to specify a status that the server should attempt to return.
109 type EchoStatus struct {
110         Code    int32  `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
111         Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
112 }
113
114 func (m *EchoStatus) Reset()                    { *m = EchoStatus{} }
115 func (m *EchoStatus) String() string            { return proto.CompactTextString(m) }
116 func (*EchoStatus) ProtoMessage()               {}
117 func (*EchoStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
118
119 func (m *EchoStatus) GetCode() int32 {
120         if m != nil {
121                 return m.Code
122         }
123         return 0
124 }
125
126 func (m *EchoStatus) GetMessage() string {
127         if m != nil {
128                 return m.Message
129         }
130         return ""
131 }
132
133 // Unary request.
134 type SimpleRequest struct {
135         // Desired payload type in the response from the server.
136         // If response_type is RANDOM, server randomly chooses one from other formats.
137         ResponseType PayloadType `protobuf:"varint,1,opt,name=response_type,json=responseType,enum=grpc.testing.PayloadType" json:"response_type,omitempty"`
138         // Desired payload size in the response from the server.
139         // If response_type is COMPRESSABLE, this denotes the size before compression.
140         ResponseSize int32 `protobuf:"varint,2,opt,name=response_size,json=responseSize" json:"response_size,omitempty"`
141         // Optional input payload sent along with the request.
142         Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
143         // Whether SimpleResponse should include username.
144         FillUsername bool `protobuf:"varint,4,opt,name=fill_username,json=fillUsername" json:"fill_username,omitempty"`
145         // Whether SimpleResponse should include OAuth scope.
146         FillOauthScope bool `protobuf:"varint,5,opt,name=fill_oauth_scope,json=fillOauthScope" json:"fill_oauth_scope,omitempty"`
147         // Whether server should return a given status
148         ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus" json:"response_status,omitempty"`
149 }
150
151 func (m *SimpleRequest) Reset()                    { *m = SimpleRequest{} }
152 func (m *SimpleRequest) String() string            { return proto.CompactTextString(m) }
153 func (*SimpleRequest) ProtoMessage()               {}
154 func (*SimpleRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
155
156 func (m *SimpleRequest) GetResponseType() PayloadType {
157         if m != nil {
158                 return m.ResponseType
159         }
160         return PayloadType_COMPRESSABLE
161 }
162
163 func (m *SimpleRequest) GetResponseSize() int32 {
164         if m != nil {
165                 return m.ResponseSize
166         }
167         return 0
168 }
169
170 func (m *SimpleRequest) GetPayload() *Payload {
171         if m != nil {
172                 return m.Payload
173         }
174         return nil
175 }
176
177 func (m *SimpleRequest) GetFillUsername() bool {
178         if m != nil {
179                 return m.FillUsername
180         }
181         return false
182 }
183
184 func (m *SimpleRequest) GetFillOauthScope() bool {
185         if m != nil {
186                 return m.FillOauthScope
187         }
188         return false
189 }
190
191 func (m *SimpleRequest) GetResponseStatus() *EchoStatus {
192         if m != nil {
193                 return m.ResponseStatus
194         }
195         return nil
196 }
197
198 // Unary response, as configured by the request.
199 type SimpleResponse struct {
200         // Payload to increase message size.
201         Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
202         // The user the request came from, for verifying authentication was
203         // successful when the client expected it.
204         Username string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
205         // OAuth scope.
206         OauthScope string `protobuf:"bytes,3,opt,name=oauth_scope,json=oauthScope" json:"oauth_scope,omitempty"`
207 }
208
209 func (m *SimpleResponse) Reset()                    { *m = SimpleResponse{} }
210 func (m *SimpleResponse) String() string            { return proto.CompactTextString(m) }
211 func (*SimpleResponse) ProtoMessage()               {}
212 func (*SimpleResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
213
214 func (m *SimpleResponse) GetPayload() *Payload {
215         if m != nil {
216                 return m.Payload
217         }
218         return nil
219 }
220
221 func (m *SimpleResponse) GetUsername() string {
222         if m != nil {
223                 return m.Username
224         }
225         return ""
226 }
227
228 func (m *SimpleResponse) GetOauthScope() string {
229         if m != nil {
230                 return m.OauthScope
231         }
232         return ""
233 }
234
235 // Client-streaming request.
236 type StreamingInputCallRequest struct {
237         // Optional input payload sent along with the request.
238         Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
239 }
240
241 func (m *StreamingInputCallRequest) Reset()                    { *m = StreamingInputCallRequest{} }
242 func (m *StreamingInputCallRequest) String() string            { return proto.CompactTextString(m) }
243 func (*StreamingInputCallRequest) ProtoMessage()               {}
244 func (*StreamingInputCallRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
245
246 func (m *StreamingInputCallRequest) GetPayload() *Payload {
247         if m != nil {
248                 return m.Payload
249         }
250         return nil
251 }
252
253 // Client-streaming response.
254 type StreamingInputCallResponse struct {
255         // Aggregated size of payloads received from the client.
256         AggregatedPayloadSize int32 `protobuf:"varint,1,opt,name=aggregated_payload_size,json=aggregatedPayloadSize" json:"aggregated_payload_size,omitempty"`
257 }
258
259 func (m *StreamingInputCallResponse) Reset()                    { *m = StreamingInputCallResponse{} }
260 func (m *StreamingInputCallResponse) String() string            { return proto.CompactTextString(m) }
261 func (*StreamingInputCallResponse) ProtoMessage()               {}
262 func (*StreamingInputCallResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
263
264 func (m *StreamingInputCallResponse) GetAggregatedPayloadSize() int32 {
265         if m != nil {
266                 return m.AggregatedPayloadSize
267         }
268         return 0
269 }
270
271 // Configuration for a particular response.
272 type ResponseParameters struct {
273         // Desired payload sizes in responses from the server.
274         // If response_type is COMPRESSABLE, this denotes the size before compression.
275         Size int32 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"`
276         // Desired interval between consecutive responses in the response stream in
277         // microseconds.
278         IntervalUs int32 `protobuf:"varint,2,opt,name=interval_us,json=intervalUs" json:"interval_us,omitempty"`
279 }
280
281 func (m *ResponseParameters) Reset()                    { *m = ResponseParameters{} }
282 func (m *ResponseParameters) String() string            { return proto.CompactTextString(m) }
283 func (*ResponseParameters) ProtoMessage()               {}
284 func (*ResponseParameters) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
285
286 func (m *ResponseParameters) GetSize() int32 {
287         if m != nil {
288                 return m.Size
289         }
290         return 0
291 }
292
293 func (m *ResponseParameters) GetIntervalUs() int32 {
294         if m != nil {
295                 return m.IntervalUs
296         }
297         return 0
298 }
299
300 // Server-streaming request.
301 type StreamingOutputCallRequest struct {
302         // Desired payload type in the response from the server.
303         // If response_type is RANDOM, the payload from each response in the stream
304         // might be of different types. This is to simulate a mixed type of payload
305         // stream.
306         ResponseType PayloadType `protobuf:"varint,1,opt,name=response_type,json=responseType,enum=grpc.testing.PayloadType" json:"response_type,omitempty"`
307         // Configuration for each expected response message.
308         ResponseParameters []*ResponseParameters `protobuf:"bytes,2,rep,name=response_parameters,json=responseParameters" json:"response_parameters,omitempty"`
309         // Optional input payload sent along with the request.
310         Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
311         // Whether server should return a given status
312         ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus" json:"response_status,omitempty"`
313 }
314
315 func (m *StreamingOutputCallRequest) Reset()                    { *m = StreamingOutputCallRequest{} }
316 func (m *StreamingOutputCallRequest) String() string            { return proto.CompactTextString(m) }
317 func (*StreamingOutputCallRequest) ProtoMessage()               {}
318 func (*StreamingOutputCallRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
319
320 func (m *StreamingOutputCallRequest) GetResponseType() PayloadType {
321         if m != nil {
322                 return m.ResponseType
323         }
324         return PayloadType_COMPRESSABLE
325 }
326
327 func (m *StreamingOutputCallRequest) GetResponseParameters() []*ResponseParameters {
328         if m != nil {
329                 return m.ResponseParameters
330         }
331         return nil
332 }
333
334 func (m *StreamingOutputCallRequest) GetPayload() *Payload {
335         if m != nil {
336                 return m.Payload
337         }
338         return nil
339 }
340
341 func (m *StreamingOutputCallRequest) GetResponseStatus() *EchoStatus {
342         if m != nil {
343                 return m.ResponseStatus
344         }
345         return nil
346 }
347
348 // Server-streaming response, as configured by the request and parameters.
349 type StreamingOutputCallResponse struct {
350         // Payload to increase response size.
351         Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
352 }
353
354 func (m *StreamingOutputCallResponse) Reset()                    { *m = StreamingOutputCallResponse{} }
355 func (m *StreamingOutputCallResponse) String() string            { return proto.CompactTextString(m) }
356 func (*StreamingOutputCallResponse) ProtoMessage()               {}
357 func (*StreamingOutputCallResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
358
359 func (m *StreamingOutputCallResponse) GetPayload() *Payload {
360         if m != nil {
361                 return m.Payload
362         }
363         return nil
364 }
365
366 func init() {
367         proto.RegisterType((*Empty)(nil), "grpc.testing.Empty")
368         proto.RegisterType((*Payload)(nil), "grpc.testing.Payload")
369         proto.RegisterType((*EchoStatus)(nil), "grpc.testing.EchoStatus")
370         proto.RegisterType((*SimpleRequest)(nil), "grpc.testing.SimpleRequest")
371         proto.RegisterType((*SimpleResponse)(nil), "grpc.testing.SimpleResponse")
372         proto.RegisterType((*StreamingInputCallRequest)(nil), "grpc.testing.StreamingInputCallRequest")
373         proto.RegisterType((*StreamingInputCallResponse)(nil), "grpc.testing.StreamingInputCallResponse")
374         proto.RegisterType((*ResponseParameters)(nil), "grpc.testing.ResponseParameters")
375         proto.RegisterType((*StreamingOutputCallRequest)(nil), "grpc.testing.StreamingOutputCallRequest")
376         proto.RegisterType((*StreamingOutputCallResponse)(nil), "grpc.testing.StreamingOutputCallResponse")
377         proto.RegisterEnum("grpc.testing.PayloadType", PayloadType_name, PayloadType_value)
378 }
379
380 // Reference imports to suppress errors if they are not otherwise used.
381 var _ context.Context
382 var _ grpc.ClientConn
383
384 // This is a compile-time assertion to ensure that this generated file
385 // is compatible with the grpc package it is being compiled against.
386 const _ = grpc.SupportPackageIsVersion4
387
388 // Client API for TestService service
389
390 type TestServiceClient interface {
391         // One empty request followed by one empty response.
392         EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
393         // One request followed by one response.
394         // The server returns the client payload as-is.
395         UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
396         // One request followed by a sequence of responses (streamed download).
397         // The server returns the payload with client desired type and sizes.
398         StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error)
399         // A sequence of requests followed by one response (streamed upload).
400         // The server returns the aggregated size of client payload as the result.
401         StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error)
402         // A sequence of requests with each request served by the server immediately.
403         // As one request could lead to multiple responses, this interface
404         // demonstrates the idea of full duplexing.
405         FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error)
406         // A sequence of requests followed by a sequence of responses.
407         // The server buffers all the client requests and then serves them in order. A
408         // stream of responses are returned to the client when the server starts with
409         // first request.
410         HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error)
411 }
412
413 type testServiceClient struct {
414         cc *grpc.ClientConn
415 }
416
417 func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient {
418         return &testServiceClient{cc}
419 }
420
421 func (c *testServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
422         out := new(Empty)
423         err := grpc.Invoke(ctx, "/grpc.testing.TestService/EmptyCall", in, out, c.cc, opts...)
424         if err != nil {
425                 return nil, err
426         }
427         return out, nil
428 }
429
430 func (c *testServiceClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
431         out := new(SimpleResponse)
432         err := grpc.Invoke(ctx, "/grpc.testing.TestService/UnaryCall", in, out, c.cc, opts...)
433         if err != nil {
434                 return nil, err
435         }
436         return out, nil
437 }
438
439 func (c *testServiceClient) StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error) {
440         stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[0], c.cc, "/grpc.testing.TestService/StreamingOutputCall", opts...)
441         if err != nil {
442                 return nil, err
443         }
444         x := &testServiceStreamingOutputCallClient{stream}
445         if err := x.ClientStream.SendMsg(in); err != nil {
446                 return nil, err
447         }
448         if err := x.ClientStream.CloseSend(); err != nil {
449                 return nil, err
450         }
451         return x, nil
452 }
453
454 type TestService_StreamingOutputCallClient interface {
455         Recv() (*StreamingOutputCallResponse, error)
456         grpc.ClientStream
457 }
458
459 type testServiceStreamingOutputCallClient struct {
460         grpc.ClientStream
461 }
462
463 func (x *testServiceStreamingOutputCallClient) Recv() (*StreamingOutputCallResponse, error) {
464         m := new(StreamingOutputCallResponse)
465         if err := x.ClientStream.RecvMsg(m); err != nil {
466                 return nil, err
467         }
468         return m, nil
469 }
470
471 func (c *testServiceClient) StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error) {
472         stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[1], c.cc, "/grpc.testing.TestService/StreamingInputCall", opts...)
473         if err != nil {
474                 return nil, err
475         }
476         x := &testServiceStreamingInputCallClient{stream}
477         return x, nil
478 }
479
480 type TestService_StreamingInputCallClient interface {
481         Send(*StreamingInputCallRequest) error
482         CloseAndRecv() (*StreamingInputCallResponse, error)
483         grpc.ClientStream
484 }
485
486 type testServiceStreamingInputCallClient struct {
487         grpc.ClientStream
488 }
489
490 func (x *testServiceStreamingInputCallClient) Send(m *StreamingInputCallRequest) error {
491         return x.ClientStream.SendMsg(m)
492 }
493
494 func (x *testServiceStreamingInputCallClient) CloseAndRecv() (*StreamingInputCallResponse, error) {
495         if err := x.ClientStream.CloseSend(); err != nil {
496                 return nil, err
497         }
498         m := new(StreamingInputCallResponse)
499         if err := x.ClientStream.RecvMsg(m); err != nil {
500                 return nil, err
501         }
502         return m, nil
503 }
504
505 func (c *testServiceClient) FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error) {
506         stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[2], c.cc, "/grpc.testing.TestService/FullDuplexCall", opts...)
507         if err != nil {
508                 return nil, err
509         }
510         x := &testServiceFullDuplexCallClient{stream}
511         return x, nil
512 }
513
514 type TestService_FullDuplexCallClient interface {
515         Send(*StreamingOutputCallRequest) error
516         Recv() (*StreamingOutputCallResponse, error)
517         grpc.ClientStream
518 }
519
520 type testServiceFullDuplexCallClient struct {
521         grpc.ClientStream
522 }
523
524 func (x *testServiceFullDuplexCallClient) Send(m *StreamingOutputCallRequest) error {
525         return x.ClientStream.SendMsg(m)
526 }
527
528 func (x *testServiceFullDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) {
529         m := new(StreamingOutputCallResponse)
530         if err := x.ClientStream.RecvMsg(m); err != nil {
531                 return nil, err
532         }
533         return m, nil
534 }
535
536 func (c *testServiceClient) HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error) {
537         stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[3], c.cc, "/grpc.testing.TestService/HalfDuplexCall", opts...)
538         if err != nil {
539                 return nil, err
540         }
541         x := &testServiceHalfDuplexCallClient{stream}
542         return x, nil
543 }
544
545 type TestService_HalfDuplexCallClient interface {
546         Send(*StreamingOutputCallRequest) error
547         Recv() (*StreamingOutputCallResponse, error)
548         grpc.ClientStream
549 }
550
551 type testServiceHalfDuplexCallClient struct {
552         grpc.ClientStream
553 }
554
555 func (x *testServiceHalfDuplexCallClient) Send(m *StreamingOutputCallRequest) error {
556         return x.ClientStream.SendMsg(m)
557 }
558
559 func (x *testServiceHalfDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) {
560         m := new(StreamingOutputCallResponse)
561         if err := x.ClientStream.RecvMsg(m); err != nil {
562                 return nil, err
563         }
564         return m, nil
565 }
566
567 // Server API for TestService service
568
569 type TestServiceServer interface {
570         // One empty request followed by one empty response.
571         EmptyCall(context.Context, *Empty) (*Empty, error)
572         // One request followed by one response.
573         // The server returns the client payload as-is.
574         UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
575         // One request followed by a sequence of responses (streamed download).
576         // The server returns the payload with client desired type and sizes.
577         StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error
578         // A sequence of requests followed by one response (streamed upload).
579         // The server returns the aggregated size of client payload as the result.
580         StreamingInputCall(TestService_StreamingInputCallServer) error
581         // A sequence of requests with each request served by the server immediately.
582         // As one request could lead to multiple responses, this interface
583         // demonstrates the idea of full duplexing.
584         FullDuplexCall(TestService_FullDuplexCallServer) error
585         // A sequence of requests followed by a sequence of responses.
586         // The server buffers all the client requests and then serves them in order. A
587         // stream of responses are returned to the client when the server starts with
588         // first request.
589         HalfDuplexCall(TestService_HalfDuplexCallServer) error
590 }
591
592 func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer) {
593         s.RegisterService(&_TestService_serviceDesc, srv)
594 }
595
596 func _TestService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
597         in := new(Empty)
598         if err := dec(in); err != nil {
599                 return nil, err
600         }
601         if interceptor == nil {
602                 return srv.(TestServiceServer).EmptyCall(ctx, in)
603         }
604         info := &grpc.UnaryServerInfo{
605                 Server:     srv,
606                 FullMethod: "/grpc.testing.TestService/EmptyCall",
607         }
608         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
609                 return srv.(TestServiceServer).EmptyCall(ctx, req.(*Empty))
610         }
611         return interceptor(ctx, in, info, handler)
612 }
613
614 func _TestService_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
615         in := new(SimpleRequest)
616         if err := dec(in); err != nil {
617                 return nil, err
618         }
619         if interceptor == nil {
620                 return srv.(TestServiceServer).UnaryCall(ctx, in)
621         }
622         info := &grpc.UnaryServerInfo{
623                 Server:     srv,
624                 FullMethod: "/grpc.testing.TestService/UnaryCall",
625         }
626         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
627                 return srv.(TestServiceServer).UnaryCall(ctx, req.(*SimpleRequest))
628         }
629         return interceptor(ctx, in, info, handler)
630 }
631
632 func _TestService_StreamingOutputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
633         m := new(StreamingOutputCallRequest)
634         if err := stream.RecvMsg(m); err != nil {
635                 return err
636         }
637         return srv.(TestServiceServer).StreamingOutputCall(m, &testServiceStreamingOutputCallServer{stream})
638 }
639
640 type TestService_StreamingOutputCallServer interface {
641         Send(*StreamingOutputCallResponse) error
642         grpc.ServerStream
643 }
644
645 type testServiceStreamingOutputCallServer struct {
646         grpc.ServerStream
647 }
648
649 func (x *testServiceStreamingOutputCallServer) Send(m *StreamingOutputCallResponse) error {
650         return x.ServerStream.SendMsg(m)
651 }
652
653 func _TestService_StreamingInputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
654         return srv.(TestServiceServer).StreamingInputCall(&testServiceStreamingInputCallServer{stream})
655 }
656
657 type TestService_StreamingInputCallServer interface {
658         SendAndClose(*StreamingInputCallResponse) error
659         Recv() (*StreamingInputCallRequest, error)
660         grpc.ServerStream
661 }
662
663 type testServiceStreamingInputCallServer struct {
664         grpc.ServerStream
665 }
666
667 func (x *testServiceStreamingInputCallServer) SendAndClose(m *StreamingInputCallResponse) error {
668         return x.ServerStream.SendMsg(m)
669 }
670
671 func (x *testServiceStreamingInputCallServer) Recv() (*StreamingInputCallRequest, error) {
672         m := new(StreamingInputCallRequest)
673         if err := x.ServerStream.RecvMsg(m); err != nil {
674                 return nil, err
675         }
676         return m, nil
677 }
678
679 func _TestService_FullDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
680         return srv.(TestServiceServer).FullDuplexCall(&testServiceFullDuplexCallServer{stream})
681 }
682
683 type TestService_FullDuplexCallServer interface {
684         Send(*StreamingOutputCallResponse) error
685         Recv() (*StreamingOutputCallRequest, error)
686         grpc.ServerStream
687 }
688
689 type testServiceFullDuplexCallServer struct {
690         grpc.ServerStream
691 }
692
693 func (x *testServiceFullDuplexCallServer) Send(m *StreamingOutputCallResponse) error {
694         return x.ServerStream.SendMsg(m)
695 }
696
697 func (x *testServiceFullDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) {
698         m := new(StreamingOutputCallRequest)
699         if err := x.ServerStream.RecvMsg(m); err != nil {
700                 return nil, err
701         }
702         return m, nil
703 }
704
705 func _TestService_HalfDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
706         return srv.(TestServiceServer).HalfDuplexCall(&testServiceHalfDuplexCallServer{stream})
707 }
708
709 type TestService_HalfDuplexCallServer interface {
710         Send(*StreamingOutputCallResponse) error
711         Recv() (*StreamingOutputCallRequest, error)
712         grpc.ServerStream
713 }
714
715 type testServiceHalfDuplexCallServer struct {
716         grpc.ServerStream
717 }
718
719 func (x *testServiceHalfDuplexCallServer) Send(m *StreamingOutputCallResponse) error {
720         return x.ServerStream.SendMsg(m)
721 }
722
723 func (x *testServiceHalfDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) {
724         m := new(StreamingOutputCallRequest)
725         if err := x.ServerStream.RecvMsg(m); err != nil {
726                 return nil, err
727         }
728         return m, nil
729 }
730
731 var _TestService_serviceDesc = grpc.ServiceDesc{
732         ServiceName: "grpc.testing.TestService",
733         HandlerType: (*TestServiceServer)(nil),
734         Methods: []grpc.MethodDesc{
735                 {
736                         MethodName: "EmptyCall",
737                         Handler:    _TestService_EmptyCall_Handler,
738                 },
739                 {
740                         MethodName: "UnaryCall",
741                         Handler:    _TestService_UnaryCall_Handler,
742                 },
743         },
744         Streams: []grpc.StreamDesc{
745                 {
746                         StreamName:    "StreamingOutputCall",
747                         Handler:       _TestService_StreamingOutputCall_Handler,
748                         ServerStreams: true,
749                 },
750                 {
751                         StreamName:    "StreamingInputCall",
752                         Handler:       _TestService_StreamingInputCall_Handler,
753                         ClientStreams: true,
754                 },
755                 {
756                         StreamName:    "FullDuplexCall",
757                         Handler:       _TestService_FullDuplexCall_Handler,
758                         ServerStreams: true,
759                         ClientStreams: true,
760                 },
761                 {
762                         StreamName:    "HalfDuplexCall",
763                         Handler:       _TestService_HalfDuplexCall_Handler,
764                         ServerStreams: true,
765                         ClientStreams: true,
766                 },
767         },
768         Metadata: "grpc_testing/test.proto",
769 }
770
771 // Client API for UnimplementedService service
772
773 type UnimplementedServiceClient interface {
774         // A call that no server should implement
775         UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
776 }
777
778 type unimplementedServiceClient struct {
779         cc *grpc.ClientConn
780 }
781
782 func NewUnimplementedServiceClient(cc *grpc.ClientConn) UnimplementedServiceClient {
783         return &unimplementedServiceClient{cc}
784 }
785
786 func (c *unimplementedServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
787         out := new(Empty)
788         err := grpc.Invoke(ctx, "/grpc.testing.UnimplementedService/UnimplementedCall", in, out, c.cc, opts...)
789         if err != nil {
790                 return nil, err
791         }
792         return out, nil
793 }
794
795 // Server API for UnimplementedService service
796
797 type UnimplementedServiceServer interface {
798         // A call that no server should implement
799         UnimplementedCall(context.Context, *Empty) (*Empty, error)
800 }
801
802 func RegisterUnimplementedServiceServer(s *grpc.Server, srv UnimplementedServiceServer) {
803         s.RegisterService(&_UnimplementedService_serviceDesc, srv)
804 }
805
806 func _UnimplementedService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
807         in := new(Empty)
808         if err := dec(in); err != nil {
809                 return nil, err
810         }
811         if interceptor == nil {
812                 return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, in)
813         }
814         info := &grpc.UnaryServerInfo{
815                 Server:     srv,
816                 FullMethod: "/grpc.testing.UnimplementedService/UnimplementedCall",
817         }
818         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
819                 return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, req.(*Empty))
820         }
821         return interceptor(ctx, in, info, handler)
822 }
823
824 var _UnimplementedService_serviceDesc = grpc.ServiceDesc{
825         ServiceName: "grpc.testing.UnimplementedService",
826         HandlerType: (*UnimplementedServiceServer)(nil),
827         Methods: []grpc.MethodDesc{
828                 {
829                         MethodName: "UnimplementedCall",
830                         Handler:    _UnimplementedService_UnimplementedCall_Handler,
831                 },
832         },
833         Streams:  []grpc.StreamDesc{},
834         Metadata: "grpc_testing/test.proto",
835 }
836
837 func init() { proto.RegisterFile("grpc_testing/test.proto", fileDescriptor0) }
838
839 var fileDescriptor0 = []byte{
840         // 664 bytes of a gzipped FileDescriptorProto
841         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xdd, 0x6e, 0xd3, 0x4c,
842         0x10, 0xfd, 0x9c, 0x26, 0x4d, 0x3b, 0x49, 0xfd, 0x85, 0x2d, 0x55, 0xdd, 0x14, 0x89, 0xc8, 0x5c,
843         0x60, 0x90, 0x48, 0x51, 0x10, 0x5c, 0x20, 0x01, 0x2a, 0x6d, 0x2a, 0x2a, 0xb5, 0x4d, 0xb1, 0x9b,
844         0xeb, 0x68, 0x9b, 0x4c, 0x5d, 0x4b, 0xfe, 0xc3, 0xbb, 0xae, 0x48, 0x2f, 0x78, 0x19, 0x1e, 0x82,
845         0x0b, 0x5e, 0x0e, 0xed, 0xda, 0x4e, 0x9c, 0xd4, 0x15, 0x0d, 0x7f, 0x57, 0xf1, 0x9e, 0x39, 0x33,
846         0x3b, 0x67, 0xe6, 0xd8, 0x81, 0x4d, 0x3b, 0x0a, 0x87, 0x03, 0x8e, 0x8c, 0x3b, 0xbe, 0xbd, 0x23,
847         0x7e, 0xdb, 0x61, 0x14, 0xf0, 0x80, 0xd4, 0x45, 0xa0, 0x9d, 0x06, 0xf4, 0x2a, 0x54, 0xba, 0x5e,
848         0xc8, 0xc7, 0xfa, 0x11, 0x54, 0x4f, 0xe9, 0xd8, 0x0d, 0xe8, 0x88, 0x3c, 0x83, 0x32, 0x1f, 0x87,
849         0xa8, 0x29, 0x2d, 0xc5, 0x50, 0x3b, 0x5b, 0xed, 0x7c, 0x42, 0x3b, 0x25, 0x9d, 0x8d, 0x43, 0x34,
850         0x25, 0x8d, 0x10, 0x28, 0x9f, 0x07, 0xa3, 0xb1, 0x56, 0x6a, 0x29, 0x46, 0xdd, 0x94, 0xcf, 0xfa,
851         0x6b, 0x80, 0xee, 0xf0, 0x32, 0xb0, 0x38, 0xe5, 0x31, 0x13, 0x8c, 0x61, 0x30, 0x4a, 0x0a, 0x56,
852         0x4c, 0xf9, 0x4c, 0x34, 0xa8, 0x7a, 0xc8, 0x18, 0xb5, 0x51, 0x26, 0xae, 0x9a, 0xd9, 0x51, 0xff,
853         0x56, 0x82, 0x35, 0xcb, 0xf1, 0x42, 0x17, 0x4d, 0xfc, 0x14, 0x23, 0xe3, 0xe4, 0x2d, 0xac, 0x45,
854         0xc8, 0xc2, 0xc0, 0x67, 0x38, 0xb8, 0x5b, 0x67, 0xf5, 0x8c, 0x2f, 0x4e, 0xe4, 0x51, 0x2e, 0x9f,
855         0x39, 0xd7, 0xc9, 0x8d, 0x95, 0x29, 0xc9, 0x72, 0xae, 0x91, 0xec, 0x40, 0x35, 0x4c, 0x2a, 0x68,
856         0x4b, 0x2d, 0xc5, 0xa8, 0x75, 0x36, 0x0a, 0xcb, 0x9b, 0x19, 0x4b, 0x54, 0xbd, 0x70, 0x5c, 0x77,
857         0x10, 0x33, 0x8c, 0x7c, 0xea, 0xa1, 0x56, 0x6e, 0x29, 0xc6, 0x8a, 0x59, 0x17, 0x60, 0x3f, 0xc5,
858         0x88, 0x01, 0x0d, 0x49, 0x0a, 0x68, 0xcc, 0x2f, 0x07, 0x6c, 0x18, 0x84, 0xa8, 0x55, 0x24, 0x4f,
859         0x15, 0x78, 0x4f, 0xc0, 0x96, 0x40, 0xc9, 0x2e, 0xfc, 0x3f, 0x6d, 0x52, 0xce, 0x4d, 0xab, 0xca,
860         0x3e, 0xb4, 0xd9, 0x3e, 0xa6, 0x73, 0x35, 0xd5, 0x89, 0x00, 0x79, 0xd6, 0xbf, 0x80, 0x9a, 0x0d,
861         0x2e, 0xc1, 0xf3, 0xa2, 0x94, 0x3b, 0x89, 0x6a, 0xc2, 0xca, 0x44, 0x4f, 0xb2, 0x97, 0xc9, 0x99,
862         0x3c, 0x84, 0x5a, 0x5e, 0xc6, 0x92, 0x0c, 0x43, 0x30, 0x91, 0xa0, 0x1f, 0xc1, 0x96, 0xc5, 0x23,
863         0xa4, 0x9e, 0xe3, 0xdb, 0x87, 0x7e, 0x18, 0xf3, 0x3d, 0xea, 0xba, 0xd9, 0x12, 0x17, 0x6d, 0x45,
864         0x3f, 0x83, 0x66, 0x51, 0xb5, 0x54, 0xd9, 0x2b, 0xd8, 0xa4, 0xb6, 0x1d, 0xa1, 0x4d, 0x39, 0x8e,
865         0x06, 0x69, 0x4e, 0xb2, 0xdd, 0xc4, 0x66, 0x1b, 0xd3, 0x70, 0x5a, 0x5a, 0xac, 0x59, 0x3f, 0x04,
866         0x92, 0xd5, 0x38, 0xa5, 0x11, 0xf5, 0x90, 0x63, 0x24, 0x1d, 0x9a, 0x4b, 0x95, 0xcf, 0x42, 0xae,
867         0xe3, 0x73, 0x8c, 0xae, 0xa8, 0xd8, 0x71, 0xea, 0x19, 0xc8, 0xa0, 0x3e, 0xd3, 0xbf, 0x96, 0x72,
868         0x1d, 0xf6, 0x62, 0x3e, 0x27, 0xf8, 0x77, 0x5d, 0xfb, 0x11, 0xd6, 0x27, 0xf9, 0xe1, 0xa4, 0x55,
869         0xad, 0xd4, 0x5a, 0x32, 0x6a, 0x9d, 0xd6, 0x6c, 0x95, 0x9b, 0x92, 0x4c, 0x12, 0xdd, 0x94, 0xb9,
870         0xb0, 0xc7, 0xff, 0x80, 0x29, 0x4f, 0x60, 0xbb, 0x70, 0x48, 0xbf, 0xe8, 0xd0, 0xa7, 0xef, 0xa0,
871         0x96, 0x9b, 0x19, 0x69, 0x40, 0x7d, 0xaf, 0x77, 0x7c, 0x6a, 0x76, 0x2d, 0x6b, 0xf7, 0xfd, 0x51,
872         0xb7, 0xf1, 0x1f, 0x21, 0xa0, 0xf6, 0x4f, 0x66, 0x30, 0x85, 0x00, 0x2c, 0x9b, 0xbb, 0x27, 0xfb,
873         0xbd, 0xe3, 0x46, 0xa9, 0xf3, 0xbd, 0x0c, 0xb5, 0x33, 0x64, 0xdc, 0xc2, 0xe8, 0xca, 0x19, 0x22,
874         0x79, 0x09, 0xab, 0xf2, 0x13, 0x28, 0xda, 0x22, 0xeb, 0x73, 0xba, 0x44, 0xa0, 0x59, 0x04, 0x92,
875         0x03, 0x58, 0xed, 0xfb, 0x34, 0x4a, 0xd2, 0xb6, 0x67, 0x19, 0x33, 0x9f, 0xaf, 0xe6, 0x83, 0xe2,
876         0x60, 0x3a, 0x00, 0x17, 0xd6, 0x0b, 0xe6, 0x43, 0x8c, 0xb9, 0xa4, 0x5b, 0x7d, 0xd6, 0x7c, 0x72,
877         0x07, 0x66, 0x72, 0xd7, 0x73, 0x85, 0x38, 0x40, 0x6e, 0xbe, 0x54, 0xe4, 0xf1, 0x2d, 0x25, 0xe6,
878         0x5f, 0xe2, 0xa6, 0xf1, 0x73, 0x62, 0x72, 0x95, 0x21, 0xae, 0x52, 0x0f, 0x62, 0xd7, 0xdd, 0x8f,
879         0x43, 0x17, 0x3f, 0xff, 0x35, 0x4d, 0x86, 0x22, 0x55, 0xa9, 0x1f, 0xa8, 0x7b, 0xf1, 0x0f, 0xae,
880         0xea, 0xf4, 0xe1, 0x7e, 0xdf, 0x97, 0x1b, 0xf4, 0xd0, 0xe7, 0x38, 0xca, 0x5c, 0xf4, 0x06, 0xee,
881         0xcd, 0xe0, 0x8b, 0xb9, 0xe9, 0x7c, 0x59, 0xfe, 0x39, 0xbf, 0xf8, 0x11, 0x00, 0x00, 0xff, 0xff,
882         0x87, 0xd4, 0xf3, 0x98, 0xb7, 0x07, 0x00, 0x00,
883 }