// Code generated by protoc-gen-go. DO NOT EDIT.
// source: test.proto

/*
Package test is a generated protocol buffer package.

It is generated from these files:
	test.proto

It has these top-level messages:
	UnaryRequest
	UnaryResponse
	StreamInputRequest
	StreamInputResponse
	StreamOutputRequest
	StreamOutputResponse
	BidirectionalRequest
	BidirectionalResponse
*/
package test

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

import (
	context "context"

	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

type UnaryRequest struct {
}

func (m *UnaryRequest) Reset()                    { *m = UnaryRequest{} }
func (m *UnaryRequest) String() string            { return proto.CompactTextString(m) }
func (*UnaryRequest) ProtoMessage()               {}
func (*UnaryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

type UnaryResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
}

func (m *UnaryResponse) Reset()                    { *m = UnaryResponse{} }
func (m *UnaryResponse) String() string            { return proto.CompactTextString(m) }
func (*UnaryResponse) ProtoMessage()               {}
func (*UnaryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

func (m *UnaryResponse) GetOk() bool {
	if m != nil {
		return m.Ok
	}
	return false
}

type StreamInputRequest struct {
}

func (m *StreamInputRequest) Reset()                    { *m = StreamInputRequest{} }
func (m *StreamInputRequest) String() string            { return proto.CompactTextString(m) }
func (*StreamInputRequest) ProtoMessage()               {}
func (*StreamInputRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

type StreamInputResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
}

func (m *StreamInputResponse) Reset()                    { *m = StreamInputResponse{} }
func (m *StreamInputResponse) String() string            { return proto.CompactTextString(m) }
func (*StreamInputResponse) ProtoMessage()               {}
func (*StreamInputResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *StreamInputResponse) GetOk() bool {
	if m != nil {
		return m.Ok
	}
	return false
}

type StreamOutputRequest struct {
}

func (m *StreamOutputRequest) Reset()                    { *m = StreamOutputRequest{} }
func (m *StreamOutputRequest) String() string            { return proto.CompactTextString(m) }
func (*StreamOutputRequest) ProtoMessage()               {}
func (*StreamOutputRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }

type StreamOutputResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
}

func (m *StreamOutputResponse) Reset()                    { *m = StreamOutputResponse{} }
func (m *StreamOutputResponse) String() string            { return proto.CompactTextString(m) }
func (*StreamOutputResponse) ProtoMessage()               {}
func (*StreamOutputResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }

func (m *StreamOutputResponse) GetOk() bool {
	if m != nil {
		return m.Ok
	}
	return false
}

type BidirectionalRequest struct {
}

func (m *BidirectionalRequest) Reset()                    { *m = BidirectionalRequest{} }
func (m *BidirectionalRequest) String() string            { return proto.CompactTextString(m) }
func (*BidirectionalRequest) ProtoMessage()               {}
func (*BidirectionalRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }

type BidirectionalResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"`
}

func (m *BidirectionalResponse) Reset()                    { *m = BidirectionalResponse{} }
func (m *BidirectionalResponse) String() string            { return proto.CompactTextString(m) }
func (*BidirectionalResponse) ProtoMessage()               {}
func (*BidirectionalResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }

func (m *BidirectionalResponse) GetOk() bool {
	if m != nil {
		return m.Ok
	}
	return false
}

