// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: envoy/data/tap/v2alpha/wrapper.proto

package v2

import (
	fmt "fmt"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	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.GoGoProtoPackageIsVersion2 // please upgrade the proto package

// Wrapper for all fully buffered and streamed tap traces that Envoy emits. This is required for
// sending traces over gRPC APIs or more easily persisting binary messages to files.
type TraceWrapper struct {
	// Types that are valid to be assigned to Trace:
	//	*TraceWrapper_HttpBufferedTrace
	//	*TraceWrapper_HttpStreamedTraceSegment
	//	*TraceWrapper_SocketBufferedTrace
	//	*TraceWrapper_SocketStreamedTraceSegment
	Trace                isTraceWrapper_Trace `protobuf_oneof:"trace"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (m *TraceWrapper) Reset()         { *m = TraceWrapper{} }
func (m *TraceWrapper) String() string { return proto.CompactTextString(m) }
func (*TraceWrapper) ProtoMessage()    {}
func (*TraceWrapper) Descriptor() ([]byte, []int) {
	return fileDescriptor_9f617738ad092e1c, []int{0}
}
func (m *TraceWrapper) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *TraceWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_TraceWrapper.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *TraceWrapper) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TraceWrapper.Merge(m, src)
}
func (m *TraceWrapper) XXX_Size() int {
	return m.Size()
}
func (m *TraceWrapper) XXX_DiscardUnknown() {
	xxx_messageInfo_TraceWrapper.DiscardUnknown(m)
}

var xxx_messageInfo_TraceWrapper proto.InternalMessageInfo

type isTraceWrapper_Trace interface {
	isTraceWrapper_Trace()
	MarshalTo([]byte) (int, error)
	Size() int
}

type TraceWrapper_HttpBufferedTrace struct {
	HttpBufferedTrace *HttpBufferedTrace `protobuf:"bytes,1,opt,name=http_buffered_trace,json=httpBufferedTrace,proto3,oneof"`
}
type TraceWrapper_HttpStreamedTraceSegment struct {
	HttpStreamedTraceSegment *HttpStreamedTraceSegment `protobuf:"bytes,2,opt,name=http_streamed_trace_segment,json=httpStreamedTraceSegment,proto3,oneof"`
}
type TraceWrapper_SocketBufferedTrace struct {
	SocketBufferedTrace *SocketBufferedTrace `protobuf:"bytes,3,opt,name=socket_buffered_trace,json=socketBufferedTrace,proto3,oneof"`
}
type TraceWrapper_SocketStreamedTraceSegment struct {
	SocketStreamedTraceSegment *SocketStreamedTraceSegment `protobuf:"bytes,4,opt,name=socket_streamed_trace_segment,json=socketStreamedTraceSegment,proto3,oneof"`
}

func (*TraceWrapper_HttpBufferedTrace) isTraceWrapper_Trace()          {}
func (*TraceWrapper_HttpStreamedTraceSegment) isTraceWrapper_Trace()   {}
func (*TraceWrapper_SocketBufferedTrace) isTraceWrapper_Trace()        {}
func (*TraceWrapper_SocketStreamedTraceSegment) isTraceWrapper_Trace() {}

func (m *TraceWrapper) GetTrace() isTraceWrapper_Trace {
	if m != nil {
		return m.Trace
	}
	return nil
}

func (m *TraceWrapper) GetHttpBufferedTrace() *HttpBufferedTrace {
	if x, ok := m.GetTrace().(*TraceWrapper_HttpBufferedTrace); ok {
		return x.HttpBufferedTrace
	}
	return nil
}

func (m *TraceWrapper) GetHttpStreamedTraceSegment() *HttpStreamedTraceSegment {
	if x, ok := m.GetTrace().(*TraceWrapper_HttpStreamedTraceSegment); ok {
		return x.HttpStreamedTraceSegment
	}
	return nil
}

func (m *TraceWrapper) GetSocketBufferedTrace() *SocketBufferedTrace {
	if x, ok := m.GetTrace().(*TraceWrapper_SocketBufferedTrace); ok {
		return x.SocketBufferedTrace
	}
	return nil
}

func (m *TraceWrapper) GetSocketStreamedTraceSegment() *SocketStreamedTraceSegment {
	if x, ok := m.GetTrace().(*TraceWrapper_SocketStreamedTraceSegment); ok {
		return x.SocketStreamedTraceSegment
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*TraceWrapper) 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{}) {
	return _TraceWrapper_OneofMarshaler, _TraceWrapper_OneofUnmarshaler, _TraceWrapper_OneofSizer, []interface{}{
		(*TraceWrapper_HttpBufferedTrace)(nil),
		(*TraceWrapper_HttpStreamedTraceSegment)(nil),
		(*TraceWrapper_SocketBufferedTrace)(nil),
		(*TraceWrapper_SocketStreamedTraceSegment)(nil),
	}
}

func _TraceWrapper_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*TraceWrapper)
	// trace
	switch x := m.Trace.(type) {
	case *TraceWrapper_HttpBufferedTrace:
		_ = b.EncodeVarint(1<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.HttpBufferedTrace); err != nil {
			return err
		}
	case *TraceWrapper_HttpStreamedTraceSegment:
		_ = b.EncodeVarint(2<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.HttpStreamedTraceSegment); err != nil {
			return err
		}
	case *TraceWrapper_SocketBufferedTrace:
		_ = b.EncodeVarint(3<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.SocketBufferedTrace); err != nil {
			return err
		}
	case *TraceWrapper_SocketStreamedTraceSegment:
		_ = b.EncodeVarint(4<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.SocketStreamedTraceSegment); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("TraceWrapper.Trace has unexpected type %T", x)
	}
	return nil
}

func _TraceWrapper_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*TraceWrapper)
	switch tag {
	case 1: // trace.http_buffered_trace
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(HttpBufferedTrace)
		err := b.DecodeMessage(msg)
		m.Trace = &TraceWrapper_HttpBufferedTrace{msg}
		return true, err
	case 2: // trace.http_streamed_trace_segment
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(HttpStreamedTraceSegment)
		err := b.DecodeMessage(msg)
		m.Trace = &TraceWrapper_HttpStreamedTraceSegment{msg}
		return true, err
	case 3: // trace.socket_buffered_trace
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(SocketBufferedTrace)
		err := b.DecodeMessage(msg)
		m.Trace = &TraceWrapper_SocketBufferedTrace{msg}
		return true, err
	case 4: // trace.socket_streamed_trace_segment
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(SocketStreamedTraceSegment)
		err := b.DecodeMessage(msg)
		m.Trace = &TraceWrapper_SocketStreamedTraceSegment{msg}
		return true, err
	default:
		return false, nil
	}
}

func _TraceWrapper_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*TraceWrapper)
	// trace
	switch x := m.Trace.(type) {
	case *TraceWrapper_HttpBufferedTrace:
		s := proto.Size(x.HttpBufferedTrace)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *TraceWrapper_HttpStreamedTraceSegment:
		s := proto.Size(x.HttpStreamedTraceSegment)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *TraceWrapper_SocketBufferedTrace:
		s := proto.Size(x.SocketBufferedTrace)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *TraceWrapper_SocketStreamedTraceSegment:
		s := proto.Size(x.SocketStreamedTraceSegment)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

func init() {
	proto.RegisterType((*TraceWrapper)(nil), "envoy.data.tap.v2alpha.TraceWrapper")
}

func init() {
	proto.RegisterFile("envoy/data/tap/v2alpha/wrapper.proto", fileDescriptor_9f617738ad092e1c)
}

var fileDescriptor_9f617738ad092e1c = []byte{
	// 321 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcf, 0x4e, 0xc2, 0x30,
	0x1c, 0xc7, 0xa9, 0x88, 0x87, 0x4a, 0x4c, 0x2c, 0x51, 0x09, 0x46, 0xa2, 0x86, 0x18, 0x8d, 0x49,
	0x67, 0xf0, 0x0d, 0x76, 0xe2, 0x48, 0xc0, 0xc4, 0x83, 0x07, 0xf2, 0x83, 0x15, 0x47, 0x84, 0xb5,
	0xb6, 0x3f, 0x87, 0xbc, 0x99, 0x47, 0x8f, 0xc6, 0x93, 0x8f, 0x60, 0x76, 0xf3, 0x2d, 0xcc, 0xba,
	0x72, 0x99, 0x96, 0xdb, 0xd2, 0xef, 0x9f, 0x4f, 0xbf, 0x59, 0x69, 0x47, 0x24, 0xa9, 0x5c, 0x05,
	0x11, 0x20, 0x04, 0x08, 0x2a, 0x48, 0xbb, 0x30, 0x57, 0x31, 0x04, 0x4b, 0x0d, 0x4a, 0x09, 0xcd,
	0x95, 0x96, 0x28, 0xd9, 0xa1, 0x75, 0xf1, 0xdc, 0xc5, 0x11, 0x14, 0x77, 0xae, 0xd6, 0x99, 0x27,
	0x1d, 0x23, 0xaa, 0x22, 0xda, 0xba, 0xf0, 0x58, 0x50, 0x43, 0x62, 0x94, 0xd4, 0xe8, 0x7c, 0x47,
	0x29, 0xcc, 0x67, 0x11, 0xa0, 0x08, 0xd6, 0x1f, 0x85, 0x70, 0xfe, 0x59, 0xa5, 0xf5, 0x3b, 0x0d,
	0x13, 0x71, 0x5f, 0x5c, 0x89, 0x3d, 0xd0, 0x46, 0xde, 0x3f, 0x1a, 0xbf, 0x4c, 0xa7, 0x42, 0x8b,
	0x68, 0x84, 0xb9, 0xda, 0x24, 0xa7, 0xe4, 0x72, 0xb7, 0x7b, 0xc5, 0xff, 0xbf, 0x2a, 0xef, 0x21,
	0xaa, 0xd0, 0x25, 0x6c, 0x5d, 0xaf, 0x32, 0xd8, 0x8f, 0xcb, 0x87, 0xec, 0x99, 0x1e, 0xdb, 0x72,
	0x83, 0x5a, 0xc0, 0x62, 0x5d, 0x3e, 0x32, 0xe2, 0x71, 0x21, 0x12, 0x6c, 0x6e, 0x59, 0xc8, 0xcd,
	0x26, 0xc8, 0xd0, 0x25, 0x6d, 0xdf, 0xb0, 0xc8, 0xf5, 0x2a, 0x83, 0x66, 0xec, 0xd1, 0x18, 0xd0,
	0x03, 0x23, 0x27, 0x4f, 0x02, 0xcb, 0x8b, 0xaa, 0x16, 0x76, 0xed, 0x83, 0x0d, 0x6d, 0xa8, 0xbc,
	0xa9, 0x61, 0xfe, 0x1e, 0xb3, 0x25, 0x3d, 0x71, 0x08, 0xcf, 0xae, 0x6d, 0x8b, 0xea, 0x6e, 0x46,
	0x79, 0x96, 0xb5, 0x8c, 0x57, 0x0d, 0xf7, 0x68, 0xcd, 0x82, 0x58, 0xed, 0xed, 0xe7, 0xbd, 0x4a,
	0xc2, 0xf0, 0x23, 0x6b, 0x93, 0xaf, 0xac, 0x4d, 0xbe, 0xb3, 0x36, 0xa1, 0x9d, 0x99, 0x2c, 0x88,
	0x4a, 0xcb, 0xd7, 0x95, 0x07, 0x1e, 0xd6, 0xdd, 0x8f, 0xef, 0xe7, 0xcf, 0xa1, 0x4f, 0xc6, 0x3b,
	0xf6, 0x5d, 0xdc, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x23, 0x13, 0x37, 0xbc, 0xbb, 0x02, 0x00,
	0x00,
}

func (m *TraceWrapper) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *TraceWrapper) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Trace != nil {
		nn1, err := m.Trace.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += nn1
	}
	if m.XXX_unrecognized != nil {
		i += copy(dAtA[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *TraceWrapper_HttpBufferedTrace) MarshalTo(dAtA []byte) (int, error) {
	i := 0
	if m.HttpBufferedTrace != nil {
		dAtA[i] = 0xa
		i++
		i = encodeVarintWrapper(dAtA, i, uint64(m.HttpBufferedTrace.Size()))
		n2, err := m.HttpBufferedTrace.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n2
	}
	return i, nil
}
func (m *TraceWrapper_HttpStreamedTraceSegment) MarshalTo(dAtA []byte) (int, error) {
	i := 0
	if m.HttpStreamedTraceSegment != nil {
		dAtA[i] = 0x12
		i++
		i = encodeVarintWrapper(dAtA, i, uint64(m.HttpStreamedTraceSegment.Size()))
		n3, err := m.HttpStreamedTraceSegment.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n3
	}
	return i, nil
}
func (m *TraceWrapper_SocketBufferedTrace) MarshalTo(dAtA []byte) (int, error) {
	i := 0
	if m.SocketBufferedTrace != nil {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintWrapper(dAtA, i, uint64(m.SocketBufferedTrace.Size()))
		n4, err := m.SocketBufferedTrace.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n4
	}
	return i, nil
}
func (m *TraceWrapper_SocketStreamedTraceSegment) MarshalTo(dAtA []byte) (int, error) {
	i := 0
	if m.SocketStreamedTraceSegment != nil {
		dAtA[i] = 0x22
		i++
		i = encodeVarintWrapper(dAtA, i, uint64(m.SocketStreamedTraceSegment.Size()))
		n5, err := m.SocketStreamedTraceSegment.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n5
	}
	return i, nil
}
func encodeVarintWrapper(dAtA []byte, offset int, v uint64) int {
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return offset + 1
}
func (m *TraceWrapper) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Trace != nil {
		n += m.Trace.Size()
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *TraceWrapper_HttpBufferedTrace) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.HttpBufferedTrace != nil {
		l = m.HttpBufferedTrace.Size()
		n += 1 + l + sovWrapper(uint64(l))
	}
	return n
}
func (m *TraceWrapper_HttpStreamedTraceSegment) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.HttpStreamedTraceSegment != nil {
		l = m.HttpStreamedTraceSegment.Size()
		n += 1 + l + sovWrapper(uint64(l))
	}
	return n
}
func (m *TraceWrapper_SocketBufferedTrace) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.SocketBufferedTrace != nil {
		l = m.SocketBufferedTrace.Size()
		n += 1 + l + sovWrapper(uint64(l))
	}
	return n
}
func (m *TraceWrapper_SocketStreamedTraceSegment) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.SocketStreamedTraceSegment != nil {
		l = m.SocketStreamedTraceSegment.Size()
		n += 1 + l + sovWrapper(uint64(l))
	}
	return n
}

func sovWrapper(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozWrapper(x uint64) (n int) {
	return sovWrapper(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *TraceWrapper) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowWrapper
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: TraceWrapper: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: TraceWrapper: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field HttpBufferedTrace", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWrapper
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthWrapper
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthWrapper
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &HttpBufferedTrace{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Trace = &TraceWrapper_HttpBufferedTrace{v}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field HttpStreamedTraceSegment", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWrapper
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthWrapper
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthWrapper
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &HttpStreamedTraceSegment{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Trace = &TraceWrapper_HttpStreamedTraceSegment{v}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SocketBufferedTrace", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWrapper
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthWrapper
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthWrapper
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &SocketBufferedTrace{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Trace = &TraceWrapper_SocketBufferedTrace{v}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SocketStreamedTraceSegment", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowWrapper
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthWrapper
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthWrapper
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &SocketStreamedTraceSegment{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Trace = &TraceWrapper_SocketStreamedTraceSegment{v}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipWrapper(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthWrapper
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthWrapper
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipWrapper(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowWrapper
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowWrapper
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
			return iNdEx, nil
		case 1:
			iNdEx += 8
			return iNdEx, nil
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowWrapper
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthWrapper
			}
			iNdEx += length
			if iNdEx < 0 {
				return 0, ErrInvalidLengthWrapper
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowWrapper
					}
					if iNdEx >= l {
						return 0, io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					innerWire |= (uint64(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				innerWireType := int(innerWire & 0x7)
				if innerWireType == 4 {
					break
				}
				next, err := skipWrapper(dAtA[start:])
				if err != nil {
					return 0, err
				}
				iNdEx = start + next
				if iNdEx < 0 {
					return 0, ErrInvalidLengthWrapper
				}
			}
			return iNdEx, nil
		case 4:
			return iNdEx, nil
		case 5:
			iNdEx += 4
			return iNdEx, nil
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
	}
	panic("unreachable")
}

var (
	ErrInvalidLengthWrapper = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowWrapper   = fmt.Errorf("proto: integer overflow")
)
