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

package models

import (
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
	reflect "reflect"
	strconv "strconv"
	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 ImageLayer_DigestAlgorithm int32

const (
	DigestAlgorithmInvalid ImageLayer_DigestAlgorithm = 0
	DigestAlgorithmSha256  ImageLayer_DigestAlgorithm = 1
	DigestAlgorithmSha512  ImageLayer_DigestAlgorithm = 2 // Deprecated: Do not use.
)

var ImageLayer_DigestAlgorithm_name = map[int32]string{
	0: "DigestAlgorithmInvalid",
	1: "SHA256",
	2: "SHA512",
}

var ImageLayer_DigestAlgorithm_value = map[string]int32{
	"DigestAlgorithmInvalid": 0,
	"SHA256":                 1,
	"SHA512":                 2,
}

func (ImageLayer_DigestAlgorithm) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_c089288d9f3c46a0, []int{0, 0}
}

type ImageLayer_MediaType int32

const (
	MediaTypeInvalid ImageLayer_MediaType = 0
	MediaTypeTgz     ImageLayer_MediaType = 1
	MediaTypeTar     ImageLayer_MediaType = 2
	MediaTypeZip     ImageLayer_MediaType = 3
)

var ImageLayer_MediaType_name = map[int32]string{
	0: "MediaTypeInvalid",
	1: "TGZ",
	2: "TAR",
	3: "ZIP",
}

var ImageLayer_MediaType_value = map[string]int32{
	"MediaTypeInvalid": 0,
	"TGZ":              1,
	"TAR":              2,
	"ZIP":              3,
}

func (ImageLayer_MediaType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_c089288d9f3c46a0, []int{0, 1}
}

type ImageLayer_Type int32

const (
	LayerTypeInvalid   ImageLayer_Type = 0
	LayerTypeShared    ImageLayer_Type = 1
	LayerTypeExclusive ImageLayer_Type = 2
)

var ImageLayer_Type_name = map[int32]string{
	0: "LayerTypeInvalid",
	1: "SHARED",
	2: "EXCLUSIVE",
}

var ImageLayer_Type_value = map[string]int32{
	"LayerTypeInvalid": 0,
	"SHARED":           1,
	"EXCLUSIVE":        2,
}

func (ImageLayer_Type) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_c089288d9f3c46a0, []int{0, 2}
}

type ImageLayer struct {
	Name            string                     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Url             string                     `protobuf:"bytes,2,opt,name=url,proto3" json:"url"`
	DestinationPath string                     `protobuf:"bytes,3,opt,name=destination_path,json=destinationPath,proto3" json:"destination_path"`
	LayerType       ImageLayer_Type            `protobuf:"varint,4,opt,name=layer_type,json=layerType,proto3,enum=models.ImageLayer_Type" json:"layer_type"`
	MediaType       ImageLayer_MediaType       `protobuf:"varint,5,opt,name=media_type,json=mediaType,proto3,enum=models.ImageLayer_MediaType" json:"media_type"`
	DigestAlgorithm ImageLayer_DigestAlgorithm `protobuf:"varint,6,opt,name=digest_algorithm,json=digestAlgorithm,proto3,enum=models.ImageLayer_DigestAlgorithm" json:"digest_algorithm,omitempty"`
	DigestValue     string                     `protobuf:"bytes,7,opt,name=digest_value,json=digestValue,proto3" json:"digest_value,omitempty"`
}

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

var xxx_messageInfo_ImageLayer proto.InternalMessageInfo

func (m *ImageLayer) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *ImageLayer) GetUrl() string {
	if m != nil {
		return m.Url
	}
	return ""
}

func (m *ImageLayer) GetDestinationPath() string {
	if m != nil {
		return m.DestinationPath
	}
	return ""
}

func (m *ImageLayer) GetLayerType() ImageLayer_Type {
	if m != nil {
		return m.LayerType
	}
	return LayerTypeInvalid
}

func (m *ImageLayer) GetMediaType() ImageLayer_MediaType {
	if m != nil {
		return m.MediaType
	}
	return MediaTypeInvalid
}

func (m *ImageLayer) GetDigestAlgorithm() ImageLayer_DigestAlgorithm {
	if m != nil {
		return m.DigestAlgorithm
	}
	return DigestAlgorithmInvalid
}

func (m *ImageLayer) GetDigestValue() string {
	if m != nil {
		return m.DigestValue
	}
	return ""
}

