1// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: github.com/containerd/containerd/api/types/descriptor.proto
3
4/*
5	Package types is a generated protocol buffer package.
6
7	It is generated from these files:
8		github.com/containerd/containerd/api/types/descriptor.proto
9		github.com/containerd/containerd/api/types/metrics.proto
10		github.com/containerd/containerd/api/types/mount.proto
11		github.com/containerd/containerd/api/types/platform.proto
12
13	It has these top-level messages:
14		Descriptor
15		Metric
16		Mount
17		Platform
18*/
19package types
20
21import proto "github.com/gogo/protobuf/proto"
22import fmt "fmt"
23import math "math"
24
25// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
26
27import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
28
29import strings "strings"
30import reflect "reflect"
31
32import io "io"
33
34// Reference imports to suppress errors if they are not otherwise used.
35var _ = proto.Marshal
36var _ = fmt.Errorf
37var _ = math.Inf
38
39// This is a compile-time assertion to ensure that this generated file
40// is compatible with the proto package it is being compiled against.
41// A compilation error at this line likely means your copy of the
42// proto package needs to be updated.
43const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
44
45// Descriptor describes a blob in a content store.
46//
47// This descriptor can be used to reference content from an
48// oci descriptor found in a manifest.
49// See https://godoc.org/github.com/opencontainers/image-spec/specs-go/v1#Descriptor
50type Descriptor struct {
51	MediaType string                                     `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
52	Digest    github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
53	Size_     int64                                      `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
54}
55
56func (m *Descriptor) Reset()                    { *m = Descriptor{} }
57func (*Descriptor) ProtoMessage()               {}
58func (*Descriptor) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{0} }
59
60func init() {
61	proto.RegisterType((*Descriptor)(nil), "containerd.types.Descriptor")
62}
63func (m *Descriptor) Marshal() (dAtA []byte, err error) {
64	size := m.Size()
65	dAtA = make([]byte, size)
66	n, err := m.MarshalTo(dAtA)
67	if err != nil {
68		return nil, err
69	}
70	return dAtA[:n], nil
71}
72
73func (m *Descriptor) MarshalTo(dAtA []byte) (int, error) {
74	var i int
75	_ = i
76	var l int
77	_ = l
78	if len(m.MediaType) > 0 {
79		dAtA[i] = 0xa
80		i++
81		i = encodeVarintDescriptor(dAtA, i, uint64(len(m.MediaType)))
82		i += copy(dAtA[i:], m.MediaType)
83	}
84	if len(m.Digest) > 0 {
85		dAtA[i] = 0x12
86		i++
87		i = encodeVarintDescriptor(dAtA, i, uint64(len(m.Digest)))
88		i += copy(dAtA[i:], m.Digest)
89	}
90	if m.Size_ != 0 {
91		dAtA[i] = 0x18
92		i++
93		i = encodeVarintDescriptor(dAtA, i, uint64(m.Size_))
94	}
95	return i, nil
96}
97
98func encodeVarintDescriptor(dAtA []byte, offset int, v uint64) int {
99	for v >= 1<<7 {
100		dAtA[offset] = uint8(v&0x7f | 0x80)
101		v >>= 7
102		offset++
103	}
104	dAtA[offset] = uint8(v)
105	return offset + 1
106}
107func (m *Descriptor) Size() (n int) {
108	var l int
109	_ = l
110	l = len(m.MediaType)
111	if l > 0 {
112		n += 1 + l + sovDescriptor(uint64(l))
113	}
114	l = len(m.Digest)
115	if l > 0 {
116		n += 1 + l + sovDescriptor(uint64(l))
117	}
118	if m.Size_ != 0 {
119		n += 1 + sovDescriptor(uint64(m.Size_))
120	}
121	return n
122}
123
124func sovDescriptor(x uint64) (n int) {
125	for {
126		n++
127		x >>= 7
128		if x == 0 {
129			break
130		}
131	}
132	return n
133}
134func sozDescriptor(x uint64) (n int) {
135	return sovDescriptor(uint64((x << 1) ^ uint64((int64(x) >> 63))))
136}
137func (this *Descriptor) String() string {
138	if this == nil {
139		return "nil"
140	}
141	s := strings.Join([]string{`&Descriptor{`,
142		`MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`,
143		`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
144		`Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
145		`}`,
146	}, "")
147	return s
148}
149func valueToStringDescriptor(v interface{}) string {
150	rv := reflect.ValueOf(v)
151	if rv.IsNil() {
152		return "nil"
153	}
154	pv := reflect.Indirect(rv).Interface()
155	return fmt.Sprintf("*%v", pv)
156}
157func (m *Descriptor) Unmarshal(dAtA []byte) error {
158	l := len(dAtA)
159	iNdEx := 0
160	for iNdEx < l {
161		preIndex := iNdEx
162		var wire uint64
163		for shift := uint(0); ; shift += 7 {
164			if shift >= 64 {
165				return ErrIntOverflowDescriptor
166			}
167			if iNdEx >= l {
168				return io.ErrUnexpectedEOF
169			}
170			b := dAtA[iNdEx]
171			iNdEx++
172			wire |= (uint64(b) & 0x7F) << shift
173			if b < 0x80 {
174				break
175			}
176		}
177		fieldNum := int32(wire >> 3)
178		wireType := int(wire & 0x7)
179		if wireType == 4 {
180			return fmt.Errorf("proto: Descriptor: wiretype end group for non-group")
181		}
182		if fieldNum <= 0 {
183			return fmt.Errorf("proto: Descriptor: illegal tag %d (wire type %d)", fieldNum, wire)
184		}
185		switch fieldNum {
186		case 1:
187			if wireType != 2 {
188				return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType)
189			}
190			var stringLen uint64
191			for shift := uint(0); ; shift += 7 {
192				if shift >= 64 {
193					return ErrIntOverflowDescriptor
194				}
195				if iNdEx >= l {
196					return io.ErrUnexpectedEOF
197				}
198				b := dAtA[iNdEx]
199				iNdEx++
200				stringLen |= (uint64(b) & 0x7F) << shift
201				if b < 0x80 {
202					break
203				}
204			}
205			intStringLen := int(stringLen)
206			if intStringLen < 0 {
207				return ErrInvalidLengthDescriptor
208			}
209			postIndex := iNdEx + intStringLen
210			if postIndex > l {
211				return io.ErrUnexpectedEOF
212			}
213			m.MediaType = string(dAtA[iNdEx:postIndex])
214			iNdEx = postIndex
215		case 2:
216			if wireType != 2 {
217				return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType)
218			}
219			var stringLen uint64
220			for shift := uint(0); ; shift += 7 {
221				if shift >= 64 {
222					return ErrIntOverflowDescriptor
223				}
224				if iNdEx >= l {
225					return io.ErrUnexpectedEOF
226				}
227				b := dAtA[iNdEx]
228				iNdEx++
229				stringLen |= (uint64(b) & 0x7F) << shift
230				if b < 0x80 {
231					break
232				}
233			}
234			intStringLen := int(stringLen)
235			if intStringLen < 0 {
236				return ErrInvalidLengthDescriptor
237			}
238			postIndex := iNdEx + intStringLen
239			if postIndex > l {
240				return io.ErrUnexpectedEOF
241			}
242			m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex])
243			iNdEx = postIndex
244		case 3:
245			if wireType != 0 {
246				return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
247			}
248			m.Size_ = 0
249			for shift := uint(0); ; shift += 7 {
250				if shift >= 64 {
251					return ErrIntOverflowDescriptor
252				}
253				if iNdEx >= l {
254					return io.ErrUnexpectedEOF
255				}
256				b := dAtA[iNdEx]
257				iNdEx++
258				m.Size_ |= (int64(b) & 0x7F) << shift
259				if b < 0x80 {
260					break
261				}
262			}
263		default:
264			iNdEx = preIndex
265			skippy, err := skipDescriptor(dAtA[iNdEx:])
266			if err != nil {
267				return err
268			}
269			if skippy < 0 {
270				return ErrInvalidLengthDescriptor
271			}
272			if (iNdEx + skippy) > l {
273				return io.ErrUnexpectedEOF
274			}
275			iNdEx += skippy
276		}
277	}
278
279	if iNdEx > l {
280		return io.ErrUnexpectedEOF
281	}
282	return nil
283}
284func skipDescriptor(dAtA []byte) (n int, err error) {
285	l := len(dAtA)
286	iNdEx := 0
287	for iNdEx < l {
288		var wire uint64
289		for shift := uint(0); ; shift += 7 {
290			if shift >= 64 {
291				return 0, ErrIntOverflowDescriptor
292			}
293			if iNdEx >= l {
294				return 0, io.ErrUnexpectedEOF
295			}
296			b := dAtA[iNdEx]
297			iNdEx++
298			wire |= (uint64(b) & 0x7F) << shift
299			if b < 0x80 {
300				break
301			}
302		}
303		wireType := int(wire & 0x7)
304		switch wireType {
305		case 0:
306			for shift := uint(0); ; shift += 7 {
307				if shift >= 64 {
308					return 0, ErrIntOverflowDescriptor
309				}
310				if iNdEx >= l {
311					return 0, io.ErrUnexpectedEOF
312				}
313				iNdEx++
314				if dAtA[iNdEx-1] < 0x80 {
315					break
316				}
317			}
318			return iNdEx, nil
319		case 1:
320			iNdEx += 8
321			return iNdEx, nil
322		case 2:
323			var length int
324			for shift := uint(0); ; shift += 7 {
325				if shift >= 64 {
326					return 0, ErrIntOverflowDescriptor
327				}
328				if iNdEx >= l {
329					return 0, io.ErrUnexpectedEOF
330				}
331				b := dAtA[iNdEx]
332				iNdEx++
333				length |= (int(b) & 0x7F) << shift
334				if b < 0x80 {
335					break
336				}
337			}
338			iNdEx += length
339			if length < 0 {
340				return 0, ErrInvalidLengthDescriptor
341			}
342			return iNdEx, nil
343		case 3:
344			for {
345				var innerWire uint64
346				var start int = iNdEx
347				for shift := uint(0); ; shift += 7 {
348					if shift >= 64 {
349						return 0, ErrIntOverflowDescriptor
350					}
351					if iNdEx >= l {
352						return 0, io.ErrUnexpectedEOF
353					}
354					b := dAtA[iNdEx]
355					iNdEx++
356					innerWire |= (uint64(b) & 0x7F) << shift
357					if b < 0x80 {
358						break
359					}
360				}
361				innerWireType := int(innerWire & 0x7)
362				if innerWireType == 4 {
363					break
364				}
365				next, err := skipDescriptor(dAtA[start:])
366				if err != nil {
367					return 0, err
368				}
369				iNdEx = start + next
370			}
371			return iNdEx, nil
372		case 4:
373			return iNdEx, nil
374		case 5:
375			iNdEx += 4
376			return iNdEx, nil
377		default:
378			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
379		}
380	}
381	panic("unreachable")
382}
383
384var (
385	ErrInvalidLengthDescriptor = fmt.Errorf("proto: negative length found during unmarshaling")
386	ErrIntOverflowDescriptor   = fmt.Errorf("proto: integer overflow")
387)
388
389func init() {
390	proto.RegisterFile("github.com/containerd/containerd/api/types/descriptor.proto", fileDescriptorDescriptor)
391}
392
393var fileDescriptorDescriptor = []byte{
394	// 234 bytes of a gzipped FileDescriptorProto
395	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
396	0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
397	0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xa7, 0xa4, 0x16,
398	0x27, 0x17, 0x65, 0x16, 0x94, 0xe4, 0x17, 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20,
399	0x94, 0xe9, 0x81, 0x95, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88,
400	0x3a, 0xa5, 0x6e, 0x46, 0x2e, 0x2e, 0x17, 0xb8, 0x66, 0x21, 0x59, 0x2e, 0xae, 0xdc, 0xd4, 0x94,
401	0xcc, 0xc4, 0x78, 0x90, 0x1e, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x4e, 0xb0, 0x48, 0x48,
402	0x65, 0x41, 0xaa, 0x90, 0x17, 0x17, 0x5b, 0x4a, 0x66, 0x7a, 0x6a, 0x71, 0x89, 0x04, 0x13, 0x48,
403	0xca, 0xc9, 0xe8, 0xc4, 0x3d, 0x79, 0x86, 0x5b, 0xf7, 0xe4, 0xb5, 0x90, 0x9c, 0x9a, 0x5f, 0x90,
404	0x9a, 0x07, 0xb7, 0xbc, 0x58, 0x3f, 0x3d, 0x5f, 0x17, 0xa2, 0x45, 0xcf, 0x05, 0x4c, 0x05, 0x41,
405	0x4d, 0x10, 0x12, 0xe2, 0x62, 0x29, 0xce, 0xac, 0x4a, 0x95, 0x60, 0x56, 0x60, 0xd4, 0x60, 0x0e,
406	0x02, 0xb3, 0x9d, 0xbc, 0x4e, 0x3c, 0x94, 0x63, 0xb8, 0xf1, 0x50, 0x8e, 0xa1, 0xe1, 0x91, 0x1c,
407	0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x18, 0x65, 0x40,
408	0x7c, 0x60, 0x58, 0x83, 0xc9, 0x08, 0x86, 0x24, 0x36, 0xb0, 0x17, 0x8d, 0x01, 0x01, 0x00, 0x00,
409	0xff, 0xff, 0xea, 0xac, 0x78, 0x9a, 0x49, 0x01, 0x00, 0x00,
410}
411