Debian Codegraph @

pkg/apis/custom_metrics/v1beta2/generated.pb.go

raw
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/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto
19
20 package v1beta2
21
22 import (
23 fmt "fmt"
24
25 io "io"
26
27 proto "github.com/gogo/protobuf/proto"
28 v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
29
30 math "math"
31 math_bits "math/bits"
32 reflect "reflect"
33 strings "strings"
34 )
35
36 // Reference imports to suppress errors if they are not otherwise used.
37 var _ = proto.Marshal
38 var _ = fmt.Errorf
39 var _ = math.Inf
40
41 // This is a compile-time assertion to ensure that this generated file
42 // is compatible with the proto package it is being compiled against.
43 // A compilation error at this line likely means your copy of the
44 // proto package needs to be updated.
45 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
46
47 func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} }
48 func (*MetricIdentifier) ProtoMessage() {}
49 func (*MetricIdentifier) Descriptor() ([]byte, []int) {
50 return fileDescriptor_b98a5b8632255b7a, []int{0}
51 }
52 func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error {
53 return m.Unmarshal(b)
54 }
55 func (m *MetricIdentifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
56 b = b[:cap(b)]
57 n, err := m.MarshalToSizedBuffer(b)
58 if err != nil {
59 return nil, err
60 }
61 return b[:n], nil
62 }
63 func (m *MetricIdentifier) XXX_Merge(src proto.Message) {
64 xxx_messageInfo_MetricIdentifier.Merge(m, src)
65 }
66 func (m *MetricIdentifier) XXX_Size() int {
67 return m.Size()
68 }
69 func (m *MetricIdentifier) XXX_DiscardUnknown() {
70 xxx_messageInfo_MetricIdentifier.DiscardUnknown(m)
71 }
72
73 var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo
74
75 func (m *MetricListOptions) Reset() { *m = MetricListOptions{} }
76 func (*MetricListOptions) ProtoMessage() {}
77 func (*MetricListOptions) Descriptor() ([]byte, []int) {
78 return fileDescriptor_b98a5b8632255b7a, []int{1}
79 }
80 func (m *MetricListOptions) XXX_Unmarshal(b []byte) error {
81 return m.Unmarshal(b)
82 }
83 func (m *MetricListOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
84 b = b[:cap(b)]
85 n, err := m.MarshalToSizedBuffer(b)
86 if err != nil {
87 return nil, err
88 }
89 return b[:n], nil
90 }
91 func (m *MetricListOptions) XXX_Merge(src proto.Message) {
92 xxx_messageInfo_MetricListOptions.Merge(m, src)
93 }
94 func (m *MetricListOptions) XXX_Size() int {
95 return m.Size()
96 }
97 func (m *MetricListOptions) XXX_DiscardUnknown() {
98 xxx_messageInfo_MetricListOptions.DiscardUnknown(m)
99 }
100
101 var xxx_messageInfo_MetricListOptions proto.InternalMessageInfo
102
103 func (m *MetricValue) Reset() { *m = MetricValue{} }
104 func (*MetricValue) ProtoMessage() {}
105 func (*MetricValue) Descriptor() ([]byte, []int) {
106 return fileDescriptor_b98a5b8632255b7a, []int{2}
107 }
108 func (m *MetricValue) XXX_Unmarshal(b []byte) error {
109 return m.Unmarshal(b)
110 }
111 func (m *MetricValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
112 b = b[:cap(b)]
113 n, err := m.MarshalToSizedBuffer(b)
114 if err != nil {
115 return nil, err
116 }
117 return b[:n], nil
118 }
119 func (m *MetricValue) XXX_Merge(src proto.Message) {
120 xxx_messageInfo_MetricValue.Merge(m, src)
121 }
122 func (m *MetricValue) XXX_Size() int {
123 return m.Size()
124 }
125 func (m *MetricValue) XXX_DiscardUnknown() {
126 xxx_messageInfo_MetricValue.DiscardUnknown(m)
127 }
128
129 var xxx_messageInfo_MetricValue proto.InternalMessageInfo
130
131 func (m *MetricValueList) Reset() { *m = MetricValueList{} }
132 func (*MetricValueList) ProtoMessage() {}
133 func (*MetricValueList) Descriptor() ([]byte, []int) {
134 return fileDescriptor_b98a5b8632255b7a, []int{3}
135 }
136 func (m *MetricValueList) XXX_Unmarshal(b []byte) error {
137 return m.Unmarshal(b)
138 }
139 func (m *MetricValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
140 b = b[:cap(b)]
141 n, err := m.MarshalToSizedBuffer(b)
142 if err != nil {
143 return nil, err
144 }
145 return b[:n], nil
146 }
147 func (m *MetricValueList) XXX_Merge(src proto.Message) {
148 xxx_messageInfo_MetricValueList.Merge(m, src)
149 }
150 func (m *MetricValueList) XXX_Size() int {
151 return m.Size()
152 }
153 func (m *MetricValueList) XXX_DiscardUnknown() {
154 xxx_messageInfo_MetricValueList.DiscardUnknown(m)
155 }
156
157 var xxx_messageInfo_MetricValueList proto.InternalMessageInfo
158
159 func init() {
160 proto.RegisterType((*MetricIdentifier)(nil), "k8s.io.metrics.pkg.apis.custom_metrics.v1beta2.MetricIdentifier")
161 proto.RegisterType((*MetricListOptions)(nil), "k8s.io.metrics.pkg.apis.custom_metrics.v1beta2.MetricListOptions")
162 proto.RegisterType((*MetricValue)(nil), "k8s.io.metrics.pkg.apis.custom_metrics.v1beta2.MetricValue")
163 proto.RegisterType((*MetricValueList)(nil), "k8s.io.metrics.pkg.apis.custom_metrics.v1beta2.MetricValueList")
164 }
165
166 func init() {
167 proto.RegisterFile("k8s.io/metrics/pkg/apis/custom_metrics/v1beta2/generated.proto", fileDescriptor_b98a5b8632255b7a)
168 }
169
170 var fileDescriptor_b98a5b8632255b7a = []byte{
171 // 644 bytes of a gzipped FileDescriptorProto
172 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02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 0x15, 0x51, 0x35, 0x03, 0xbf, 0x24, 0xc3, 0x18, 0xcc, 0x1e, 0x5a, 0xf1, 0x41, 0x78, 0x9c, 0x76,
196 0xc1, 0xdf, 0xeb, 0x7e, 0x04, 0x4f, 0x2a, 0x77, 0xd5, 0xf6, 0x9d, 0x89, 0xb9, 0xe0, 0x74, 0xb5,
197 0xd2, 0x29, 0x64, 0x08, 0x17, 0x7a, 0xc0, 0x21, 0xf4, 0xc0, 0xb9, 0xa5, 0xeb, 0xaf, 0x3c, 0x9b,
198 0xd6, 0x70, 0x67, 0x45, 0xcd, 0x01, 0x5a, 0xca, 0xec, 0xe8, 0xb1, 0x3f, 0x9d, 0xf3, 0x61, 0xe0,
199 0xd9, 0xb0, 0x9d, 0xff, 0x74, 0xed, 0xa5, 0xec, 0xc6, 0xd5, 0xfa, 0xe6, 0x1b, 0x54, 0x49, 0x17,
200 0x47, 0x48, 0x12, 0x44, 0xf5, 0xa2, 0x2a, 0x76, 0xf7, 0x66, 0x19, 0x1f, 0xd0, 0x00, 0x9c, 0x35,
201 0x2d, 0x5b, 0x39, 0xc8, 0x45, 0xdc, 0xb1, 0x9e, 0xf9, 0x08, 0xd5, 0x8e, 0x68, 0xe8, 0xb3, 0xa3,
202 0x7d, 0xf0, 0x58, 0xe8, 0x8b, 0xfa, 0x62, 0xc3, 0x68, 0x15, 0x9d, 0xb5, 0x34, 0xc6, 0x57, 0x93,
203 0x17, 0xee, 0x34, 0xce, 0xdc, 0x47, 0xa5, 0x51, 0x3a, 0xf0, 0x7a, 0x49, 0x39, 0xc2, 0x7f, 0x72,
204 0x84, 0xf3, 0x47, 0x89, 0x5f, 0xc4, 0x24, 0x94, 0x54, 0x1e, 0x3b, 0x35, 0xed, 0xaa, 0xa4, 0x52,
205 0x73, 0x33, 0xad, 0xe6, 0x77, 0x03, 0xad, 0x4c, 0x84, 0x99, 0xee, 0x9c, 0xf9, 0x16, 0x95, 0xd3,
206 0x7e, 0x7c, 0x22, 0x89, 0x4e, 0x12, 0xdf, 0x70, 0xc3, 0xa9, 0x90, 0x1d, 0x90, 0xc4, 0x59, 0xd5,
207 0xb5, 0xca, 0xf9, 0x17, 0xf7, 0x52, 0xd1, 0xfc, 0x80, 0x4a, 0x54, 0x42, 0x20, 0xea, 0x0b, 0x8d,
208 0x62, 0xab, 0xda, 0xde, 0xfe, 0xb7, 0x14, 0x95, 0xdb, 0x71, 0x4f, 0x3b, 0xa9, 0xa2, 0x9b, 0x09,
209 0x3b, 0x07, 0x27, 0x17, 0x56, 0xe1, 0xf4, 0xc2, 0x2a, 0x9c, 0x5d, 0x58, 0x85, 0x4f, 0x89, 0x65,
210 0x9c, 0x24, 0x96, 0x71, 0x9a, 0x58, 0xc6, 0x59, 0x62, 0x19, 0x3f, 0x12, 0xcb, 0xf8, 0xfc, 0xd3,
211 0x2a, 0xbc, 0xc6, 0xf3, 0xfd, 0x2d, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00, 0x18, 0x0c, 0x91,
212 0xc7, 0x05, 0x00, 0x00,
213 }
214
215 func (m *MetricIdentifier) Marshal() (dAtA []byte, err error) {
216 size := m.Size()
217 dAtA = make([]byte, size)
218 n, err := m.MarshalToSizedBuffer(dAtA[:size])
219 if err != nil {
220 return nil, err
221 }
222 return dAtA[:n], nil
223 }
224
225 func (m *MetricIdentifier) MarshalTo(dAtA []byte) (int, error) {
226 size := m.Size()
227 return m.MarshalToSizedBuffer(dAtA[:size])
228 }
229
230 func (m *MetricIdentifier) MarshalToSizedBuffer(dAtA []byte) (int, error) {
231 i := len(dAtA)
232 _ = i
233 var l int
234 _ = l
235 if m.Selector != nil {
236 {
237 size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i])
238 if err != nil {
239 return 0, err
240 }
241 i -= size
242 i = encodeVarintGenerated(dAtA, i, uint64(size))
243 }
244 i--
245 dAtA[i] = 0x12
246 }
247 i -= len(m.Name)
248 copy(dAtA[i:], m.Name)
249 i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
250 i--
251 dAtA[i] = 0xa
252 return len(dAtA) - i, nil
253 }
254
255 func (m *MetricListOptions) Marshal() (dAtA []byte, err error) {
256 size := m.Size()
257 dAtA = make([]byte, size)
258 n, err := m.MarshalToSizedBuffer(dAtA[:size])
259 if err != nil {
260 return nil, err
261 }
262 return dAtA[:n], nil
263 }
264
265 func (m *MetricListOptions) MarshalTo(dAtA []byte) (int, error) {
266 size := m.Size()
267 return m.MarshalToSizedBuffer(dAtA[:size])
268 }
269
270 func (m *MetricListOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
271 i := len(dAtA)
272 _ = i
273 var l int
274 _ = l
275 i -= len(m.MetricLabelSelector)
276 copy(dAtA[i:], m.MetricLabelSelector)
277 i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricLabelSelector)))
278 i--
279 dAtA[i] = 0x12
280 i -= len(m.LabelSelector)
281 copy(dAtA[i:], m.LabelSelector)
282 i = encodeVarintGenerated(dAtA, i, uint64(len(m.LabelSelector)))
283 i--
284 dAtA[i] = 0xa
285 return len(dAtA) - i, nil
286 }
287
288 func (m *MetricValue) Marshal() (dAtA []byte, err error) {
289 size := m.Size()
290 dAtA = make([]byte, size)
291 n, err := m.MarshalToSizedBuffer(dAtA[:size])
292 if err != nil {
293 return nil, err
294 }
295 return dAtA[:n], nil
296 }
297
298 func (m *MetricValue) MarshalTo(dAtA []byte) (int, error) {
299 size := m.Size()
300 return m.MarshalToSizedBuffer(dAtA[:size])
301 }
302
303 func (m *MetricValue) MarshalToSizedBuffer(dAtA []byte) (int, error) {
304 i := len(dAtA)
305 _ = i
306 var l int
307 _ = l
308 {
309 size, err := m.Value.MarshalToSizedBuffer(dAtA[:i])
310 if err != nil {
311 return 0, err
312 }
313 i -= size
314 i = encodeVarintGenerated(dAtA, i, uint64(size))
315 }
316 i--
317 dAtA[i] = 0x2a
318 if m.WindowSeconds != nil {
319 i = encodeVarintGenerated(dAtA, i, uint64(*m.WindowSeconds))
320 i--
321 dAtA[i] = 0x20
322 }
323 {
324 size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i])
325 if err != nil {
326 return 0, err
327 }
328 i -= size
329 i = encodeVarintGenerated(dAtA, i, uint64(size))
330 }
331 i--
332 dAtA[i] = 0x1a
333 {
334 size, err := m.Metric.MarshalToSizedBuffer(dAtA[:i])
335 if err != nil {
336 return 0, err
337 }
338 i -= size
339 i = encodeVarintGenerated(dAtA, i, uint64(size))
340 }
341 i--
342 dAtA[i] = 0x12
343 {
344 size, err := m.DescribedObject.MarshalToSizedBuffer(dAtA[:i])
345 if err != nil {
346 return 0, err
347 }
348 i -= size
349 i = encodeVarintGenerated(dAtA, i, uint64(size))
350 }
351 i--
352 dAtA[i] = 0xa
353 return len(dAtA) - i, nil
354 }
355
356 func (m *MetricValueList) Marshal() (dAtA []byte, err error) {
357 size := m.Size()
358 dAtA = make([]byte, size)
359 n, err := m.MarshalToSizedBuffer(dAtA[:size])
360 if err != nil {
361 return nil, err
362 }
363 return dAtA[:n], nil
364 }
365
366 func (m *MetricValueList) MarshalTo(dAtA []byte) (int, error) {
367 size := m.Size()
368 return m.MarshalToSizedBuffer(dAtA[:size])
369 }
370
371 func (m *MetricValueList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
372 i := len(dAtA)
373 _ = i
374 var l int
375 _ = l
376 if len(m.Items) > 0 {
377 for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
378 {
379 size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
380 if err != nil {
381 return 0, err
382 }
383 i -= size
384 i = encodeVarintGenerated(dAtA, i, uint64(size))
385 }
386 i--
387 dAtA[i] = 0x12
388 }
389 }
390 {
391 size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
392 if err != nil {
393 return 0, err
394 }
395 i -= size
396 i = encodeVarintGenerated(dAtA, i, uint64(size))
397 }
398 i--
399 dAtA[i] = 0xa
400 return len(dAtA) - i, nil
401 }
402
403 func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
404 offset -= sovGenerated(v)
405 base := offset
406 for v >= 1<<7 {
407 dAtA[offset] = uint8(v&0x7f | 0x80)
408 v >>= 7
409 offset++
410 }
411 dAtA[offset] = uint8(v)
412 return base
413 }
414 func (m *MetricIdentifier) Size() (n int) {
415 if m == nil {
416 return 0
417 }
418 var l int
419 _ = l
420 l = len(m.Name)
421 n += 1 + l + sovGenerated(uint64(l))
422 if m.Selector != nil {
423 l = m.Selector.Size()
424 n += 1 + l + sovGenerated(uint64(l))
425 }
426 return n
427 }
428
429 func (m *MetricListOptions) Size() (n int) {
430 if m == nil {
431 return 0
432 }
433 var l int
434 _ = l
435 l = len(m.LabelSelector)
436 n += 1 + l + sovGenerated(uint64(l))
437 l = len(m.MetricLabelSelector)
438 n += 1 + l + sovGenerated(uint64(l))
439 return n
440 }
441
442 func (m *MetricValue) Size() (n int) {
443 if m == nil {
444 return 0
445 }
446 var l int
447 _ = l
448 l = m.DescribedObject.Size()
449 n += 1 + l + sovGenerated(uint64(l))
450 l = m.Metric.Size()
451 n += 1 + l + sovGenerated(uint64(l))
452 l = m.Timestamp.Size()
453 n += 1 + l + sovGenerated(uint64(l))
454 if m.WindowSeconds != nil {
455 n += 1 + sovGenerated(uint64(*m.WindowSeconds))
456 }
457 l = m.Value.Size()
458 n += 1 + l + sovGenerated(uint64(l))
459 return n
460 }
461
462 func (m *MetricValueList) Size() (n int) {
463 if m == nil {
464 return 0
465 }
466 var l int
467 _ = l
468 l = m.ListMeta.Size()
469 n += 1 + l + sovGenerated(uint64(l))
470 if len(m.Items) > 0 {
471 for _, e := range m.Items {
472 l = e.Size()
473 n += 1 + l + sovGenerated(uint64(l))
474 }
475 }
476 return n
477 }
478
479 func sovGenerated(x uint64) (n int) {
480 return (math_bits.Len64(x|1) + 6) / 7
481 }
482 func sozGenerated(x uint64) (n int) {
483 return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
484 }
485 func (this *MetricIdentifier) String() string {
486 if this == nil {
487 return "nil"
488 }
489 s := strings.Join([]string{`&MetricIdentifier{`,
490 `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
491 `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`,
492 `}`,
493 }, "")
494 return s
495 }
496 func (this *MetricListOptions) String() string {
497 if this == nil {
498 return "nil"
499 }
500 s := strings.Join([]string{`&MetricListOptions{`,
501 `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`,
502 `MetricLabelSelector:` + fmt.Sprintf("%v", this.MetricLabelSelector) + `,`,
503 `}`,
504 }, "")
505 return s
506 }
507 func (this *MetricValue) String() string {
508 if this == nil {
509 return "nil"
510 }
511 s := strings.Join([]string{`&MetricValue{`,
512 `DescribedObject:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DescribedObject), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`,
513 `Metric:` + strings.Replace(strings.Replace(this.Metric.String(), "MetricIdentifier", "MetricIdentifier", 1), `&`, ``, 1) + `,`,
514 `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Time", "v1.Time", 1), `&`, ``, 1) + `,`,
515 `WindowSeconds:` + valueToStringGenerated(this.WindowSeconds) + `,`,
516 `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
517 `}`,
518 }, "")
519 return s
520 }
521 func (this *MetricValueList) String() string {
522 if this == nil {
523 return "nil"
524 }
525 repeatedStringForItems := "[]MetricValue{"
526 for _, f := range this.Items {
527 repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MetricValue", "MetricValue", 1), `&`, ``, 1) + ","
528 }
529 repeatedStringForItems += "}"
530 s := strings.Join([]string{`&MetricValueList{`,
531 `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
532 `Items:` + repeatedStringForItems + `,`,
533 `}`,
534 }, "")
535 return s
536 }
537 func valueToStringGenerated(v interface{}) string {
538 rv := reflect.ValueOf(v)
539 if rv.IsNil() {
540 return "nil"
541 }
542 pv := reflect.Indirect(rv).Interface()
543 return fmt.Sprintf("*%v", pv)
544 }
545 func (m *MetricIdentifier) Unmarshal(dAtA []byte) error {
546 l := len(dAtA)
547 iNdEx := 0
548 for iNdEx < l {
549 preIndex := iNdEx
550 var wire uint64
551 for shift := uint(0); ; shift += 7 {
552 if shift >= 64 {
553 return ErrIntOverflowGenerated
554 }
555 if iNdEx >= l {
556 return io.ErrUnexpectedEOF
557 }
558 b := dAtA[iNdEx]
559 iNdEx++
560 wire |= uint64(b&0x7F) << shift
561 if b < 0x80 {
562 break
563 }
564 }
565 fieldNum := int32(wire >> 3)
566 wireType := int(wire & 0x7)
567 if wireType == 4 {
568 return fmt.Errorf("proto: MetricIdentifier: wiretype end group for non-group")
569 }
570 if fieldNum <= 0 {
571 return fmt.Errorf("proto: MetricIdentifier: illegal tag %d (wire type %d)", fieldNum, wire)
572 }
573 switch fieldNum {
574 case 1:
575 if wireType != 2 {
576 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
577 }
578 var stringLen uint64
579 for shift := uint(0); ; shift += 7 {
580 if shift >= 64 {
581 return ErrIntOverflowGenerated
582 }
583 if iNdEx >= l {
584 return io.ErrUnexpectedEOF
585 }
586 b := dAtA[iNdEx]
587 iNdEx++
588 stringLen |= uint64(b&0x7F) << shift
589 if b < 0x80 {
590 break
591 }
592 }
593 intStringLen := int(stringLen)
594 if intStringLen < 0 {
595 return ErrInvalidLengthGenerated
596 }
597 postIndex := iNdEx + intStringLen
598 if postIndex < 0 {
599 return ErrInvalidLengthGenerated
600 }
601 if postIndex > l {
602 return io.ErrUnexpectedEOF
603 }
604 m.Name = string(dAtA[iNdEx:postIndex])
605 iNdEx = postIndex
606 case 2:
607 if wireType != 2 {
608 return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
609 }
610 var msglen int
611 for shift := uint(0); ; shift += 7 {
612 if shift >= 64 {
613 return ErrIntOverflowGenerated
614 }
615 if iNdEx >= l {
616 return io.ErrUnexpectedEOF
617 }
618 b := dAtA[iNdEx]
619 iNdEx++
620 msglen |= int(b&0x7F) << shift
621 if b < 0x80 {
622 break
623 }
624 }
625 if msglen < 0 {
626 return ErrInvalidLengthGenerated
627 }
628 postIndex := iNdEx + msglen
629 if postIndex < 0 {
630 return ErrInvalidLengthGenerated
631 }
632 if postIndex > l {
633 return io.ErrUnexpectedEOF
634 }
635 if m.Selector == nil {
636 m.Selector = &v1.LabelSelector{}
637 }
638 if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
639 return err
640 }
641 iNdEx = postIndex
642 default:
643 iNdEx = preIndex
644 skippy, err := skipGenerated(dAtA[iNdEx:])
645 if err != nil {
646 return err
647 }
648 if (skippy < 0) || (iNdEx+skippy) < 0 {
649 return ErrInvalidLengthGenerated
650 }
651 if (iNdEx + skippy) > l {
652 return io.ErrUnexpectedEOF
653 }
654 iNdEx += skippy
655 }
656 }
657
658 if iNdEx > l {
659 return io.ErrUnexpectedEOF
660 }
661 return nil
662 }
663 func (m *MetricListOptions) Unmarshal(dAtA []byte) error {
664 l := len(dAtA)
665 iNdEx := 0
666 for iNdEx < l {
667 preIndex := iNdEx
668 var wire uint64
669 for shift := uint(0); ; shift += 7 {
670 if shift >= 64 {
671 return ErrIntOverflowGenerated
672 }
673 if iNdEx >= l {
674 return io.ErrUnexpectedEOF
675 }
676 b := dAtA[iNdEx]
677 iNdEx++
678 wire |= uint64(b&0x7F) << shift
679 if b < 0x80 {
680 break
681 }
682 }
683 fieldNum := int32(wire >> 3)
684 wireType := int(wire & 0x7)
685 if wireType == 4 {
686 return fmt.Errorf("proto: MetricListOptions: wiretype end group for non-group")
687 }
688 if fieldNum <= 0 {
689 return fmt.Errorf("proto: MetricListOptions: illegal tag %d (wire type %d)", fieldNum, wire)
690 }
691 switch fieldNum {
692 case 1:
693 if wireType != 2 {
694 return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
695 }
696 var stringLen uint64
697 for shift := uint(0); ; shift += 7 {
698 if shift >= 64 {
699 return ErrIntOverflowGenerated
700 }
701 if iNdEx >= l {
702 return io.ErrUnexpectedEOF
703 }
704 b := dAtA[iNdEx]
705 iNdEx++
706 stringLen |= uint64(b&0x7F) << shift
707 if b < 0x80 {
708 break
709 }
710 }
711 intStringLen := int(stringLen)
712 if intStringLen < 0 {
713 return ErrInvalidLengthGenerated
714 }
715 postIndex := iNdEx + intStringLen
716 if postIndex < 0 {
717 return ErrInvalidLengthGenerated
718 }
719 if postIndex > l {
720 return io.ErrUnexpectedEOF
721 }
722 m.LabelSelector = string(dAtA[iNdEx:postIndex])
723 iNdEx = postIndex
724 case 2:
725 if wireType != 2 {
726 return fmt.Errorf("proto: wrong wireType = %d for field MetricLabelSelector", wireType)
727 }
728 var stringLen uint64
729 for shift := uint(0); ; shift += 7 {
730 if shift >= 64 {
731 return ErrIntOverflowGenerated
732 }
733 if iNdEx >= l {
734 return io.ErrUnexpectedEOF
735 }
736 b := dAtA[iNdEx]
737 iNdEx++
738 stringLen |= uint64(b&0x7F) << shift
739 if b < 0x80 {
740 break
741 }
742 }
743 intStringLen := int(stringLen)
744 if intStringLen < 0 {
745 return ErrInvalidLengthGenerated
746 }
747 postIndex := iNdEx + intStringLen
748 if postIndex < 0 {
749 return ErrInvalidLengthGenerated
750 }
751 if postIndex > l {
752 return io.ErrUnexpectedEOF
753 }
754 m.MetricLabelSelector = string(dAtA[iNdEx:postIndex])
755 iNdEx = postIndex
756 default:
757 iNdEx = preIndex
758 skippy, err := skipGenerated(dAtA[iNdEx:])
759 if err != nil {
760 return err
761 }
762 if (skippy < 0) || (iNdEx+skippy) < 0 {
763 return ErrInvalidLengthGenerated
764 }
765 if (iNdEx + skippy) > l {
766 return io.ErrUnexpectedEOF
767 }
768 iNdEx += skippy
769 }
770 }
771
772 if iNdEx > l {
773 return io.ErrUnexpectedEOF
774 }
775 return nil
776 }
777 func (m *MetricValue) Unmarshal(dAtA []byte) error {
778 l := len(dAtA)
779 iNdEx := 0
780 for iNdEx < l {
781 preIndex := iNdEx
782 var wire uint64
783 for shift := uint(0); ; shift += 7 {
784 if shift >= 64 {
785 return ErrIntOverflowGenerated
786 }
787 if iNdEx >= l {
788 return io.ErrUnexpectedEOF
789 }
790 b := dAtA[iNdEx]
791 iNdEx++
792 wire |= uint64(b&0x7F) << shift
793 if b < 0x80 {
794 break
795 }
796 }
797 fieldNum := int32(wire >> 3)
798 wireType := int(wire & 0x7)
799 if wireType == 4 {
800 return fmt.Errorf("proto: MetricValue: wiretype end group for non-group")
801 }
802 if fieldNum <= 0 {
803 return fmt.Errorf("proto: MetricValue: illegal tag %d (wire type %d)", fieldNum, wire)
804 }
805 switch fieldNum {
806 case 1:
807 if wireType != 2 {
808 return fmt.Errorf("proto: wrong wireType = %d for field DescribedObject", wireType)
809 }
810 var msglen int
811 for shift := uint(0); ; shift += 7 {
812 if shift >= 64 {
813 return ErrIntOverflowGenerated
814 }
815 if iNdEx >= l {
816 return io.ErrUnexpectedEOF
817 }
818 b := dAtA[iNdEx]
819 iNdEx++
820 msglen |= int(b&0x7F) << shift
821 if b < 0x80 {
822 break
823 }
824 }
825 if msglen < 0 {
826 return ErrInvalidLengthGenerated
827 }
828 postIndex := iNdEx + msglen
829 if postIndex < 0 {
830 return ErrInvalidLengthGenerated
831 }
832 if postIndex > l {
833 return io.ErrUnexpectedEOF
834 }
835 if err := m.DescribedObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
836 return err
837 }
838 iNdEx = postIndex
839 case 2:
840 if wireType != 2 {
841 return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType)
842 }
843 var msglen int
844 for shift := uint(0); ; shift += 7 {
845 if shift >= 64 {
846 return ErrIntOverflowGenerated
847 }
848 if iNdEx >= l {
849 return io.ErrUnexpectedEOF
850 }
851 b := dAtA[iNdEx]
852 iNdEx++
853 msglen |= int(b&0x7F) << shift
854 if b < 0x80 {
855 break
856 }
857 }
858 if msglen < 0 {
859 return ErrInvalidLengthGenerated
860 }
861 postIndex := iNdEx + msglen
862 if postIndex < 0 {
863 return ErrInvalidLengthGenerated
864 }
865 if postIndex > l {
866 return io.ErrUnexpectedEOF
867 }
868 if err := m.Metric.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
869 return err
870 }
871 iNdEx = postIndex
872 case 3:
873 if wireType != 2 {
874 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
875 }
876 var msglen int
877 for shift := uint(0); ; shift += 7 {
878 if shift >= 64 {
879 return ErrIntOverflowGenerated
880 }
881 if iNdEx >= l {
882 return io.ErrUnexpectedEOF
883 }
884 b := dAtA[iNdEx]
885 iNdEx++
886 msglen |= int(b&0x7F) << shift
887 if b < 0x80 {
888 break
889 }
890 }
891 if msglen < 0 {
892 return ErrInvalidLengthGenerated
893 }
894 postIndex := iNdEx + msglen
895 if postIndex < 0 {
896 return ErrInvalidLengthGenerated
897 }
898 if postIndex > l {
899 return io.ErrUnexpectedEOF
900 }
901 if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
902 return err
903 }
904 iNdEx = postIndex
905 case 4:
906 if wireType != 0 {
907 return fmt.Errorf("proto: wrong wireType = %d for field WindowSeconds", wireType)
908 }
909 var v int64
910 for shift := uint(0); ; shift += 7 {
911 if shift >= 64 {
912 return ErrIntOverflowGenerated
913 }
914 if iNdEx >= l {
915 return io.ErrUnexpectedEOF
916 }
917 b := dAtA[iNdEx]
918 iNdEx++
919 v |= int64(b&0x7F) << shift
920 if b < 0x80 {
921 break
922 }
923 }
924 m.WindowSeconds = &v
925 case 5:
926 if wireType != 2 {
927 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
928 }
929 var msglen int
930 for shift := uint(0); ; shift += 7 {
931 if shift >= 64 {
932 return ErrIntOverflowGenerated
933 }
934 if iNdEx >= l {
935 return io.ErrUnexpectedEOF
936 }
937 b := dAtA[iNdEx]
938 iNdEx++
939 msglen |= int(b&0x7F) << shift
940 if b < 0x80 {
941 break
942 }
943 }
944 if msglen < 0 {
945 return ErrInvalidLengthGenerated
946 }
947 postIndex := iNdEx + msglen
948 if postIndex < 0 {
949 return ErrInvalidLengthGenerated
950 }
951 if postIndex > l {
952 return io.ErrUnexpectedEOF
953 }
954 if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
955 return err
956 }
957 iNdEx = postIndex
958 default:
959 iNdEx = preIndex
960 skippy, err := skipGenerated(dAtA[iNdEx:])
961 if err != nil {
962 return err
963 }
964 if (skippy < 0) || (iNdEx+skippy) < 0 {
965 return ErrInvalidLengthGenerated
966 }
967 if (iNdEx + skippy) > l {
968 return io.ErrUnexpectedEOF
969 }
970 iNdEx += skippy
971 }
972 }
973
974 if iNdEx > l {
975 return io.ErrUnexpectedEOF
976 }
977 return nil
978 }
979 func (m *MetricValueList) Unmarshal(dAtA []byte) error {
980 l := len(dAtA)
981 iNdEx := 0
982 for iNdEx < l {
983 preIndex := iNdEx
984 var wire uint64
985 for shift := uint(0); ; shift += 7 {
986 if shift >= 64 {
987 return ErrIntOverflowGenerated
988 }
989 if iNdEx >= l {
990 return io.ErrUnexpectedEOF
991 }
992 b := dAtA[iNdEx]
993 iNdEx++
994 wire |= uint64(b&0x7F) << shift
995 if b < 0x80 {
996 break
997 }
998 }
999 fieldNum := int32(wire >> 3)
1000 wireType := int(wire & 0x7)
1001 if wireType == 4 {
1002 return fmt.Errorf("proto: MetricValueList: wiretype end group for non-group")
1003 }
1004 if fieldNum <= 0 {
1005 return fmt.Errorf("proto: MetricValueList: illegal tag %d (wire type %d)", fieldNum, wire)
1006 }
1007 switch fieldNum {
1008 case 1:
1009 if wireType != 2 {
1010 return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
1011 }
1012 var msglen int
1013 for shift := uint(0); ; shift += 7 {
1014 if shift >= 64 {
1015 return ErrIntOverflowGenerated
1016 }
1017 if iNdEx >= l {
1018 return io.ErrUnexpectedEOF
1019 }
1020 b := dAtA[iNdEx]
1021 iNdEx++
1022 msglen |= int(b&0x7F) << shift
1023 if b < 0x80 {
1024 break
1025 }
1026 }
1027 if msglen < 0 {
1028 return ErrInvalidLengthGenerated
1029 }
1030 postIndex := iNdEx + msglen
1031 if postIndex < 0 {
1032 return ErrInvalidLengthGenerated
1033 }
1034 if postIndex > l {
1035 return io.ErrUnexpectedEOF
1036 }
1037 if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1038 return err
1039 }
1040 iNdEx = postIndex
1041 case 2:
1042 if wireType != 2 {
1043 return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
1044 }
1045 var msglen int
1046 for shift := uint(0); ; shift += 7 {
1047 if shift >= 64 {
1048 return ErrIntOverflowGenerated
1049 }
1050 if iNdEx >= l {
1051 return io.ErrUnexpectedEOF
1052 }
1053 b := dAtA[iNdEx]
1054 iNdEx++
1055 msglen |= int(b&0x7F) << shift
1056 if b < 0x80 {
1057 break
1058 }
1059 }
1060 if msglen < 0 {
1061 return ErrInvalidLengthGenerated
1062 }
1063 postIndex := iNdEx + msglen
1064 if postIndex < 0 {
1065 return ErrInvalidLengthGenerated
1066 }
1067 if postIndex > l {
1068 return io.ErrUnexpectedEOF
1069 }
1070 m.Items = append(m.Items, MetricValue{})
1071 if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1072 return err
1073 }
1074 iNdEx = postIndex
1075 default:
1076 iNdEx = preIndex
1077 skippy, err := skipGenerated(dAtA[iNdEx:])
1078 if err != nil {
1079 return err
1080 }
1081 if (skippy < 0) || (iNdEx+skippy) < 0 {
1082 return ErrInvalidLengthGenerated
1083 }
1084 if (iNdEx + skippy) > l {
1085 return io.ErrUnexpectedEOF
1086 }
1087 iNdEx += skippy
1088 }
1089 }
1090
1091 if iNdEx > l {
1092 return io.ErrUnexpectedEOF
1093 }
1094 return nil
1095 }
1096 func skipGenerated(dAtA []byte) (n int, err error) {
1097 l := len(dAtA)
1098 iNdEx := 0
1099 depth := 0
1100 for iNdEx < l {
1101 var wire uint64
1102 for shift := uint(0); ; shift += 7 {
1103 if shift >= 64 {
1104 return 0, ErrIntOverflowGenerated
1105 }
1106 if iNdEx >= l {
1107 return 0, io.ErrUnexpectedEOF
1108 }
1109 b := dAtA[iNdEx]
1110 iNdEx++
1111 wire |= (uint64(b) & 0x7F) << shift
1112 if b < 0x80 {
1113 break
1114 }
1115 }
1116 wireType := int(wire & 0x7)
1117 switch wireType {
1118 case 0:
1119 for shift := uint(0); ; shift += 7 {
1120 if shift >= 64 {
1121 return 0, ErrIntOverflowGenerated
1122 }
1123 if iNdEx >= l {
1124 return 0, io.ErrUnexpectedEOF
1125 }
1126 iNdEx++
1127 if dAtA[iNdEx-1] < 0x80 {
1128 break
1129 }
1130 }
1131 case 1:
1132 iNdEx += 8
1133 case 2:
1134 var length int
1135 for shift := uint(0); ; shift += 7 {
1136 if shift >= 64 {
1137 return 0, ErrIntOverflowGenerated
1138 }
1139 if iNdEx >= l {
1140 return 0, io.ErrUnexpectedEOF
1141 }
1142 b := dAtA[iNdEx]
1143 iNdEx++
1144 length |= (int(b) & 0x7F) << shift
1145 if b < 0x80 {
1146 break
1147 }
1148 }
1149 if length < 0 {
1150 return 0, ErrInvalidLengthGenerated
1151 }
1152 iNdEx += length
1153 case 3:
1154 depth++
1155 case 4:
1156 if depth == 0 {
1157 return 0, ErrUnexpectedEndOfGroupGenerated
1158 }
1159 depth--
1160 case 5:
1161 iNdEx += 4
1162 default:
1163 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
1164 }
1165 if iNdEx < 0 {
1166 return 0, ErrInvalidLengthGenerated
1167 }
1168 if depth == 0 {
1169 return iNdEx, nil
1170 }
1171 }
1172 return 0, io.ErrUnexpectedEOF
1173 }
1174
1175 var (
1176 ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
1177 ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
1178 ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
1179 )