Debian Codegraph @

pkg/apis/metrics/v1alpha1/generated.pb.go

raw symbols SCIP
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/metrics/v1alpha1/generated.proto
19
20 package v1alpha1
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 k8s_io_api_core_v1 "k8s.io/api/core/v1"
31 k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
32 resource "k8s.io/apimachinery/pkg/api/resource"
33
34 math "math"
35 math_bits "math/bits"
36 reflect "reflect"
37 strings "strings"
38 )
39
40 // Reference imports to suppress errors if they are not otherwise used.
41 var _ = proto.Marshal
42 var _ = fmt.Errorf
43 var _ = math.Inf
44
45 // This is a compile-time assertion to ensure that this generated file
46 // is compatible with the proto package it is being compiled against.
47 // A compilation error at this line likely means your copy of the
48 // proto package needs to be updated.
49 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
50
51 func (m *ContainerMetrics) Reset() { *m = ContainerMetrics{} }
52 func (*ContainerMetrics) ProtoMessage() {}
53 func (*ContainerMetrics) Descriptor() ([]byte, []int) {
54 return fileDescriptor_5f579fa237c41fb8, []int{0}
55 }
56 func (m *ContainerMetrics) XXX_Unmarshal(b []byte) error {
57 return m.Unmarshal(b)
58 }
59 func (m *ContainerMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
60 b = b[:cap(b)]
61 n, err := m.MarshalToSizedBuffer(b)
62 if err != nil {
63 return nil, err
64 }
65 return b[:n], nil
66 }
67 func (m *ContainerMetrics) XXX_Merge(src proto.Message) {
68 xxx_messageInfo_ContainerMetrics.Merge(m, src)
69 }
70 func (m *ContainerMetrics) XXX_Size() int {
71 return m.Size()
72 }
73 func (m *ContainerMetrics) XXX_DiscardUnknown() {
74 xxx_messageInfo_ContainerMetrics.DiscardUnknown(m)
75 }
76
77 var xxx_messageInfo_ContainerMetrics proto.InternalMessageInfo
78
79 func (m *NodeMetrics) Reset() { *m = NodeMetrics{} }
80 func (*NodeMetrics) ProtoMessage() {}
81 func (*NodeMetrics) Descriptor() ([]byte, []int) {
82 return fileDescriptor_5f579fa237c41fb8, []int{1}
83 }
84 func (m *NodeMetrics) XXX_Unmarshal(b []byte) error {
85 return m.Unmarshal(b)
86 }
87 func (m *NodeMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
88 b = b[:cap(b)]
89 n, err := m.MarshalToSizedBuffer(b)
90 if err != nil {
91 return nil, err
92 }
93 return b[:n], nil
94 }
95 func (m *NodeMetrics) XXX_Merge(src proto.Message) {
96 xxx_messageInfo_NodeMetrics.Merge(m, src)
97 }
98 func (m *NodeMetrics) XXX_Size() int {
99 return m.Size()
100 }
101 func (m *NodeMetrics) XXX_DiscardUnknown() {
102 xxx_messageInfo_NodeMetrics.DiscardUnknown(m)
103 }
104
105 var xxx_messageInfo_NodeMetrics proto.InternalMessageInfo
106
107 func (m *NodeMetricsList) Reset() { *m = NodeMetricsList{} }
108 func (*NodeMetricsList) ProtoMessage() {}
109 func (*NodeMetricsList) Descriptor() ([]byte, []int) {
110 return fileDescriptor_5f579fa237c41fb8, []int{2}
111 }
112 func (m *NodeMetricsList) XXX_Unmarshal(b []byte) error {
113 return m.Unmarshal(b)
114 }
115 func (m *NodeMetricsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
116 b = b[:cap(b)]
117 n, err := m.MarshalToSizedBuffer(b)
118 if err != nil {
119 return nil, err
120 }
121 return b[:n], nil
122 }
123 func (m *NodeMetricsList) XXX_Merge(src proto.Message) {
124 xxx_messageInfo_NodeMetricsList.Merge(m, src)
125 }
126 func (m *NodeMetricsList) XXX_Size() int {
127 return m.Size()
128 }
129 func (m *NodeMetricsList) XXX_DiscardUnknown() {
130 xxx_messageInfo_NodeMetricsList.DiscardUnknown(m)
131 }
132
133 var xxx_messageInfo_NodeMetricsList proto.InternalMessageInfo
134
135 func (m *PodMetrics) Reset() { *m = PodMetrics{} }
136 func (*PodMetrics) ProtoMessage() {}
137 func (*PodMetrics) Descriptor() ([]byte, []int) {
138 return fileDescriptor_5f579fa237c41fb8, []int{3}
139 }
140 func (m *PodMetrics) XXX_Unmarshal(b []byte) error {
141 return m.Unmarshal(b)
142 }
143 func (m *PodMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
144 b = b[:cap(b)]
145 n, err := m.MarshalToSizedBuffer(b)
146 if err != nil {
147 return nil, err
148 }
149 return b[:n], nil
150 }
151 func (m *PodMetrics) XXX_Merge(src proto.Message) {
152 xxx_messageInfo_PodMetrics.Merge(m, src)
153 }
154 func (m *PodMetrics) XXX_Size() int {
155 return m.Size()
156 }
157 func (m *PodMetrics) XXX_DiscardUnknown() {
158 xxx_messageInfo_PodMetrics.DiscardUnknown(m)
159 }
160
161 var xxx_messageInfo_PodMetrics proto.InternalMessageInfo
162
163 func (m *PodMetricsList) Reset() { *m = PodMetricsList{} }
164 func (*PodMetricsList) ProtoMessage() {}
165 func (*PodMetricsList) Descriptor() ([]byte, []int) {
166 return fileDescriptor_5f579fa237c41fb8, []int{4}
167 }
168 func (m *PodMetricsList) XXX_Unmarshal(b []byte) error {
169 return m.Unmarshal(b)
170 }
171 func (m *PodMetricsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
172 b = b[:cap(b)]
173 n, err := m.MarshalToSizedBuffer(b)
174 if err != nil {
175 return nil, err
176 }
177 return b[:n], nil
178 }
179 func (m *PodMetricsList) XXX_Merge(src proto.Message) {
180 xxx_messageInfo_PodMetricsList.Merge(m, src)
181 }
182 func (m *PodMetricsList) XXX_Size() int {
183 return m.Size()
184 }
185 func (m *PodMetricsList) XXX_DiscardUnknown() {
186 xxx_messageInfo_PodMetricsList.DiscardUnknown(m)
187 }
188
189 var xxx_messageInfo_PodMetricsList proto.InternalMessageInfo
190
191 func init() {
192 proto.RegisterType((*ContainerMetrics)(nil), "k8s.io.metrics.pkg.apis.metrics.v1alpha1.ContainerMetrics")
193 proto.RegisterMapType((k8s_io_api_core_v1.ResourceList)(nil), "k8s.io.metrics.pkg.apis.metrics.v1alpha1.ContainerMetrics.UsageEntry")
194 proto.RegisterType((*NodeMetrics)(nil), "k8s.io.metrics.pkg.apis.metrics.v1alpha1.NodeMetrics")
195 proto.RegisterMapType((k8s_io_api_core_v1.ResourceList)(nil), "k8s.io.metrics.pkg.apis.metrics.v1alpha1.NodeMetrics.UsageEntry")
196 proto.RegisterType((*NodeMetricsList)(nil), "k8s.io.metrics.pkg.apis.metrics.v1alpha1.NodeMetricsList")
197 proto.RegisterType((*PodMetrics)(nil), "k8s.io.metrics.pkg.apis.metrics.v1alpha1.PodMetrics")
198 proto.RegisterType((*PodMetricsList)(nil), "k8s.io.metrics.pkg.apis.metrics.v1alpha1.PodMetricsList")
199 }
200
201 func init() {
202 proto.RegisterFile("k8s.io/metrics/pkg/apis/metrics/v1alpha1/generated.proto", fileDescriptor_5f579fa237c41fb8)
203 }
204
205 var fileDescriptor_5f579fa237c41fb8 = []byte{
206 // 647 bytes of a gzipped FileDescriptorProto
207 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xb1, 0x6f, 0xd3, 0x4e,
208 0x18, 0xcd, 0x35, 0x49, 0xd5, 0x5e, 0x7e, 0xbf, 0x52, 0x3c, 0x55, 0x19, 0x9c, 0xca, 0x53, 0x84,
209 0xd4, 0x33, 0xad, 0x0a, 0x8a, 0x3a, 0x21, 0xd3, 0x0e, 0x48, 0x34, 0x80, 0x55, 0x40, 0x14, 0x06,
210 0x2e, 0xce, 0xe1, 0x1c, 0xa9, 0x7d, 0x96, 0x7d, 0x4e, 0x95, 0x0d, 0x01, 0x13, 0x13, 0x12, 0xff,
211 0x54, 0x10, 0x4b, 0xc7, 0x2e, 0xa4, 0xc4, 0xec, 0xfc, 0x01, 0x4c, 0xc8, 0xe7, 0x73, 0x1c, 0x9a,
212 0x90, 0x9a, 0x0e, 0x4c, 0xdd, 0xec, 0xcf, 0xf7, 0xde, 0xfb, 0xee, 0x7d, 0xef, 0x4e, 0x86, 0x8d,
213 0x6e, 0x23, 0x40, 0x94, 0xe9, 0x0e, 0xe1, 0x3e, 0xb5, 0x02, 0xdd, 0xeb, 0xda, 0x3a, 0xf6, 0x68,
214 0x30, 0x2e, 0xf4, 0x36, 0xf1, 0x91, 0xd7, 0xc1, 0x9b, 0xba, 0x4d, 0x5c, 0xe2, 0x63, 0x4e, 0xda,
215 0xc8, 0xf3, 0x19, 0x67, 0x4a, 0x3d, 0x41, 0x22, 0xb9, 0x10, 0x79, 0x5d, 0x1b, 0xc5, 0xc8, 0x71,
216 0x21, 0x45, 0x56, 0x37, 0x6c, 0xca, 0x3b, 0x61, 0x0b, 0x59, 0xcc, 0xd1, 0x6d, 0x66, 0x33, 0x5d,
217 0x10, 0xb4, 0xc2, 0x57, 0xe2, 0x4d, 0xbc, 0x88, 0xa7, 0x84, 0xb8, 0xaa, 0xc9, 0x96, 0xb0, 0x47,
218 0x75, 0x8b, 0xf9, 0x44, 0xef, 0x4d, 0x89, 0x57, 0xb7, 0xb3, 0x35, 0x0e, 0xb6, 0x3a, 0xd4, 0x25,
219 0x7e, 0x3f, 0xed, 0x5d, 0xf7, 0x49, 0xc0, 0x42, 0xdf, 0x22, 0x7f, 0x85, 0x12, 0x3b, 0xc6, 0xb3,
220 0xb4, 0xf4, 0x3f, 0xa1, 0xfc, 0xd0, 0xe5, 0xd4, 0x99, 0x96, 0xb9, 0x7d, 0x11, 0x20, 0xb0, 0x3a,
221 0xc4, 0xc1, 0xe7, 0x71, 0xda, 0xbb, 0x22, 0x5c, 0xbd, 0xcb, 0x5c, 0x8e, 0x63, 0xc4, 0x7e, 0xe2,
222 0xa2, 0xb2, 0x0e, 0x4b, 0x2e, 0x76, 0xc8, 0x1a, 0x58, 0x07, 0xf5, 0x65, 0xe3, 0xbf, 0xc1, 0xb0,
223 0x56, 0x88, 0x86, 0xb5, 0x52, 0x13, 0x3b, 0xc4, 0x14, 0x5f, 0x94, 0x08, 0xc0, 0x72, 0x18, 0x60,
224 0x9b, 0xac, 0x2d, 0xac, 0x17, 0xeb, 0x95, 0xad, 0x3d, 0x94, 0x77, 0x32, 0xe8, 0xbc, 0x1a, 0x7a,
225 0x1c, 0xf3, 0xec, 0xb9, 0xdc, 0xef, 0x1b, 0xef, 0x81, 0xd4, 0x2a, 0x8b, 0xe2, 0xcf, 0x61, 0xad,
226 0x36, 0x3d, 0x18, 0x64, 0x4a, 0xaf, 0xef, 0xd3, 0x80, 0xbf, 0x3d, 0x9b, 0xbb, 0x24, 0x6e, 0xf9,
227 0xc3, 0x59, 0x6d, 0x23, 0xcf, 0xe8, 0xd0, 0xa3, 0x10, 0xbb, 0x9c, 0xf2, 0xbe, 0x99, 0x6c, 0xad,
228 0xda, 0x81, 0x30, 0xeb, 0x4d, 0x59, 0x85, 0xc5, 0x2e, 0xe9, 0x27, 0x9e, 0x98, 0xf1, 0xa3, 0xb2,
229 0x0b, 0xcb, 0x3d, 0x7c, 0x14, 0xc6, 0x1e, 0x80, 0x7a, 0x65, 0x0b, 0xa5, 0x1e, 0x4c, 0xaa, 0xa4,
230 0x46, 0xa0, 0x19, 0x2a, 0x02, 0xbc, 0xb3, 0xd0, 0x00, 0xda, 0x8f, 0x12, 0xac, 0x34, 0x59, 0x9b,
231 0xa4, 0x03, 0x78, 0x09, 0x97, 0xe2, 0x64, 0xb4, 0x31, 0xc7, 0x42, 0xb0, 0xb2, 0x75, 0x73, 0x1e,
232 0xb9, 0x70, 0x19, 0xa3, 0xde, 0x26, 0x7a, 0xd0, 0x7a, 0x4d, 0x2c, 0xbe, 0x4f, 0x38, 0x36, 0x14,
233 0x69, 0x25, 0xcc, 0x6a, 0xe6, 0x98, 0x55, 0x79, 0x0e, 0x97, 0xe3, 0x58, 0x04, 0x1c, 0x3b, 0x9e,
234 0xec, 0xff, 0x46, 0x3e, 0x89, 0x03, 0xea, 0x10, 0xe3, 0xba, 0x24, 0x5f, 0x3e, 0x48, 0x49, 0xcc,
235 0x8c, 0x4f, 0x79, 0x02, 0x17, 0x8f, 0xa9, 0xdb, 0x66, 0xc7, 0x6b, 0xc5, 0x8b, 0x9d, 0xc9, 0x98,
236 0x77, 0x43, 0x1f, 0x73, 0xca, 0x5c, 0x63, 0x45, 0xb2, 0x2f, 0x3e, 0x15, 0x2c, 0xa6, 0x64, 0x53,
237 0xbe, 0x8e, 0x53, 0x57, 0x12, 0xa9, 0xbb, 0x93, 0x3f, 0x75, 0x13, 0xee, 0x5e, 0x05, 0x0e, 0x68,
238 0x5f, 0x00, 0xbc, 0x36, 0x61, 0x49, 0xbc, 0x31, 0xe5, 0xc5, 0x54, 0xe8, 0x72, 0xce, 0x2d, 0x46,
239 0x8b, 0xc8, 0xad, 0x4a, 0x33, 0x97, 0xd2, 0xca, 0x44, 0xe0, 0x0e, 0x61, 0x99, 0x72, 0xe2, 0x04,
240 0xf2, 0xc2, 0xb8, 0x75, 0xa9, 0xd1, 0x19, 0xff, 0xa7, 0xe3, 0xba, 0x17, 0x73, 0x99, 0x09, 0xa5,
241 0xf6, 0xa9, 0x08, 0xe1, 0x43, 0xd6, 0xbe, 0x3a, 0x3d, 0x73, 0x4f, 0x8f, 0x0b, 0xa1, 0x95, 0xde,
242 0xbd, 0x81, 0x3c, 0x41, 0x3b, 0x97, 0xbf, 0xb7, 0x33, 0x8b, 0xc6, 0x5f, 0x02, 0x73, 0x42, 0x41,
243 0xfb, 0x0c, 0xe0, 0x4a, 0x36, 0x95, 0x7f, 0x10, 0xb1, 0x67, 0xbf, 0x47, 0x6c, 0x3b, 0xff, 0xde,
244 0xb2, 0x36, 0x67, 0x27, 0xcc, 0x68, 0x0e, 0x46, 0x6a, 0xe1, 0x64, 0xa4, 0x16, 0x4e, 0x47, 0x6a,
245 0xe1, 0x4d, 0xa4, 0x82, 0x41, 0xa4, 0x82, 0x93, 0x48, 0x05, 0xa7, 0x91, 0x0a, 0xbe, 0x45, 0x2a,
246 0xf8, 0xf8, 0x5d, 0x2d, 0x1c, 0xd6, 0xf3, 0xfe, 0xd8, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xe5,
247 0xa6, 0x17, 0xf2, 0x03, 0x09, 0x00, 0x00,
248 }
249
250 func (m *ContainerMetrics) Marshal() (dAtA []byte, err error) {
251 size := m.Size()
252 dAtA = make([]byte, size)
253 n, err := m.MarshalToSizedBuffer(dAtA[:size])
254 if err != nil {
255 return nil, err
256 }
257 return dAtA[:n], nil
258 }
259
260 func (m *ContainerMetrics) MarshalTo(dAtA []byte) (int, error) {
261 size := m.Size()
262 return m.MarshalToSizedBuffer(dAtA[:size])
263 }
264
265 func (m *ContainerMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) {
266 i := len(dAtA)
267 _ = i
268 var l int
269 _ = l
270 if len(m.Usage) > 0 {
271 keysForUsage := make([]string, 0, len(m.Usage))
272 for k := range m.Usage {
273 keysForUsage = append(keysForUsage, string(k))
274 }
275 github_com_gogo_protobuf_sortkeys.Strings(keysForUsage)
276 for iNdEx := len(keysForUsage) - 1; iNdEx >= 0; iNdEx-- {
277 v := m.Usage[k8s_io_api_core_v1.ResourceName(keysForUsage[iNdEx])]
278 baseI := i
279 {
280 size, err := ((*resource.Quantity)(&v)).MarshalToSizedBuffer(dAtA[:i])
281 if err != nil {
282 return 0, err
283 }
284 i -= size
285 i = encodeVarintGenerated(dAtA, i, uint64(size))
286 }
287 i--
288 dAtA[i] = 0x12
289 i -= len(keysForUsage[iNdEx])
290 copy(dAtA[i:], keysForUsage[iNdEx])
291 i = encodeVarintGenerated(dAtA, i, uint64(len(keysForUsage[iNdEx])))
292 i--
293 dAtA[i] = 0xa
294 i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
295 i--
296 dAtA[i] = 0x12
297 }
298 }
299 i -= len(m.Name)
300 copy(dAtA[i:], m.Name)
301 i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
302 i--
303 dAtA[i] = 0xa
304 return len(dAtA) - i, nil
305 }
306
307 func (m *NodeMetrics) Marshal() (dAtA []byte, err error) {
308 size := m.Size()
309 dAtA = make([]byte, size)
310 n, err := m.MarshalToSizedBuffer(dAtA[:size])
311 if err != nil {
312 return nil, err
313 }
314 return dAtA[:n], nil
315 }
316
317 func (m *NodeMetrics) MarshalTo(dAtA []byte) (int, error) {
318 size := m.Size()
319 return m.MarshalToSizedBuffer(dAtA[:size])
320 }
321
322 func (m *NodeMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) {
323 i := len(dAtA)
324 _ = i
325 var l int
326 _ = l
327 if len(m.Usage) > 0 {
328 keysForUsage := make([]string, 0, len(m.Usage))
329 for k := range m.Usage {
330 keysForUsage = append(keysForUsage, string(k))
331 }
332 github_com_gogo_protobuf_sortkeys.Strings(keysForUsage)
333 for iNdEx := len(keysForUsage) - 1; iNdEx >= 0; iNdEx-- {
334 v := m.Usage[k8s_io_api_core_v1.ResourceName(keysForUsage[iNdEx])]
335 baseI := i
336 {
337 size, err := ((*resource.Quantity)(&v)).MarshalToSizedBuffer(dAtA[:i])
338 if err != nil {
339 return 0, err
340 }
341 i -= size
342 i = encodeVarintGenerated(dAtA, i, uint64(size))
343 }
344 i--
345 dAtA[i] = 0x12
346 i -= len(keysForUsage[iNdEx])
347 copy(dAtA[i:], keysForUsage[iNdEx])
348 i = encodeVarintGenerated(dAtA, i, uint64(len(keysForUsage[iNdEx])))
349 i--
350 dAtA[i] = 0xa
351 i = encodeVarintGenerated(dAtA, i, uint64(baseI-i))
352 i--
353 dAtA[i] = 0x22
354 }
355 }
356 {
357 size, err := m.Window.MarshalToSizedBuffer(dAtA[:i])
358 if err != nil {
359 return 0, err
360 }
361 i -= size
362 i = encodeVarintGenerated(dAtA, i, uint64(size))
363 }
364 i--
365 dAtA[i] = 0x1a
366 {
367 size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i])
368 if err != nil {
369 return 0, err
370 }
371 i -= size
372 i = encodeVarintGenerated(dAtA, i, uint64(size))
373 }
374 i--
375 dAtA[i] = 0x12
376 {
377 size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
378 if err != nil {
379 return 0, err
380 }
381 i -= size
382 i = encodeVarintGenerated(dAtA, i, uint64(size))
383 }
384 i--
385 dAtA[i] = 0xa
386 return len(dAtA) - i, nil
387 }
388
389 func (m *NodeMetricsList) Marshal() (dAtA []byte, err error) {
390 size := m.Size()
391 dAtA = make([]byte, size)
392 n, err := m.MarshalToSizedBuffer(dAtA[:size])
393 if err != nil {
394 return nil, err
395 }
396 return dAtA[:n], nil
397 }
398
399 func (m *NodeMetricsList) MarshalTo(dAtA []byte) (int, error) {
400 size := m.Size()
401 return m.MarshalToSizedBuffer(dAtA[:size])
402 }
403
404 func (m *NodeMetricsList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
405 i := len(dAtA)
406 _ = i
407 var l int
408 _ = l
409 if len(m.Items) > 0 {
410 for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
411 {
412 size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
413 if err != nil {
414 return 0, err
415 }
416 i -= size
417 i = encodeVarintGenerated(dAtA, i, uint64(size))
418 }
419 i--
420 dAtA[i] = 0x12
421 }
422 }
423 {
424 size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
425 if err != nil {
426 return 0, err
427 }
428 i -= size
429 i = encodeVarintGenerated(dAtA, i, uint64(size))
430 }
431 i--
432 dAtA[i] = 0xa
433 return len(dAtA) - i, nil
434 }
435
436 func (m *PodMetrics) Marshal() (dAtA []byte, err error) {
437 size := m.Size()
438 dAtA = make([]byte, size)
439 n, err := m.MarshalToSizedBuffer(dAtA[:size])
440 if err != nil {
441 return nil, err
442 }
443 return dAtA[:n], nil
444 }
445
446 func (m *PodMetrics) MarshalTo(dAtA []byte) (int, error) {
447 size := m.Size()
448 return m.MarshalToSizedBuffer(dAtA[:size])
449 }
450
451 func (m *PodMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) {
452 i := len(dAtA)
453 _ = i
454 var l int
455 _ = l
456 if len(m.Containers) > 0 {
457 for iNdEx := len(m.Containers) - 1; iNdEx >= 0; iNdEx-- {
458 {
459 size, err := m.Containers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
460 if err != nil {
461 return 0, err
462 }
463 i -= size
464 i = encodeVarintGenerated(dAtA, i, uint64(size))
465 }
466 i--
467 dAtA[i] = 0x22
468 }
469 }
470 {
471 size, err := m.Window.MarshalToSizedBuffer(dAtA[:i])
472 if err != nil {
473 return 0, err
474 }
475 i -= size
476 i = encodeVarintGenerated(dAtA, i, uint64(size))
477 }
478 i--
479 dAtA[i] = 0x1a
480 {
481 size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i])
482 if err != nil {
483 return 0, err
484 }
485 i -= size
486 i = encodeVarintGenerated(dAtA, i, uint64(size))
487 }
488 i--
489 dAtA[i] = 0x12
490 {
491 size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
492 if err != nil {
493 return 0, err
494 }
495 i -= size
496 i = encodeVarintGenerated(dAtA, i, uint64(size))
497 }
498 i--
499 dAtA[i] = 0xa
500 return len(dAtA) - i, nil
501 }
502
503 func (m *PodMetricsList) Marshal() (dAtA []byte, err error) {
504 size := m.Size()
505 dAtA = make([]byte, size)
506 n, err := m.MarshalToSizedBuffer(dAtA[:size])
507 if err != nil {
508 return nil, err
509 }
510 return dAtA[:n], nil
511 }
512
513 func (m *PodMetricsList) MarshalTo(dAtA []byte) (int, error) {
514 size := m.Size()
515 return m.MarshalToSizedBuffer(dAtA[:size])
516 }
517
518 func (m *PodMetricsList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
519 i := len(dAtA)
520 _ = i
521 var l int
522 _ = l
523 if len(m.Items) > 0 {
524 for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
525 {
526 size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
527 if err != nil {
528 return 0, err
529 }
530 i -= size
531 i = encodeVarintGenerated(dAtA, i, uint64(size))
532 }
533 i--
534 dAtA[i] = 0x12
535 }
536 }
537 {
538 size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
539 if err != nil {
540 return 0, err
541 }
542 i -= size
543 i = encodeVarintGenerated(dAtA, i, uint64(size))
544 }
545 i--
546 dAtA[i] = 0xa
547 return len(dAtA) - i, nil
548 }
549
550 func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
551 offset -= sovGenerated(v)
552 base := offset
553 for v >= 1<<7 {
554 dAtA[offset] = uint8(v&0x7f | 0x80)
555 v >>= 7
556 offset++
557 }
558 dAtA[offset] = uint8(v)
559 return base
560 }
561 func (m *ContainerMetrics) Size() (n int) {
562 if m == nil {
563 return 0
564 }
565 var l int
566 _ = l
567 l = len(m.Name)
568 n += 1 + l + sovGenerated(uint64(l))
569 if len(m.Usage) > 0 {
570 for k, v := range m.Usage {
571 _ = k
572 _ = v
573 l = ((*resource.Quantity)(&v)).Size()
574 mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
575 n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
576 }
577 }
578 return n
579 }
580
581 func (m *NodeMetrics) Size() (n int) {
582 if m == nil {
583 return 0
584 }
585 var l int
586 _ = l
587 l = m.ObjectMeta.Size()
588 n += 1 + l + sovGenerated(uint64(l))
589 l = m.Timestamp.Size()
590 n += 1 + l + sovGenerated(uint64(l))
591 l = m.Window.Size()
592 n += 1 + l + sovGenerated(uint64(l))
593 if len(m.Usage) > 0 {
594 for k, v := range m.Usage {
595 _ = k
596 _ = v
597 l = ((*resource.Quantity)(&v)).Size()
598 mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
599 n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
600 }
601 }
602 return n
603 }
604
605 func (m *NodeMetricsList) Size() (n int) {
606 if m == nil {
607 return 0
608 }
609 var l int
610 _ = l
611 l = m.ListMeta.Size()
612 n += 1 + l + sovGenerated(uint64(l))
613 if len(m.Items) > 0 {
614 for _, e := range m.Items {
615 l = e.Size()
616 n += 1 + l + sovGenerated(uint64(l))
617 }
618 }
619 return n
620 }
621
622 func (m *PodMetrics) Size() (n int) {
623 if m == nil {
624 return 0
625 }
626 var l int
627 _ = l
628 l = m.ObjectMeta.Size()
629 n += 1 + l + sovGenerated(uint64(l))
630 l = m.Timestamp.Size()
631 n += 1 + l + sovGenerated(uint64(l))
632 l = m.Window.Size()
633 n += 1 + l + sovGenerated(uint64(l))
634 if len(m.Containers) > 0 {
635 for _, e := range m.Containers {
636 l = e.Size()
637 n += 1 + l + sovGenerated(uint64(l))
638 }
639 }
640 return n
641 }
642
643 func (m *PodMetricsList) Size() (n int) {
644 if m == nil {
645 return 0
646 }
647 var l int
648 _ = l
649 l = m.ListMeta.Size()
650 n += 1 + l + sovGenerated(uint64(l))
651 if len(m.Items) > 0 {
652 for _, e := range m.Items {
653 l = e.Size()
654 n += 1 + l + sovGenerated(uint64(l))
655 }
656 }
657 return n
658 }
659
660 func sovGenerated(x uint64) (n int) {
661 return (math_bits.Len64(x|1) + 6) / 7
662 }
663 func sozGenerated(x uint64) (n int) {
664 return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
665 }
666 func (this *ContainerMetrics) String() string {
667 if this == nil {
668 return "nil"
669 }
670 keysForUsage := make([]string, 0, len(this.Usage))
671 for k := range this.Usage {
672 keysForUsage = append(keysForUsage, string(k))
673 }
674 github_com_gogo_protobuf_sortkeys.Strings(keysForUsage)
675 mapStringForUsage := "k8s_io_api_core_v1.ResourceList{"
676 for _, k := range keysForUsage {
677 mapStringForUsage += fmt.Sprintf("%v: %v,", k, this.Usage[k8s_io_api_core_v1.ResourceName(k)])
678 }
679 mapStringForUsage += "}"
680 s := strings.Join([]string{`&ContainerMetrics{`,
681 `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
682 `Usage:` + mapStringForUsage + `,`,
683 `}`,
684 }, "")
685 return s
686 }
687 func (this *NodeMetrics) String() string {
688 if this == nil {
689 return "nil"
690 }
691 keysForUsage := make([]string, 0, len(this.Usage))
692 for k := range this.Usage {
693 keysForUsage = append(keysForUsage, string(k))
694 }
695 github_com_gogo_protobuf_sortkeys.Strings(keysForUsage)
696 mapStringForUsage := "k8s_io_api_core_v1.ResourceList{"
697 for _, k := range keysForUsage {
698 mapStringForUsage += fmt.Sprintf("%v: %v,", k, this.Usage[k8s_io_api_core_v1.ResourceName(k)])
699 }
700 mapStringForUsage += "}"
701 s := strings.Join([]string{`&NodeMetrics{`,
702 `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
703 `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Time", "v1.Time", 1), `&`, ``, 1) + `,`,
704 `Window:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Window), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`,
705 `Usage:` + mapStringForUsage + `,`,
706 `}`,
707 }, "")
708 return s
709 }
710 func (this *NodeMetricsList) String() string {
711 if this == nil {
712 return "nil"
713 }
714 repeatedStringForItems := "[]NodeMetrics{"
715 for _, f := range this.Items {
716 repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "NodeMetrics", "NodeMetrics", 1), `&`, ``, 1) + ","
717 }
718 repeatedStringForItems += "}"
719 s := strings.Join([]string{`&NodeMetricsList{`,
720 `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
721 `Items:` + repeatedStringForItems + `,`,
722 `}`,
723 }, "")
724 return s
725 }
726 func (this *PodMetrics) String() string {
727 if this == nil {
728 return "nil"
729 }
730 repeatedStringForContainers := "[]ContainerMetrics{"
731 for _, f := range this.Containers {
732 repeatedStringForContainers += strings.Replace(strings.Replace(f.String(), "ContainerMetrics", "ContainerMetrics", 1), `&`, ``, 1) + ","
733 }
734 repeatedStringForContainers += "}"
735 s := strings.Join([]string{`&PodMetrics{`,
736 `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
737 `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Time", "v1.Time", 1), `&`, ``, 1) + `,`,
738 `Window:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Window), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`,
739 `Containers:` + repeatedStringForContainers + `,`,
740 `}`,
741 }, "")
742 return s
743 }
744 func (this *PodMetricsList) String() string {
745 if this == nil {
746 return "nil"
747 }
748 repeatedStringForItems := "[]PodMetrics{"
749 for _, f := range this.Items {
750 repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodMetrics", "PodMetrics", 1), `&`, ``, 1) + ","
751 }
752 repeatedStringForItems += "}"
753 s := strings.Join([]string{`&PodMetricsList{`,
754 `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
755 `Items:` + repeatedStringForItems + `,`,
756 `}`,
757 }, "")
758 return s
759 }
760 func valueToStringGenerated(v interface{}) string {
761 rv := reflect.ValueOf(v)
762 if rv.IsNil() {
763 return "nil"
764 }
765 pv := reflect.Indirect(rv).Interface()
766 return fmt.Sprintf("*%v", pv)
767 }
768 func (m *ContainerMetrics) Unmarshal(dAtA []byte) error {
769 l := len(dAtA)
770 iNdEx := 0
771 for iNdEx < l {
772 preIndex := iNdEx
773 var wire uint64
774 for shift := uint(0); ; shift += 7 {
775 if shift >= 64 {
776 return ErrIntOverflowGenerated
777 }
778 if iNdEx >= l {
779 return io.ErrUnexpectedEOF
780 }
781 b := dAtA[iNdEx]
782 iNdEx++
783 wire |= uint64(b&0x7F) << shift
784 if b < 0x80 {
785 break
786 }
787 }
788 fieldNum := int32(wire >> 3)
789 wireType := int(wire & 0x7)
790 if wireType == 4 {
791 return fmt.Errorf("proto: ContainerMetrics: wiretype end group for non-group")
792 }
793 if fieldNum <= 0 {
794 return fmt.Errorf("proto: ContainerMetrics: illegal tag %d (wire type %d)", fieldNum, wire)
795 }
796 switch fieldNum {
797 case 1:
798 if wireType != 2 {
799 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
800 }
801 var stringLen uint64
802 for shift := uint(0); ; shift += 7 {
803 if shift >= 64 {
804 return ErrIntOverflowGenerated
805 }
806 if iNdEx >= l {
807 return io.ErrUnexpectedEOF
808 }
809 b := dAtA[iNdEx]
810 iNdEx++
811 stringLen |= uint64(b&0x7F) << shift
812 if b < 0x80 {
813 break
814 }
815 }
816 intStringLen := int(stringLen)
817 if intStringLen < 0 {
818 return ErrInvalidLengthGenerated
819 }
820 postIndex := iNdEx + intStringLen
821 if postIndex < 0 {
822 return ErrInvalidLengthGenerated
823 }
824 if postIndex > l {
825 return io.ErrUnexpectedEOF
826 }
827 m.Name = string(dAtA[iNdEx:postIndex])
828 iNdEx = postIndex
829 case 2:
830 if wireType != 2 {
831 return fmt.Errorf("proto: wrong wireType = %d for field Usage", wireType)
832 }
833 var msglen int
834 for shift := uint(0); ; shift += 7 {
835 if shift >= 64 {
836 return ErrIntOverflowGenerated
837 }
838 if iNdEx >= l {
839 return io.ErrUnexpectedEOF
840 }
841 b := dAtA[iNdEx]
842 iNdEx++
843 msglen |= int(b&0x7F) << shift
844 if b < 0x80 {
845 break
846 }
847 }
848 if msglen < 0 {
849 return ErrInvalidLengthGenerated
850 }
851 postIndex := iNdEx + msglen
852 if postIndex < 0 {
853 return ErrInvalidLengthGenerated
854 }
855 if postIndex > l {
856 return io.ErrUnexpectedEOF
857 }
858 if m.Usage == nil {
859 m.Usage = make(k8s_io_api_core_v1.ResourceList)
860 }
861 var mapkey k8s_io_api_core_v1.ResourceName
862 mapvalue := &resource.Quantity{}
863 for iNdEx < postIndex {
864 entryPreIndex := iNdEx
865 var wire uint64
866 for shift := uint(0); ; shift += 7 {
867 if shift >= 64 {
868 return ErrIntOverflowGenerated
869 }
870 if iNdEx >= l {
871 return io.ErrUnexpectedEOF
872 }
873 b := dAtA[iNdEx]
874 iNdEx++
875 wire |= uint64(b&0x7F) << shift
876 if b < 0x80 {
877 break
878 }
879 }
880 fieldNum := int32(wire >> 3)
881 if fieldNum == 1 {
882 var stringLenmapkey uint64
883 for shift := uint(0); ; shift += 7 {
884 if shift >= 64 {
885 return ErrIntOverflowGenerated
886 }
887 if iNdEx >= l {
888 return io.ErrUnexpectedEOF
889 }
890 b := dAtA[iNdEx]
891 iNdEx++
892 stringLenmapkey |= uint64(b&0x7F) << shift
893 if b < 0x80 {
894 break
895 }
896 }
897 intStringLenmapkey := int(stringLenmapkey)
898 if intStringLenmapkey < 0 {
899 return ErrInvalidLengthGenerated
900 }
901 postStringIndexmapkey := iNdEx + intStringLenmapkey
902 if postStringIndexmapkey < 0 {
903 return ErrInvalidLengthGenerated
904 }
905 if postStringIndexmapkey > l {
906 return io.ErrUnexpectedEOF
907 }
908 mapkey = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postStringIndexmapkey])
909 iNdEx = postStringIndexmapkey
910 } else if fieldNum == 2 {
911 var mapmsglen int
912 for shift := uint(0); ; shift += 7 {
913 if shift >= 64 {
914 return ErrIntOverflowGenerated
915 }
916 if iNdEx >= l {
917 return io.ErrUnexpectedEOF
918 }
919 b := dAtA[iNdEx]
920 iNdEx++
921 mapmsglen |= int(b&0x7F) << shift
922 if b < 0x80 {
923 break
924 }
925 }
926 if mapmsglen < 0 {
927 return ErrInvalidLengthGenerated
928 }
929 postmsgIndex := iNdEx + mapmsglen
930 if postmsgIndex < 0 {
931 return ErrInvalidLengthGenerated
932 }
933 if postmsgIndex > l {
934 return io.ErrUnexpectedEOF
935 }
936 mapvalue = &resource.Quantity{}
937 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
938 return err
939 }
940 iNdEx = postmsgIndex
941 } else {
942 iNdEx = entryPreIndex
943 skippy, err := skipGenerated(dAtA[iNdEx:])
944 if err != nil {
945 return err
946 }
947 if (skippy < 0) || (iNdEx+skippy) < 0 {
948 return ErrInvalidLengthGenerated
949 }
950 if (iNdEx + skippy) > postIndex {
951 return io.ErrUnexpectedEOF
952 }
953 iNdEx += skippy
954 }
955 }
956 m.Usage[k8s_io_api_core_v1.ResourceName(mapkey)] = ((k8s_io_apimachinery_pkg_api_resource.Quantity)(*mapvalue))
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 *NodeMetrics) 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: NodeMetrics: wiretype end group for non-group")
1003 }
1004 if fieldNum <= 0 {
1005 return fmt.Errorf("proto: NodeMetrics: 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 ObjectMeta", 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.ObjectMeta.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 Timestamp", 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 if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1071 return err
1072 }
1073 iNdEx = postIndex
1074 case 3:
1075 if wireType != 2 {
1076 return fmt.Errorf("proto: wrong wireType = %d for field Window", wireType)
1077 }
1078 var msglen int
1079 for shift := uint(0); ; shift += 7 {
1080 if shift >= 64 {
1081 return ErrIntOverflowGenerated
1082 }
1083 if iNdEx >= l {
1084 return io.ErrUnexpectedEOF
1085 }
1086 b := dAtA[iNdEx]
1087 iNdEx++
1088 msglen |= int(b&0x7F) << shift
1089 if b < 0x80 {
1090 break
1091 }
1092 }
1093 if msglen < 0 {
1094 return ErrInvalidLengthGenerated
1095 }
1096 postIndex := iNdEx + msglen
1097 if postIndex < 0 {
1098 return ErrInvalidLengthGenerated
1099 }
1100 if postIndex > l {
1101 return io.ErrUnexpectedEOF
1102 }
1103 if err := m.Window.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1104 return err
1105 }
1106 iNdEx = postIndex
1107 case 4:
1108 if wireType != 2 {
1109 return fmt.Errorf("proto: wrong wireType = %d for field Usage", wireType)
1110 }
1111 var msglen int
1112 for shift := uint(0); ; shift += 7 {
1113 if shift >= 64 {
1114 return ErrIntOverflowGenerated
1115 }
1116 if iNdEx >= l {
1117 return io.ErrUnexpectedEOF
1118 }
1119 b := dAtA[iNdEx]
1120 iNdEx++
1121 msglen |= int(b&0x7F) << shift
1122 if b < 0x80 {
1123 break
1124 }
1125 }
1126 if msglen < 0 {
1127 return ErrInvalidLengthGenerated
1128 }
1129 postIndex := iNdEx + msglen
1130 if postIndex < 0 {
1131 return ErrInvalidLengthGenerated
1132 }
1133 if postIndex > l {
1134 return io.ErrUnexpectedEOF
1135 }
1136 if m.Usage == nil {
1137 m.Usage = make(k8s_io_api_core_v1.ResourceList)
1138 }
1139 var mapkey k8s_io_api_core_v1.ResourceName
1140 mapvalue := &resource.Quantity{}
1141 for iNdEx < postIndex {
1142 entryPreIndex := iNdEx
1143 var wire uint64
1144 for shift := uint(0); ; shift += 7 {
1145 if shift >= 64 {
1146 return ErrIntOverflowGenerated
1147 }
1148 if iNdEx >= l {
1149 return io.ErrUnexpectedEOF
1150 }
1151 b := dAtA[iNdEx]
1152 iNdEx++
1153 wire |= uint64(b&0x7F) << shift
1154 if b < 0x80 {
1155 break
1156 }
1157 }
1158 fieldNum := int32(wire >> 3)
1159 if fieldNum == 1 {
1160 var stringLenmapkey uint64
1161 for shift := uint(0); ; shift += 7 {
1162 if shift >= 64 {
1163 return ErrIntOverflowGenerated
1164 }
1165 if iNdEx >= l {
1166 return io.ErrUnexpectedEOF
1167 }
1168 b := dAtA[iNdEx]
1169 iNdEx++
1170 stringLenmapkey |= uint64(b&0x7F) << shift
1171 if b < 0x80 {
1172 break
1173 }
1174 }
1175 intStringLenmapkey := int(stringLenmapkey)
1176 if intStringLenmapkey < 0 {
1177 return ErrInvalidLengthGenerated
1178 }
1179 postStringIndexmapkey := iNdEx + intStringLenmapkey
1180 if postStringIndexmapkey < 0 {
1181 return ErrInvalidLengthGenerated
1182 }
1183 if postStringIndexmapkey > l {
1184 return io.ErrUnexpectedEOF
1185 }
1186 mapkey = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postStringIndexmapkey])
1187 iNdEx = postStringIndexmapkey
1188 } else if fieldNum == 2 {
1189 var mapmsglen int
1190 for shift := uint(0); ; shift += 7 {
1191 if shift >= 64 {
1192 return ErrIntOverflowGenerated
1193 }
1194 if iNdEx >= l {
1195 return io.ErrUnexpectedEOF
1196 }
1197 b := dAtA[iNdEx]
1198 iNdEx++
1199 mapmsglen |= int(b&0x7F) << shift
1200 if b < 0x80 {
1201 break
1202 }
1203 }
1204 if mapmsglen < 0 {
1205 return ErrInvalidLengthGenerated
1206 }
1207 postmsgIndex := iNdEx + mapmsglen
1208 if postmsgIndex < 0 {
1209 return ErrInvalidLengthGenerated
1210 }
1211 if postmsgIndex > l {
1212 return io.ErrUnexpectedEOF
1213 }
1214 mapvalue = &resource.Quantity{}
1215 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
1216 return err
1217 }
1218 iNdEx = postmsgIndex
1219 } else {
1220 iNdEx = entryPreIndex
1221 skippy, err := skipGenerated(dAtA[iNdEx:])
1222 if err != nil {
1223 return err
1224 }
1225 if (skippy < 0) || (iNdEx+skippy) < 0 {
1226 return ErrInvalidLengthGenerated
1227 }
1228 if (iNdEx + skippy) > postIndex {
1229 return io.ErrUnexpectedEOF
1230 }
1231 iNdEx += skippy
1232 }
1233 }
1234 m.Usage[k8s_io_api_core_v1.ResourceName(mapkey)] = ((k8s_io_apimachinery_pkg_api_resource.Quantity)(*mapvalue))
1235 iNdEx = postIndex
1236 default:
1237 iNdEx = preIndex
1238 skippy, err := skipGenerated(dAtA[iNdEx:])
1239 if err != nil {
1240 return err
1241 }
1242 if (skippy < 0) || (iNdEx+skippy) < 0 {
1243 return ErrInvalidLengthGenerated
1244 }
1245 if (iNdEx + skippy) > l {
1246 return io.ErrUnexpectedEOF
1247 }
1248 iNdEx += skippy
1249 }
1250 }
1251
1252 if iNdEx > l {
1253 return io.ErrUnexpectedEOF
1254 }
1255 return nil
1256 }
1257 func (m *NodeMetricsList) Unmarshal(dAtA []byte) error {
1258 l := len(dAtA)
1259 iNdEx := 0
1260 for iNdEx < l {
1261 preIndex := iNdEx
1262 var wire uint64
1263 for shift := uint(0); ; shift += 7 {
1264 if shift >= 64 {
1265 return ErrIntOverflowGenerated
1266 }
1267 if iNdEx >= l {
1268 return io.ErrUnexpectedEOF
1269 }
1270 b := dAtA[iNdEx]
1271 iNdEx++
1272 wire |= uint64(b&0x7F) << shift
1273 if b < 0x80 {
1274 break
1275 }
1276 }
1277 fieldNum := int32(wire >> 3)
1278 wireType := int(wire & 0x7)
1279 if wireType == 4 {
1280 return fmt.Errorf("proto: NodeMetricsList: wiretype end group for non-group")
1281 }
1282 if fieldNum <= 0 {
1283 return fmt.Errorf("proto: NodeMetricsList: illegal tag %d (wire type %d)", fieldNum, wire)
1284 }
1285 switch fieldNum {
1286 case 1:
1287 if wireType != 2 {
1288 return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
1289 }
1290 var msglen int
1291 for shift := uint(0); ; shift += 7 {
1292 if shift >= 64 {
1293 return ErrIntOverflowGenerated
1294 }
1295 if iNdEx >= l {
1296 return io.ErrUnexpectedEOF
1297 }
1298 b := dAtA[iNdEx]
1299 iNdEx++
1300 msglen |= int(b&0x7F) << shift
1301 if b < 0x80 {
1302 break
1303 }
1304 }
1305 if msglen < 0 {
1306 return ErrInvalidLengthGenerated
1307 }
1308 postIndex := iNdEx + msglen
1309 if postIndex < 0 {
1310 return ErrInvalidLengthGenerated
1311 }
1312 if postIndex > l {
1313 return io.ErrUnexpectedEOF
1314 }
1315 if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1316 return err
1317 }
1318 iNdEx = postIndex
1319 case 2:
1320 if wireType != 2 {
1321 return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
1322 }
1323 var msglen int
1324 for shift := uint(0); ; shift += 7 {
1325 if shift >= 64 {
1326 return ErrIntOverflowGenerated
1327 }
1328 if iNdEx >= l {
1329 return io.ErrUnexpectedEOF
1330 }
1331 b := dAtA[iNdEx]
1332 iNdEx++
1333 msglen |= int(b&0x7F) << shift
1334 if b < 0x80 {
1335 break
1336 }
1337 }
1338 if msglen < 0 {
1339 return ErrInvalidLengthGenerated
1340 }
1341 postIndex := iNdEx + msglen
1342 if postIndex < 0 {
1343 return ErrInvalidLengthGenerated
1344 }
1345 if postIndex > l {
1346 return io.ErrUnexpectedEOF
1347 }
1348 m.Items = append(m.Items, NodeMetrics{})
1349 if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1350 return err
1351 }
1352 iNdEx = postIndex
1353 default:
1354 iNdEx = preIndex
1355 skippy, err := skipGenerated(dAtA[iNdEx:])
1356 if err != nil {
1357 return err
1358 }
1359 if (skippy < 0) || (iNdEx+skippy) < 0 {
1360 return ErrInvalidLengthGenerated
1361 }
1362 if (iNdEx + skippy) > l {
1363 return io.ErrUnexpectedEOF
1364 }
1365 iNdEx += skippy
1366 }
1367 }
1368
1369 if iNdEx > l {
1370 return io.ErrUnexpectedEOF
1371 }
1372 return nil
1373 }
1374 func (m *PodMetrics) Unmarshal(dAtA []byte) error {
1375 l := len(dAtA)
1376 iNdEx := 0
1377 for iNdEx < l {
1378 preIndex := iNdEx
1379 var wire uint64
1380 for shift := uint(0); ; shift += 7 {
1381 if shift >= 64 {
1382 return ErrIntOverflowGenerated
1383 }
1384 if iNdEx >= l {
1385 return io.ErrUnexpectedEOF
1386 }
1387 b := dAtA[iNdEx]
1388 iNdEx++
1389 wire |= uint64(b&0x7F) << shift
1390 if b < 0x80 {
1391 break
1392 }
1393 }
1394 fieldNum := int32(wire >> 3)
1395 wireType := int(wire & 0x7)
1396 if wireType == 4 {
1397 return fmt.Errorf("proto: PodMetrics: wiretype end group for non-group")
1398 }
1399 if fieldNum <= 0 {
1400 return fmt.Errorf("proto: PodMetrics: illegal tag %d (wire type %d)", fieldNum, wire)
1401 }
1402 switch fieldNum {
1403 case 1:
1404 if wireType != 2 {
1405 return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
1406 }
1407 var msglen int
1408 for shift := uint(0); ; shift += 7 {
1409 if shift >= 64 {
1410 return ErrIntOverflowGenerated
1411 }
1412 if iNdEx >= l {
1413 return io.ErrUnexpectedEOF
1414 }
1415 b := dAtA[iNdEx]
1416 iNdEx++
1417 msglen |= int(b&0x7F) << shift
1418 if b < 0x80 {
1419 break
1420 }
1421 }
1422 if msglen < 0 {
1423 return ErrInvalidLengthGenerated
1424 }
1425 postIndex := iNdEx + msglen
1426 if postIndex < 0 {
1427 return ErrInvalidLengthGenerated
1428 }
1429 if postIndex > l {
1430 return io.ErrUnexpectedEOF
1431 }
1432 if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1433 return err
1434 }
1435 iNdEx = postIndex
1436 case 2:
1437 if wireType != 2 {
1438 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
1439 }
1440 var msglen int
1441 for shift := uint(0); ; shift += 7 {
1442 if shift >= 64 {
1443 return ErrIntOverflowGenerated
1444 }
1445 if iNdEx >= l {
1446 return io.ErrUnexpectedEOF
1447 }
1448 b := dAtA[iNdEx]
1449 iNdEx++
1450 msglen |= int(b&0x7F) << shift
1451 if b < 0x80 {
1452 break
1453 }
1454 }
1455 if msglen < 0 {
1456 return ErrInvalidLengthGenerated
1457 }
1458 postIndex := iNdEx + msglen
1459 if postIndex < 0 {
1460 return ErrInvalidLengthGenerated
1461 }
1462 if postIndex > l {
1463 return io.ErrUnexpectedEOF
1464 }
1465 if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1466 return err
1467 }
1468 iNdEx = postIndex
1469 case 3:
1470 if wireType != 2 {
1471 return fmt.Errorf("proto: wrong wireType = %d for field Window", wireType)
1472 }
1473 var msglen int
1474 for shift := uint(0); ; shift += 7 {
1475 if shift >= 64 {
1476 return ErrIntOverflowGenerated
1477 }
1478 if iNdEx >= l {
1479 return io.ErrUnexpectedEOF
1480 }
1481 b := dAtA[iNdEx]
1482 iNdEx++
1483 msglen |= int(b&0x7F) << shift
1484 if b < 0x80 {
1485 break
1486 }
1487 }
1488 if msglen < 0 {
1489 return ErrInvalidLengthGenerated
1490 }
1491 postIndex := iNdEx + msglen
1492 if postIndex < 0 {
1493 return ErrInvalidLengthGenerated
1494 }
1495 if postIndex > l {
1496 return io.ErrUnexpectedEOF
1497 }
1498 if err := m.Window.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1499 return err
1500 }
1501 iNdEx = postIndex
1502 case 4:
1503 if wireType != 2 {
1504 return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType)
1505 }
1506 var msglen int
1507 for shift := uint(0); ; shift += 7 {
1508 if shift >= 64 {
1509 return ErrIntOverflowGenerated
1510 }
1511 if iNdEx >= l {
1512 return io.ErrUnexpectedEOF
1513 }
1514 b := dAtA[iNdEx]
1515 iNdEx++
1516 msglen |= int(b&0x7F) << shift
1517 if b < 0x80 {
1518 break
1519 }
1520 }
1521 if msglen < 0 {
1522 return ErrInvalidLengthGenerated
1523 }
1524 postIndex := iNdEx + msglen
1525 if postIndex < 0 {
1526 return ErrInvalidLengthGenerated
1527 }
1528 if postIndex > l {
1529 return io.ErrUnexpectedEOF
1530 }
1531 m.Containers = append(m.Containers, ContainerMetrics{})
1532 if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1533 return err
1534 }
1535 iNdEx = postIndex
1536 default:
1537 iNdEx = preIndex
1538 skippy, err := skipGenerated(dAtA[iNdEx:])
1539 if err != nil {
1540 return err
1541 }
1542 if (skippy < 0) || (iNdEx+skippy) < 0 {
1543 return ErrInvalidLengthGenerated
1544 }
1545 if (iNdEx + skippy) > l {
1546 return io.ErrUnexpectedEOF
1547 }
1548 iNdEx += skippy
1549 }
1550 }
1551
1552 if iNdEx > l {
1553 return io.ErrUnexpectedEOF
1554 }
1555 return nil
1556 }
1557 func (m *PodMetricsList) Unmarshal(dAtA []byte) error {
1558 l := len(dAtA)
1559 iNdEx := 0
1560 for iNdEx < l {
1561 preIndex := iNdEx
1562 var wire uint64
1563 for shift := uint(0); ; shift += 7 {
1564 if shift >= 64 {
1565 return ErrIntOverflowGenerated
1566 }
1567 if iNdEx >= l {
1568 return io.ErrUnexpectedEOF
1569 }
1570 b := dAtA[iNdEx]
1571 iNdEx++
1572 wire |= uint64(b&0x7F) << shift
1573 if b < 0x80 {
1574 break
1575 }
1576 }
1577 fieldNum := int32(wire >> 3)
1578 wireType := int(wire & 0x7)
1579 if wireType == 4 {
1580 return fmt.Errorf("proto: PodMetricsList: wiretype end group for non-group")
1581 }
1582 if fieldNum <= 0 {
1583 return fmt.Errorf("proto: PodMetricsList: illegal tag %d (wire type %d)", fieldNum, wire)
1584 }
1585 switch fieldNum {
1586 case 1:
1587 if wireType != 2 {
1588 return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
1589 }
1590 var msglen int
1591 for shift := uint(0); ; shift += 7 {
1592 if shift >= 64 {
1593 return ErrIntOverflowGenerated
1594 }
1595 if iNdEx >= l {
1596 return io.ErrUnexpectedEOF
1597 }
1598 b := dAtA[iNdEx]
1599 iNdEx++
1600 msglen |= int(b&0x7F) << shift
1601 if b < 0x80 {
1602 break
1603 }
1604 }
1605 if msglen < 0 {
1606 return ErrInvalidLengthGenerated
1607 }
1608 postIndex := iNdEx + msglen
1609 if postIndex < 0 {
1610 return ErrInvalidLengthGenerated
1611 }
1612 if postIndex > l {
1613 return io.ErrUnexpectedEOF
1614 }
1615 if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1616 return err
1617 }
1618 iNdEx = postIndex
1619 case 2:
1620 if wireType != 2 {
1621 return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
1622 }
1623 var msglen int
1624 for shift := uint(0); ; shift += 7 {
1625 if shift >= 64 {
1626 return ErrIntOverflowGenerated
1627 }
1628 if iNdEx >= l {
1629 return io.ErrUnexpectedEOF
1630 }
1631 b := dAtA[iNdEx]
1632 iNdEx++
1633 msglen |= int(b&0x7F) << shift
1634 if b < 0x80 {
1635 break
1636 }
1637 }
1638 if msglen < 0 {
1639 return ErrInvalidLengthGenerated
1640 }
1641 postIndex := iNdEx + msglen
1642 if postIndex < 0 {
1643 return ErrInvalidLengthGenerated
1644 }
1645 if postIndex > l {
1646 return io.ErrUnexpectedEOF
1647 }
1648 m.Items = append(m.Items, PodMetrics{})
1649 if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
1650 return err
1651 }
1652 iNdEx = postIndex
1653 default:
1654 iNdEx = preIndex
1655 skippy, err := skipGenerated(dAtA[iNdEx:])
1656 if err != nil {
1657 return err
1658 }
1659 if (skippy < 0) || (iNdEx+skippy) < 0 {
1660 return ErrInvalidLengthGenerated
1661 }
1662 if (iNdEx + skippy) > l {
1663 return io.ErrUnexpectedEOF
1664 }
1665 iNdEx += skippy
1666 }
1667 }
1668
1669 if iNdEx > l {
1670 return io.ErrUnexpectedEOF
1671 }
1672 return nil
1673 }
1674 func skipGenerated(dAtA []byte) (n int, err error) {
1675 l := len(dAtA)
1676 iNdEx := 0
1677 depth := 0
1678 for iNdEx < l {
1679 var wire uint64
1680 for shift := uint(0); ; shift += 7 {
1681 if shift >= 64 {
1682 return 0, ErrIntOverflowGenerated
1683 }
1684 if iNdEx >= l {
1685 return 0, io.ErrUnexpectedEOF
1686 }
1687 b := dAtA[iNdEx]
1688 iNdEx++
1689 wire |= (uint64(b) & 0x7F) << shift
1690 if b < 0x80 {
1691 break
1692 }
1693 }
1694 wireType := int(wire & 0x7)
1695 switch wireType {
1696 case 0:
1697 for shift := uint(0); ; shift += 7 {
1698 if shift >= 64 {
1699 return 0, ErrIntOverflowGenerated
1700 }
1701 if iNdEx >= l {
1702 return 0, io.ErrUnexpectedEOF
1703 }
1704 iNdEx++
1705 if dAtA[iNdEx-1] < 0x80 {
1706 break
1707 }
1708 }
1709 case 1:
1710 iNdEx += 8
1711 case 2:
1712 var length int
1713 for shift := uint(0); ; shift += 7 {
1714 if shift >= 64 {
1715 return 0, ErrIntOverflowGenerated
1716 }
1717 if iNdEx >= l {
1718 return 0, io.ErrUnexpectedEOF
1719 }
1720 b := dAtA[iNdEx]
1721 iNdEx++
1722 length |= (int(b) & 0x7F) << shift
1723 if b < 0x80 {
1724 break
1725 }
1726 }
1727 if length < 0 {
1728 return 0, ErrInvalidLengthGenerated
1729 }
1730 iNdEx += length
1731 case 3:
1732 depth++
1733 case 4:
1734 if depth == 0 {
1735 return 0, ErrUnexpectedEndOfGroupGenerated
1736 }
1737 depth--
1738 case 5:
1739 iNdEx += 4
1740 default:
1741 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
1742 }
1743 if iNdEx < 0 {
1744 return 0, ErrInvalidLengthGenerated
1745 }
1746 if depth == 0 {
1747 return iNdEx, nil
1748 }
1749 }
1750 return 0, io.ErrUnexpectedEOF
1751 }
1752
1753 var (
1754 ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
1755 ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
1756 ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
1757 )