// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: node.proto

package trie

import (
	bytes "bytes"
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
	reflect "reflect"
	strings "strings"
)

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

type CollapsedBn struct {
	EncodedChildren [][]byte `protobuf:"bytes,1,rep,name=EncodedChildren,proto3" json:"EncodedChildren,omitempty"`
	ChildrenVersion []byte   `protobuf:"bytes,2,opt,name=ChildrenVersion,proto3" json:"ChildrenVersion,omitempty"`
}

func (m *CollapsedBn) Reset()      { *m = CollapsedBn{} }
func (*CollapsedBn) ProtoMessage() {}
func (*CollapsedBn) Descriptor() ([]byte, []int) {
	return fileDescriptor_0c843d59d2d938e7, []int{0}
}
func (m *CollapsedBn) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *CollapsedBn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	b = b[:cap(b)]
	n, err := m.MarshalToSizedBuffer(b)
	if err != nil {
		return nil, err
	}
	return b[:n], nil
}
func (m *CollapsedBn) XXX_Merge(src proto.Message) {
	xxx_messageInfo_CollapsedBn.Merge(m, src)
}
func (m *CollapsedBn) XXX_Size() int {
	return m.Size()
}
func (m *CollapsedBn) XXX_DiscardUnknown() {
	xxx_messageInfo_CollapsedBn.DiscardUnknown(m)
}

var xxx_messageInfo_CollapsedBn proto.InternalMessageInfo

func (m *CollapsedBn) GetEncodedChildren() [][]byte {
	if m != nil {
		return m.EncodedChildren
	}
	return nil
}

func (m *CollapsedBn) GetChildrenVersion() []byte {
	if m != nil {
		return m.ChildrenVersion
	}
	return nil
}

