github.com/cilium/cilium@v1.16.2/api/v1/models/status_response.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 // Copyright Authors of Cilium 4 // SPDX-License-Identifier: Apache-2.0 5 6 package models 7 8 // This file was generated by the swagger tool. 9 // Editing this file might prove futile when you re-run the swagger generate command 10 11 import ( 12 "context" 13 14 "github.com/go-openapi/errors" 15 "github.com/go-openapi/strfmt" 16 "github.com/go-openapi/swag" 17 "github.com/go-openapi/validate" 18 ) 19 20 // StatusResponse Health and status information of daemon 21 // 22 // +k8s:deepcopy-gen=true 23 // 24 // swagger:model StatusResponse 25 type StatusResponse struct { 26 27 // Status of core datapath attachment mode 28 AttachMode AttachMode `json:"attach-mode,omitempty"` 29 30 // Status of Mutual Authentication certificate provider 31 AuthCertificateProvider *Status `json:"auth-certificate-provider,omitempty"` 32 33 // Status of bandwidth manager 34 BandwidthManager *BandwidthManager `json:"bandwidth-manager,omitempty"` 35 36 // Status of BPF maps 37 BpfMaps *BPFMapStatus `json:"bpf-maps,omitempty"` 38 39 // Status of Cilium daemon 40 Cilium *Status `json:"cilium,omitempty"` 41 42 // When supported by the API, this client ID should be used by the 43 // client when making another request to the server. 44 // See for example "/cluster/nodes". 45 // 46 ClientID int64 `json:"client-id,omitempty"` 47 48 // Status of clock source 49 ClockSource *ClockSource `json:"clock-source,omitempty"` 50 51 // Status of cluster 52 Cluster *ClusterStatus `json:"cluster,omitempty"` 53 54 // Status of ClusterMesh 55 ClusterMesh *ClusterMeshStatus `json:"cluster-mesh,omitempty"` 56 57 // Status of CNI chaining 58 CniChaining *CNIChainingStatus `json:"cni-chaining,omitempty"` 59 60 // Status of the CNI configuration file 61 CniFile *Status `json:"cni-file,omitempty"` 62 63 // Status of local container runtime 64 ContainerRuntime *Status `json:"container-runtime,omitempty"` 65 66 // Status of all endpoint controllers 67 Controllers ControllerStatuses `json:"controllers,omitempty"` 68 69 // Status of datapath mode 70 DatapathMode DatapathMode `json:"datapath-mode,omitempty"` 71 72 // Status of transparent encryption 73 Encryption *EncryptionStatus `json:"encryption,omitempty"` 74 75 // Status of the host firewall 76 HostFirewall *HostFirewall `json:"host-firewall,omitempty"` 77 78 // Status of Hubble server 79 Hubble *HubbleStatus `json:"hubble,omitempty"` 80 81 // Status of identity range of the cluster 82 IdentityRange *IdentityRange `json:"identity-range,omitempty"` 83 84 // Status of IP address management 85 Ipam *IPAMStatus `json:"ipam,omitempty"` 86 87 // Status of IPv4 BIG TCP 88 IPV4BigTCP *IPV4BigTCP `json:"ipv4-big-tcp,omitempty"` 89 90 // Status of IPv6 BIG TCP 91 IPV6BigTCP *IPV6BigTCP `json:"ipv6-big-tcp,omitempty"` 92 93 // Status of kube-proxy replacement 94 KubeProxyReplacement *KubeProxyReplacement `json:"kube-proxy-replacement,omitempty"` 95 96 // Status of Kubernetes integration 97 Kubernetes *K8sStatus `json:"kubernetes,omitempty"` 98 99 // Status of key/value datastore 100 Kvstore *Status `json:"kvstore,omitempty"` 101 102 // Status of masquerading 103 Masquerading *Masquerading `json:"masquerading,omitempty"` 104 105 // Status of the node monitor 106 NodeMonitor *MonitorStatus `json:"nodeMonitor,omitempty"` 107 108 // Status of proxy 109 Proxy *ProxyStatus `json:"proxy,omitempty"` 110 111 // Status of routing 112 Routing *Routing `json:"routing,omitempty"` 113 114 // Status of SRv6 115 Srv6 *Srv6 `json:"srv6,omitempty"` 116 117 // List of stale information in the status 118 Stale map[string]strfmt.DateTime `json:"stale,omitempty"` 119 } 120 121 // Validate validates this status response 122 func (m *StatusResponse) Validate(formats strfmt.Registry) error { 123 var res []error 124 125 if err := m.validateAttachMode(formats); err != nil { 126 res = append(res, err) 127 } 128 129 if err := m.validateAuthCertificateProvider(formats); err != nil { 130 res = append(res, err) 131 } 132 133 if err := m.validateBandwidthManager(formats); err != nil { 134 res = append(res, err) 135 } 136 137 if err := m.validateBpfMaps(formats); err != nil { 138 res = append(res, err) 139 } 140 141 if err := m.validateCilium(formats); err != nil { 142 res = append(res, err) 143 } 144 145 if err := m.validateClockSource(formats); err != nil { 146 res = append(res, err) 147 } 148 149 if err := m.validateCluster(formats); err != nil { 150 res = append(res, err) 151 } 152 153 if err := m.validateClusterMesh(formats); err != nil { 154 res = append(res, err) 155 } 156 157 if err := m.validateCniChaining(formats); err != nil { 158 res = append(res, err) 159 } 160 161 if err := m.validateCniFile(formats); err != nil { 162 res = append(res, err) 163 } 164 165 if err := m.validateContainerRuntime(formats); err != nil { 166 res = append(res, err) 167 } 168 169 if err := m.validateControllers(formats); err != nil { 170 res = append(res, err) 171 } 172 173 if err := m.validateDatapathMode(formats); err != nil { 174 res = append(res, err) 175 } 176 177 if err := m.validateEncryption(formats); err != nil { 178 res = append(res, err) 179 } 180 181 if err := m.validateHostFirewall(formats); err != nil { 182 res = append(res, err) 183 } 184 185 if err := m.validateHubble(formats); err != nil { 186 res = append(res, err) 187 } 188 189 if err := m.validateIdentityRange(formats); err != nil { 190 res = append(res, err) 191 } 192 193 if err := m.validateIpam(formats); err != nil { 194 res = append(res, err) 195 } 196 197 if err := m.validateIPV4BigTCP(formats); err != nil { 198 res = append(res, err) 199 } 200 201 if err := m.validateIPV6BigTCP(formats); err != nil { 202 res = append(res, err) 203 } 204 205 if err := m.validateKubeProxyReplacement(formats); err != nil { 206 res = append(res, err) 207 } 208 209 if err := m.validateKubernetes(formats); err != nil { 210 res = append(res, err) 211 } 212 213 if err := m.validateKvstore(formats); err != nil { 214 res = append(res, err) 215 } 216 217 if err := m.validateMasquerading(formats); err != nil { 218 res = append(res, err) 219 } 220 221 if err := m.validateNodeMonitor(formats); err != nil { 222 res = append(res, err) 223 } 224 225 if err := m.validateProxy(formats); err != nil { 226 res = append(res, err) 227 } 228 229 if err := m.validateRouting(formats); err != nil { 230 res = append(res, err) 231 } 232 233 if err := m.validateSrv6(formats); err != nil { 234 res = append(res, err) 235 } 236 237 if err := m.validateStale(formats); err != nil { 238 res = append(res, err) 239 } 240 241 if len(res) > 0 { 242 return errors.CompositeValidationError(res...) 243 } 244 return nil 245 } 246 247 func (m *StatusResponse) validateAttachMode(formats strfmt.Registry) error { 248 if swag.IsZero(m.AttachMode) { // not required 249 return nil 250 } 251 252 if err := m.AttachMode.Validate(formats); err != nil { 253 if ve, ok := err.(*errors.Validation); ok { 254 return ve.ValidateName("attach-mode") 255 } else if ce, ok := err.(*errors.CompositeError); ok { 256 return ce.ValidateName("attach-mode") 257 } 258 return err 259 } 260 261 return nil 262 } 263 264 func (m *StatusResponse) validateAuthCertificateProvider(formats strfmt.Registry) error { 265 if swag.IsZero(m.AuthCertificateProvider) { // not required 266 return nil 267 } 268 269 if m.AuthCertificateProvider != nil { 270 if err := m.AuthCertificateProvider.Validate(formats); err != nil { 271 if ve, ok := err.(*errors.Validation); ok { 272 return ve.ValidateName("auth-certificate-provider") 273 } else if ce, ok := err.(*errors.CompositeError); ok { 274 return ce.ValidateName("auth-certificate-provider") 275 } 276 return err 277 } 278 } 279 280 return nil 281 } 282 283 func (m *StatusResponse) validateBandwidthManager(formats strfmt.Registry) error { 284 if swag.IsZero(m.BandwidthManager) { // not required 285 return nil 286 } 287 288 if m.BandwidthManager != nil { 289 if err := m.BandwidthManager.Validate(formats); err != nil { 290 if ve, ok := err.(*errors.Validation); ok { 291 return ve.ValidateName("bandwidth-manager") 292 } else if ce, ok := err.(*errors.CompositeError); ok { 293 return ce.ValidateName("bandwidth-manager") 294 } 295 return err 296 } 297 } 298 299 return nil 300 } 301 302 func (m *StatusResponse) validateBpfMaps(formats strfmt.Registry) error { 303 if swag.IsZero(m.BpfMaps) { // not required 304 return nil 305 } 306 307 if m.BpfMaps != nil { 308 if err := m.BpfMaps.Validate(formats); err != nil { 309 if ve, ok := err.(*errors.Validation); ok { 310 return ve.ValidateName("bpf-maps") 311 } else if ce, ok := err.(*errors.CompositeError); ok { 312 return ce.ValidateName("bpf-maps") 313 } 314 return err 315 } 316 } 317 318 return nil 319 } 320 321 func (m *StatusResponse) validateCilium(formats strfmt.Registry) error { 322 if swag.IsZero(m.Cilium) { // not required 323 return nil 324 } 325 326 if m.Cilium != nil { 327 if err := m.Cilium.Validate(formats); err != nil { 328 if ve, ok := err.(*errors.Validation); ok { 329 return ve.ValidateName("cilium") 330 } else if ce, ok := err.(*errors.CompositeError); ok { 331 return ce.ValidateName("cilium") 332 } 333 return err 334 } 335 } 336 337 return nil 338 } 339 340 func (m *StatusResponse) validateClockSource(formats strfmt.Registry) error { 341 if swag.IsZero(m.ClockSource) { // not required 342 return nil 343 } 344 345 if m.ClockSource != nil { 346 if err := m.ClockSource.Validate(formats); err != nil { 347 if ve, ok := err.(*errors.Validation); ok { 348 return ve.ValidateName("clock-source") 349 } else if ce, ok := err.(*errors.CompositeError); ok { 350 return ce.ValidateName("clock-source") 351 } 352 return err 353 } 354 } 355 356 return nil 357 } 358 359 func (m *StatusResponse) validateCluster(formats strfmt.Registry) error { 360 if swag.IsZero(m.Cluster) { // not required 361 return nil 362 } 363 364 if m.Cluster != nil { 365 if err := m.Cluster.Validate(formats); err != nil { 366 if ve, ok := err.(*errors.Validation); ok { 367 return ve.ValidateName("cluster") 368 } else if ce, ok := err.(*errors.CompositeError); ok { 369 return ce.ValidateName("cluster") 370 } 371 return err 372 } 373 } 374 375 return nil 376 } 377 378 func (m *StatusResponse) validateClusterMesh(formats strfmt.Registry) error { 379 if swag.IsZero(m.ClusterMesh) { // not required 380 return nil 381 } 382 383 if m.ClusterMesh != nil { 384 if err := m.ClusterMesh.Validate(formats); err != nil { 385 if ve, ok := err.(*errors.Validation); ok { 386 return ve.ValidateName("cluster-mesh") 387 } else if ce, ok := err.(*errors.CompositeError); ok { 388 return ce.ValidateName("cluster-mesh") 389 } 390 return err 391 } 392 } 393 394 return nil 395 } 396 397 func (m *StatusResponse) validateCniChaining(formats strfmt.Registry) error { 398 if swag.IsZero(m.CniChaining) { // not required 399 return nil 400 } 401 402 if m.CniChaining != nil { 403 if err := m.CniChaining.Validate(formats); err != nil { 404 if ve, ok := err.(*errors.Validation); ok { 405 return ve.ValidateName("cni-chaining") 406 } else if ce, ok := err.(*errors.CompositeError); ok { 407 return ce.ValidateName("cni-chaining") 408 } 409 return err 410 } 411 } 412 413 return nil 414 } 415 416 func (m *StatusResponse) validateCniFile(formats strfmt.Registry) error { 417 if swag.IsZero(m.CniFile) { // not required 418 return nil 419 } 420 421 if m.CniFile != nil { 422 if err := m.CniFile.Validate(formats); err != nil { 423 if ve, ok := err.(*errors.Validation); ok { 424 return ve.ValidateName("cni-file") 425 } else if ce, ok := err.(*errors.CompositeError); ok { 426 return ce.ValidateName("cni-file") 427 } 428 return err 429 } 430 } 431 432 return nil 433 } 434 435 func (m *StatusResponse) validateContainerRuntime(formats strfmt.Registry) error { 436 if swag.IsZero(m.ContainerRuntime) { // not required 437 return nil 438 } 439 440 if m.ContainerRuntime != nil { 441 if err := m.ContainerRuntime.Validate(formats); err != nil { 442 if ve, ok := err.(*errors.Validation); ok { 443 return ve.ValidateName("container-runtime") 444 } else if ce, ok := err.(*errors.CompositeError); ok { 445 return ce.ValidateName("container-runtime") 446 } 447 return err 448 } 449 } 450 451 return nil 452 } 453 454 func (m *StatusResponse) validateControllers(formats strfmt.Registry) error { 455 if swag.IsZero(m.Controllers) { // not required 456 return nil 457 } 458 459 if err := m.Controllers.Validate(formats); err != nil { 460 if ve, ok := err.(*errors.Validation); ok { 461 return ve.ValidateName("controllers") 462 } else if ce, ok := err.(*errors.CompositeError); ok { 463 return ce.ValidateName("controllers") 464 } 465 return err 466 } 467 468 return nil 469 } 470 471 func (m *StatusResponse) validateDatapathMode(formats strfmt.Registry) error { 472 if swag.IsZero(m.DatapathMode) { // not required 473 return nil 474 } 475 476 if err := m.DatapathMode.Validate(formats); err != nil { 477 if ve, ok := err.(*errors.Validation); ok { 478 return ve.ValidateName("datapath-mode") 479 } else if ce, ok := err.(*errors.CompositeError); ok { 480 return ce.ValidateName("datapath-mode") 481 } 482 return err 483 } 484 485 return nil 486 } 487 488 func (m *StatusResponse) validateEncryption(formats strfmt.Registry) error { 489 if swag.IsZero(m.Encryption) { // not required 490 return nil 491 } 492 493 if m.Encryption != nil { 494 if err := m.Encryption.Validate(formats); err != nil { 495 if ve, ok := err.(*errors.Validation); ok { 496 return ve.ValidateName("encryption") 497 } else if ce, ok := err.(*errors.CompositeError); ok { 498 return ce.ValidateName("encryption") 499 } 500 return err 501 } 502 } 503 504 return nil 505 } 506 507 func (m *StatusResponse) validateHostFirewall(formats strfmt.Registry) error { 508 if swag.IsZero(m.HostFirewall) { // not required 509 return nil 510 } 511 512 if m.HostFirewall != nil { 513 if err := m.HostFirewall.Validate(formats); err != nil { 514 if ve, ok := err.(*errors.Validation); ok { 515 return ve.ValidateName("host-firewall") 516 } else if ce, ok := err.(*errors.CompositeError); ok { 517 return ce.ValidateName("host-firewall") 518 } 519 return err 520 } 521 } 522 523 return nil 524 } 525 526 func (m *StatusResponse) validateHubble(formats strfmt.Registry) error { 527 if swag.IsZero(m.Hubble) { // not required 528 return nil 529 } 530 531 if m.Hubble != nil { 532 if err := m.Hubble.Validate(formats); err != nil { 533 if ve, ok := err.(*errors.Validation); ok { 534 return ve.ValidateName("hubble") 535 } else if ce, ok := err.(*errors.CompositeError); ok { 536 return ce.ValidateName("hubble") 537 } 538 return err 539 } 540 } 541 542 return nil 543 } 544 545 func (m *StatusResponse) validateIdentityRange(formats strfmt.Registry) error { 546 if swag.IsZero(m.IdentityRange) { // not required 547 return nil 548 } 549 550 if m.IdentityRange != nil { 551 if err := m.IdentityRange.Validate(formats); err != nil { 552 if ve, ok := err.(*errors.Validation); ok { 553 return ve.ValidateName("identity-range") 554 } else if ce, ok := err.(*errors.CompositeError); ok { 555 return ce.ValidateName("identity-range") 556 } 557 return err 558 } 559 } 560 561 return nil 562 } 563 564 func (m *StatusResponse) validateIpam(formats strfmt.Registry) error { 565 if swag.IsZero(m.Ipam) { // not required 566 return nil 567 } 568 569 if m.Ipam != nil { 570 if err := m.Ipam.Validate(formats); err != nil { 571 if ve, ok := err.(*errors.Validation); ok { 572 return ve.ValidateName("ipam") 573 } else if ce, ok := err.(*errors.CompositeError); ok { 574 return ce.ValidateName("ipam") 575 } 576 return err 577 } 578 } 579 580 return nil 581 } 582 583 func (m *StatusResponse) validateIPV4BigTCP(formats strfmt.Registry) error { 584 if swag.IsZero(m.IPV4BigTCP) { // not required 585 return nil 586 } 587 588 if m.IPV4BigTCP != nil { 589 if err := m.IPV4BigTCP.Validate(formats); err != nil { 590 if ve, ok := err.(*errors.Validation); ok { 591 return ve.ValidateName("ipv4-big-tcp") 592 } else if ce, ok := err.(*errors.CompositeError); ok { 593 return ce.ValidateName("ipv4-big-tcp") 594 } 595 return err 596 } 597 } 598 599 return nil 600 } 601 602 func (m *StatusResponse) validateIPV6BigTCP(formats strfmt.Registry) error { 603 if swag.IsZero(m.IPV6BigTCP) { // not required 604 return nil 605 } 606 607 if m.IPV6BigTCP != nil { 608 if err := m.IPV6BigTCP.Validate(formats); err != nil { 609 if ve, ok := err.(*errors.Validation); ok { 610 return ve.ValidateName("ipv6-big-tcp") 611 } else if ce, ok := err.(*errors.CompositeError); ok { 612 return ce.ValidateName("ipv6-big-tcp") 613 } 614 return err 615 } 616 } 617 618 return nil 619 } 620 621 func (m *StatusResponse) validateKubeProxyReplacement(formats strfmt.Registry) error { 622 if swag.IsZero(m.KubeProxyReplacement) { // not required 623 return nil 624 } 625 626 if m.KubeProxyReplacement != nil { 627 if err := m.KubeProxyReplacement.Validate(formats); err != nil { 628 if ve, ok := err.(*errors.Validation); ok { 629 return ve.ValidateName("kube-proxy-replacement") 630 } else if ce, ok := err.(*errors.CompositeError); ok { 631 return ce.ValidateName("kube-proxy-replacement") 632 } 633 return err 634 } 635 } 636 637 return nil 638 } 639 640 func (m *StatusResponse) validateKubernetes(formats strfmt.Registry) error { 641 if swag.IsZero(m.Kubernetes) { // not required 642 return nil 643 } 644 645 if m.Kubernetes != nil { 646 if err := m.Kubernetes.Validate(formats); err != nil { 647 if ve, ok := err.(*errors.Validation); ok { 648 return ve.ValidateName("kubernetes") 649 } else if ce, ok := err.(*errors.CompositeError); ok { 650 return ce.ValidateName("kubernetes") 651 } 652 return err 653 } 654 } 655 656 return nil 657 } 658 659 func (m *StatusResponse) validateKvstore(formats strfmt.Registry) error { 660 if swag.IsZero(m.Kvstore) { // not required 661 return nil 662 } 663 664 if m.Kvstore != nil { 665 if err := m.Kvstore.Validate(formats); err != nil { 666 if ve, ok := err.(*errors.Validation); ok { 667 return ve.ValidateName("kvstore") 668 } else if ce, ok := err.(*errors.CompositeError); ok { 669 return ce.ValidateName("kvstore") 670 } 671 return err 672 } 673 } 674 675 return nil 676 } 677 678 func (m *StatusResponse) validateMasquerading(formats strfmt.Registry) error { 679 if swag.IsZero(m.Masquerading) { // not required 680 return nil 681 } 682 683 if m.Masquerading != nil { 684 if err := m.Masquerading.Validate(formats); err != nil { 685 if ve, ok := err.(*errors.Validation); ok { 686 return ve.ValidateName("masquerading") 687 } else if ce, ok := err.(*errors.CompositeError); ok { 688 return ce.ValidateName("masquerading") 689 } 690 return err 691 } 692 } 693 694 return nil 695 } 696 697 func (m *StatusResponse) validateNodeMonitor(formats strfmt.Registry) error { 698 if swag.IsZero(m.NodeMonitor) { // not required 699 return nil 700 } 701 702 if m.NodeMonitor != nil { 703 if err := m.NodeMonitor.Validate(formats); err != nil { 704 if ve, ok := err.(*errors.Validation); ok { 705 return ve.ValidateName("nodeMonitor") 706 } else if ce, ok := err.(*errors.CompositeError); ok { 707 return ce.ValidateName("nodeMonitor") 708 } 709 return err 710 } 711 } 712 713 return nil 714 } 715 716 func (m *StatusResponse) validateProxy(formats strfmt.Registry) error { 717 if swag.IsZero(m.Proxy) { // not required 718 return nil 719 } 720 721 if m.Proxy != nil { 722 if err := m.Proxy.Validate(formats); err != nil { 723 if ve, ok := err.(*errors.Validation); ok { 724 return ve.ValidateName("proxy") 725 } else if ce, ok := err.(*errors.CompositeError); ok { 726 return ce.ValidateName("proxy") 727 } 728 return err 729 } 730 } 731 732 return nil 733 } 734 735 func (m *StatusResponse) validateRouting(formats strfmt.Registry) error { 736 if swag.IsZero(m.Routing) { // not required 737 return nil 738 } 739 740 if m.Routing != nil { 741 if err := m.Routing.Validate(formats); err != nil { 742 if ve, ok := err.(*errors.Validation); ok { 743 return ve.ValidateName("routing") 744 } else if ce, ok := err.(*errors.CompositeError); ok { 745 return ce.ValidateName("routing") 746 } 747 return err 748 } 749 } 750 751 return nil 752 } 753 754 func (m *StatusResponse) validateSrv6(formats strfmt.Registry) error { 755 if swag.IsZero(m.Srv6) { // not required 756 return nil 757 } 758 759 if m.Srv6 != nil { 760 if err := m.Srv6.Validate(formats); err != nil { 761 if ve, ok := err.(*errors.Validation); ok { 762 return ve.ValidateName("srv6") 763 } else if ce, ok := err.(*errors.CompositeError); ok { 764 return ce.ValidateName("srv6") 765 } 766 return err 767 } 768 } 769 770 return nil 771 } 772 773 func (m *StatusResponse) validateStale(formats strfmt.Registry) error { 774 if swag.IsZero(m.Stale) { // not required 775 return nil 776 } 777 778 for k := range m.Stale { 779 780 if err := validate.FormatOf("stale"+"."+k, "body", "date-time", m.Stale[k].String(), formats); err != nil { 781 return err 782 } 783 784 } 785 786 return nil 787 } 788 789 // ContextValidate validate this status response based on the context it is used 790 func (m *StatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 791 var res []error 792 793 if err := m.contextValidateAttachMode(ctx, formats); err != nil { 794 res = append(res, err) 795 } 796 797 if err := m.contextValidateAuthCertificateProvider(ctx, formats); err != nil { 798 res = append(res, err) 799 } 800 801 if err := m.contextValidateBandwidthManager(ctx, formats); err != nil { 802 res = append(res, err) 803 } 804 805 if err := m.contextValidateBpfMaps(ctx, formats); err != nil { 806 res = append(res, err) 807 } 808 809 if err := m.contextValidateCilium(ctx, formats); err != nil { 810 res = append(res, err) 811 } 812 813 if err := m.contextValidateClockSource(ctx, formats); err != nil { 814 res = append(res, err) 815 } 816 817 if err := m.contextValidateCluster(ctx, formats); err != nil { 818 res = append(res, err) 819 } 820 821 if err := m.contextValidateClusterMesh(ctx, formats); err != nil { 822 res = append(res, err) 823 } 824 825 if err := m.contextValidateCniChaining(ctx, formats); err != nil { 826 res = append(res, err) 827 } 828 829 if err := m.contextValidateCniFile(ctx, formats); err != nil { 830 res = append(res, err) 831 } 832 833 if err := m.contextValidateContainerRuntime(ctx, formats); err != nil { 834 res = append(res, err) 835 } 836 837 if err := m.contextValidateControllers(ctx, formats); err != nil { 838 res = append(res, err) 839 } 840 841 if err := m.contextValidateDatapathMode(ctx, formats); err != nil { 842 res = append(res, err) 843 } 844 845 if err := m.contextValidateEncryption(ctx, formats); err != nil { 846 res = append(res, err) 847 } 848 849 if err := m.contextValidateHostFirewall(ctx, formats); err != nil { 850 res = append(res, err) 851 } 852 853 if err := m.contextValidateHubble(ctx, formats); err != nil { 854 res = append(res, err) 855 } 856 857 if err := m.contextValidateIdentityRange(ctx, formats); err != nil { 858 res = append(res, err) 859 } 860 861 if err := m.contextValidateIpam(ctx, formats); err != nil { 862 res = append(res, err) 863 } 864 865 if err := m.contextValidateIPV4BigTCP(ctx, formats); err != nil { 866 res = append(res, err) 867 } 868 869 if err := m.contextValidateIPV6BigTCP(ctx, formats); err != nil { 870 res = append(res, err) 871 } 872 873 if err := m.contextValidateKubeProxyReplacement(ctx, formats); err != nil { 874 res = append(res, err) 875 } 876 877 if err := m.contextValidateKubernetes(ctx, formats); err != nil { 878 res = append(res, err) 879 } 880 881 if err := m.contextValidateKvstore(ctx, formats); err != nil { 882 res = append(res, err) 883 } 884 885 if err := m.contextValidateMasquerading(ctx, formats); err != nil { 886 res = append(res, err) 887 } 888 889 if err := m.contextValidateNodeMonitor(ctx, formats); err != nil { 890 res = append(res, err) 891 } 892 893 if err := m.contextValidateProxy(ctx, formats); err != nil { 894 res = append(res, err) 895 } 896 897 if err := m.contextValidateRouting(ctx, formats); err != nil { 898 res = append(res, err) 899 } 900 901 if err := m.contextValidateSrv6(ctx, formats); err != nil { 902 res = append(res, err) 903 } 904 905 if len(res) > 0 { 906 return errors.CompositeValidationError(res...) 907 } 908 return nil 909 } 910 911 func (m *StatusResponse) contextValidateAttachMode(ctx context.Context, formats strfmt.Registry) error { 912 913 if swag.IsZero(m.AttachMode) { // not required 914 return nil 915 } 916 917 if err := m.AttachMode.ContextValidate(ctx, formats); err != nil { 918 if ve, ok := err.(*errors.Validation); ok { 919 return ve.ValidateName("attach-mode") 920 } else if ce, ok := err.(*errors.CompositeError); ok { 921 return ce.ValidateName("attach-mode") 922 } 923 return err 924 } 925 926 return nil 927 } 928 929 func (m *StatusResponse) contextValidateAuthCertificateProvider(ctx context.Context, formats strfmt.Registry) error { 930 931 if m.AuthCertificateProvider != nil { 932 933 if swag.IsZero(m.AuthCertificateProvider) { // not required 934 return nil 935 } 936 937 if err := m.AuthCertificateProvider.ContextValidate(ctx, formats); err != nil { 938 if ve, ok := err.(*errors.Validation); ok { 939 return ve.ValidateName("auth-certificate-provider") 940 } else if ce, ok := err.(*errors.CompositeError); ok { 941 return ce.ValidateName("auth-certificate-provider") 942 } 943 return err 944 } 945 } 946 947 return nil 948 } 949 950 func (m *StatusResponse) contextValidateBandwidthManager(ctx context.Context, formats strfmt.Registry) error { 951 952 if m.BandwidthManager != nil { 953 954 if swag.IsZero(m.BandwidthManager) { // not required 955 return nil 956 } 957 958 if err := m.BandwidthManager.ContextValidate(ctx, formats); err != nil { 959 if ve, ok := err.(*errors.Validation); ok { 960 return ve.ValidateName("bandwidth-manager") 961 } else if ce, ok := err.(*errors.CompositeError); ok { 962 return ce.ValidateName("bandwidth-manager") 963 } 964 return err 965 } 966 } 967 968 return nil 969 } 970 971 func (m *StatusResponse) contextValidateBpfMaps(ctx context.Context, formats strfmt.Registry) error { 972 973 if m.BpfMaps != nil { 974 975 if swag.IsZero(m.BpfMaps) { // not required 976 return nil 977 } 978 979 if err := m.BpfMaps.ContextValidate(ctx, formats); err != nil { 980 if ve, ok := err.(*errors.Validation); ok { 981 return ve.ValidateName("bpf-maps") 982 } else if ce, ok := err.(*errors.CompositeError); ok { 983 return ce.ValidateName("bpf-maps") 984 } 985 return err 986 } 987 } 988 989 return nil 990 } 991 992 func (m *StatusResponse) contextValidateCilium(ctx context.Context, formats strfmt.Registry) error { 993 994 if m.Cilium != nil { 995 996 if swag.IsZero(m.Cilium) { // not required 997 return nil 998 } 999 1000 if err := m.Cilium.ContextValidate(ctx, formats); err != nil { 1001 if ve, ok := err.(*errors.Validation); ok { 1002 return ve.ValidateName("cilium") 1003 } else if ce, ok := err.(*errors.CompositeError); ok { 1004 return ce.ValidateName("cilium") 1005 } 1006 return err 1007 } 1008 } 1009 1010 return nil 1011 } 1012 1013 func (m *StatusResponse) contextValidateClockSource(ctx context.Context, formats strfmt.Registry) error { 1014 1015 if m.ClockSource != nil { 1016 1017 if swag.IsZero(m.ClockSource) { // not required 1018 return nil 1019 } 1020 1021 if err := m.ClockSource.ContextValidate(ctx, formats); err != nil { 1022 if ve, ok := err.(*errors.Validation); ok { 1023 return ve.ValidateName("clock-source") 1024 } else if ce, ok := err.(*errors.CompositeError); ok { 1025 return ce.ValidateName("clock-source") 1026 } 1027 return err 1028 } 1029 } 1030 1031 return nil 1032 } 1033 1034 func (m *StatusResponse) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { 1035 1036 if m.Cluster != nil { 1037 1038 if swag.IsZero(m.Cluster) { // not required 1039 return nil 1040 } 1041 1042 if err := m.Cluster.ContextValidate(ctx, formats); err != nil { 1043 if ve, ok := err.(*errors.Validation); ok { 1044 return ve.ValidateName("cluster") 1045 } else if ce, ok := err.(*errors.CompositeError); ok { 1046 return ce.ValidateName("cluster") 1047 } 1048 return err 1049 } 1050 } 1051 1052 return nil 1053 } 1054 1055 func (m *StatusResponse) contextValidateClusterMesh(ctx context.Context, formats strfmt.Registry) error { 1056 1057 if m.ClusterMesh != nil { 1058 1059 if swag.IsZero(m.ClusterMesh) { // not required 1060 return nil 1061 } 1062 1063 if err := m.ClusterMesh.ContextValidate(ctx, formats); err != nil { 1064 if ve, ok := err.(*errors.Validation); ok { 1065 return ve.ValidateName("cluster-mesh") 1066 } else if ce, ok := err.(*errors.CompositeError); ok { 1067 return ce.ValidateName("cluster-mesh") 1068 } 1069 return err 1070 } 1071 } 1072 1073 return nil 1074 } 1075 1076 func (m *StatusResponse) contextValidateCniChaining(ctx context.Context, formats strfmt.Registry) error { 1077 1078 if m.CniChaining != nil { 1079 1080 if swag.IsZero(m.CniChaining) { // not required 1081 return nil 1082 } 1083 1084 if err := m.CniChaining.ContextValidate(ctx, formats); err != nil { 1085 if ve, ok := err.(*errors.Validation); ok { 1086 return ve.ValidateName("cni-chaining") 1087 } else if ce, ok := err.(*errors.CompositeError); ok { 1088 return ce.ValidateName("cni-chaining") 1089 } 1090 return err 1091 } 1092 } 1093 1094 return nil 1095 } 1096 1097 func (m *StatusResponse) contextValidateCniFile(ctx context.Context, formats strfmt.Registry) error { 1098 1099 if m.CniFile != nil { 1100 1101 if swag.IsZero(m.CniFile) { // not required 1102 return nil 1103 } 1104 1105 if err := m.CniFile.ContextValidate(ctx, formats); err != nil { 1106 if ve, ok := err.(*errors.Validation); ok { 1107 return ve.ValidateName("cni-file") 1108 } else if ce, ok := err.(*errors.CompositeError); ok { 1109 return ce.ValidateName("cni-file") 1110 } 1111 return err 1112 } 1113 } 1114 1115 return nil 1116 } 1117 1118 func (m *StatusResponse) contextValidateContainerRuntime(ctx context.Context, formats strfmt.Registry) error { 1119 1120 if m.ContainerRuntime != nil { 1121 1122 if swag.IsZero(m.ContainerRuntime) { // not required 1123 return nil 1124 } 1125 1126 if err := m.ContainerRuntime.ContextValidate(ctx, formats); err != nil { 1127 if ve, ok := err.(*errors.Validation); ok { 1128 return ve.ValidateName("container-runtime") 1129 } else if ce, ok := err.(*errors.CompositeError); ok { 1130 return ce.ValidateName("container-runtime") 1131 } 1132 return err 1133 } 1134 } 1135 1136 return nil 1137 } 1138 1139 func (m *StatusResponse) contextValidateControllers(ctx context.Context, formats strfmt.Registry) error { 1140 1141 if err := m.Controllers.ContextValidate(ctx, formats); err != nil { 1142 if ve, ok := err.(*errors.Validation); ok { 1143 return ve.ValidateName("controllers") 1144 } else if ce, ok := err.(*errors.CompositeError); ok { 1145 return ce.ValidateName("controllers") 1146 } 1147 return err 1148 } 1149 1150 return nil 1151 } 1152 1153 func (m *StatusResponse) contextValidateDatapathMode(ctx context.Context, formats strfmt.Registry) error { 1154 1155 if swag.IsZero(m.DatapathMode) { // not required 1156 return nil 1157 } 1158 1159 if err := m.DatapathMode.ContextValidate(ctx, formats); err != nil { 1160 if ve, ok := err.(*errors.Validation); ok { 1161 return ve.ValidateName("datapath-mode") 1162 } else if ce, ok := err.(*errors.CompositeError); ok { 1163 return ce.ValidateName("datapath-mode") 1164 } 1165 return err 1166 } 1167 1168 return nil 1169 } 1170 1171 func (m *StatusResponse) contextValidateEncryption(ctx context.Context, formats strfmt.Registry) error { 1172 1173 if m.Encryption != nil { 1174 1175 if swag.IsZero(m.Encryption) { // not required 1176 return nil 1177 } 1178 1179 if err := m.Encryption.ContextValidate(ctx, formats); err != nil { 1180 if ve, ok := err.(*errors.Validation); ok { 1181 return ve.ValidateName("encryption") 1182 } else if ce, ok := err.(*errors.CompositeError); ok { 1183 return ce.ValidateName("encryption") 1184 } 1185 return err 1186 } 1187 } 1188 1189 return nil 1190 } 1191 1192 func (m *StatusResponse) contextValidateHostFirewall(ctx context.Context, formats strfmt.Registry) error { 1193 1194 if m.HostFirewall != nil { 1195 1196 if swag.IsZero(m.HostFirewall) { // not required 1197 return nil 1198 } 1199 1200 if err := m.HostFirewall.ContextValidate(ctx, formats); err != nil { 1201 if ve, ok := err.(*errors.Validation); ok { 1202 return ve.ValidateName("host-firewall") 1203 } else if ce, ok := err.(*errors.CompositeError); ok { 1204 return ce.ValidateName("host-firewall") 1205 } 1206 return err 1207 } 1208 } 1209 1210 return nil 1211 } 1212 1213 func (m *StatusResponse) contextValidateHubble(ctx context.Context, formats strfmt.Registry) error { 1214 1215 if m.Hubble != nil { 1216 1217 if swag.IsZero(m.Hubble) { // not required 1218 return nil 1219 } 1220 1221 if err := m.Hubble.ContextValidate(ctx, formats); err != nil { 1222 if ve, ok := err.(*errors.Validation); ok { 1223 return ve.ValidateName("hubble") 1224 } else if ce, ok := err.(*errors.CompositeError); ok { 1225 return ce.ValidateName("hubble") 1226 } 1227 return err 1228 } 1229 } 1230 1231 return nil 1232 } 1233 1234 func (m *StatusResponse) contextValidateIdentityRange(ctx context.Context, formats strfmt.Registry) error { 1235 1236 if m.IdentityRange != nil { 1237 1238 if swag.IsZero(m.IdentityRange) { // not required 1239 return nil 1240 } 1241 1242 if err := m.IdentityRange.ContextValidate(ctx, formats); err != nil { 1243 if ve, ok := err.(*errors.Validation); ok { 1244 return ve.ValidateName("identity-range") 1245 } else if ce, ok := err.(*errors.CompositeError); ok { 1246 return ce.ValidateName("identity-range") 1247 } 1248 return err 1249 } 1250 } 1251 1252 return nil 1253 } 1254 1255 func (m *StatusResponse) contextValidateIpam(ctx context.Context, formats strfmt.Registry) error { 1256 1257 if m.Ipam != nil { 1258 1259 if swag.IsZero(m.Ipam) { // not required 1260 return nil 1261 } 1262 1263 if err := m.Ipam.ContextValidate(ctx, formats); err != nil { 1264 if ve, ok := err.(*errors.Validation); ok { 1265 return ve.ValidateName("ipam") 1266 } else if ce, ok := err.(*errors.CompositeError); ok { 1267 return ce.ValidateName("ipam") 1268 } 1269 return err 1270 } 1271 } 1272 1273 return nil 1274 } 1275 1276 func (m *StatusResponse) contextValidateIPV4BigTCP(ctx context.Context, formats strfmt.Registry) error { 1277 1278 if m.IPV4BigTCP != nil { 1279 1280 if swag.IsZero(m.IPV4BigTCP) { // not required 1281 return nil 1282 } 1283 1284 if err := m.IPV4BigTCP.ContextValidate(ctx, formats); err != nil { 1285 if ve, ok := err.(*errors.Validation); ok { 1286 return ve.ValidateName("ipv4-big-tcp") 1287 } else if ce, ok := err.(*errors.CompositeError); ok { 1288 return ce.ValidateName("ipv4-big-tcp") 1289 } 1290 return err 1291 } 1292 } 1293 1294 return nil 1295 } 1296 1297 func (m *StatusResponse) contextValidateIPV6BigTCP(ctx context.Context, formats strfmt.Registry) error { 1298 1299 if m.IPV6BigTCP != nil { 1300 1301 if swag.IsZero(m.IPV6BigTCP) { // not required 1302 return nil 1303 } 1304 1305 if err := m.IPV6BigTCP.ContextValidate(ctx, formats); err != nil { 1306 if ve, ok := err.(*errors.Validation); ok { 1307 return ve.ValidateName("ipv6-big-tcp") 1308 } else if ce, ok := err.(*errors.CompositeError); ok { 1309 return ce.ValidateName("ipv6-big-tcp") 1310 } 1311 return err 1312 } 1313 } 1314 1315 return nil 1316 } 1317 1318 func (m *StatusResponse) contextValidateKubeProxyReplacement(ctx context.Context, formats strfmt.Registry) error { 1319 1320 if m.KubeProxyReplacement != nil { 1321 1322 if swag.IsZero(m.KubeProxyReplacement) { // not required 1323 return nil 1324 } 1325 1326 if err := m.KubeProxyReplacement.ContextValidate(ctx, formats); err != nil { 1327 if ve, ok := err.(*errors.Validation); ok { 1328 return ve.ValidateName("kube-proxy-replacement") 1329 } else if ce, ok := err.(*errors.CompositeError); ok { 1330 return ce.ValidateName("kube-proxy-replacement") 1331 } 1332 return err 1333 } 1334 } 1335 1336 return nil 1337 } 1338 1339 func (m *StatusResponse) contextValidateKubernetes(ctx context.Context, formats strfmt.Registry) error { 1340 1341 if m.Kubernetes != nil { 1342 1343 if swag.IsZero(m.Kubernetes) { // not required 1344 return nil 1345 } 1346 1347 if err := m.Kubernetes.ContextValidate(ctx, formats); err != nil { 1348 if ve, ok := err.(*errors.Validation); ok { 1349 return ve.ValidateName("kubernetes") 1350 } else if ce, ok := err.(*errors.CompositeError); ok { 1351 return ce.ValidateName("kubernetes") 1352 } 1353 return err 1354 } 1355 } 1356 1357 return nil 1358 } 1359 1360 func (m *StatusResponse) contextValidateKvstore(ctx context.Context, formats strfmt.Registry) error { 1361 1362 if m.Kvstore != nil { 1363 1364 if swag.IsZero(m.Kvstore) { // not required 1365 return nil 1366 } 1367 1368 if err := m.Kvstore.ContextValidate(ctx, formats); err != nil { 1369 if ve, ok := err.(*errors.Validation); ok { 1370 return ve.ValidateName("kvstore") 1371 } else if ce, ok := err.(*errors.CompositeError); ok { 1372 return ce.ValidateName("kvstore") 1373 } 1374 return err 1375 } 1376 } 1377 1378 return nil 1379 } 1380 1381 func (m *StatusResponse) contextValidateMasquerading(ctx context.Context, formats strfmt.Registry) error { 1382 1383 if m.Masquerading != nil { 1384 1385 if swag.IsZero(m.Masquerading) { // not required 1386 return nil 1387 } 1388 1389 if err := m.Masquerading.ContextValidate(ctx, formats); err != nil { 1390 if ve, ok := err.(*errors.Validation); ok { 1391 return ve.ValidateName("masquerading") 1392 } else if ce, ok := err.(*errors.CompositeError); ok { 1393 return ce.ValidateName("masquerading") 1394 } 1395 return err 1396 } 1397 } 1398 1399 return nil 1400 } 1401 1402 func (m *StatusResponse) contextValidateNodeMonitor(ctx context.Context, formats strfmt.Registry) error { 1403 1404 if m.NodeMonitor != nil { 1405 1406 if swag.IsZero(m.NodeMonitor) { // not required 1407 return nil 1408 } 1409 1410 if err := m.NodeMonitor.ContextValidate(ctx, formats); err != nil { 1411 if ve, ok := err.(*errors.Validation); ok { 1412 return ve.ValidateName("nodeMonitor") 1413 } else if ce, ok := err.(*errors.CompositeError); ok { 1414 return ce.ValidateName("nodeMonitor") 1415 } 1416 return err 1417 } 1418 } 1419 1420 return nil 1421 } 1422 1423 func (m *StatusResponse) contextValidateProxy(ctx context.Context, formats strfmt.Registry) error { 1424 1425 if m.Proxy != nil { 1426 1427 if swag.IsZero(m.Proxy) { // not required 1428 return nil 1429 } 1430 1431 if err := m.Proxy.ContextValidate(ctx, formats); err != nil { 1432 if ve, ok := err.(*errors.Validation); ok { 1433 return ve.ValidateName("proxy") 1434 } else if ce, ok := err.(*errors.CompositeError); ok { 1435 return ce.ValidateName("proxy") 1436 } 1437 return err 1438 } 1439 } 1440 1441 return nil 1442 } 1443 1444 func (m *StatusResponse) contextValidateRouting(ctx context.Context, formats strfmt.Registry) error { 1445 1446 if m.Routing != nil { 1447 1448 if swag.IsZero(m.Routing) { // not required 1449 return nil 1450 } 1451 1452 if err := m.Routing.ContextValidate(ctx, formats); err != nil { 1453 if ve, ok := err.(*errors.Validation); ok { 1454 return ve.ValidateName("routing") 1455 } else if ce, ok := err.(*errors.CompositeError); ok { 1456 return ce.ValidateName("routing") 1457 } 1458 return err 1459 } 1460 } 1461 1462 return nil 1463 } 1464 1465 func (m *StatusResponse) contextValidateSrv6(ctx context.Context, formats strfmt.Registry) error { 1466 1467 if m.Srv6 != nil { 1468 1469 if swag.IsZero(m.Srv6) { // not required 1470 return nil 1471 } 1472 1473 if err := m.Srv6.ContextValidate(ctx, formats); err != nil { 1474 if ve, ok := err.(*errors.Validation); ok { 1475 return ve.ValidateName("srv6") 1476 } else if ce, ok := err.(*errors.CompositeError); ok { 1477 return ce.ValidateName("srv6") 1478 } 1479 return err 1480 } 1481 } 1482 1483 return nil 1484 } 1485 1486 // MarshalBinary interface implementation 1487 func (m *StatusResponse) MarshalBinary() ([]byte, error) { 1488 if m == nil { 1489 return nil, nil 1490 } 1491 return swag.WriteJSON(m) 1492 } 1493 1494 // UnmarshalBinary interface implementation 1495 func (m *StatusResponse) UnmarshalBinary(b []byte) error { 1496 var res StatusResponse 1497 if err := swag.ReadJSON(b, &res); err != nil { 1498 return err 1499 } 1500 *m = res 1501 return nil 1502 }