func init() {
	proto.RegisterType((*UnaryRequest)(nil), "test.UnaryRequest")
	proto.RegisterType((*UnaryResponse)(nil), "test.UnaryResponse")
	proto.RegisterType((*StreamInputRequest)(nil), "test.StreamInputRequest")
	proto.RegisterType((*StreamInputResponse)(nil), "test.StreamInputResponse")
	proto.RegisterType((*StreamOutputRequest)(nil), "test.StreamOutputRequest")
	proto.RegisterType((*StreamOutputResponse)(nil), "test.StreamOutputResponse")
	proto.RegisterType((*BidirectionalRequest)(nil), "test.BidirectionalRequest")
	proto.RegisterType((*BidirectionalResponse)(nil), "test.BidirectionalResponse")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for Test service

type TestClient interface {
	Unary(ctx context.Context, in *UnaryRequest, opts ...grpc.CallOption) (*UnaryResponse, error)
	StreamInput(ctx context.Context, opts ...grpc.CallOption) (Test_StreamInputClient, error)
	StreamOutput(ctx context.Context, in *StreamOutputRequest, opts ...grpc.CallOption) (Test_StreamOutputClient, error)
	Bidirectional(ctx context.Context, opts ...grpc.CallOption) (Test_BidirectionalClient, error)
}

type testClient struct {
	cc *grpc.ClientConn
}

func NewTestClient(cc *grpc.ClientConn) TestClient {
	return &testClient{cc}
}

func (c *testClient) Unary(ctx context.Context, in *UnaryRequest, opts ...grpc.CallOption) (*UnaryResponse, error) {
	out := new(UnaryResponse)
	err := grpc.Invoke(ctx, "/test.Test/Unary", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *testClient) StreamInput(ctx context.Context, opts ...grpc.CallOption) (Test_StreamInputClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Test_serviceDesc.Streams[0], c.cc, "/test.Test/StreamInput", opts...)
	if err != nil {
		return nil, err
	}
	x := &testStreamInputClient{stream}
	return x, nil
}

type Test_StreamInputClient interface {
	Send(*StreamInputRequest) error
	CloseAndRecv() (*StreamInputResponse, error)
	grpc.ClientStream
}

type testStreamInputClient struct {
	grpc.ClientStream
}

func (x *testStreamInputClient) Send(m *StreamInputRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *testStreamInputClient) CloseAndRecv() (*StreamInputResponse, error) {
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	m := new(StreamInputResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *testClient) StreamOutput(ctx context.Context, in *StreamOutputRequest, opts ...grpc.CallOption) (Test_StreamOutputClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Test_serviceDesc.Streams[1], c.cc, "/test.Test/StreamOutput", opts...)
	if err != nil {
		return nil, err
	}
	x := &testStreamOutputClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type Test_StreamOutputClient interface {
	Recv() (*StreamOutputResponse, error)
	grpc.ClientStream
}

type testStreamOutputClient struct {
	grpc.ClientStream
}

func (x *testStreamOutputClient) Recv() (*StreamOutputResponse, error) {
	m := new(StreamOutputResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *testClient) Bidirectional(ctx context.Context, opts ...grpc.CallOption) (Test_BidirectionalClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Test_serviceDesc.Streams[2], c.cc, "/test.Test/Bidirectional", opts...)
	if err != nil {
		return nil, err
	}
	x := &testBidirectionalClient{stream}
	return x, nil
}

type Test_BidirectionalClient interface {
	Send(*BidirectionalRequest) error
	Recv() (*BidirectionalResponse, error)
	grpc.ClientStream
}

type testBidirectionalClient struct {
	grpc.ClientStream
}

func (x *testBidirectionalClient) Send(m *BidirectionalRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *testBidirectionalClient) Recv() (*BidirectionalResponse, error) {
	m := new(BidirectionalResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// Server API for Test service

type TestServer interface {
	Unary(context.Context, *UnaryRequest) (*UnaryResponse, error)
	StreamInput(Test_StreamInputServer) error
	StreamOutput(*StreamOutputRequest, Test_StreamOutputServer) error
	Bidirectional(Test_BidirectionalServer) error
}

func RegisterTestServer(s *grpc.Server, srv TestServer) {
	s.RegisterService(&_Test_serviceDesc, srv)
}

func _Test_Unary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UnaryRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TestServer).Unary(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/test.Test/Unary",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TestServer).Unary(ctx, req.(*UnaryRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Test_StreamInput_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(TestServer).StreamInput(&testStreamInputServer{stream})
}

type Test_StreamInputServer interface {
	SendAndClose(*StreamInputResponse) error
	Recv() (*StreamInputRequest, error)
	grpc.ServerStream
}

type testStreamInputServer struct {
	grpc.ServerStream
}

func (x *testStreamInputServer) SendAndClose(m *StreamInputResponse) error {
	return x.ServerStream.SendMsg(m)
}

func (x *testStreamInputServer) Recv() (*StreamInputRequest, error) {
	m := new(StreamInputRequest)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func _Test_StreamOutput_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(StreamOutputRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(TestServer).StreamOutput(m, &testStreamOutputServer{stream})
}

type Test_StreamOutputServer interface {
	Send(*StreamOutputResponse) error
	grpc.ServerStream
}

type testStreamOutputServer struct {
	grpc.ServerStream
}

func (x *testStreamOutputServer) Send(m *StreamOutputResponse) error {
	return x.ServerStream.SendMsg(m)
}

func _Test_Bidirectional_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(TestServer).Bidirectional(&testBidirectionalServer{stream})
}

type Test_BidirectionalServer interface {
	Send(*BidirectionalResponse) error
	Recv() (*BidirectionalRequest, error)
	grpc.ServerStream
}

type testBidirectionalServer struct {
	grpc.ServerStream
}

func (x *testBidirectionalServer) Send(m *BidirectionalResponse) error {
	return x.ServerStream.SendMsg(m)
}

func (x *testBidirectionalServer) Recv() (*BidirectionalRequest, error) {
	m := new(BidirectionalRequest)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

var _Test_serviceDesc = grpc.ServiceDesc{
	ServiceName: "test.Test",
	HandlerType: (*TestServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Unary",
			Handler:    _Test_Unary_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamInput",
			Handler:       _Test_StreamInput_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "StreamOutput",
			Handler:       _Test_StreamOutput_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Bidirectional",
			Handler:       _Test_Bidirectional_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "test.proto",
}

func init() { proto.RegisterFile("test.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 245 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x2d, 0x2e,
	0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0x95, 0xf8, 0xb8, 0x78, 0x42, 0xf3,
	0x12, 0x8b, 0x2a, 0x83, 0x52, 0x0b, 0x4b, 0x41, 0x7c, 0x79, 0x2e, 0x5e, 0x28, 0xbf, 0xb8, 0x20,
	0x3f, 0xaf, 0x38, 0x55, 0x88, 0x8f, 0x8b, 0x29, 0x3f, 0x5b, 0x82, 0x51, 0x81, 0x51, 0x83, 0x23,
	0x88, 0x29, 0x3f, 0x5b, 0x49, 0x84, 0x4b, 0x28, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0xd7, 0x33, 0xaf,
	0xa0, 0xb4, 0x04, 0xa6, 0x4d, 0x95, 0x4b, 0x18, 0x45, 0x14, 0x87, 0x66, 0x51, 0x98, 0x32, 0xff,
	0xd2, 0x12, 0x24, 0xdd, 0x6a, 0x5c, 0x22, 0xa8, 0xc2, 0x38, 0xb4, 0x8b, 0x71, 0x89, 0x38, 0x65,
	0xa6, 0x64, 0x16, 0xa5, 0x26, 0x97, 0x64, 0xe6, 0xe7, 0x25, 0xe6, 0xc0, 0xf4, 0xab, 0x73, 0x89,
	0xa2, 0x89, 0x63, 0x37, 0xc0, 0x68, 0x2e, 0x13, 0x17, 0x4b, 0x48, 0x6a, 0x71, 0x89, 0x90, 0x11,
	0x17, 0x2b, 0xd8, 0x9b, 0x42, 0x42, 0x7a, 0xe0, 0x20, 0x41, 0x0e, 0x03, 0x29, 0x61, 0x14, 0x31,
	0x88, 0x51, 0x4a, 0x0c, 0x42, 0x6e, 0x5c, 0xdc, 0x48, 0x7e, 0x14, 0x92, 0x80, 0xa8, 0xc2, 0x0c,
	0x0c, 0x29, 0x49, 0x2c, 0x32, 0x30, 0x53, 0x34, 0x18, 0x85, 0x3c, 0xb9, 0x78, 0x90, 0x7d, 0x2b,
	0x84, 0xa2, 0x1c, 0x25, 0x60, 0xa4, 0xa4, 0xb0, 0x49, 0xc1, 0x8c, 0x32, 0x60, 0x14, 0xf2, 0xe3,
	0xe2, 0x45, 0xf1, 0xb8, 0x10, 0x54, 0x03, 0xb6, 0x50, 0x92, 0x92, 0xc6, 0x2a, 0x87, 0x70, 0x98,
	0x01, 0x63, 0x12, 0x1b, 0x38, 0x69, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x27, 0xb9, 0x36,
	0xfb, 0x28, 0x02, 0x00, 0x00,
}
