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

package test

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	math "math"
)

// 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.ProtoPackageIsVersion3 // please upgrade the proto package

type StreamOutputRequest struct {
	BytesToReturn        int32    `protobuf:"varint,1,opt,name=bytes_to_return,json=bytesToReturn,proto3" json:"bytes_to_return,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *StreamOutputRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_StreamOutputRequest.Unmarshal(m, b)
}
func (m *StreamOutputRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_StreamOutputRequest.Marshal(b, m, deterministic)
}
func (m *StreamOutputRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StreamOutputRequest.Merge(m, src)
}
func (m *StreamOutputRequest) XXX_Size() int {
	return xxx_messageInfo_StreamOutputRequest.Size(m)
}
func (m *StreamOutputRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_StreamOutputRequest.DiscardUnknown(m)
}

var xxx_messageInfo_StreamOutputRequest proto.InternalMessageInfo

func (m *StreamOutputRequest) GetBytesToReturn() int32 {
	if m != nil {
		return m.BytesToReturn
	}
	return 0
}

type StreamOutputResponse struct {
	Msg                  [][]byte `protobuf:"bytes,1,rep,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *StreamOutputResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_StreamOutputResponse.Unmarshal(m, b)
}
func (m *StreamOutputResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_StreamOutputResponse.Marshal(b, m, deterministic)
}
func (m *StreamOutputResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StreamOutputResponse.Merge(m, src)
}
func (m *StreamOutputResponse) XXX_Size() int {
	return xxx_messageInfo_StreamOutputResponse.Size(m)
}
func (m *StreamOutputResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_StreamOutputResponse.DiscardUnknown(m)
}

var xxx_messageInfo_StreamOutputResponse proto.InternalMessageInfo

func (m *StreamOutputResponse) GetMsg() [][]byte {
	if m != nil {
		return m.Msg
	}
	return nil
}

func init() {
	proto.RegisterType((*StreamOutputRequest)(nil), "test.StreamOutputRequest")
	proto.RegisterType((*StreamOutputResponse)(nil), "test.StreamOutputResponse")
}

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

var fileDescriptor_c161fcfdc0c3ff1e = []byte{
	// 160 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, 0x6c, 0xb9, 0x84, 0x83, 0x4b,
	0x8a, 0x52, 0x13, 0x73, 0xfd, 0x4b, 0x4b, 0x0a, 0x4a, 0x4b, 0x82, 0x52, 0x0b, 0x4b, 0x53, 0x8b,
	0x4b, 0x84, 0xd4, 0xb8, 0xf8, 0x93, 0x2a, 0x4b, 0x52, 0x8b, 0xe3, 0x4b, 0xf2, 0xe3, 0x8b, 0x52,
	0x4b, 0x4a, 0x8b, 0xf2, 0x24, 0x18, 0x15, 0x18, 0x35, 0x58, 0x83, 0x78, 0xc1, 0xc2, 0x21, 0xf9,
	0x41, 0x60, 0x41, 0x25, 0x0d, 0x2e, 0x11, 0x54, 0xed, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x42,
	0x02, 0x5c, 0xcc, 0xb9, 0xc5, 0xe9, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0x3c, 0x41, 0x20, 0xa6, 0x51,
	0x20, 0x17, 0x4b, 0x08, 0xc8, 0x64, 0x4f, 0x2e, 0x1e, 0x64, 0x1d, 0x42, 0x92, 0x7a, 0x60, 0x37,
	0x61, 0x71, 0x84, 0x94, 0x14, 0x36, 0x29, 0x88, 0x05, 0x4a, 0x0c, 0x06, 0x8c, 0x49, 0x6c, 0x60,
	0x8f, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xae, 0x1b, 0x22, 0xff, 0xd6, 0x00, 0x00, 0x00,
}

// 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

// TestClient is the client API for Test service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TestClient interface {
	StreamOutput(ctx context.Context, in *StreamOutputRequest, opts ...grpc.CallOption) (Test_StreamOutputClient, error)
}

type testClient struct {
	cc *grpc.ClientConn
}

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

func (c *testClient) StreamOutput(ctx context.Context, in *StreamOutputRequest, opts ...grpc.CallOption) (Test_StreamOutputClient, error) {
	stream, err := c.cc.NewStream(ctx, &_Test_serviceDesc.Streams[0], "/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
}

// TestServer is the server API for Test service.
type TestServer interface {
	StreamOutput(*StreamOutputRequest, Test_StreamOutputServer) error
}

// UnimplementedTestServer can be embedded to have forward compatible implementations.
type UnimplementedTestServer struct {
}

func (*UnimplementedTestServer) StreamOutput(req *StreamOutputRequest, srv Test_StreamOutputServer) error {
	return status.Errorf(codes.Unimplemented, "method StreamOutput not implemented")
}

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

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)
}

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