Debian Codegraph @

pkg/apis/external_metrics/v1beta1/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/external_metrics/v1beta1/generated.proto
19
20 package v1beta1
21
22 import (
23 fmt "fmt"
24
25 io "io"
26
27 proto "github.com/gogo/protobuf/proto"
28 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
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 *ExternalMetricValue) Reset() { *m = ExternalMetricValue{} }
48 func (*ExternalMetricValue) ProtoMessage() {}
49 func (*ExternalMetricValue) Descriptor() ([]byte, []int) {
50 return fileDescriptor_56302cb587e818f0, []int{0}
51 }
52 func (m *ExternalMetricValue) XXX_Unmarshal(b []byte) error {
53 return m.Unmarshal(b)
54 }
55 func (m *ExternalMetricValue) 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 *ExternalMetricValue) XXX_Merge(src proto.Message) {
64 xxx_messageInfo_ExternalMetricValue.Merge(m, src)
65 }
66 func (m *ExternalMetricValue) XXX_Size() int {
67 return m.Size()
68 }
69 func (m *ExternalMetricValue) XXX_DiscardUnknown() {
70 xxx_messageInfo_ExternalMetricValue.DiscardUnknown(m)
71 }
72
73 var xxx_messageInfo_ExternalMetricValue proto.InternalMessageInfo
74
75 func (m *ExternalMetricValueList) Reset() { *m = ExternalMetricValueList{} }
76 func (*ExternalMetricValueList) ProtoMessage() {}
77 func (*ExternalMetricValueList) Descriptor() ([]byte, []int) {
78 return fileDescriptor_56302cb587e818f0, []int{1}
79 }
80 func (m *ExternalMetricValueList) XXX_Unmarshal(b []byte) error {
81 return m.Unmarshal(b)
82 }
83 func (m *ExternalMetricValueList) 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 *ExternalMetricValueList) XXX_Merge(src proto.Message) {
92 xxx_messageInfo_ExternalMetricValueList.Merge(m, src)
93 }
94 func (m *ExternalMetricValueList) XXX_Size() int {
95 return m.Size()
96 }
97 func (m *ExternalMetricValueList) XXX_DiscardUnknown() {
98 xxx_messageInfo_ExternalMetricValueList.DiscardUnknown(m)
99 }
100
101 var xxx_messageInfo_ExternalMetricValueList proto.InternalMessageInfo
102
103 func init() {
104 proto.RegisterType((*ExternalMetricValue)(nil), "k8s.io.metrics.pkg.apis.external_metrics.v1beta1.ExternalMetricValue")
105 proto.RegisterMapType((map[string]string)(nil), "k8s.io.metrics.pkg.apis.external_metrics.v1beta1.ExternalMetricValue.MetricLabelsEntry")
106 proto.RegisterType((*ExternalMetricValueList)(nil), "k8s.io.metrics.pkg.apis.external_metrics.v1beta1.ExternalMetricValueList")
107 }
108
109 func init() {
110 proto.RegisterFile("k8s.io/metrics/pkg/apis/external_metrics/v1beta1/generated.proto", fileDescriptor_56302cb587e818f0)
111 }
112
113 var fileDescriptor_56302cb587e818f0 = []byte{
114 // 539 bytes of a gzipped FileDescriptorProto
115 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x6b, 0xdb, 0x30,
116 0x14, 0xc7, 0xad, 0x78, 0x19, 0x8d, 0xda, 0x42, 0xa3, 0x15, 0x66, 0x72, 0x70, 0x42, 0x4f, 0xd9,
117 0x60, 0x52, 0x13, 0xc6, 0x28, 0xbb, 0x6c, 0x18, 0x72, 0x18, 0x34, 0x83, 0xb9, 0xa5, 0x85, 0x6d,
118 0x30, 0x14, 0x47, 0x73, 0xb4, 0xc4, 0x3f, 0xb0, 0xe4, 0x74, 0xb9, 0xed, 0x4f, 0xd8, 0xfe, 0xab,
119 0x1c, 0x7b, 0xec, 0x29, 0x2c, 0xee, 0x9f, 0xb1, 0xcb, 0xb0, 0x6c, 0x37, 0x59, 0xd2, 0xb5, 0x04,
120 0x7a, 0xf3, 0x93, 0xf4, 0xbe, 0xef, 0xf3, 0xbe, 0xef, 0x61, 0xf8, 0x76, 0x78, 0x24, 0x30, 0x0f,
121 0x88, 0xc7, 0x64, 0xc4, 0x1d, 0x41, 0xc2, 0xa1, 0x4b, 0x68, 0xc8, 0x05, 0x61, 0xdf, 0x25, 0x8b,
122 0x7c, 0x3a, 0xfa, 0x52, 0xdc, 0x8c, 0x5b, 0x3d, 0x26, 0x69, 0x8b, 0xb8, 0xcc, 0x67, 0x11, 0x95,
123 0xac, 0x8f, 0xc3, 0x28, 0x90, 0x01, 0x3a, 0xcc, 0x14, 0x70, 0xfe, 0x0e, 0x87, 0x43, 0x17, 0xa7,
124 0x0a, 0x78, 0x55, 0x01, 0xe7, 0x0a, 0xb5, 0x17, 0x2e, 0x97, 0x83, 0xb8, 0x87, 0x9d, 0xc0, 0x23,
125 0x6e, 0xe0, 0x06, 0x44, 0x09, 0xf5, 0xe2, 0xaf, 0x2a, 0x52, 0x81, 0xfa, 0xca, 0x0a, 0xd4, 0x5e,
126 0xe6, 0x88, 0x34, 0xe4, 0x1e, 0x75, 0x06, 0xdc, 0x67, 0xd1, 0xa4, 0xe0, 0x24, 0x11, 0x13, 0x41,
127 0x1c, 0x39, 0x6c, 0x15, 0xeb, 0xce, 0x2c, 0x91, 0xb6, 0x4b, 0xc9, 0x78, 0xad, 0x99, 0x1a, 0xf9,
128 0x5f, 0x56, 0x14, 0xfb, 0x92, 0x7b, 0xeb, 0x65, 0x5e, 0xdd, 0x97, 0x20, 0x9c, 0x01, 0xf3, 0xe8,
129 0x6a, 0xde, 0xc1, 0x1f, 0x1d, 0x3e, 0xe9, 0xe4, 0x06, 0x75, 0x95, 0x3f, 0x67, 0x74, 0x14, 0x33,
130 0xd4, 0x86, 0x30, 0xb3, 0xeb, 0x3d, 0xf5, 0x98, 0x01, 0x1a, 0xa0, 0x59, 0xb1, 0xd0, 0x74, 0x56,
131 0xd7, 0x92, 0x59, 0x1d, 0x76, 0x6f, 0x6e, 0xec, 0xa5, 0x57, 0xe8, 0x17, 0x80, 0x3b, 0x59, 0x78,
132 0x4c, 0x7b, 0x6c, 0x24, 0x8c, 0x52, 0x43, 0x6f, 0x6e, 0xb7, 0xcf, 0xf1, 0xa6, 0x93, 0xc1, 0xb7,
133 0x10, 0xe1, 0xee, 0x92, 0x72, 0xc7, 0x97, 0xd1, 0xc4, 0xda, 0xcf, 0x79, 0x76, 0x96, 0xaf, 0xec,
134 0x7f, 0x10, 0xd0, 0x27, 0x58, 0x49, 0xdb, 0x17, 0x92, 0x7a, 0xa1, 0xa1, 0x37, 0x40, 0x73, 0xbb,
135 0xfd, 0xbc, 0xe0, 0x59, 0xf6, 0x6a, 0x01, 0x95, 0x8e, 0x04, 0x8f, 0x5b, 0xf8, 0x94, 0x7b, 0xcc,
136 0xaa, 0xe6, 0x25, 0x2a, 0xa7, 0x85, 0x88, 0xbd, 0xd0, 0x43, 0xcf, 0xe0, 0xe3, 0x0b, 0xee, 0xf7,
137 0x83, 0x0b, 0xe3, 0x51, 0x03, 0x34, 0x75, 0xab, 0x9a, 0xcc, 0xea, 0xbb, 0xe7, 0xea, 0xe4, 0x84,
138 0x39, 0x81, 0xdf, 0x17, 0x76, 0xfe, 0x00, 0x9d, 0xc0, 0xf2, 0x38, 0x6d, 0xc3, 0x28, 0x2b, 0x06,
139 0x7c, 0x17, 0x03, 0x2e, 0x96, 0x09, 0x7f, 0x88, 0xa9, 0x2f, 0xb9, 0x9c, 0x58, 0xbb, 0x39, 0x47,
140 0x59, 0x79, 0x61, 0x67, 0x5a, 0xb5, 0x37, 0xb0, 0xba, 0xe6, 0x0a, 0xda, 0x83, 0xfa, 0x90, 0x4d,
141 0xb2, 0x91, 0xd9, 0xe9, 0x27, 0xda, 0x2f, 0x6a, 0x97, 0xd4, 0x59, 0x16, 0xbc, 0x2e, 0x1d, 0x81,
142 0x83, 0x6b, 0x00, 0x9f, 0xde, 0xe2, 0xf5, 0x31, 0x17, 0x12, 0x7d, 0x86, 0x5b, 0xa9, 0x15, 0x7d,
143 0x2a, 0xa9, 0x12, 0xbb, 0x07, 0x7a, 0x61, 0x5c, 0x9a, 0xdd, 0x65, 0x92, 0x5a, 0x7b, 0x39, 0xf4,
144 0x56, 0x71, 0x62, 0xdf, 0x28, 0xa2, 0x6f, 0xb0, 0xcc, 0x25, 0xf3, 0x8a, 0x1d, 0xe9, 0x3c, 0xc8,
145 0x8e, 0x2c, 0x6c, 0x7a, 0x97, 0x6a, 0xdb, 0x59, 0x09, 0xeb, 0x6c, 0x3a, 0x37, 0xb5, 0xcb, 0xb9,
146 0xa9, 0x5d, 0xcd, 0x4d, 0xed, 0x47, 0x62, 0x82, 0x69, 0x62, 0x82, 0xcb, 0xc4, 0x04, 0x57, 0x89,
147 0x09, 0x7e, 0x27, 0x26, 0xf8, 0x79, 0x6d, 0x6a, 0x1f, 0x0f, 0x37, 0xfd, 0x03, 0xfd, 0x0d, 0x00,
148 0x00, 0xff, 0xff, 0x68, 0x2d, 0x7f, 0xed, 0xb4, 0x04, 0x00, 0x00,
149 }
150
151 func (m *ExternalMetricValue) Marshal() (dAtA []byte, err error) {
152 size := m.Size()
153 dAtA = make([]byte, size)
154 n, err := m.MarshalToSizedBuffer(dAtA[:size])
155 if err != nil {
156 return nil, err
157 }
158 return dAtA[:n], nil
159 }
160
161 func (m *ExternalMetricValue) MarshalTo(dAtA []byte) (int, error) {
162 size := m.Size()
163 return m.MarshalToSizedBuffer(dAtA[:size])
164 }
165
166 func (m *ExternalMetricValue) MarshalToSizedBuffer(dAtA []byte) (int, error) {
167 i := len(dAtA)
168 _ = i
169 var l int
170 _ = l
171 {
172 size, err := m.Value.MarshalToSizedBuffer(dAtA[:i])
173 if err != nil {
174 return 0, err
175 }
176 i -= size
177 i = encodeVarintGenerated(dAtA, i, uint64(size))
178 }
179 i--
180 dAtA[i] = 0x2a
181 if m.WindowSeconds != nil {
182 i = encodeVarintGenerated(dAtA, i, uint64(*m.WindowSeconds))
183 i--
184 dAtA[i] = 0x20
185 }
186 {
187 size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i])
188 if err != nil {
189 return 0, err
190 }
191 i -= size
192 i = encodeVarintGenerated(dAtA, i, uint64(size))
193 }
194 i--
195 dAtA[i] = 0x1a
196 if len(m.MetricLabels) > 0 {
197 keysForMetricLabels := make([]string, 0, len(m.MetricLabels))
198 for k := range m.MetricLabels {
199 keysForMetricLabels = append(keysForMetricLabels, string(k))
200 }
201 github_com_gogo_protobuf_sortkeys.Strings(keysForMetricLabels)
202 for iNdEx := len(keysForMetricLabels) - 1; iNdEx >= 0; iNdEx-- {
203 v := m.MetricLabels[string(keysForMetricLabels[iNdEx])]
204 baseI := i
205 i -= len(v)
206 copy(dAtA[i:], v)
207 i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
208 i--
209 dAtA[i] = 0x12
210 i -= len(keysForMetricLabels[iNdEx])
211 copy(dAtA[i:], keysForMetricLabels[iNdEx])
212 i = encodeVarintGenerated(dAtA, i, uint64(len(keysForMetricLabels[iNdEx])))
213 i--
214 dAtA[i] = 0xa
215 i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
216 i--
217 dAtA[i] = 0x12
218 }
219 }
220 i -= len(m.MetricName)
221 copy(dAtA[i:], m.MetricName)
222 i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
223 i--
224 dAtA[i] = 0xa
225 return len(dAtA) - i, nil
226 }
227
228 func (m *ExternalMetricValueList) Marshal() (dAtA []byte, err error) {
229 size := m.Size()
230 dAtA = make([]byte, size)
231 n, err := m.MarshalToSizedBuffer(dAtA[:size])
232 if err != nil {
233 return nil, err
234 }
235 return dAtA[:n], nil
236 }
237
238 func (m *ExternalMetricValueList) MarshalTo(dAtA []byte) (int, error) {
239 size := m.Size()
240 return m.MarshalToSizedBuffer(dAtA[:size])
241 }
242
243 func (m *ExternalMetricValueList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
244 i := len(dAtA)
245 _ = i
246 var l int
247 _ = l
248 if len(m.Items) > 0 {
249 for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
250 {
251 size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
252 if err != nil {
253 return 0, err
254 }
255 i -= size
256 i = encodeVarintGenerated(dAtA, i, uint64(size))
257 }
258 i--
259 dAtA[i] = 0x12
260 }
261 }
262 {
263 size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
264 if err != nil {
265 return 0, err
266 }
267 i -= size
268 i = encodeVarintGenerated(dAtA, i, uint64(size))
269 }
270 i--
271 dAtA[i] = 0xa
272 return len(dAtA) - i, nil
273 }
274
275 func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
276 offset -= sovGenerated(v)
277 base := offset
278 for v >= 1<<7 {
279 dAtA[offset] = uint8(v&0x7f | 0x80)
280 v >>= 7
281 offset++
282 }
283 dAtA[offset] = uint8(v)
284 return base
285 }
286 func (m *ExternalMetricValue) Size() (n int) {
287 if m == nil {
288 return 0
289 }
290 var l int
291 _ = l
292 l = len(m.MetricName)
293 n += 1 + l + sovGenerated(uint64(l))
294 if len(m.MetricLabels) > 0 {
295 for k, v := range m.MetricLabels {
296 _ = k
297 _ = v
298 mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
299 n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
300 }
301 }
302 l = m.Timestamp.Size()
303 n += 1 + l + sovGenerated(uint64(l))
304 if m.WindowSeconds != nil {
305 n += 1 + sovGenerated(uint64(*m.WindowSeconds))
306 }
307 l = m.Value.Size()
308 n += 1 + l + sovGenerated(uint64(l))
309 return n
310 }
311
312 func (m *ExternalMetricValueList) Size() (n int) {
313 if m == nil {
314 return 0
315 }
316 var l int
317 _ = l
318 l = m.ListMeta.Size()
319 n += 1 + l + sovGenerated(uint64(l))
320 if len(m.Items) > 0 {
321 for _, e := range m.Items {
322 l = e.Size()
323 n += 1 + l + sovGenerated(uint64(l))
324 }
325 }
326 return n
327 }
328
329 func sovGenerated(x uint64) (n int) {
330 return (math_bits.Len64(x|1) + 6) / 7
331 }
332 func sozGenerated(x uint64) (n int) {
333 return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
334 }
335 func (this *ExternalMetricValue) String() string {
336 if this == nil {
337 return "nil"
338 }
339 keysForMetricLabels := make([]string, 0, len(this.MetricLabels))
340 for k := range this.MetricLabels {
341 keysForMetricLabels = append(keysForMetricLabels, k)
342 }
343 github_com_gogo_protobuf_sortkeys.Strings(keysForMetricLabels)
344 mapStringForMetricLabels := "map[string]string{"
345 for _, k := range keysForMetricLabels {
346 mapStringForMetricLabels += fmt.Sprintf("%v: %v,", k, this.MetricLabels[k])
347 }
348 mapStringForMetricLabels += "}"
349 s := strings.Join([]string{`&ExternalMetricValue{`,
350 `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
351 `MetricLabels:` + mapStringForMetricLabels + `,`,
352 `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Time", "v1.Time", 1), `&`, ``, 1) + `,`,
353 `WindowSeconds:` + valueToStringGenerated(this.WindowSeconds) + `,`,
354 `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
355 `}`,
356 }, "")
357 return s
358 }
359 func (this *ExternalMetricValueList) String() string {
360 if this == nil {
361 return "nil"
362 }
363 repeatedStringForItems := "[]ExternalMetricValue{"
364 for _, f := range this.Items {
365 repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ExternalMetricValue", "ExternalMetricValue", 1), `&`, ``, 1) + ","
366 }
367 repeatedStringForItems += "}"
368 s := strings.Join([]string{`&ExternalMetricValueList{`,
369 `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
370 `Items:` + repeatedStringForItems + `,`,
371 `}`,
372 }, "")
373 return s
374 }
375 func valueToStringGenerated(v interface{}) string {
376 rv := reflect.ValueOf(v)
377 if rv.IsNil() {
378 return "nil"
379 }
380 pv := reflect.Indirect(rv).Interface()
381 return fmt.Sprintf("*%v", pv)
382 }
383 func (m *ExternalMetricValue) Unmarshal(dAtA []byte) error {
384 l := len(dAtA)
385 iNdEx := 0
386 for iNdEx < l {
387 preIndex := iNdEx
388 var wire uint64
389 for shift := uint(0); ; shift += 7 {
390 if shift >= 64 {
391 return ErrIntOverflowGenerated
392 }
393 if iNdEx >= l {
394 return io.ErrUnexpectedEOF
395 }
396 b := dAtA[iNdEx]
397 iNdEx++
398 wire |= uint64(b&0x7F) << shift
399 if b < 0x80 {
400 break
401 }
402 }
403 fieldNum := int32(wire >> 3)
404 wireType := int(wire & 0x7)
405 if wireType == 4 {
406 return fmt.Errorf("proto: ExternalMetricValue: wiretype end group for non-group")
407 }
408 if fieldNum <= 0 {
409 return fmt.Errorf("proto: ExternalMetricValue: illegal tag %d (wire type %d)", fieldNum, wire)
410 }
411 switch fieldNum {
412 case 1:
413 if wireType != 2 {
414 return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
415 }
416 var stringLen uint64
417 for shift := uint(0); ; shift += 7 {
418 if shift >= 64 {
419 return ErrIntOverflowGenerated
420 }
421 if iNdEx >= l {
422 return io.ErrUnexpectedEOF
423 }
424 b := dAtA[iNdEx]
425 iNdEx++
426 stringLen |= uint64(b&0x7F) << shift
427 if b < 0x80 {
428 break
429 }
430 }
431 intStringLen := int(stringLen)
432 if intStringLen < 0 {
433 return ErrInvalidLengthGenerated
434 }
435 postIndex := iNdEx + intStringLen
436 if postIndex < 0 {
437 return ErrInvalidLengthGenerated
438 }
439 if postIndex > l {
440 return io.ErrUnexpectedEOF
441 }
442 m.MetricName = string(dAtA[iNdEx:postIndex])
443 iNdEx = postIndex
444 case 2:
445 if wireType != 2 {
446 return fmt.Errorf("proto: wrong wireType = %d for field MetricLabels", wireType)
447 }
448 var msglen int
449 for shift := uint(0); ; shift += 7 {
450 if shift >= 64 {
451 return ErrIntOverflowGenerated
452 }
453 if iNdEx >= l {
454 return io.ErrUnexpectedEOF
455 }
456 b := dAtA[iNdEx]
457 iNdEx++
458 msglen |= int(b&0x7F) << shift
459 if b < 0x80 {
460 break
461 }
462 }
463 if msglen < 0 {
464 return ErrInvalidLengthGenerated
465 }
466 postIndex := iNdEx + msglen
467 if postIndex < 0 {
468 return ErrInvalidLengthGenerated
469 }
470 if postIndex > l {
471 return io.ErrUnexpectedEOF
472 }
473 if m.MetricLabels == nil {
474 m.MetricLabels = make(map[string]string)
475 }
476 var mapkey string
477 var mapvalue string
478 for iNdEx < postIndex {
479 entryPreIndex := iNdEx
480 var wire uint64
481 for shift := uint(0); ; shift += 7 {
482 if shift >= 64 {
483 return ErrIntOverflowGenerated
484 }
485 if iNdEx >= l {
486 return io.ErrUnexpectedEOF
487 }
488 b := dAtA[iNdEx]
489 iNdEx++
490 wire |= uint64(b&0x7F) << shift
491 if b < 0x80 {
492 break
493 }
494 }
495 fieldNum := int32(wire >> 3)
496 if fieldNum == 1 {
497 var stringLenmapkey uint64
498 for shift := uint(0); ; shift += 7 {
499 if shift >= 64 {
500 return ErrIntOverflowGenerated
501 }
502 if iNdEx >= l {
503 return io.ErrUnexpectedEOF
504 }
505 b := dAtA[iNdEx]
506 iNdEx++
507 stringLenmapkey |= uint64(b&0x7F) << shift
508 if b < 0x80 {
509 break
510 }
511 }
512 intStringLenmapkey := int(stringLenmapkey)
513 if intStringLenmapkey < 0 {
514 return ErrInvalidLengthGenerated
515 }
516 postStringIndexmapkey := iNdEx + intStringLenmapkey
517 if postStringIndexmapkey < 0 {
518 return ErrInvalidLengthGenerated
519 }
520 if postStringIndexmapkey > l {
521 return io.ErrUnexpectedEOF
522 }
523 mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
524 iNdEx = postStringIndexmapkey
525 } else if fieldNum == 2 {
526 var stringLenmapvalue uint64
527 for shift := uint(0); ; shift += 7 {
528 if shift >= 64 {
529 return ErrIntOverflowGenerated
530 }
531 if iNdEx >= l {
532 return io.ErrUnexpectedEOF
533 }
534 b := dAtA[iNdEx]
535 iNdEx++
536 stringLenmapvalue |= uint64(b&0x7F) << shift
537 if b < 0x80 {
538 break
539 }
540 }
541 intStringLenmapvalue := int(stringLenmapvalue)
542 if intStringLenmapvalue < 0 {
543 return ErrInvalidLengthGenerated
544 }
545 postStringIndexmapvalue := iNdEx + intStringLenmapvalue
546 if postStringIndexmapvalue < 0 {
547 return ErrInvalidLengthGenerated
548 }
549 if postStringIndexmapvalue > l {
550 return io.ErrUnexpectedEOF
551 }
552 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
553 iNdEx = postStringIndexmapvalue
554 } else {
555 iNdEx = entryPreIndex
556 skippy, err := skipGenerated(dAtA[iNdEx:])
557 if err != nil {
558 return err
559 }
560 if (skippy < 0) || (iNdEx+skippy) < 0 {
561 return ErrInvalidLengthGenerated
562 }
563 if (iNdEx + skippy) > postIndex {
564 return io.ErrUnexpectedEOF
565 }
566 iNdEx += skippy
567 }
568 }
569 m.MetricLabels[mapkey] = mapvalue
570 iNdEx = postIndex
571 case 3:
572 if wireType != 2 {
573 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
574 }
575 var msglen int
576 for shift := uint(0); ; shift += 7 {
577 if shift >= 64 {
578 return ErrIntOverflowGenerated
579 }
580 if iNdEx >= l {
581 return io.ErrUnexpectedEOF
582 }
583 b := dAtA[iNdEx]
584 iNdEx++
585 msglen |= int(b&0x7F) << shift
586 if b < 0x80 {
587 break
588 }
589 }
590 if msglen < 0 {
591 return ErrInvalidLengthGenerated
592 }
593 postIndex := iNdEx + msglen
594 if postIndex < 0 {
595 return ErrInvalidLengthGenerated
596 }
597 if postIndex > l {
598 return io.ErrUnexpectedEOF
599 }
600 if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
601 return err
602 }
603 iNdEx = postIndex
604 case 4:
605 if wireType != 0 {
606 return fmt.Errorf("proto: wrong wireType = %d for field WindowSeconds", wireType)
607 }
608 var v int64
609 for shift := uint(0); ; shift += 7 {
610 if shift >= 64 {
611 return ErrIntOverflowGenerated
612 }
613 if iNdEx >= l {
614 return io.ErrUnexpectedEOF
615 }
616 b := dAtA[iNdEx]
617 iNdEx++
618 v |= int64(b&0x7F) << shift
619 if b < 0x80 {
620 break
621 }
622 }
623 m.WindowSeconds = &v
624 case 5:
625 if wireType != 2 {
626 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
627 }
628 var msglen int
629 for shift := uint(0); ; shift += 7 {
630 if shift >= 64 {
631 return ErrIntOverflowGenerated
632 }
633 if iNdEx >= l {
634 return io.ErrUnexpectedEOF
635 }
636 b := dAtA[iNdEx]
637 iNdEx++
638 msglen |= int(b&0x7F) << shift
639 if b < 0x80 {
640 break
641 }
642 }
643 if msglen < 0 {
644 return ErrInvalidLengthGenerated
645 }
646 postIndex := iNdEx + msglen
647 if postIndex < 0 {
648 return ErrInvalidLengthGenerated
649 }
650 if postIndex > l {
651 return io.ErrUnexpectedEOF
652 }
653 if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
654 return err
655 }
656 iNdEx = postIndex
657 default:
658 iNdEx = preIndex
659 skippy, err := skipGenerated(dAtA[iNdEx:])
660 if err != nil {
661 return err
662 }
663 if (skippy < 0) || (iNdEx+skippy) < 0 {
664 return ErrInvalidLengthGenerated
665 }
666 if (iNdEx + skippy) > l {
667 return io.ErrUnexpectedEOF
668 }
669 iNdEx += skippy
670 }
671 }
672
673 if iNdEx > l {
674 return io.ErrUnexpectedEOF
675 }
676 return nil
677 }
678 func (m *ExternalMetricValueList) Unmarshal(dAtA []byte) error {
679 l := len(dAtA)
680 iNdEx := 0
681 for iNdEx < l {
682 preIndex := iNdEx
683 var wire uint64
684 for shift := uint(0); ; shift += 7 {
685 if shift >= 64 {
686 return ErrIntOverflowGenerated
687 }
688 if iNdEx >= l {
689 return io.ErrUnexpectedEOF
690 }
691 b := dAtA[iNdEx]
692 iNdEx++
693 wire |= uint64(b&0x7F) << shift
694 if b < 0x80 {
695 break
696 }
697 }
698 fieldNum := int32(wire >> 3)
699 wireType := int(wire & 0x7)
700 if wireType == 4 {
701 return fmt.Errorf("proto: ExternalMetricValueList: wiretype end group for non-group")
702 }
703 if fieldNum <= 0 {
704 return fmt.Errorf("proto: ExternalMetricValueList: illegal tag %d (wire type %d)", fieldNum, wire)
705 }
706 switch fieldNum {
707 case 1:
708 if wireType != 2 {
709 return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
710 }
711 var msglen int
712 for shift := uint(0); ; shift += 7 {
713 if shift >= 64 {
714 return ErrIntOverflowGenerated
715 }
716 if iNdEx >= l {
717 return io.ErrUnexpectedEOF
718 }
719 b := dAtA[iNdEx]
720 iNdEx++
721 msglen |= int(b&0x7F) << shift
722 if b < 0x80 {
723 break
724 }
725 }
726 if msglen < 0 {
727 return ErrInvalidLengthGenerated
728 }
729 postIndex := iNdEx + msglen
730 if postIndex < 0 {
731 return ErrInvalidLengthGenerated
732 }
733 if postIndex > l {
734 return io.ErrUnexpectedEOF
735 }
736 if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
737 return err
738 }
739 iNdEx = postIndex
740 case 2:
741 if wireType != 2 {
742 return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
743 }
744 var msglen int
745 for shift := uint(0); ; shift += 7 {
746 if shift >= 64 {
747 return ErrIntOverflowGenerated
748 }
749 if iNdEx >= l {
750 return io.ErrUnexpectedEOF
751 }
752 b := dAtA[iNdEx]
753 iNdEx++
754 msglen |= int(b&0x7F) << shift
755 if b < 0x80 {
756 break
757 }
758 }
759 if msglen < 0 {
760 return ErrInvalidLengthGenerated
761 }
762 postIndex := iNdEx + msglen
763 if postIndex < 0 {
764 return ErrInvalidLengthGenerated
765 }
766 if postIndex > l {
767 return io.ErrUnexpectedEOF
768 }
769 m.Items = append(m.Items, ExternalMetricValue{})
770 if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
771 return err
772 }
773 iNdEx = postIndex
774 default:
775 iNdEx = preIndex
776 skippy, err := skipGenerated(dAtA[iNdEx:])
777 if err != nil {
778 return err
779 }
780 if (skippy < 0) || (iNdEx+skippy) < 0 {
781 return ErrInvalidLengthGenerated
782 }
783 if (iNdEx + skippy) > l {
784 return io.ErrUnexpectedEOF
785 }
786 iNdEx += skippy
787 }
788 }
789
790 if iNdEx > l {
791 return io.ErrUnexpectedEOF
792 }
793 return nil
794 }
795 func skipGenerated(dAtA []byte) (n int, err error) {
796 l := len(dAtA)
797 iNdEx := 0
798 depth := 0
799 for iNdEx < l {
800 var wire uint64
801 for shift := uint(0); ; shift += 7 {
802 if shift >= 64 {
803 return 0, ErrIntOverflowGenerated
804 }
805 if iNdEx >= l {
806 return 0, io.ErrUnexpectedEOF
807 }
808 b := dAtA[iNdEx]
809 iNdEx++
810 wire |= (uint64(b) & 0x7F) << shift
811 if b < 0x80 {
812 break
813 }
814 }
815 wireType := int(wire & 0x7)
816 switch wireType {
817 case 0:
818 for shift := uint(0); ; shift += 7 {
819 if shift >= 64 {
820 return 0, ErrIntOverflowGenerated
821 }
822 if iNdEx >= l {
823 return 0, io.ErrUnexpectedEOF
824 }
825 iNdEx++
826 if dAtA[iNdEx-1] < 0x80 {
827 break
828 }
829 }
830 case 1:
831 iNdEx += 8
832 case 2:
833 var length int
834 for shift := uint(0); ; shift += 7 {
835 if shift >= 64 {
836 return 0, ErrIntOverflowGenerated
837 }
838 if iNdEx >= l {
839 return 0, io.ErrUnexpectedEOF
840 }
841 b := dAtA[iNdEx]
842 iNdEx++
843 length |= (int(b) & 0x7F) << shift
844 if b < 0x80 {
845 break
846 }
847 }
848 if length < 0 {
849 return 0, ErrInvalidLengthGenerated
850 }
851 iNdEx += length
852 case 3:
853 depth++
854 case 4:
855 if depth == 0 {
856 return 0, ErrUnexpectedEndOfGroupGenerated
857 }
858 depth--
859 case 5:
860 iNdEx += 4
861 default:
862 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
863 }
864 if iNdEx < 0 {
865 return 0, ErrInvalidLengthGenerated
866 }
867 if depth == 0 {
868 return iNdEx, nil
869 }
870 }
871 return 0, io.ErrUnexpectedEOF
872 }
873
874 var (
875 ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
876 ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
877 ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
878 )