1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: test.proto
3
4package grpctest
5
6import proto "github.com/golang/protobuf/proto"
7import fmt "fmt"
8import math "math"
9import empty "github.com/golang/protobuf/ptypes/empty"
10
11import (
12	context "golang.org/x/net/context"
13	grpc "google.golang.org/grpc"
14)
15
16// Reference imports to suppress errors if they are not otherwise used.
17var _ = proto.Marshal
18var _ = fmt.Errorf
19var _ = math.Inf
20
21// This is a compile-time assertion to ensure that this generated file
22// is compatible with the proto package it is being compiled against.
23// A compilation error at this line likely means your copy of the
24// proto package needs to be updated.
25const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
26
27type TestRequest struct {
28	Input                int32    `protobuf:"varint,1,opt,name=Input,proto3" json:"Input,omitempty"`
29	XXX_NoUnkeyedLiteral struct{} `json:"-"`
30	XXX_unrecognized     []byte   `json:"-"`
31	XXX_sizecache        int32    `json:"-"`
32}
33
34func (m *TestRequest) Reset()         { *m = TestRequest{} }
35func (m *TestRequest) String() string { return proto.CompactTextString(m) }
36func (*TestRequest) ProtoMessage()    {}
37func (*TestRequest) Descriptor() ([]byte, []int) {
38	return fileDescriptor_test_ed149f2304c9fa82, []int{0}
39}
40func (m *TestRequest) XXX_Unmarshal(b []byte) error {
41	return xxx_messageInfo_TestRequest.Unmarshal(m, b)
42}
43func (m *TestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
44	return xxx_messageInfo_TestRequest.Marshal(b, m, deterministic)
45}
46func (dst *TestRequest) XXX_Merge(src proto.Message) {
47	xxx_messageInfo_TestRequest.Merge(dst, src)
48}
49func (m *TestRequest) XXX_Size() int {
50	return xxx_messageInfo_TestRequest.Size(m)
51}
52func (m *TestRequest) XXX_DiscardUnknown() {
53	xxx_messageInfo_TestRequest.DiscardUnknown(m)
54}
55
56var xxx_messageInfo_TestRequest proto.InternalMessageInfo
57
58func (m *TestRequest) GetInput() int32 {
59	if m != nil {
60		return m.Input
61	}
62	return 0
63}
64
65type TestResponse struct {
66	Output               int32    `protobuf:"varint,2,opt,name=Output,proto3" json:"Output,omitempty"`
67	XXX_NoUnkeyedLiteral struct{} `json:"-"`
68	XXX_unrecognized     []byte   `json:"-"`
69	XXX_sizecache        int32    `json:"-"`
70}
71
72func (m *TestResponse) Reset()         { *m = TestResponse{} }
73func (m *TestResponse) String() string { return proto.CompactTextString(m) }
74func (*TestResponse) ProtoMessage()    {}
75func (*TestResponse) Descriptor() ([]byte, []int) {
76	return fileDescriptor_test_ed149f2304c9fa82, []int{1}
77}
78func (m *TestResponse) XXX_Unmarshal(b []byte) error {
79	return xxx_messageInfo_TestResponse.Unmarshal(m, b)
80}
81func (m *TestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
82	return xxx_messageInfo_TestResponse.Marshal(b, m, deterministic)
83}
84func (dst *TestResponse) XXX_Merge(src proto.Message) {
85	xxx_messageInfo_TestResponse.Merge(dst, src)
86}
87func (m *TestResponse) XXX_Size() int {
88	return xxx_messageInfo_TestResponse.Size(m)
89}
90func (m *TestResponse) XXX_DiscardUnknown() {
91	xxx_messageInfo_TestResponse.DiscardUnknown(m)
92}
93
94var xxx_messageInfo_TestResponse proto.InternalMessageInfo
95
96func (m *TestResponse) GetOutput() int32 {
97	if m != nil {
98		return m.Output
99	}
100	return 0
101}
102
103type PrintKVRequest struct {
104	Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
105	// Types that are valid to be assigned to Value:
106	//	*PrintKVRequest_ValueString
107	//	*PrintKVRequest_ValueInt
108	Value                isPrintKVRequest_Value `protobuf_oneof:"Value"`
109	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
110	XXX_unrecognized     []byte                 `json:"-"`
111	XXX_sizecache        int32                  `json:"-"`
112}
113
114func (m *PrintKVRequest) Reset()         { *m = PrintKVRequest{} }
115func (m *PrintKVRequest) String() string { return proto.CompactTextString(m) }
116func (*PrintKVRequest) ProtoMessage()    {}
117func (*PrintKVRequest) Descriptor() ([]byte, []int) {
118	return fileDescriptor_test_ed149f2304c9fa82, []int{2}
119}
120func (m *PrintKVRequest) XXX_Unmarshal(b []byte) error {
121	return xxx_messageInfo_PrintKVRequest.Unmarshal(m, b)
122}
123func (m *PrintKVRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
124	return xxx_messageInfo_PrintKVRequest.Marshal(b, m, deterministic)
125}
126func (dst *PrintKVRequest) XXX_Merge(src proto.Message) {
127	xxx_messageInfo_PrintKVRequest.Merge(dst, src)
128}
129func (m *PrintKVRequest) XXX_Size() int {
130	return xxx_messageInfo_PrintKVRequest.Size(m)
131}
132func (m *PrintKVRequest) XXX_DiscardUnknown() {
133	xxx_messageInfo_PrintKVRequest.DiscardUnknown(m)
134}
135
136var xxx_messageInfo_PrintKVRequest proto.InternalMessageInfo
137
138func (m *PrintKVRequest) GetKey() string {
139	if m != nil {
140		return m.Key
141	}
142	return ""
143}
144
145type isPrintKVRequest_Value interface {
146	isPrintKVRequest_Value()
147}
148
149type PrintKVRequest_ValueString struct {
150	ValueString string `protobuf:"bytes,2,opt,name=ValueString,proto3,oneof"`
151}
152
153type PrintKVRequest_ValueInt struct {
154	ValueInt int32 `protobuf:"varint,3,opt,name=ValueInt,proto3,oneof"`
155}
156
157func (*PrintKVRequest_ValueString) isPrintKVRequest_Value() {}
158
159func (*PrintKVRequest_ValueInt) isPrintKVRequest_Value() {}
160
161func (m *PrintKVRequest) GetValue() isPrintKVRequest_Value {
162	if m != nil {
163		return m.Value
164	}
165	return nil
166}
167
168func (m *PrintKVRequest) GetValueString() string {
169	if x, ok := m.GetValue().(*PrintKVRequest_ValueString); ok {
170		return x.ValueString
171	}
172	return ""
173}
174
175func (m *PrintKVRequest) GetValueInt() int32 {
176	if x, ok := m.GetValue().(*PrintKVRequest_ValueInt); ok {
177		return x.ValueInt
178	}
179	return 0
180}
181
182// XXX_OneofFuncs is for the internal use of the proto package.
183func (*PrintKVRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
184	return _PrintKVRequest_OneofMarshaler, _PrintKVRequest_OneofUnmarshaler, _PrintKVRequest_OneofSizer, []interface{}{
185		(*PrintKVRequest_ValueString)(nil),
186		(*PrintKVRequest_ValueInt)(nil),
187	}
188}
189
190func _PrintKVRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
191	m := msg.(*PrintKVRequest)
192	// Value
193	switch x := m.Value.(type) {
194	case *PrintKVRequest_ValueString:
195		b.EncodeVarint(2<<3 | proto.WireBytes)
196		b.EncodeStringBytes(x.ValueString)
197	case *PrintKVRequest_ValueInt:
198		b.EncodeVarint(3<<3 | proto.WireVarint)
199		b.EncodeVarint(uint64(x.ValueInt))
200	case nil:
201	default:
202		return fmt.Errorf("PrintKVRequest.Value has unexpected type %T", x)
203	}
204	return nil
205}
206
207func _PrintKVRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
208	m := msg.(*PrintKVRequest)
209	switch tag {
210	case 2: // Value.ValueString
211		if wire != proto.WireBytes {
212			return true, proto.ErrInternalBadWireType
213		}
214		x, err := b.DecodeStringBytes()
215		m.Value = &PrintKVRequest_ValueString{x}
216		return true, err
217	case 3: // Value.ValueInt
218		if wire != proto.WireVarint {
219			return true, proto.ErrInternalBadWireType
220		}
221		x, err := b.DecodeVarint()
222		m.Value = &PrintKVRequest_ValueInt{int32(x)}
223		return true, err
224	default:
225		return false, nil
226	}
227}
228
229func _PrintKVRequest_OneofSizer(msg proto.Message) (n int) {
230	m := msg.(*PrintKVRequest)
231	// Value
232	switch x := m.Value.(type) {
233	case *PrintKVRequest_ValueString:
234		n += 1 // tag and wire
235		n += proto.SizeVarint(uint64(len(x.ValueString)))
236		n += len(x.ValueString)
237	case *PrintKVRequest_ValueInt:
238		n += 1 // tag and wire
239		n += proto.SizeVarint(uint64(x.ValueInt))
240	case nil:
241	default:
242		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
243	}
244	return n
245}
246
247type PrintKVResponse struct {
248	XXX_NoUnkeyedLiteral struct{} `json:"-"`
249	XXX_unrecognized     []byte   `json:"-"`
250	XXX_sizecache        int32    `json:"-"`
251}
252
253func (m *PrintKVResponse) Reset()         { *m = PrintKVResponse{} }
254func (m *PrintKVResponse) String() string { return proto.CompactTextString(m) }
255func (*PrintKVResponse) ProtoMessage()    {}
256func (*PrintKVResponse) Descriptor() ([]byte, []int) {
257	return fileDescriptor_test_ed149f2304c9fa82, []int{3}
258}
259func (m *PrintKVResponse) XXX_Unmarshal(b []byte) error {
260	return xxx_messageInfo_PrintKVResponse.Unmarshal(m, b)
261}
262func (m *PrintKVResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
263	return xxx_messageInfo_PrintKVResponse.Marshal(b, m, deterministic)
264}
265func (dst *PrintKVResponse) XXX_Merge(src proto.Message) {
266	xxx_messageInfo_PrintKVResponse.Merge(dst, src)
267}
268func (m *PrintKVResponse) XXX_Size() int {
269	return xxx_messageInfo_PrintKVResponse.Size(m)
270}
271func (m *PrintKVResponse) XXX_DiscardUnknown() {
272	xxx_messageInfo_PrintKVResponse.DiscardUnknown(m)
273}
274
275var xxx_messageInfo_PrintKVResponse proto.InternalMessageInfo
276
277type BidirectionalRequest struct {
278	Id                   uint32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
279	XXX_NoUnkeyedLiteral struct{} `json:"-"`
280	XXX_unrecognized     []byte   `json:"-"`
281	XXX_sizecache        int32    `json:"-"`
282}
283
284func (m *BidirectionalRequest) Reset()         { *m = BidirectionalRequest{} }
285func (m *BidirectionalRequest) String() string { return proto.CompactTextString(m) }
286func (*BidirectionalRequest) ProtoMessage()    {}
287func (*BidirectionalRequest) Descriptor() ([]byte, []int) {
288	return fileDescriptor_test_ed149f2304c9fa82, []int{4}
289}
290func (m *BidirectionalRequest) XXX_Unmarshal(b []byte) error {
291	return xxx_messageInfo_BidirectionalRequest.Unmarshal(m, b)
292}
293func (m *BidirectionalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
294	return xxx_messageInfo_BidirectionalRequest.Marshal(b, m, deterministic)
295}
296func (dst *BidirectionalRequest) XXX_Merge(src proto.Message) {
297	xxx_messageInfo_BidirectionalRequest.Merge(dst, src)
298}
299func (m *BidirectionalRequest) XXX_Size() int {
300	return xxx_messageInfo_BidirectionalRequest.Size(m)
301}
302func (m *BidirectionalRequest) XXX_DiscardUnknown() {
303	xxx_messageInfo_BidirectionalRequest.DiscardUnknown(m)
304}
305
306var xxx_messageInfo_BidirectionalRequest proto.InternalMessageInfo
307
308func (m *BidirectionalRequest) GetId() uint32 {
309	if m != nil {
310		return m.Id
311	}
312	return 0
313}
314
315type BidirectionalResponse struct {
316	Id                   uint32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
317	XXX_NoUnkeyedLiteral struct{} `json:"-"`
318	XXX_unrecognized     []byte   `json:"-"`
319	XXX_sizecache        int32    `json:"-"`
320}
321
322func (m *BidirectionalResponse) Reset()         { *m = BidirectionalResponse{} }
323func (m *BidirectionalResponse) String() string { return proto.CompactTextString(m) }
324func (*BidirectionalResponse) ProtoMessage()    {}
325func (*BidirectionalResponse) Descriptor() ([]byte, []int) {
326	return fileDescriptor_test_ed149f2304c9fa82, []int{5}
327}
328func (m *BidirectionalResponse) XXX_Unmarshal(b []byte) error {
329	return xxx_messageInfo_BidirectionalResponse.Unmarshal(m, b)
330}
331func (m *BidirectionalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
332	return xxx_messageInfo_BidirectionalResponse.Marshal(b, m, deterministic)
333}
334func (dst *BidirectionalResponse) XXX_Merge(src proto.Message) {
335	xxx_messageInfo_BidirectionalResponse.Merge(dst, src)
336}
337func (m *BidirectionalResponse) XXX_Size() int {
338	return xxx_messageInfo_BidirectionalResponse.Size(m)
339}
340func (m *BidirectionalResponse) XXX_DiscardUnknown() {
341	xxx_messageInfo_BidirectionalResponse.DiscardUnknown(m)
342}
343
344var xxx_messageInfo_BidirectionalResponse proto.InternalMessageInfo
345
346func (m *BidirectionalResponse) GetId() uint32 {
347	if m != nil {
348		return m.Id
349	}
350	return 0
351}
352
353type PrintStdioRequest struct {
354	Stdout               []byte   `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"`
355	Stderr               []byte   `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"`
356	XXX_NoUnkeyedLiteral struct{} `json:"-"`
357	XXX_unrecognized     []byte   `json:"-"`
358	XXX_sizecache        int32    `json:"-"`
359}
360
361func (m *PrintStdioRequest) Reset()         { *m = PrintStdioRequest{} }
362func (m *PrintStdioRequest) String() string { return proto.CompactTextString(m) }
363func (*PrintStdioRequest) ProtoMessage()    {}
364func (*PrintStdioRequest) Descriptor() ([]byte, []int) {
365	return fileDescriptor_test_ed149f2304c9fa82, []int{6}
366}
367func (m *PrintStdioRequest) XXX_Unmarshal(b []byte) error {
368	return xxx_messageInfo_PrintStdioRequest.Unmarshal(m, b)
369}
370func (m *PrintStdioRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
371	return xxx_messageInfo_PrintStdioRequest.Marshal(b, m, deterministic)
372}
373func (dst *PrintStdioRequest) XXX_Merge(src proto.Message) {
374	xxx_messageInfo_PrintStdioRequest.Merge(dst, src)
375}
376func (m *PrintStdioRequest) XXX_Size() int {
377	return xxx_messageInfo_PrintStdioRequest.Size(m)
378}
379func (m *PrintStdioRequest) XXX_DiscardUnknown() {
380	xxx_messageInfo_PrintStdioRequest.DiscardUnknown(m)
381}
382
383var xxx_messageInfo_PrintStdioRequest proto.InternalMessageInfo
384
385func (m *PrintStdioRequest) GetStdout() []byte {
386	if m != nil {
387		return m.Stdout
388	}
389	return nil
390}
391
392func (m *PrintStdioRequest) GetStderr() []byte {
393	if m != nil {
394		return m.Stderr
395	}
396	return nil
397}
398
399type PingRequest struct {
400	XXX_NoUnkeyedLiteral struct{} `json:"-"`
401	XXX_unrecognized     []byte   `json:"-"`
402	XXX_sizecache        int32    `json:"-"`
403}
404
405func (m *PingRequest) Reset()         { *m = PingRequest{} }
406func (m *PingRequest) String() string { return proto.CompactTextString(m) }
407func (*PingRequest) ProtoMessage()    {}
408func (*PingRequest) Descriptor() ([]byte, []int) {
409	return fileDescriptor_test_ed149f2304c9fa82, []int{7}
410}
411func (m *PingRequest) XXX_Unmarshal(b []byte) error {
412	return xxx_messageInfo_PingRequest.Unmarshal(m, b)
413}
414func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
415	return xxx_messageInfo_PingRequest.Marshal(b, m, deterministic)
416}
417func (dst *PingRequest) XXX_Merge(src proto.Message) {
418	xxx_messageInfo_PingRequest.Merge(dst, src)
419}
420func (m *PingRequest) XXX_Size() int {
421	return xxx_messageInfo_PingRequest.Size(m)
422}
423func (m *PingRequest) XXX_DiscardUnknown() {
424	xxx_messageInfo_PingRequest.DiscardUnknown(m)
425}
426
427var xxx_messageInfo_PingRequest proto.InternalMessageInfo
428
429type PongResponse struct {
430	Msg                  string   `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
431	XXX_NoUnkeyedLiteral struct{} `json:"-"`
432	XXX_unrecognized     []byte   `json:"-"`
433	XXX_sizecache        int32    `json:"-"`
434}
435
436func (m *PongResponse) Reset()         { *m = PongResponse{} }
437func (m *PongResponse) String() string { return proto.CompactTextString(m) }
438func (*PongResponse) ProtoMessage()    {}
439func (*PongResponse) Descriptor() ([]byte, []int) {
440	return fileDescriptor_test_ed149f2304c9fa82, []int{8}
441}
442func (m *PongResponse) XXX_Unmarshal(b []byte) error {
443	return xxx_messageInfo_PongResponse.Unmarshal(m, b)
444}
445func (m *PongResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
446	return xxx_messageInfo_PongResponse.Marshal(b, m, deterministic)
447}
448func (dst *PongResponse) XXX_Merge(src proto.Message) {
449	xxx_messageInfo_PongResponse.Merge(dst, src)
450}
451func (m *PongResponse) XXX_Size() int {
452	return xxx_messageInfo_PongResponse.Size(m)
453}
454func (m *PongResponse) XXX_DiscardUnknown() {
455	xxx_messageInfo_PongResponse.DiscardUnknown(m)
456}
457
458var xxx_messageInfo_PongResponse proto.InternalMessageInfo
459
460func (m *PongResponse) GetMsg() string {
461	if m != nil {
462		return m.Msg
463	}
464	return ""
465}
466
467func init() {
468	proto.RegisterType((*TestRequest)(nil), "grpctest.TestRequest")
469	proto.RegisterType((*TestResponse)(nil), "grpctest.TestResponse")
470	proto.RegisterType((*PrintKVRequest)(nil), "grpctest.PrintKVRequest")
471	proto.RegisterType((*PrintKVResponse)(nil), "grpctest.PrintKVResponse")
472	proto.RegisterType((*BidirectionalRequest)(nil), "grpctest.BidirectionalRequest")
473	proto.RegisterType((*BidirectionalResponse)(nil), "grpctest.BidirectionalResponse")
474	proto.RegisterType((*PrintStdioRequest)(nil), "grpctest.PrintStdioRequest")
475	proto.RegisterType((*PingRequest)(nil), "grpctest.PingRequest")
476	proto.RegisterType((*PongResponse)(nil), "grpctest.PongResponse")
477}
478
479// Reference imports to suppress errors if they are not otherwise used.
480var _ context.Context
481var _ grpc.ClientConn
482
483// This is a compile-time assertion to ensure that this generated file
484// is compatible with the grpc package it is being compiled against.
485const _ = grpc.SupportPackageIsVersion4
486
487// TestClient is the client API for Test service.
488//
489// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
490type TestClient interface {
491	Double(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
492	PrintKV(ctx context.Context, in *PrintKVRequest, opts ...grpc.CallOption) (*PrintKVResponse, error)
493	Bidirectional(ctx context.Context, in *BidirectionalRequest, opts ...grpc.CallOption) (*BidirectionalResponse, error)
494	Stream(ctx context.Context, opts ...grpc.CallOption) (Test_StreamClient, error)
495	PrintStdio(ctx context.Context, in *PrintStdioRequest, opts ...grpc.CallOption) (*empty.Empty, error)
496}
497
498type testClient struct {
499	cc *grpc.ClientConn
500}
501
502func NewTestClient(cc *grpc.ClientConn) TestClient {
503	return &testClient{cc}
504}
505
506func (c *testClient) Double(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error) {
507	out := new(TestResponse)
508	err := c.cc.Invoke(ctx, "/grpctest.Test/Double", in, out, opts...)
509	if err != nil {
510		return nil, err
511	}
512	return out, nil
513}
514
515func (c *testClient) PrintKV(ctx context.Context, in *PrintKVRequest, opts ...grpc.CallOption) (*PrintKVResponse, error) {
516	out := new(PrintKVResponse)
517	err := c.cc.Invoke(ctx, "/grpctest.Test/PrintKV", in, out, opts...)
518	if err != nil {
519		return nil, err
520	}
521	return out, nil
522}
523
524func (c *testClient) Bidirectional(ctx context.Context, in *BidirectionalRequest, opts ...grpc.CallOption) (*BidirectionalResponse, error) {
525	out := new(BidirectionalResponse)
526	err := c.cc.Invoke(ctx, "/grpctest.Test/Bidirectional", in, out, opts...)
527	if err != nil {
528		return nil, err
529	}
530	return out, nil
531}
532
533func (c *testClient) Stream(ctx context.Context, opts ...grpc.CallOption) (Test_StreamClient, error) {
534	stream, err := c.cc.NewStream(ctx, &_Test_serviceDesc.Streams[0], "/grpctest.Test/Stream", opts...)
535	if err != nil {
536		return nil, err
537	}
538	x := &testStreamClient{stream}
539	return x, nil
540}
541
542type Test_StreamClient interface {
543	Send(*TestRequest) error
544	Recv() (*TestResponse, error)
545	grpc.ClientStream
546}
547
548type testStreamClient struct {
549	grpc.ClientStream
550}
551
552func (x *testStreamClient) Send(m *TestRequest) error {
553	return x.ClientStream.SendMsg(m)
554}
555
556func (x *testStreamClient) Recv() (*TestResponse, error) {
557	m := new(TestResponse)
558	if err := x.ClientStream.RecvMsg(m); err != nil {
559		return nil, err
560	}
561	return m, nil
562}
563
564func (c *testClient) PrintStdio(ctx context.Context, in *PrintStdioRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
565	out := new(empty.Empty)
566	err := c.cc.Invoke(ctx, "/grpctest.Test/PrintStdio", in, out, opts...)
567	if err != nil {
568		return nil, err
569	}
570	return out, nil
571}
572
573// TestServer is the server API for Test service.
574type TestServer interface {
575	Double(context.Context, *TestRequest) (*TestResponse, error)
576	PrintKV(context.Context, *PrintKVRequest) (*PrintKVResponse, error)
577	Bidirectional(context.Context, *BidirectionalRequest) (*BidirectionalResponse, error)
578	Stream(Test_StreamServer) error
579	PrintStdio(context.Context, *PrintStdioRequest) (*empty.Empty, error)
580}
581
582func RegisterTestServer(s *grpc.Server, srv TestServer) {
583	s.RegisterService(&_Test_serviceDesc, srv)
584}
585
586func _Test_Double_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
587	in := new(TestRequest)
588	if err := dec(in); err != nil {
589		return nil, err
590	}
591	if interceptor == nil {
592		return srv.(TestServer).Double(ctx, in)
593	}
594	info := &grpc.UnaryServerInfo{
595		Server:     srv,
596		FullMethod: "/grpctest.Test/Double",
597	}
598	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
599		return srv.(TestServer).Double(ctx, req.(*TestRequest))
600	}
601	return interceptor(ctx, in, info, handler)
602}
603
604func _Test_PrintKV_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
605	in := new(PrintKVRequest)
606	if err := dec(in); err != nil {
607		return nil, err
608	}
609	if interceptor == nil {
610		return srv.(TestServer).PrintKV(ctx, in)
611	}
612	info := &grpc.UnaryServerInfo{
613		Server:     srv,
614		FullMethod: "/grpctest.Test/PrintKV",
615	}
616	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
617		return srv.(TestServer).PrintKV(ctx, req.(*PrintKVRequest))
618	}
619	return interceptor(ctx, in, info, handler)
620}
621
622func _Test_Bidirectional_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
623	in := new(BidirectionalRequest)
624	if err := dec(in); err != nil {
625		return nil, err
626	}
627	if interceptor == nil {
628		return srv.(TestServer).Bidirectional(ctx, in)
629	}
630	info := &grpc.UnaryServerInfo{
631		Server:     srv,
632		FullMethod: "/grpctest.Test/Bidirectional",
633	}
634	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
635		return srv.(TestServer).Bidirectional(ctx, req.(*BidirectionalRequest))
636	}
637	return interceptor(ctx, in, info, handler)
638}
639
640func _Test_Stream_Handler(srv interface{}, stream grpc.ServerStream) error {
641	return srv.(TestServer).Stream(&testStreamServer{stream})
642}
643
644type Test_StreamServer interface {
645	Send(*TestResponse) error
646	Recv() (*TestRequest, error)
647	grpc.ServerStream
648}
649
650type testStreamServer struct {
651	grpc.ServerStream
652}
653
654func (x *testStreamServer) Send(m *TestResponse) error {
655	return x.ServerStream.SendMsg(m)
656}
657
658func (x *testStreamServer) Recv() (*TestRequest, error) {
659	m := new(TestRequest)
660	if err := x.ServerStream.RecvMsg(m); err != nil {
661		return nil, err
662	}
663	return m, nil
664}
665
666func _Test_PrintStdio_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
667	in := new(PrintStdioRequest)
668	if err := dec(in); err != nil {
669		return nil, err
670	}
671	if interceptor == nil {
672		return srv.(TestServer).PrintStdio(ctx, in)
673	}
674	info := &grpc.UnaryServerInfo{
675		Server:     srv,
676		FullMethod: "/grpctest.Test/PrintStdio",
677	}
678	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
679		return srv.(TestServer).PrintStdio(ctx, req.(*PrintStdioRequest))
680	}
681	return interceptor(ctx, in, info, handler)
682}
683
684var _Test_serviceDesc = grpc.ServiceDesc{
685	ServiceName: "grpctest.Test",
686	HandlerType: (*TestServer)(nil),
687	Methods: []grpc.MethodDesc{
688		{
689			MethodName: "Double",
690			Handler:    _Test_Double_Handler,
691		},
692		{
693			MethodName: "PrintKV",
694			Handler:    _Test_PrintKV_Handler,
695		},
696		{
697			MethodName: "Bidirectional",
698			Handler:    _Test_Bidirectional_Handler,
699		},
700		{
701			MethodName: "PrintStdio",
702			Handler:    _Test_PrintStdio_Handler,
703		},
704	},
705	Streams: []grpc.StreamDesc{
706		{
707			StreamName:    "Stream",
708			Handler:       _Test_Stream_Handler,
709			ServerStreams: true,
710			ClientStreams: true,
711		},
712	},
713	Metadata: "test.proto",
714}
715
716// PingPongClient is the client API for PingPong service.
717//
718// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
719type PingPongClient interface {
720	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error)
721}
722
723type pingPongClient struct {
724	cc *grpc.ClientConn
725}
726
727func NewPingPongClient(cc *grpc.ClientConn) PingPongClient {
728	return &pingPongClient{cc}
729}
730
731func (c *pingPongClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) {
732	out := new(PongResponse)
733	err := c.cc.Invoke(ctx, "/grpctest.PingPong/Ping", in, out, opts...)
734	if err != nil {
735		return nil, err
736	}
737	return out, nil
738}
739
740// PingPongServer is the server API for PingPong service.
741type PingPongServer interface {
742	Ping(context.Context, *PingRequest) (*PongResponse, error)
743}
744
745func RegisterPingPongServer(s *grpc.Server, srv PingPongServer) {
746	s.RegisterService(&_PingPong_serviceDesc, srv)
747}
748
749func _PingPong_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
750	in := new(PingRequest)
751	if err := dec(in); err != nil {
752		return nil, err
753	}
754	if interceptor == nil {
755		return srv.(PingPongServer).Ping(ctx, in)
756	}
757	info := &grpc.UnaryServerInfo{
758		Server:     srv,
759		FullMethod: "/grpctest.PingPong/Ping",
760	}
761	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
762		return srv.(PingPongServer).Ping(ctx, req.(*PingRequest))
763	}
764	return interceptor(ctx, in, info, handler)
765}
766
767var _PingPong_serviceDesc = grpc.ServiceDesc{
768	ServiceName: "grpctest.PingPong",
769	HandlerType: (*PingPongServer)(nil),
770	Methods: []grpc.MethodDesc{
771		{
772			MethodName: "Ping",
773			Handler:    _PingPong_Ping_Handler,
774		},
775	},
776	Streams:  []grpc.StreamDesc{},
777	Metadata: "test.proto",
778}
779
780func init() { proto.RegisterFile("test.proto", fileDescriptor_test_ed149f2304c9fa82) }
781
782var fileDescriptor_test_ed149f2304c9fa82 = []byte{
783	// 431 bytes of a gzipped FileDescriptorProto
784	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x41, 0x6f, 0xda, 0x30,
785	0x18, 0x4d, 0x42, 0x49, 0xe9, 0x07, 0x74, 0xad, 0xd5, 0x22, 0x96, 0x4e, 0x5b, 0xe5, 0x49, 0x5d,
786	0x4f, 0xe9, 0xd4, 0x1d, 0xa6, 0x1d, 0x26, 0x4d, 0xb0, 0x49, 0x20, 0x0e, 0x43, 0x66, 0xe2, 0x0e,
787	0xc4, 0x8b, 0x2c, 0x25, 0x71, 0x66, 0x3b, 0x07, 0x7e, 0xeb, 0xfe, 0xcc, 0x64, 0xc7, 0x09, 0x21,
788	0x62, 0x87, 0xde, 0xfc, 0xbd, 0xbc, 0xbc, 0xef, 0xf9, 0x3d, 0x03, 0x28, 0x2a, 0x55, 0x98, 0x0b,
789	0xae, 0x38, 0xea, 0xc5, 0x22, 0xdf, 0xe9, 0x39, 0xb8, 0x8b, 0x39, 0x8f, 0x13, 0xfa, 0x64, 0xf0,
790	0x6d, 0xf1, 0xfb, 0x89, 0xa6, 0xb9, 0xda, 0x97, 0x34, 0xfc, 0x1e, 0xfa, 0xbf, 0xa8, 0x54, 0x84,
791	0xfe, 0x29, 0xa8, 0x54, 0xe8, 0x06, 0xba, 0xf3, 0x2c, 0x2f, 0xd4, 0xd8, 0xbd, 0x77, 0x1f, 0xbb,
792	0xa4, 0x1c, 0xf0, 0x03, 0x0c, 0x4a, 0x92, 0xcc, 0x79, 0x26, 0x29, 0x1a, 0x81, 0xff, 0xb3, 0x50,
793	0x9a, 0xe6, 0x19, 0x9a, 0x9d, 0x70, 0x0a, 0x97, 0x4b, 0xc1, 0x32, 0xb5, 0x58, 0x57, 0x7a, 0x57,
794	0xd0, 0x59, 0xd0, 0xbd, 0x51, 0xbb, 0x20, 0xfa, 0x88, 0x30, 0xf4, 0xd7, 0x9b, 0xa4, 0xa0, 0x2b,
795	0x25, 0x58, 0x16, 0x1b, 0x81, 0x8b, 0x99, 0x43, 0x9a, 0x20, 0x7a, 0x03, 0x3d, 0x33, 0xce, 0x33,
796	0x35, 0xee, 0xe8, 0x0d, 0x33, 0x87, 0xd4, 0xc8, 0xe4, 0x1c, 0xba, 0xe6, 0x8c, 0xaf, 0xe1, 0x55,
797	0xbd, 0xae, 0x74, 0x86, 0x1f, 0xe0, 0x66, 0xc2, 0x22, 0x26, 0xe8, 0x4e, 0x31, 0x9e, 0x6d, 0x92,
798	0xca, 0xc7, 0x25, 0x78, 0x2c, 0x32, 0x36, 0x86, 0xc4, 0x63, 0x11, 0xfe, 0x00, 0xb7, 0x2d, 0x9e,
799	0xbd, 0x5a, 0x9b, 0x38, 0x85, 0x6b, 0xb3, 0x63, 0xa5, 0x22, 0xc6, 0x2b, 0xb5, 0x11, 0xf8, 0x52,
800	0x45, 0xdc, 0xc6, 0x34, 0x20, 0x76, 0xb2, 0x38, 0x15, 0xc2, 0x5c, 0xab, 0xc4, 0xa9, 0x10, 0x78,
801	0x08, 0xfd, 0x25, 0xcb, 0x62, 0xfb, 0x3b, 0xbe, 0x87, 0xc1, 0x92, 0xeb, 0xd1, 0xee, 0xbc, 0x82,
802	0x4e, 0x2a, 0xe3, 0x2a, 0xa4, 0x54, 0xc6, 0xcf, 0x7f, 0x3d, 0x38, 0xd3, 0x89, 0xa3, 0x2f, 0xe0,
803	0x7f, 0xe7, 0xc5, 0x36, 0xa1, 0xe8, 0x36, 0xac, 0x0a, 0x0d, 0x1b, 0x85, 0x05, 0xa3, 0x36, 0x6c,
804	0x83, 0x70, 0xd0, 0x37, 0x38, 0xb7, 0xe9, 0xa0, 0xf1, 0x81, 0x74, 0xdc, 0x4f, 0xf0, 0xfa, 0xc4,
805	0x97, 0x5a, 0x81, 0xc0, 0xf0, 0x28, 0x24, 0xf4, 0xf6, 0xc0, 0x3e, 0x95, 0x72, 0xf0, 0xee, 0xbf,
806	0xdf, 0x6b, 0xcd, 0xaf, 0xe0, 0xaf, 0x94, 0xa0, 0x9b, 0xf4, 0xc5, 0x17, 0x7a, 0x74, 0x3f, 0xba,
807	0x68, 0x0a, 0x70, 0xa8, 0x03, 0xdd, 0xb5, 0xdc, 0x37, 0x4b, 0xd2, 0x42, 0xe6, 0xdd, 0x87, 0xd5,
808	0xbb, 0x0f, 0x7f, 0xe8, 0x77, 0x8f, 0x9d, 0xe7, 0x29, 0xf4, 0x74, 0x1d, 0xba, 0x03, 0xf4, 0x19,
809	0xce, 0xf4, 0xb9, 0xe9, 0xa6, 0x51, 0x55, 0xd3, 0x4d, 0xb3, 0x32, 0xec, 0x6c, 0x7d, 0x23, 0xfb,
810	0xe9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x11, 0x4b, 0x8c, 0x40, 0x74, 0x03, 0x00, 0x00,
811}
812