1// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: github.com/containerd/containerd/api/types/platform.proto
3
4package types
5
6import (
7	fmt "fmt"
8	proto "github.com/gogo/protobuf/proto"
9	io "io"
10	math "math"
11	math_bits "math/bits"
12	reflect "reflect"
13	strings "strings"
14)
15
16// Reference imports to suppress errors if they are not otherwise used.
17var _ = proto.Marshal
18var _ = fmt.Errorf
19var _ = math.Inf
20
21// This is a compile-time assertion to ensure that this generated file
22// is compatible with the proto package it is being compiled against.
23// A compilation error at this line likely means your copy of the
24// proto package needs to be updated.
25const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
26
27// Platform follows the structure of the OCI platform specification, from
28// descriptors.
29type Platform struct {
30	OS                   string   `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"`
31	Architecture         string   `protobuf:"bytes,2,opt,name=architecture,proto3" json:"architecture,omitempty"`
32	Variant              string   `protobuf:"bytes,3,opt,name=variant,proto3" json:"variant,omitempty"`
33	XXX_NoUnkeyedLiteral struct{} `json:"-"`
34	XXX_unrecognized     []byte   `json:"-"`
35	XXX_sizecache        int32    `json:"-"`
36}
37
38func (m *Platform) Reset()      { *m = Platform{} }
39func (*Platform) ProtoMessage() {}
40func (*Platform) Descriptor() ([]byte, []int) {
41	return fileDescriptor_24ba7a4b83e2367e, []int{0}
42}
43func (m *Platform) XXX_Unmarshal(b []byte) error {
44	return m.Unmarshal(b)
45}
46func (m *Platform) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
47	if deterministic {
48		return xxx_messageInfo_Platform.Marshal(b, m, deterministic)
49	} else {
50		b = b[:cap(b)]
51		n, err := m.MarshalToSizedBuffer(b)
52		if err != nil {
53			return nil, err
54		}
55		return b[:n], nil
56	}
57}
58func (m *Platform) XXX_Merge(src proto.Message) {
59	xxx_messageInfo_Platform.Merge(m, src)
60}
61func (m *Platform) XXX_Size() int {
62	return m.Size()
63}
64func (m *Platform) XXX_DiscardUnknown() {
65	xxx_messageInfo_Platform.DiscardUnknown(m)
66}
67
68var xxx_messageInfo_Platform proto.InternalMessageInfo
69
70func init() {
71	proto.RegisterType((*Platform)(nil), "containerd.types.Platform")
72}
73
74func init() {
75	proto.RegisterFile("github.com/containerd/containerd/api/types/platform.proto", fileDescriptor_24ba7a4b83e2367e)
76}
77
78var fileDescriptor_24ba7a4b83e2367e = []byte{
79	// 205 bytes of a gzipped FileDescriptorProto
80	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
81	0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
82	0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0x17, 0xe4, 0x24,
83	0x96, 0xa4, 0xe5, 0x17, 0xe5, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x14, 0xe9,
84	0x81, 0x15, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88, 0x3a, 0xa5,
85	0x04, 0x2e, 0x8e, 0x00, 0xa8, 0x4e, 0x21, 0x31, 0x2e, 0xa6, 0xfc, 0x62, 0x09, 0x46, 0x05, 0x46,
86	0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0xfc, 0x83, 0x83, 0x98, 0xf2, 0x8b, 0x85, 0x94,
87	0xb8, 0x78, 0x12, 0x8b, 0x92, 0x33, 0x32, 0x4b, 0x52, 0x93, 0x4b, 0x4a, 0x8b, 0x52, 0x25, 0x98,
88	0x40, 0x2a, 0x82, 0x50, 0xc4, 0x84, 0x24, 0xb8, 0xd8, 0xcb, 0x12, 0x8b, 0x32, 0x13, 0xf3, 0x4a,
89	0x24, 0x98, 0xc1, 0xd2, 0x30, 0xae, 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31,
90	0x34, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4,
91	0x18, 0xa3, 0x0c, 0x88, 0xf7, 0x9e, 0x35, 0x98, 0x8c, 0x60, 0x48, 0x62, 0x03, 0x3b, 0xdb, 0x18,
92	0x10, 0x00, 0x00, 0xff, 0xff, 0x05, 0xaa, 0xda, 0xa1, 0x1b, 0x01, 0x00, 0x00,
93}
94
95func (m *Platform) Marshal() (dAtA []byte, err error) {
96	size := m.Size()
97	dAtA = make([]byte, size)
98	n, err := m.MarshalToSizedBuffer(dAtA[:size])
99	if err != nil {
100		return nil, err
101	}
102	return dAtA[:n], nil
103}
104
105func (m *Platform) MarshalTo(dAtA []byte) (int, error) {
106	size := m.Size()
107	return m.MarshalToSizedBuffer(dAtA[:size])
108}
109
110func (m *Platform) MarshalToSizedBuffer(dAtA []byte) (int, error) {
111	i := len(dAtA)
112	_ = i
113	var l int
114	_ = l
115	if m.XXX_unrecognized != nil {
116		i -= len(m.XXX_unrecognized)
117		copy(dAtA[i:], m.XXX_unrecognized)
118	}
119	if len(m.Variant) > 0 {
120		i -= len(m.Variant)
121		copy(dAtA[i:], m.Variant)
122		i = encodeVarintPlatform(dAtA, i, uint64(len(m.Variant)))
123		i--
124		dAtA[i] = 0x1a
125	}
126	if len(m.Architecture) > 0 {
127		i -= len(m.Architecture)
128		copy(dAtA[i:], m.Architecture)
129		i = encodeVarintPlatform(dAtA, i, uint64(len(m.Architecture)))
130		i--
131		dAtA[i] = 0x12
132	}
133	if len(m.OS) > 0 {
134		i -= len(m.OS)
135		copy(dAtA[i:], m.OS)
136		i = encodeVarintPlatform(dAtA, i, uint64(len(m.OS)))
137		i--
138		dAtA[i] = 0xa
139	}
140	return len(dAtA) - i, nil
141}
142
143func encodeVarintPlatform(dAtA []byte, offset int, v uint64) int {
144	offset -= sovPlatform(v)
145	base := offset
146	for v >= 1<<7 {
147		dAtA[offset] = uint8(v&0x7f | 0x80)
148		v >>= 7
149		offset++
150	}
151	dAtA[offset] = uint8(v)
152	return base
153}
154func (m *Platform) Size() (n int) {
155	if m == nil {
156		return 0
157	}
158	var l int
159	_ = l
160	l = len(m.OS)
161	if l > 0 {
162		n += 1 + l + sovPlatform(uint64(l))
163	}
164	l = len(m.Architecture)
165	if l > 0 {
166		n += 1 + l + sovPlatform(uint64(l))
167	}
168	l = len(m.Variant)
169	if l > 0 {
170		n += 1 + l + sovPlatform(uint64(l))
171	}
172	if m.XXX_unrecognized != nil {
173		n += len(m.XXX_unrecognized)
174	}
175	return n
176}
177
178func sovPlatform(x uint64) (n int) {
179	return (math_bits.Len64(x|1) + 6) / 7
180}
181func sozPlatform(x uint64) (n int) {
182	return sovPlatform(uint64((x << 1) ^ uint64((int64(x) >> 63))))
183}
184func (this *Platform) String() string {
185	if this == nil {
186		return "nil"
187	}
188	s := strings.Join([]string{`&Platform{`,
189		`OS:` + fmt.Sprintf("%v", this.OS) + `,`,
190		`Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`,
191		`Variant:` + fmt.Sprintf("%v", this.Variant) + `,`,
192		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
193		`}`,
194	}, "")
195	return s
196}
197func valueToStringPlatform(v interface{}) string {
198	rv := reflect.ValueOf(v)
199	if rv.IsNil() {
200		return "nil"
201	}
202	pv := reflect.Indirect(rv).Interface()
203	return fmt.Sprintf("*%v", pv)
204}
205func (m *Platform) Unmarshal(dAtA []byte) error {
206	l := len(dAtA)
207	iNdEx := 0
208	for iNdEx < l {
209		preIndex := iNdEx
210		var wire uint64
211		for shift := uint(0); ; shift += 7 {
212			if shift >= 64 {
213				return ErrIntOverflowPlatform
214			}
215			if iNdEx >= l {
216				return io.ErrUnexpectedEOF
217			}
218			b := dAtA[iNdEx]
219			iNdEx++
220			wire |= uint64(b&0x7F) << shift
221			if b < 0x80 {
222				break
223			}
224		}
225		fieldNum := int32(wire >> 3)
226		wireType := int(wire & 0x7)
227		if wireType == 4 {
228			return fmt.Errorf("proto: Platform: wiretype end group for non-group")
229		}
230		if fieldNum <= 0 {
231			return fmt.Errorf("proto: Platform: illegal tag %d (wire type %d)", fieldNum, wire)
232		}
233		switch fieldNum {
234		case 1:
235			if wireType != 2 {
236				return fmt.Errorf("proto: wrong wireType = %d for field OS", wireType)
237			}
238			var stringLen uint64
239			for shift := uint(0); ; shift += 7 {
240				if shift >= 64 {
241					return ErrIntOverflowPlatform
242				}
243				if iNdEx >= l {
244					return io.ErrUnexpectedEOF
245				}
246				b := dAtA[iNdEx]
247				iNdEx++
248				stringLen |= uint64(b&0x7F) << shift
249				if b < 0x80 {
250					break
251				}
252			}
253			intStringLen := int(stringLen)
254			if intStringLen < 0 {
255				return ErrInvalidLengthPlatform
256			}
257			postIndex := iNdEx + intStringLen
258			if postIndex < 0 {
259				return ErrInvalidLengthPlatform
260			}
261			if postIndex > l {
262				return io.ErrUnexpectedEOF
263			}
264			m.OS = string(dAtA[iNdEx:postIndex])
265			iNdEx = postIndex
266		case 2:
267			if wireType != 2 {
268				return fmt.Errorf("proto: wrong wireType = %d for field Architecture", wireType)
269			}
270			var stringLen uint64
271			for shift := uint(0); ; shift += 7 {
272				if shift >= 64 {
273					return ErrIntOverflowPlatform
274				}
275				if iNdEx >= l {
276					return io.ErrUnexpectedEOF
277				}
278				b := dAtA[iNdEx]
279				iNdEx++
280				stringLen |= uint64(b&0x7F) << shift
281				if b < 0x80 {
282					break
283				}
284			}
285			intStringLen := int(stringLen)
286			if intStringLen < 0 {
287				return ErrInvalidLengthPlatform
288			}
289			postIndex := iNdEx + intStringLen
290			if postIndex < 0 {
291				return ErrInvalidLengthPlatform
292			}
293			if postIndex > l {
294				return io.ErrUnexpectedEOF
295			}
296			m.Architecture = string(dAtA[iNdEx:postIndex])
297			iNdEx = postIndex
298		case 3:
299			if wireType != 2 {
300				return fmt.Errorf("proto: wrong wireType = %d for field Variant", wireType)
301			}
302			var stringLen uint64
303			for shift := uint(0); ; shift += 7 {
304				if shift >= 64 {
305					return ErrIntOverflowPlatform
306				}
307				if iNdEx >= l {
308					return io.ErrUnexpectedEOF
309				}
310				b := dAtA[iNdEx]
311				iNdEx++
312				stringLen |= uint64(b&0x7F) << shift
313				if b < 0x80 {
314					break
315				}
316			}
317			intStringLen := int(stringLen)
318			if intStringLen < 0 {
319				return ErrInvalidLengthPlatform
320			}
321			postIndex := iNdEx + intStringLen
322			if postIndex < 0 {
323				return ErrInvalidLengthPlatform
324			}
325			if postIndex > l {
326				return io.ErrUnexpectedEOF
327			}
328			m.Variant = string(dAtA[iNdEx:postIndex])
329			iNdEx = postIndex
330		default:
331			iNdEx = preIndex
332			skippy, err := skipPlatform(dAtA[iNdEx:])
333			if err != nil {
334				return err
335			}
336			if skippy < 0 {
337				return ErrInvalidLengthPlatform
338			}
339			if (iNdEx + skippy) < 0 {
340				return ErrInvalidLengthPlatform
341			}
342			if (iNdEx + skippy) > l {
343				return io.ErrUnexpectedEOF
344			}
345			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
346			iNdEx += skippy
347		}
348	}
349
350	if iNdEx > l {
351		return io.ErrUnexpectedEOF
352	}
353	return nil
354}
355func skipPlatform(dAtA []byte) (n int, err error) {
356	l := len(dAtA)
357	iNdEx := 0
358	depth := 0
359	for iNdEx < l {
360		var wire uint64
361		for shift := uint(0); ; shift += 7 {
362			if shift >= 64 {
363				return 0, ErrIntOverflowPlatform
364			}
365			if iNdEx >= l {
366				return 0, io.ErrUnexpectedEOF
367			}
368			b := dAtA[iNdEx]
369			iNdEx++
370			wire |= (uint64(b) & 0x7F) << shift
371			if b < 0x80 {
372				break
373			}
374		}
375		wireType := int(wire & 0x7)
376		switch wireType {
377		case 0:
378			for shift := uint(0); ; shift += 7 {
379				if shift >= 64 {
380					return 0, ErrIntOverflowPlatform
381				}
382				if iNdEx >= l {
383					return 0, io.ErrUnexpectedEOF
384				}
385				iNdEx++
386				if dAtA[iNdEx-1] < 0x80 {
387					break
388				}
389			}
390		case 1:
391			iNdEx += 8
392		case 2:
393			var length int
394			for shift := uint(0); ; shift += 7 {
395				if shift >= 64 {
396					return 0, ErrIntOverflowPlatform
397				}
398				if iNdEx >= l {
399					return 0, io.ErrUnexpectedEOF
400				}
401				b := dAtA[iNdEx]
402				iNdEx++
403				length |= (int(b) & 0x7F) << shift
404				if b < 0x80 {
405					break
406				}
407			}
408			if length < 0 {
409				return 0, ErrInvalidLengthPlatform
410			}
411			iNdEx += length
412		case 3:
413			depth++
414		case 4:
415			if depth == 0 {
416				return 0, ErrUnexpectedEndOfGroupPlatform
417			}
418			depth--
419		case 5:
420			iNdEx += 4
421		default:
422			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
423		}
424		if iNdEx < 0 {
425			return 0, ErrInvalidLengthPlatform
426		}
427		if depth == 0 {
428			return iNdEx, nil
429		}
430	}
431	return 0, io.ErrUnexpectedEOF
432}
433
434var (
435	ErrInvalidLengthPlatform        = fmt.Errorf("proto: negative length found during unmarshaling")
436	ErrIntOverflowPlatform          = fmt.Errorf("proto: integer overflow")
437	ErrUnexpectedEndOfGroupPlatform = fmt.Errorf("proto: unexpected end of group")
438)
439