func init() {
	proto.RegisterEnum("models.ImageLayer_DigestAlgorithm", ImageLayer_DigestAlgorithm_name, ImageLayer_DigestAlgorithm_value)
	proto.RegisterEnum("models.ImageLayer_MediaType", ImageLayer_MediaType_name, ImageLayer_MediaType_value)
	proto.RegisterEnum("models.ImageLayer_Type", ImageLayer_Type_name, ImageLayer_Type_value)
	proto.RegisterType((*ImageLayer)(nil), "models.ImageLayer")
}

func init() { proto.RegisterFile("image_layer.proto", fileDescriptor_c089288d9f3c46a0) }

var fileDescriptor_c089288d9f3c46a0 = []byte{
	// 533 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x41, 0x6f, 0x12, 0x41,
	0x14, 0xc7, 0x77, 0xa0, 0xa5, 0xf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, 0x70, 0xa4, 0xee, 0xae, 0x80, 0xba, 0xf1, 0x59, 0x58, 0x45,
	0x0d, 0xc7, 0xa2, 0x16, 0xf3, 0x42, 0xab, 0x51, 0xb9, 0xc0, 0xf1, 0x88, 0xd5, 0xb0, 0x3a, 0x59,
	0x1d, 0xb6, 0x96, 0xe3, 0xaa, 0xcb, 0xdf, 0xb8, 0x1e, 0x97, 0x11, 0x5b, 0xd7, 0xca, 0x67, 0x18,
	0x29, 0xf7, 0x87, 0x23, 0x35, 0xb5, 0x62, 0x6a, 0x26, 0xf3, 0xb8, 0x4e, 0x0e, 0x21, 0x59, 0xfe,
	0xf0, 0xaa, 0xfa, 0xbe, 0x56, 0xb9, 0x2c, 0xe3, 0x98, 0x72, 0x30, 0x1c, 0xa9, 0x64, 0xc5, 0x94,
	0x3f, 0x5d, 0xd9, 0xbd, 0xae, 0xd5, 0xe7, 0xa5, 0x17, 0xe3, 0x29, 0x95, 0xae, 0xa7, 0x54, 0xba,
	0x99, 0x52, 0xf4, 0x35, 0xa0, 0xe8, 0x7b, 0x40, 0xd1, 0x8f, 0x80, 0xa2, 0x71, 0x40, 0xd1, 0xaf,
	0x80, 0xa2, 0xdf, 0x01, 0x95, 0x6e, 0x02, 0x8a, 0xbe, 0xcd, 0xa8, 0x34, 0x9e, 0x51, 0xe9, 0x7a,
	0x46, 0xa5, 0x56, 0x42, 0xbc, 0x8d, 0xe7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5a, 0x90, 0xc9,
	0x42, 0x67, 0x03, 0x00, 0x00,
}