type CollapsedEn struct {
	Key          []byte `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
	EncodedChild []byte `protobuf:"bytes,2,opt,name=EncodedChild,proto3" json:"EncodedChild,omitempty"`
	ChildVersion uint32 `protobuf:"varint,3,opt,name=ChildVersion,proto3" json:"ChildVersion,omitempty"`
}

func (m *CollapsedEn) Reset()      { *m = CollapsedEn{} }
func (*CollapsedEn) ProtoMessage() {}
func (*CollapsedEn) Descriptor() ([]byte, []int) {
	return fileDescriptor_0c843d59d2d938e7, []int{1}
}
func (m *CollapsedEn) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *CollapsedEn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	b = b[:cap(b)]
	n, err := m.MarshalToSizedBuffer(b)
	if err != nil {
		return nil, err
	}
	return b[:n], nil
}
func (m *CollapsedEn) XXX_Merge(src proto.Message) {
	xxx_messageInfo_CollapsedEn.Merge(m, src)
}
func (m *CollapsedEn) XXX_Size() int {
	return m.Size()
}
func (m *CollapsedEn) XXX_DiscardUnknown() {
	xxx_messageInfo_CollapsedEn.DiscardUnknown(m)
}

var xxx_messageInfo_CollapsedEn proto.InternalMessageInfo

func (m *CollapsedEn) GetKey() []byte {
	if m != nil {
		return m.Key
	}
	return nil
}

func (m *CollapsedEn) GetEncodedChild() []byte {
	if m != nil {
		return m.EncodedChild
	}
	return nil
}

func (m *CollapsedEn) GetChildVersion() uint32 {
	if m != nil {
		return m.ChildVersion
	}
	return 0
}

type CollapsedLn struct {
	Key     []byte `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
	Value   []byte `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
	Version uint32 `protobuf:"varint,3,opt,name=Version,proto3" json:"Version,omitempty"`
}

func (m *CollapsedLn) Reset()      { *m = CollapsedLn{} }
func (*CollapsedLn) ProtoMessage() {}
func (*CollapsedLn) Descriptor() ([]byte, []int) {
	return fileDescriptor_0c843d59d2d938e7, []int{2}
}
func (m *CollapsedLn) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *CollapsedLn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	b = b[:cap(b)]
	n, err := m.MarshalToSizedBuffer(b)
	if err != nil {
		return nil, err
	}
	return b[:n], nil
}
func (m *CollapsedLn) XXX_Merge(src proto.Message) {
	xxx_messageInfo_CollapsedLn.Merge(m, src)
}
func (m *CollapsedLn) XXX_Size() int {
	return m.Size()
}
func (m *CollapsedLn) XXX_DiscardUnknown() {
	xxx_messageInfo_CollapsedLn.DiscardUnknown(m)
}

var xxx_messageInfo_CollapsedLn proto.InternalMessageInfo

func (m *CollapsedLn) GetKey() []byte {
	if m != nil {
		return m.Key
	}
	return nil
}

func (m *CollapsedLn) GetValue() []byte {
	if m != nil {
		return m.Value
	}
	return nil
}

func (m *CollapsedLn) GetVersion() uint32 {
	if m != nil {
		return m.Version
	}
	return 0
}

func init() {
	proto.RegisterType((*CollapsedBn)(nil), "proto.CollapsedBn")
	proto.RegisterType((*CollapsedEn)(nil), "proto.CollapsedEn")
	proto.RegisterType((*CollapsedLn)(nil), "proto.CollapsedLn")
}

func init() { proto.RegisterFile("node.proto", fileDescriptor_0c843d59d2d938e7) }

var fileDescriptor_0c843d59d2d938e7 = []byte{
	// 283 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xca, 0xcb, 0x4f, 0x49,
	0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19,
	0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xe1, 0xa4, 0xd2,
	0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xba, 0x94, 0x72, 0xb9, 0xb8, 0x9d, 0xf3, 0x73, 0x72,
	0x12, 0x0b, 0x8a, 0x53, 0x53, 0x9c, 0xf2, 0x84, 0xf4, 0xb8, 0xf8, 0x5d, 0xf3, 0x92, 0xf3, 0x53,
	0x52, 0x53, 0x9c, 0x33, 0x32, 0x73, 0x52, 0x8a, 0x52, 0xf3, 0x24, 0x18, 0x15, 0x98, 0x35, 0x78,
	0x9c, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x0c, 0x42, 0x97, 0x04, 0xa9, 0x87, 0xb1, 0xc3, 0x52, 0x8b,
	0x8a, 0x33, 0xf3, 0xf3, 0x24, 0x98, 0x14, 0x18, 0x11, 0xea, 0xd1, 0x24, 0x95, 0xd2, 0x91, 0xac,
	0x73, 0xcd, 0x13, 0x12, 0xe0, 0x62, 0xf6, 0x4e, 0xad, 0x94, 0x60, 0x04, 0x69, 0x09, 0x02, 0x31,
	0x85, 0x94, 0xb8, 0x78, 0x90, 0xed, 0x80, 0x98, 0x16, 0x84, 0x22, 0x06, 0x52, 0x03, 0x66, 0xc0,
	0x6c, 0x64, 0x56, 0x60, 0xd4, 0xe0, 0x0d, 0x42, 0x11, 0x53, 0xf2, 0x47, 0xb2, 0xc8, 0x07, 0x9b,
	0x45, 0x22, 0x5c, 0xac, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x50, 0x1b, 0x20, 0x1c, 0x21, 0x09, 0x2e,
	0x76, 0x54, 0x53, 0x61, 0x5c, 0x27, 0xbb, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8,
	0xf0, 0x50, 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31,
	0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9,
	0x31, 0x7c, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e,
	0xcb, 0x31, 0x44, 0xb1, 0x94, 0x14, 0x65, 0xa6, 0x26, 0xb1, 0x81, 0xc3, 0xdb, 0x18, 0x10, 0x00,
	0x00, 0xff, 0xff, 0x62, 0x19, 0x3f, 0xae, 0xb3, 0x01, 0x00, 0x00,
}

func (this *CollapsedBn) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*CollapsedBn)
	if !ok {
		that2, ok := that.(CollapsedBn)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if len(this.EncodedChildren) != len(that1.EncodedChildren) {
		return false
	}
	for i := range this.EncodedChildren {
		if !bytes.Equal(this.EncodedChildren[i], that1.EncodedChildren[i]) {
			return false
		}
	}
	if !bytes.Equal(this.ChildrenVersion, that1.ChildrenVersion) {
		return false
	}
	return true
}
func (this *CollapsedEn) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*CollapsedEn)
	if !ok {
		that2, ok := that.(CollapsedEn)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if !bytes.Equal(this.Key, that1.Key) {
		return false
	}
	if !bytes.Equal(this.EncodedChild, that1.EncodedChild) {
		return false
	}
	if this.ChildVersion != that1.ChildVersion {
		return false
	}
	return true
}
func (this *CollapsedLn) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*CollapsedLn)
	if !ok {
		that2, ok := that.(CollapsedLn)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if !bytes.Equal(this.Key, that1.Key) {
		return false
	}
	if !bytes.Equal(this.Value, that1.Value) {
		return false
	}
	if this.Version != that1.Version {
		return false
	}
	return true
}
func (this *CollapsedBn) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 6)
	s = append(s, "&trie.CollapsedBn{")
	s = append(s, "EncodedChildren: "+fmt.Sprintf("%#v", this.EncodedChildren)+",\n")
	s = append(s, "ChildrenVersion: "+fmt.Sprintf("%#v", this.ChildrenVersion)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *CollapsedEn) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 7)
	s = append(s, "&trie.CollapsedEn{")
	s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n")
	s = append(s, "EncodedChild: "+fmt.Sprintf("%#v", this.EncodedChild)+",\n")
	s = append(s, "ChildVersion: "+fmt.Sprintf("%#v", this.ChildVersion)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *CollapsedLn) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 7)
	s = append(s, "&trie.CollapsedLn{")
	s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n")
	s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
	s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func valueToGoStringNode(v interface{}, typ string) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *CollapsedBn) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *CollapsedBn) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *CollapsedBn) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ChildrenVersion) > 0 {
		i -= len(m.ChildrenVersion)
		copy(dAtA[i:], m.ChildrenVersion)
		i = encodeVarintNode(dAtA, i, uint64(len(m.ChildrenVersion)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.EncodedChildren) > 0 {
		for iNdEx := len(m.EncodedChildren) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.EncodedChildren[iNdEx])
			copy(dAtA[i:], m.EncodedChildren[iNdEx])
			i = encodeVarintNode(dAtA, i, uint64(len(m.EncodedChildren[iNdEx])))
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

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

func (m *CollapsedEn) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *CollapsedEn) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.ChildVersion != 0 {
		i = encodeVarintNode(dAtA, i, uint64(m.ChildVersion))
		i--
		dAtA[i] = 0x18
	}
	if len(m.EncodedChild) > 0 {
		i -= len(m.EncodedChild)
		copy(dAtA[i:], m.EncodedChild)
		i = encodeVarintNode(dAtA, i, uint64(len(m.EncodedChild)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Key) > 0 {
		i -= len(m.Key)
		copy(dAtA[i:], m.Key)
		i = encodeVarintNode(dAtA, i, uint64(len(m.Key)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *CollapsedLn) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *CollapsedLn) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Version != 0 {
		i = encodeVarintNode(dAtA, i, uint64(m.Version))
		i--
		dAtA[i] = 0x18
	}
	if len(m.Value) > 0 {
		i -= len(m.Value)
		copy(dAtA[i:], m.Value)
		i = encodeVarintNode(dAtA, i, uint64(len(m.Value)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Key) > 0 {
		i -= len(m.Key)
		copy(dAtA[i:], m.Key)
		i = encodeVarintNode(dAtA, i, uint64(len(m.Key)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintNode(dAtA []byte, offset int, v uint64) int {
	offset -= sovNode(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *CollapsedBn) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.EncodedChildren) > 0 {
		for _, b := range m.EncodedChildren {
			l = len(b)
			n += 1 + l + sovNode(uint64(l))
		}
	}
	l = len(m.ChildrenVersion)
	if l > 0 {
		n += 1 + l + sovNode(uint64(l))
	}
	return n
}

func (m *CollapsedEn) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Key)
	if l > 0 {
		n += 1 + l + sovNode(uint64(l))
	}
	l = len(m.EncodedChild)
	if l > 0 {
		n += 1 + l + sovNode(uint64(l))
	}
	if m.ChildVersion != 0 {
		n += 1 + sovNode(uint64(m.ChildVersion))
	}
	return n
}

func (m *CollapsedLn) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Key)
	if l > 0 {
		n += 1 + l + sovNode(uint64(l))
	}
	l = len(m.Value)
	if l > 0 {
		n += 1 + l + sovNode(uint64(l))
	}
	if m.Version != 0 {
		n += 1 + sovNode(uint64(m.Version))
	}
	return n
}

func sovNode(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozNode(x uint64) (n int) {
	return sovNode(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *CollapsedBn) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&CollapsedBn{`,
		`EncodedChildren:` + fmt.Sprintf("%v", this.EncodedChildren) + `,`,
		`ChildrenVersion:` + fmt.Sprintf("%v", this.ChildrenVersion) + `,`,
		`}`,
	}, "")
	return s
}
func (this *CollapsedEn) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&CollapsedEn{`,
		`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
		`EncodedChild:` + fmt.Sprintf("%v", this.EncodedChild) + `,`,
		`ChildVersion:` + fmt.Sprintf("%v", this.ChildVersion) + `,`,
		`}`,
	}, "")
	return s
}
func (this *CollapsedLn) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&CollapsedLn{`,
		`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
		`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
		`Version:` + fmt.Sprintf("%v", this.Version) + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringNode(v interface{}) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("*%v", pv)
}
func (m *CollapsedBn) 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 ErrIntOverflowNode
			}
			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: CollapsedBn: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: CollapsedBn: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field EncodedChildren", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowNode
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthNode
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthNode
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.EncodedChildren = append(m.EncodedChildren, make([]byte, postIndex-iNdEx))
			copy(m.EncodedChildren[len(m.EncodedChildren)-1], dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ChildrenVersion", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowNode
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthNode
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthNode
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ChildrenVersion = append(m.ChildrenVersion[:0], dAtA[iNdEx:postIndex]...)
			if m.ChildrenVersion == nil {
				m.ChildrenVersion = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipNode(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthNode
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthNode
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *CollapsedEn) 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 ErrIntOverflowNode
			}
			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: CollapsedEn: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: CollapsedEn: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowNode
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthNode
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthNode
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
			if m.Key == nil {
				m.Key = []byte{}
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field EncodedChild", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowNode
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthNode
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthNode
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.EncodedChild = append(m.EncodedChild[:0], dAtA[iNdEx:postIndex]...)
			if m.EncodedChild == nil {
				m.EncodedChild = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ChildVersion", wireType)
			}
			m.ChildVersion = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowNode
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.ChildVersion |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipNode(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthNode
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthNode
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *CollapsedLn) 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 ErrIntOverflowNode
			}
			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: CollapsedLn: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: CollapsedLn: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowNode
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthNode
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthNode
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
			if m.Key == nil {
				m.Key = []byte{}
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowNode
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthNode
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthNode
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
			if m.Value == nil {
				m.Value = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
			}
			m.Version = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowNode
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Version |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipNode(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthNode
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthNode
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipNode(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowNode
			}
			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, ErrIntOverflowNode
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowNode
				}
				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, ErrInvalidLengthNode
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupNode
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthNode
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthNode        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNode          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNode = fmt.Errorf("proto: unexpected end of group")
)
