blob: 1ac96c9eb6ea90ed17d6f4dd4b83b4f4fcd52ac5 [file] [log] [blame]
Zack Williamse940c7a2019-08-21 14:25:39 -07001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
David Bainbridge86971522019-09-26 22:09:39 +000017// Code generated by protoc-gen-gogo. DO NOT EDIT.
Zack Williamse940c7a2019-08-21 14:25:39 -070018// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto
Zack Williamse940c7a2019-08-21 14:25:39 -070019
20/*
21 Package intstr is a generated protocol buffer package.
22
23 It is generated from these files:
24 k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto
25
26 It has these top-level messages:
27 IntOrString
28*/
29package intstr
30
Scott Baker4a35a702019-11-26 08:17:33 -080031import (
32 fmt "fmt"
Zack Williamse940c7a2019-08-21 14:25:39 -070033
Scott Baker4a35a702019-11-26 08:17:33 -080034 proto "github.com/gogo/protobuf/proto"
35
36 math "math"
37
38 io "io"
39)
Zack Williamse940c7a2019-08-21 14:25:39 -070040
41// Reference imports to suppress errors if they are not otherwise used.
42var _ = proto.Marshal
43var _ = fmt.Errorf
44var _ = math.Inf
45
46// This is a compile-time assertion to ensure that this generated file
47// is compatible with the proto package it is being compiled against.
48// A compilation error at this line likely means your copy of the
49// proto package needs to be updated.
50const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
51
52func (m *IntOrString) Reset() { *m = IntOrString{} }
53func (*IntOrString) ProtoMessage() {}
54func (*IntOrString) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
55
56func init() {
57 proto.RegisterType((*IntOrString)(nil), "k8s.io.apimachinery.pkg.util.intstr.IntOrString")
58}
59func (m *IntOrString) Marshal() (dAtA []byte, err error) {
60 size := m.Size()
61 dAtA = make([]byte, size)
62 n, err := m.MarshalTo(dAtA)
63 if err != nil {
64 return nil, err
65 }
66 return dAtA[:n], nil
67}
68
69func (m *IntOrString) MarshalTo(dAtA []byte) (int, error) {
70 var i int
71 _ = i
72 var l int
73 _ = l
74 dAtA[i] = 0x8
75 i++
76 i = encodeVarintGenerated(dAtA, i, uint64(m.Type))
77 dAtA[i] = 0x10
78 i++
79 i = encodeVarintGenerated(dAtA, i, uint64(m.IntVal))
80 dAtA[i] = 0x1a
81 i++
82 i = encodeVarintGenerated(dAtA, i, uint64(len(m.StrVal)))
83 i += copy(dAtA[i:], m.StrVal)
84 return i, nil
85}
86
Zack Williamse940c7a2019-08-21 14:25:39 -070087func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
88 for v >= 1<<7 {
89 dAtA[offset] = uint8(v&0x7f | 0x80)
90 v >>= 7
91 offset++
92 }
93 dAtA[offset] = uint8(v)
94 return offset + 1
95}
96func (m *IntOrString) Size() (n int) {
97 var l int
98 _ = l
99 n += 1 + sovGenerated(uint64(m.Type))
100 n += 1 + sovGenerated(uint64(m.IntVal))
101 l = len(m.StrVal)
102 n += 1 + l + sovGenerated(uint64(l))
103 return n
104}
105
106func sovGenerated(x uint64) (n int) {
107 for {
108 n++
109 x >>= 7
110 if x == 0 {
111 break
112 }
113 }
114 return n
115}
116func sozGenerated(x uint64) (n int) {
117 return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
118}
119func (m *IntOrString) Unmarshal(dAtA []byte) error {
120 l := len(dAtA)
121 iNdEx := 0
122 for iNdEx < l {
123 preIndex := iNdEx
124 var wire uint64
125 for shift := uint(0); ; shift += 7 {
126 if shift >= 64 {
127 return ErrIntOverflowGenerated
128 }
129 if iNdEx >= l {
130 return io.ErrUnexpectedEOF
131 }
132 b := dAtA[iNdEx]
133 iNdEx++
134 wire |= (uint64(b) & 0x7F) << shift
135 if b < 0x80 {
136 break
137 }
138 }
139 fieldNum := int32(wire >> 3)
140 wireType := int(wire & 0x7)
141 if wireType == 4 {
142 return fmt.Errorf("proto: IntOrString: wiretype end group for non-group")
143 }
144 if fieldNum <= 0 {
145 return fmt.Errorf("proto: IntOrString: illegal tag %d (wire type %d)", fieldNum, wire)
146 }
147 switch fieldNum {
148 case 1:
149 if wireType != 0 {
150 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
151 }
152 m.Type = 0
153 for shift := uint(0); ; shift += 7 {
154 if shift >= 64 {
155 return ErrIntOverflowGenerated
156 }
157 if iNdEx >= l {
158 return io.ErrUnexpectedEOF
159 }
160 b := dAtA[iNdEx]
161 iNdEx++
162 m.Type |= (Type(b) & 0x7F) << shift
163 if b < 0x80 {
164 break
165 }
166 }
167 case 2:
168 if wireType != 0 {
169 return fmt.Errorf("proto: wrong wireType = %d for field IntVal", wireType)
170 }
171 m.IntVal = 0
172 for shift := uint(0); ; shift += 7 {
173 if shift >= 64 {
174 return ErrIntOverflowGenerated
175 }
176 if iNdEx >= l {
177 return io.ErrUnexpectedEOF
178 }
179 b := dAtA[iNdEx]
180 iNdEx++
181 m.IntVal |= (int32(b) & 0x7F) << shift
182 if b < 0x80 {
183 break
184 }
185 }
186 case 3:
187 if wireType != 2 {
188 return fmt.Errorf("proto: wrong wireType = %d for field StrVal", wireType)
189 }
190 var stringLen uint64
191 for shift := uint(0); ; shift += 7 {
192 if shift >= 64 {
193 return ErrIntOverflowGenerated
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 ErrInvalidLengthGenerated
208 }
209 postIndex := iNdEx + intStringLen
210 if postIndex > l {
211 return io.ErrUnexpectedEOF
212 }
213 m.StrVal = string(dAtA[iNdEx:postIndex])
214 iNdEx = postIndex
215 default:
216 iNdEx = preIndex
217 skippy, err := skipGenerated(dAtA[iNdEx:])
218 if err != nil {
219 return err
220 }
221 if skippy < 0 {
222 return ErrInvalidLengthGenerated
223 }
224 if (iNdEx + skippy) > l {
225 return io.ErrUnexpectedEOF
226 }
227 iNdEx += skippy
228 }
229 }
230
231 if iNdEx > l {
232 return io.ErrUnexpectedEOF
233 }
234 return nil
235}
236func skipGenerated(dAtA []byte) (n int, err error) {
237 l := len(dAtA)
238 iNdEx := 0
239 for iNdEx < l {
240 var wire uint64
241 for shift := uint(0); ; shift += 7 {
242 if shift >= 64 {
243 return 0, ErrIntOverflowGenerated
244 }
245 if iNdEx >= l {
246 return 0, io.ErrUnexpectedEOF
247 }
248 b := dAtA[iNdEx]
249 iNdEx++
250 wire |= (uint64(b) & 0x7F) << shift
251 if b < 0x80 {
252 break
253 }
254 }
255 wireType := int(wire & 0x7)
256 switch wireType {
257 case 0:
258 for shift := uint(0); ; shift += 7 {
259 if shift >= 64 {
260 return 0, ErrIntOverflowGenerated
261 }
262 if iNdEx >= l {
263 return 0, io.ErrUnexpectedEOF
264 }
265 iNdEx++
266 if dAtA[iNdEx-1] < 0x80 {
267 break
268 }
269 }
270 return iNdEx, nil
271 case 1:
272 iNdEx += 8
273 return iNdEx, nil
274 case 2:
275 var length int
276 for shift := uint(0); ; shift += 7 {
277 if shift >= 64 {
278 return 0, ErrIntOverflowGenerated
279 }
280 if iNdEx >= l {
281 return 0, io.ErrUnexpectedEOF
282 }
283 b := dAtA[iNdEx]
284 iNdEx++
285 length |= (int(b) & 0x7F) << shift
286 if b < 0x80 {
287 break
288 }
289 }
290 iNdEx += length
291 if length < 0 {
292 return 0, ErrInvalidLengthGenerated
293 }
294 return iNdEx, nil
295 case 3:
296 for {
297 var innerWire uint64
298 var start int = iNdEx
299 for shift := uint(0); ; shift += 7 {
300 if shift >= 64 {
301 return 0, ErrIntOverflowGenerated
302 }
303 if iNdEx >= l {
304 return 0, io.ErrUnexpectedEOF
305 }
306 b := dAtA[iNdEx]
307 iNdEx++
308 innerWire |= (uint64(b) & 0x7F) << shift
309 if b < 0x80 {
310 break
311 }
312 }
313 innerWireType := int(innerWire & 0x7)
314 if innerWireType == 4 {
315 break
316 }
317 next, err := skipGenerated(dAtA[start:])
318 if err != nil {
319 return 0, err
320 }
321 iNdEx = start + next
322 }
323 return iNdEx, nil
324 case 4:
325 return iNdEx, nil
326 case 5:
327 iNdEx += 4
328 return iNdEx, nil
329 default:
330 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
331 }
332 }
333 panic("unreachable")
334}
335
336var (
337 ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
338 ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
339)
340
341func init() {
342 proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptorGenerated)
343}
344
345var fileDescriptorGenerated = []byte{
346 // 292 bytes of a gzipped FileDescriptorProto
347 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0x31, 0x4b, 0x33, 0x31,
348 0x1c, 0xc6, 0x93, 0xb7, 0x7d, 0x8b, 0x9e, 0xe0, 0x50, 0x1c, 0x8a, 0x43, 0x7a, 0x28, 0xc8, 0x0d,
349 0x9a, 0xac, 0xe2, 0xd8, 0xad, 0x20, 0x08, 0x57, 0x71, 0x70, 0xbb, 0x6b, 0x63, 0x1a, 0xae, 0x4d,
350 0x42, 0xee, 0x7f, 0xc2, 0x6d, 0xfd, 0x08, 0xba, 0x39, 0xfa, 0x71, 0x6e, 0xec, 0xd8, 0x41, 0x8a,
351 0x17, 0xbf, 0x85, 0x93, 0x5c, 0xee, 0x40, 0xa7, 0xe4, 0x79, 0x9e, 0xdf, 0x2f, 0x90, 0xe0, 0x36,
352 0xbb, 0xce, 0xa9, 0xd4, 0x2c, 0x2b, 0x52, 0x6e, 0x15, 0x07, 0x9e, 0xb3, 0x67, 0xae, 0x16, 0xda,
353 0xb2, 0x6e, 0x48, 0x8c, 0x5c, 0x27, 0xf3, 0xa5, 0x54, 0xdc, 0x96, 0xcc, 0x64, 0x82, 0x15, 0x20,
354 0x57, 0x4c, 0x2a, 0xc8, 0xc1, 0x32, 0xc1, 0x15, 0xb7, 0x09, 0xf0, 0x05, 0x35, 0x56, 0x83, 0x1e,
355 0x9e, 0xb7, 0x12, 0xfd, 0x2b, 0x51, 0x93, 0x09, 0xda, 0x48, 0xb4, 0x95, 0x4e, 0xaf, 0x84, 0x84,
356 0x65, 0x91, 0xd2, 0xb9, 0x5e, 0x33, 0xa1, 0x85, 0x66, 0xde, 0x4d, 0x8b, 0x27, 0x9f, 0x7c, 0xf0,
357 0xb7, 0xf6, 0xcd, 0xb3, 0x57, 0x1c, 0x1c, 0x4d, 0x15, 0xdc, 0xd9, 0x19, 0x58, 0xa9, 0xc4, 0x30,
358 0x0a, 0xfa, 0x50, 0x1a, 0x3e, 0xc2, 0x21, 0x8e, 0x7a, 0x93, 0x93, 0x6a, 0x3f, 0x46, 0x6e, 0x3f,
359 0xee, 0xdf, 0x97, 0x86, 0x7f, 0x77, 0x67, 0xec, 0x89, 0xe1, 0x45, 0x30, 0x90, 0x0a, 0x1e, 0x92,
360 0xd5, 0xe8, 0x5f, 0x88, 0xa3, 0xff, 0x93, 0xe3, 0x8e, 0x1d, 0x4c, 0x7d, 0x1b, 0x77, 0x6b, 0xc3,
361 0xe5, 0x60, 0x1b, 0xae, 0x17, 0xe2, 0xe8, 0xf0, 0x97, 0x9b, 0xf9, 0x36, 0xee, 0xd6, 0x9b, 0x83,
362 0xb7, 0xf7, 0x31, 0xda, 0x7c, 0x84, 0x68, 0x72, 0x59, 0xd5, 0x04, 0x6d, 0x6b, 0x82, 0x76, 0x35,
363 0x41, 0x1b, 0x47, 0x70, 0xe5, 0x08, 0xde, 0x3a, 0x82, 0x77, 0x8e, 0xe0, 0x4f, 0x47, 0xf0, 0xcb,
364 0x17, 0x41, 0x8f, 0x83, 0xf6, 0xc3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52, 0xa0, 0xb5, 0xc9,
365 0x64, 0x01, 0x00, 0x00,
366}