func (x ImageLayer_DigestAlgorithm) String() string {
	s, ok := ImageLayer_DigestAlgorithm_name[int32(x)]
	if ok {
		return s
	}
	return strconv.Itoa(int(x))
}
func (x ImageLayer_MediaType) String() string {
	s, ok := ImageLayer_MediaType_name[int32(x)]
	if ok {
		return s
	}
	return strconv.Itoa(int(x))
}
func (x ImageLayer_Type) String() string {
	s, ok := ImageLayer_Type_name[int32(x)]
	if ok {
		return s
	}
	return strconv.Itoa(int(x))
}
func (this *ImageLayer) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*ImageLayer)
	if !ok {
		that2, ok := that.(ImageLayer)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.Name != that1.Name {
		return false
	}
	if this.Url != that1.Url {
		return false
	}
	if this.DestinationPath != that1.DestinationPath {
		return false
	}
	if this.LayerType != that1.LayerType {
		return false
	}
	if this.MediaType != that1.MediaType {
		return false
	}
	if this.DigestAlgorithm != that1.DigestAlgorithm {
		return false
	}
	if this.DigestValue != that1.DigestValue {
		return false
	}
	return true
}
func (this *ImageLayer) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 11)
	s = append(s, "&models.ImageLayer{")
	s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
	s = append(s, "Url: "+fmt.Sprintf("%#v", this.Url)+",\n")
	s = append(s, "DestinationPath: "+fmt.Sprintf("%#v", this.DestinationPath)+",\n")
	s = append(s, "LayerType: "+fmt.Sprintf("%#v", this.LayerType)+",\n")
	s = append(s, "MediaType: "+fmt.Sprintf("%#v", this.MediaType)+",\n")
	s = append(s, "DigestAlgorithm: "+fmt.Sprintf("%#v", this.DigestAlgorithm)+",\n")
	s = append(s, "DigestValue: "+fmt.Sprintf("%#v", this.DigestValue)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func valueToGoStringImageLayer(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 *ImageLayer) 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 *ImageLayer) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *ImageLayer) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.DigestValue) > 0 {
		i -= len(m.DigestValue)
		copy(dAtA[i:], m.DigestValue)
		i = encodeVarintImageLayer(dAtA, i, uint64(len(m.DigestValue)))
		i--
		dAtA[i] = 0x3a
	}
	if m.DigestAlgorithm != 0 {
		i = encodeVarintImageLayer(dAtA, i, uint64(m.DigestAlgorithm))
		i--
		dAtA[i] = 0x30
	}
	if m.MediaType != 0 {
		i = encodeVarintImageLayer(dAtA, i, uint64(m.MediaType))
		i--
		dAtA[i] = 0x28
	}
	if m.LayerType != 0 {
		i = encodeVarintImageLayer(dAtA, i, uint64(m.LayerType))
		i--
		dAtA[i] = 0x20
	}
	if len(m.DestinationPath) > 0 {
		i -= len(m.DestinationPath)
		copy(dAtA[i:], m.DestinationPath)
		i = encodeVarintImageLayer(dAtA, i, uint64(len(m.DestinationPath)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Url) > 0 {
		i -= len(m.Url)
		copy(dAtA[i:], m.Url)
		i = encodeVarintImageLayer(dAtA, i, uint64(len(m.Url)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = encodeVarintImageLayer(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintImageLayer(dAtA []byte, offset int, v uint64) int {
	offset -= sovImageLayer(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *ImageLayer) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovImageLayer(uint64(l))
	}
	l = len(m.Url)
	if l > 0 {
		n += 1 + l + sovImageLayer(uint64(l))
	}
	l = len(m.DestinationPath)
	if l > 0 {
		n += 1 + l + sovImageLayer(uint64(l))
	}
	if m.LayerType != 0 {
		n += 1 + sovImageLayer(uint64(m.LayerType))
	}
	if m.MediaType != 0 {
		n += 1 + sovImageLayer(uint64(m.MediaType))
	}
	if m.DigestAlgorithm != 0 {
		n += 1 + sovImageLayer(uint64(m.DigestAlgorithm))
	}
	l = len(m.DigestValue)
	if l > 0 {
		n += 1 + l + sovImageLayer(uint64(l))
	}
	return n
}

func sovImageLayer(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozImageLayer(x uint64) (n int) {
	return sovImageLayer(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *ImageLayer) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&ImageLayer{`,
		`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
		`Url:` + fmt.Sprintf("%v", this.Url) + `,`,
		`DestinationPath:` + fmt.Sprintf("%v", this.DestinationPath) + `,`,
		`LayerType:` + fmt.Sprintf("%v", this.LayerType) + `,`,
		`MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`,
		`DigestAlgorithm:` + fmt.Sprintf("%v", this.DigestAlgorithm) + `,`,
		`DigestValue:` + fmt.Sprintf("%v", this.DigestValue) + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringImageLayer(v interface{}) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("*%v", pv)
}
func (m *ImageLayer) 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 ErrIntOverflowImageLayer
			}
			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: ImageLayer: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ImageLayer: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowImageLayer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthImageLayer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthImageLayer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowImageLayer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthImageLayer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthImageLayer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Url = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field DestinationPath", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowImageLayer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthImageLayer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthImageLayer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.DestinationPath = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field LayerType", wireType)
			}
			m.LayerType = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowImageLayer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.LayerType |= ImageLayer_Type(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType)
			}
			m.MediaType = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowImageLayer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.MediaType |= ImageLayer_MediaType(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType)
			}
			m.DigestAlgorithm = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowImageLayer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.DigestAlgorithm |= ImageLayer_DigestAlgorithm(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field DigestValue", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowImageLayer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthImageLayer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthImageLayer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.DigestValue = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipImageLayer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthImageLayer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipImageLayer(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, ErrIntOverflowImageLayer
			}
			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, ErrIntOverflowImageLayer
				}
				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, ErrIntOverflowImageLayer
				}
				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, ErrInvalidLengthImageLayer
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupImageLayer
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthImageLayer
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthImageLayer        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowImageLayer          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupImageLayer = fmt.Errorf("proto: unexpected end of group")
)
