Matteo Scandolo | a428586 | 2020-12-01 18:10:10 -0800 | [diff] [blame] | 1 | /* |
| 2 | Copyright The Kubernetes Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | // Code generated by protoc-gen-gogo. DO NOT EDIT. |
| 18 | // source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto |
| 19 | |
| 20 | package intstr |
| 21 | |
| 22 | import ( |
| 23 | fmt "fmt" |
| 24 | |
| 25 | io "io" |
| 26 | math "math" |
| 27 | math_bits "math/bits" |
| 28 | |
| 29 | proto "github.com/gogo/protobuf/proto" |
| 30 | ) |
| 31 | |
| 32 | // Reference imports to suppress errors if they are not otherwise used. |
| 33 | var _ = proto.Marshal |
| 34 | var _ = fmt.Errorf |
| 35 | var _ = math.Inf |
| 36 | |
| 37 | // This is a compile-time assertion to ensure that this generated file |
| 38 | // is compatible with the proto package it is being compiled against. |
| 39 | // A compilation error at this line likely means your copy of the |
| 40 | // proto package needs to be updated. |
| 41 | const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package |
| 42 | |
| 43 | func (m *IntOrString) Reset() { *m = IntOrString{} } |
| 44 | func (*IntOrString) ProtoMessage() {} |
| 45 | func (*IntOrString) Descriptor() ([]byte, []int) { |
| 46 | return fileDescriptor_94e046ae3ce6121c, []int{0} |
| 47 | } |
| 48 | func (m *IntOrString) XXX_Unmarshal(b []byte) error { |
| 49 | return m.Unmarshal(b) |
| 50 | } |
| 51 | func (m *IntOrString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 52 | b = b[:cap(b)] |
| 53 | n, err := m.MarshalToSizedBuffer(b) |
| 54 | if err != nil { |
| 55 | return nil, err |
| 56 | } |
| 57 | return b[:n], nil |
| 58 | } |
| 59 | func (m *IntOrString) XXX_Merge(src proto.Message) { |
| 60 | xxx_messageInfo_IntOrString.Merge(m, src) |
| 61 | } |
| 62 | func (m *IntOrString) XXX_Size() int { |
| 63 | return m.Size() |
| 64 | } |
| 65 | func (m *IntOrString) XXX_DiscardUnknown() { |
| 66 | xxx_messageInfo_IntOrString.DiscardUnknown(m) |
| 67 | } |
| 68 | |
| 69 | var xxx_messageInfo_IntOrString proto.InternalMessageInfo |
| 70 | |
| 71 | func init() { |
| 72 | proto.RegisterType((*IntOrString)(nil), "k8s.io.apimachinery.pkg.util.intstr.IntOrString") |
| 73 | } |
| 74 | |
| 75 | func init() { |
| 76 | proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptor_94e046ae3ce6121c) |
| 77 | } |
| 78 | |
| 79 | var fileDescriptor_94e046ae3ce6121c = []byte{ |
| 80 | // 292 bytes of a gzipped FileDescriptorProto |
| 81 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0x31, 0x4b, 0x33, 0x31, |
| 82 | 0x1c, 0xc6, 0x93, 0xb7, 0x7d, 0x8b, 0x9e, 0xe0, 0x50, 0x1c, 0x8a, 0x43, 0x7a, 0x28, 0xc8, 0x0d, |
| 83 | 0x9a, 0xac, 0xe2, 0xd8, 0xad, 0x20, 0x08, 0x57, 0x71, 0x70, 0xbb, 0x6b, 0x63, 0x1a, 0xae, 0x4d, |
| 84 | 0x42, 0xee, 0x7f, 0xc2, 0x6d, 0xfd, 0x08, 0xba, 0x39, 0xfa, 0x71, 0x6e, 0xec, 0xd8, 0x41, 0x8a, |
| 85 | 0x17, 0xbf, 0x85, 0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0x83, |
| 96 | 0xb7, 0xf7, 0x31, 0xda, 0x7c, 0x84, 0x68, 0x72, 0x59, 0xd5, 0x04, 0x6d, 0x6b, 0x82, 0x76, 0x35, |
| 97 | 0x41, 0x1b, 0x47, 0x70, 0xe5, 0x08, 0xde, 0x3a, 0x82, 0x77, 0x8e, 0xe0, 0x4f, 0x47, 0xf0, 0xcb, |
| 98 | 0x17, 0x41, 0x8f, 0x83, 0xf6, 0xc3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52, 0xa0, 0xb5, 0xc9, |
| 99 | 0x64, 0x01, 0x00, 0x00, |
| 100 | } |
| 101 | |
| 102 | func (m *IntOrString) Marshal() (dAtA []byte, err error) { |
| 103 | size := m.Size() |
| 104 | dAtA = make([]byte, size) |
| 105 | n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
| 106 | if err != nil { |
| 107 | return nil, err |
| 108 | } |
| 109 | return dAtA[:n], nil |
| 110 | } |
| 111 | |
| 112 | func (m *IntOrString) MarshalTo(dAtA []byte) (int, error) { |
| 113 | size := m.Size() |
| 114 | return m.MarshalToSizedBuffer(dAtA[:size]) |
| 115 | } |
| 116 | |
| 117 | func (m *IntOrString) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
| 118 | i := len(dAtA) |
| 119 | _ = i |
| 120 | var l int |
| 121 | _ = l |
| 122 | i -= len(m.StrVal) |
| 123 | copy(dAtA[i:], m.StrVal) |
| 124 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.StrVal))) |
| 125 | i-- |
| 126 | dAtA[i] = 0x1a |
| 127 | i = encodeVarintGenerated(dAtA, i, uint64(m.IntVal)) |
| 128 | i-- |
| 129 | dAtA[i] = 0x10 |
| 130 | i = encodeVarintGenerated(dAtA, i, uint64(m.Type)) |
| 131 | i-- |
| 132 | dAtA[i] = 0x8 |
| 133 | return len(dAtA) - i, nil |
| 134 | } |
| 135 | |
| 136 | func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { |
| 137 | offset -= sovGenerated(v) |
| 138 | base := offset |
| 139 | for v >= 1<<7 { |
| 140 | dAtA[offset] = uint8(v&0x7f | 0x80) |
| 141 | v >>= 7 |
| 142 | offset++ |
| 143 | } |
| 144 | dAtA[offset] = uint8(v) |
| 145 | return base |
| 146 | } |
| 147 | func (m *IntOrString) Size() (n int) { |
| 148 | if m == nil { |
| 149 | return 0 |
| 150 | } |
| 151 | var l int |
| 152 | _ = l |
| 153 | n += 1 + sovGenerated(uint64(m.Type)) |
| 154 | n += 1 + sovGenerated(uint64(m.IntVal)) |
| 155 | l = len(m.StrVal) |
| 156 | n += 1 + l + sovGenerated(uint64(l)) |
| 157 | return n |
| 158 | } |
| 159 | |
| 160 | func sovGenerated(x uint64) (n int) { |
| 161 | return (math_bits.Len64(x|1) + 6) / 7 |
| 162 | } |
| 163 | func sozGenerated(x uint64) (n int) { |
| 164 | return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| 165 | } |
| 166 | func (m *IntOrString) Unmarshal(dAtA []byte) error { |
| 167 | l := len(dAtA) |
| 168 | iNdEx := 0 |
| 169 | for iNdEx < l { |
| 170 | preIndex := iNdEx |
| 171 | var wire uint64 |
| 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 | wire |= uint64(b&0x7F) << shift |
| 182 | if b < 0x80 { |
| 183 | break |
| 184 | } |
| 185 | } |
| 186 | fieldNum := int32(wire >> 3) |
| 187 | wireType := int(wire & 0x7) |
| 188 | if wireType == 4 { |
| 189 | return fmt.Errorf("proto: IntOrString: wiretype end group for non-group") |
| 190 | } |
| 191 | if fieldNum <= 0 { |
| 192 | return fmt.Errorf("proto: IntOrString: illegal tag %d (wire type %d)", fieldNum, wire) |
| 193 | } |
| 194 | switch fieldNum { |
| 195 | case 1: |
| 196 | if wireType != 0 { |
| 197 | return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) |
| 198 | } |
| 199 | m.Type = 0 |
| 200 | for shift := uint(0); ; shift += 7 { |
| 201 | if shift >= 64 { |
| 202 | return ErrIntOverflowGenerated |
| 203 | } |
| 204 | if iNdEx >= l { |
| 205 | return io.ErrUnexpectedEOF |
| 206 | } |
| 207 | b := dAtA[iNdEx] |
| 208 | iNdEx++ |
| 209 | m.Type |= Type(b&0x7F) << shift |
| 210 | if b < 0x80 { |
| 211 | break |
| 212 | } |
| 213 | } |
| 214 | case 2: |
| 215 | if wireType != 0 { |
| 216 | return fmt.Errorf("proto: wrong wireType = %d for field IntVal", wireType) |
| 217 | } |
| 218 | m.IntVal = 0 |
| 219 | for shift := uint(0); ; shift += 7 { |
| 220 | if shift >= 64 { |
| 221 | return ErrIntOverflowGenerated |
| 222 | } |
| 223 | if iNdEx >= l { |
| 224 | return io.ErrUnexpectedEOF |
| 225 | } |
| 226 | b := dAtA[iNdEx] |
| 227 | iNdEx++ |
| 228 | m.IntVal |= int32(b&0x7F) << shift |
| 229 | if b < 0x80 { |
| 230 | break |
| 231 | } |
| 232 | } |
| 233 | case 3: |
| 234 | if wireType != 2 { |
| 235 | return fmt.Errorf("proto: wrong wireType = %d for field StrVal", wireType) |
| 236 | } |
| 237 | var stringLen uint64 |
| 238 | for shift := uint(0); ; shift += 7 { |
| 239 | if shift >= 64 { |
| 240 | return ErrIntOverflowGenerated |
| 241 | } |
| 242 | if iNdEx >= l { |
| 243 | return io.ErrUnexpectedEOF |
| 244 | } |
| 245 | b := dAtA[iNdEx] |
| 246 | iNdEx++ |
| 247 | stringLen |= uint64(b&0x7F) << shift |
| 248 | if b < 0x80 { |
| 249 | break |
| 250 | } |
| 251 | } |
| 252 | intStringLen := int(stringLen) |
| 253 | if intStringLen < 0 { |
| 254 | return ErrInvalidLengthGenerated |
| 255 | } |
| 256 | postIndex := iNdEx + intStringLen |
| 257 | if postIndex < 0 { |
| 258 | return ErrInvalidLengthGenerated |
| 259 | } |
| 260 | if postIndex > l { |
| 261 | return io.ErrUnexpectedEOF |
| 262 | } |
| 263 | m.StrVal = string(dAtA[iNdEx:postIndex]) |
| 264 | iNdEx = postIndex |
| 265 | default: |
| 266 | iNdEx = preIndex |
| 267 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 268 | if err != nil { |
| 269 | return err |
| 270 | } |
| 271 | if skippy < 0 { |
| 272 | return ErrInvalidLengthGenerated |
| 273 | } |
| 274 | if (iNdEx + skippy) < 0 { |
| 275 | return ErrInvalidLengthGenerated |
| 276 | } |
| 277 | if (iNdEx + skippy) > l { |
| 278 | return io.ErrUnexpectedEOF |
| 279 | } |
| 280 | iNdEx += skippy |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | if iNdEx > l { |
| 285 | return io.ErrUnexpectedEOF |
| 286 | } |
| 287 | return nil |
| 288 | } |
| 289 | func skipGenerated(dAtA []byte) (n int, err error) { |
| 290 | l := len(dAtA) |
| 291 | iNdEx := 0 |
| 292 | depth := 0 |
| 293 | for iNdEx < l { |
| 294 | var wire uint64 |
| 295 | for shift := uint(0); ; shift += 7 { |
| 296 | if shift >= 64 { |
| 297 | return 0, ErrIntOverflowGenerated |
| 298 | } |
| 299 | if iNdEx >= l { |
| 300 | return 0, io.ErrUnexpectedEOF |
| 301 | } |
| 302 | b := dAtA[iNdEx] |
| 303 | iNdEx++ |
| 304 | wire |= (uint64(b) & 0x7F) << shift |
| 305 | if b < 0x80 { |
| 306 | break |
| 307 | } |
| 308 | } |
| 309 | wireType := int(wire & 0x7) |
| 310 | switch wireType { |
| 311 | case 0: |
| 312 | for shift := uint(0); ; shift += 7 { |
| 313 | if shift >= 64 { |
| 314 | return 0, ErrIntOverflowGenerated |
| 315 | } |
| 316 | if iNdEx >= l { |
| 317 | return 0, io.ErrUnexpectedEOF |
| 318 | } |
| 319 | iNdEx++ |
| 320 | if dAtA[iNdEx-1] < 0x80 { |
| 321 | break |
| 322 | } |
| 323 | } |
| 324 | case 1: |
| 325 | iNdEx += 8 |
| 326 | case 2: |
| 327 | var length int |
| 328 | for shift := uint(0); ; shift += 7 { |
| 329 | if shift >= 64 { |
| 330 | return 0, ErrIntOverflowGenerated |
| 331 | } |
| 332 | if iNdEx >= l { |
| 333 | return 0, io.ErrUnexpectedEOF |
| 334 | } |
| 335 | b := dAtA[iNdEx] |
| 336 | iNdEx++ |
| 337 | length |= (int(b) & 0x7F) << shift |
| 338 | if b < 0x80 { |
| 339 | break |
| 340 | } |
| 341 | } |
| 342 | if length < 0 { |
| 343 | return 0, ErrInvalidLengthGenerated |
| 344 | } |
| 345 | iNdEx += length |
| 346 | case 3: |
| 347 | depth++ |
| 348 | case 4: |
| 349 | if depth == 0 { |
| 350 | return 0, ErrUnexpectedEndOfGroupGenerated |
| 351 | } |
| 352 | depth-- |
| 353 | case 5: |
| 354 | iNdEx += 4 |
| 355 | default: |
| 356 | return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
| 357 | } |
| 358 | if iNdEx < 0 { |
| 359 | return 0, ErrInvalidLengthGenerated |
| 360 | } |
| 361 | if depth == 0 { |
| 362 | return iNdEx, nil |
| 363 | } |
| 364 | } |
| 365 | return 0, io.ErrUnexpectedEOF |
| 366 | } |
| 367 | |
| 368 | var ( |
| 369 | ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") |
| 370 | ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") |
| 371 | ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") |
| 372 | ) |