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