github.com/percona/percona-xtradb-cluster-operator@v1.14.0/version/client/models/version_version_matrix.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package models 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "context" 10 11 "github.com/go-openapi/errors" 12 "github.com/go-openapi/strfmt" 13 "github.com/go-openapi/swag" 14 "github.com/go-openapi/validate" 15 ) 16 17 // VersionVersionMatrix VersionMatrix represents set of possible product versions. 18 // 19 // swagger:model versionVersionMatrix 20 type VersionVersionMatrix struct { 21 22 // backup 23 Backup map[string]VersionVersion `json:"backup,omitempty"` 24 25 // haproxy 26 Haproxy map[string]VersionVersion `json:"haproxy,omitempty"` 27 28 // log collector 29 LogCollector map[string]VersionVersion `json:"logCollector,omitempty"` 30 31 // mongod 32 Mongod map[string]VersionVersion `json:"mongod,omitempty"` 33 34 // mysql 35 Mysql map[string]VersionVersion `json:"mysql,omitempty"` 36 37 // operator 38 Operator map[string]VersionVersion `json:"operator,omitempty"` 39 40 // orchestrator 41 Orchestrator map[string]VersionVersion `json:"orchestrator,omitempty"` 42 43 // pg operator 44 PgOperator map[string]VersionVersion `json:"pgOperator,omitempty"` 45 46 // pg operator apiserver 47 PgOperatorApiserver map[string]VersionVersion `json:"pgOperatorApiserver,omitempty"` 48 49 // pg operator deployer 50 PgOperatorDeployer map[string]VersionVersion `json:"pgOperatorDeployer,omitempty"` 51 52 // pg operator event 53 PgOperatorEvent map[string]VersionVersion `json:"pgOperatorEvent,omitempty"` 54 55 // pg operator rmdata 56 PgOperatorRmdata map[string]VersionVersion `json:"pgOperatorRmdata,omitempty"` 57 58 // pg operator scheduler 59 PgOperatorScheduler map[string]VersionVersion `json:"pgOperatorScheduler,omitempty"` 60 61 // pgbackrest 62 Pgbackrest map[string]VersionVersion `json:"pgbackrest,omitempty"` 63 64 // pgbackrest repo 65 PgbackrestRepo map[string]VersionVersion `json:"pgbackrestRepo,omitempty"` 66 67 // pgbadger 68 Pgbadger map[string]VersionVersion `json:"pgbadger,omitempty"` 69 70 // pgbouncer 71 Pgbouncer map[string]VersionVersion `json:"pgbouncer,omitempty"` 72 73 // pmm 74 Pmm map[string]VersionVersion `json:"pmm,omitempty"` 75 76 // postgresql 77 Postgresql map[string]VersionVersion `json:"postgresql,omitempty"` 78 79 // proxysql 80 Proxysql map[string]VersionVersion `json:"proxysql,omitempty"` 81 82 // ps operator 83 PsOperator map[string]VersionVersion `json:"psOperator,omitempty"` 84 85 // psmdb operator 86 PsmdbOperator map[string]VersionVersion `json:"psmdbOperator,omitempty"` 87 88 // pxc 89 Pxc map[string]VersionVersion `json:"pxc,omitempty"` 90 91 // pxc operator 92 PxcOperator map[string]VersionVersion `json:"pxcOperator,omitempty"` 93 94 // router 95 Router map[string]VersionVersion `json:"router,omitempty"` 96 } 97 98 // Validate validates this version version matrix 99 func (m *VersionVersionMatrix) Validate(formats strfmt.Registry) error { 100 var res []error 101 102 if err := m.validateBackup(formats); err != nil { 103 res = append(res, err) 104 } 105 106 if err := m.validateHaproxy(formats); err != nil { 107 res = append(res, err) 108 } 109 110 if err := m.validateLogCollector(formats); err != nil { 111 res = append(res, err) 112 } 113 114 if err := m.validateMongod(formats); err != nil { 115 res = append(res, err) 116 } 117 118 if err := m.validateMysql(formats); err != nil { 119 res = append(res, err) 120 } 121 122 if err := m.validateOperator(formats); err != nil { 123 res = append(res, err) 124 } 125 126 if err := m.validateOrchestrator(formats); err != nil { 127 res = append(res, err) 128 } 129 130 if err := m.validatePgOperator(formats); err != nil { 131 res = append(res, err) 132 } 133 134 if err := m.validatePgOperatorApiserver(formats); err != nil { 135 res = append(res, err) 136 } 137 138 if err := m.validatePgOperatorDeployer(formats); err != nil { 139 res = append(res, err) 140 } 141 142 if err := m.validatePgOperatorEvent(formats); err != nil { 143 res = append(res, err) 144 } 145 146 if err := m.validatePgOperatorRmdata(formats); err != nil { 147 res = append(res, err) 148 } 149 150 if err := m.validatePgOperatorScheduler(formats); err != nil { 151 res = append(res, err) 152 } 153 154 if err := m.validatePgbackrest(formats); err != nil { 155 res = append(res, err) 156 } 157 158 if err := m.validatePgbackrestRepo(formats); err != nil { 159 res = append(res, err) 160 } 161 162 if err := m.validatePgbadger(formats); err != nil { 163 res = append(res, err) 164 } 165 166 if err := m.validatePgbouncer(formats); err != nil { 167 res = append(res, err) 168 } 169 170 if err := m.validatePmm(formats); err != nil { 171 res = append(res, err) 172 } 173 174 if err := m.validatePostgresql(formats); err != nil { 175 res = append(res, err) 176 } 177 178 if err := m.validateProxysql(formats); err != nil { 179 res = append(res, err) 180 } 181 182 if err := m.validatePsOperator(formats); err != nil { 183 res = append(res, err) 184 } 185 186 if err := m.validatePsmdbOperator(formats); err != nil { 187 res = append(res, err) 188 } 189 190 if err := m.validatePxc(formats); err != nil { 191 res = append(res, err) 192 } 193 194 if err := m.validatePxcOperator(formats); err != nil { 195 res = append(res, err) 196 } 197 198 if err := m.validateRouter(formats); err != nil { 199 res = append(res, err) 200 } 201 202 if len(res) > 0 { 203 return errors.CompositeValidationError(res...) 204 } 205 return nil 206 } 207 208 func (m *VersionVersionMatrix) validateBackup(formats strfmt.Registry) error { 209 if swag.IsZero(m.Backup) { // not required 210 return nil 211 } 212 213 for k := range m.Backup { 214 215 if err := validate.Required("backup"+"."+k, "body", m.Backup[k]); err != nil { 216 return err 217 } 218 if val, ok := m.Backup[k]; ok { 219 if err := val.Validate(formats); err != nil { 220 if ve, ok := err.(*errors.Validation); ok { 221 return ve.ValidateName("backup" + "." + k) 222 } else if ce, ok := err.(*errors.CompositeError); ok { 223 return ce.ValidateName("backup" + "." + k) 224 } 225 return err 226 } 227 } 228 229 } 230 231 return nil 232 } 233 234 func (m *VersionVersionMatrix) validateHaproxy(formats strfmt.Registry) error { 235 if swag.IsZero(m.Haproxy) { // not required 236 return nil 237 } 238 239 for k := range m.Haproxy { 240 241 if err := validate.Required("haproxy"+"."+k, "body", m.Haproxy[k]); err != nil { 242 return err 243 } 244 if val, ok := m.Haproxy[k]; ok { 245 if err := val.Validate(formats); err != nil { 246 if ve, ok := err.(*errors.Validation); ok { 247 return ve.ValidateName("haproxy" + "." + k) 248 } else if ce, ok := err.(*errors.CompositeError); ok { 249 return ce.ValidateName("haproxy" + "." + k) 250 } 251 return err 252 } 253 } 254 255 } 256 257 return nil 258 } 259 260 func (m *VersionVersionMatrix) validateLogCollector(formats strfmt.Registry) error { 261 if swag.IsZero(m.LogCollector) { // not required 262 return nil 263 } 264 265 for k := range m.LogCollector { 266 267 if err := validate.Required("logCollector"+"."+k, "body", m.LogCollector[k]); err != nil { 268 return err 269 } 270 if val, ok := m.LogCollector[k]; ok { 271 if err := val.Validate(formats); err != nil { 272 if ve, ok := err.(*errors.Validation); ok { 273 return ve.ValidateName("logCollector" + "." + k) 274 } else if ce, ok := err.(*errors.CompositeError); ok { 275 return ce.ValidateName("logCollector" + "." + k) 276 } 277 return err 278 } 279 } 280 281 } 282 283 return nil 284 } 285 286 func (m *VersionVersionMatrix) validateMongod(formats strfmt.Registry) error { 287 if swag.IsZero(m.Mongod) { // not required 288 return nil 289 } 290 291 for k := range m.Mongod { 292 293 if err := validate.Required("mongod"+"."+k, "body", m.Mongod[k]); err != nil { 294 return err 295 } 296 if val, ok := m.Mongod[k]; ok { 297 if err := val.Validate(formats); err != nil { 298 if ve, ok := err.(*errors.Validation); ok { 299 return ve.ValidateName("mongod" + "." + k) 300 } else if ce, ok := err.(*errors.CompositeError); ok { 301 return ce.ValidateName("mongod" + "." + k) 302 } 303 return err 304 } 305 } 306 307 } 308 309 return nil 310 } 311 312 func (m *VersionVersionMatrix) validateMysql(formats strfmt.Registry) error { 313 if swag.IsZero(m.Mysql) { // not required 314 return nil 315 } 316 317 for k := range m.Mysql { 318 319 if err := validate.Required("mysql"+"."+k, "body", m.Mysql[k]); err != nil { 320 return err 321 } 322 if val, ok := m.Mysql[k]; ok { 323 if err := val.Validate(formats); err != nil { 324 if ve, ok := err.(*errors.Validation); ok { 325 return ve.ValidateName("mysql" + "." + k) 326 } else if ce, ok := err.(*errors.CompositeError); ok { 327 return ce.ValidateName("mysql" + "." + k) 328 } 329 return err 330 } 331 } 332 333 } 334 335 return nil 336 } 337 338 func (m *VersionVersionMatrix) validateOperator(formats strfmt.Registry) error { 339 if swag.IsZero(m.Operator) { // not required 340 return nil 341 } 342 343 for k := range m.Operator { 344 345 if err := validate.Required("operator"+"."+k, "body", m.Operator[k]); err != nil { 346 return err 347 } 348 if val, ok := m.Operator[k]; ok { 349 if err := val.Validate(formats); err != nil { 350 if ve, ok := err.(*errors.Validation); ok { 351 return ve.ValidateName("operator" + "." + k) 352 } else if ce, ok := err.(*errors.CompositeError); ok { 353 return ce.ValidateName("operator" + "." + k) 354 } 355 return err 356 } 357 } 358 359 } 360 361 return nil 362 } 363 364 func (m *VersionVersionMatrix) validateOrchestrator(formats strfmt.Registry) error { 365 if swag.IsZero(m.Orchestrator) { // not required 366 return nil 367 } 368 369 for k := range m.Orchestrator { 370 371 if err := validate.Required("orchestrator"+"."+k, "body", m.Orchestrator[k]); err != nil { 372 return err 373 } 374 if val, ok := m.Orchestrator[k]; ok { 375 if err := val.Validate(formats); err != nil { 376 if ve, ok := err.(*errors.Validation); ok { 377 return ve.ValidateName("orchestrator" + "." + k) 378 } else if ce, ok := err.(*errors.CompositeError); ok { 379 return ce.ValidateName("orchestrator" + "." + k) 380 } 381 return err 382 } 383 } 384 385 } 386 387 return nil 388 } 389 390 func (m *VersionVersionMatrix) validatePgOperator(formats strfmt.Registry) error { 391 if swag.IsZero(m.PgOperator) { // not required 392 return nil 393 } 394 395 for k := range m.PgOperator { 396 397 if err := validate.Required("pgOperator"+"."+k, "body", m.PgOperator[k]); err != nil { 398 return err 399 } 400 if val, ok := m.PgOperator[k]; ok { 401 if err := val.Validate(formats); err != nil { 402 if ve, ok := err.(*errors.Validation); ok { 403 return ve.ValidateName("pgOperator" + "." + k) 404 } else if ce, ok := err.(*errors.CompositeError); ok { 405 return ce.ValidateName("pgOperator" + "." + k) 406 } 407 return err 408 } 409 } 410 411 } 412 413 return nil 414 } 415 416 func (m *VersionVersionMatrix) validatePgOperatorApiserver(formats strfmt.Registry) error { 417 if swag.IsZero(m.PgOperatorApiserver) { // not required 418 return nil 419 } 420 421 for k := range m.PgOperatorApiserver { 422 423 if err := validate.Required("pgOperatorApiserver"+"."+k, "body", m.PgOperatorApiserver[k]); err != nil { 424 return err 425 } 426 if val, ok := m.PgOperatorApiserver[k]; ok { 427 if err := val.Validate(formats); err != nil { 428 if ve, ok := err.(*errors.Validation); ok { 429 return ve.ValidateName("pgOperatorApiserver" + "." + k) 430 } else if ce, ok := err.(*errors.CompositeError); ok { 431 return ce.ValidateName("pgOperatorApiserver" + "." + k) 432 } 433 return err 434 } 435 } 436 437 } 438 439 return nil 440 } 441 442 func (m *VersionVersionMatrix) validatePgOperatorDeployer(formats strfmt.Registry) error { 443 if swag.IsZero(m.PgOperatorDeployer) { // not required 444 return nil 445 } 446 447 for k := range m.PgOperatorDeployer { 448 449 if err := validate.Required("pgOperatorDeployer"+"."+k, "body", m.PgOperatorDeployer[k]); err != nil { 450 return err 451 } 452 if val, ok := m.PgOperatorDeployer[k]; ok { 453 if err := val.Validate(formats); err != nil { 454 if ve, ok := err.(*errors.Validation); ok { 455 return ve.ValidateName("pgOperatorDeployer" + "." + k) 456 } else if ce, ok := err.(*errors.CompositeError); ok { 457 return ce.ValidateName("pgOperatorDeployer" + "." + k) 458 } 459 return err 460 } 461 } 462 463 } 464 465 return nil 466 } 467 468 func (m *VersionVersionMatrix) validatePgOperatorEvent(formats strfmt.Registry) error { 469 if swag.IsZero(m.PgOperatorEvent) { // not required 470 return nil 471 } 472 473 for k := range m.PgOperatorEvent { 474 475 if err := validate.Required("pgOperatorEvent"+"."+k, "body", m.PgOperatorEvent[k]); err != nil { 476 return err 477 } 478 if val, ok := m.PgOperatorEvent[k]; ok { 479 if err := val.Validate(formats); err != nil { 480 if ve, ok := err.(*errors.Validation); ok { 481 return ve.ValidateName("pgOperatorEvent" + "." + k) 482 } else if ce, ok := err.(*errors.CompositeError); ok { 483 return ce.ValidateName("pgOperatorEvent" + "." + k) 484 } 485 return err 486 } 487 } 488 489 } 490 491 return nil 492 } 493 494 func (m *VersionVersionMatrix) validatePgOperatorRmdata(formats strfmt.Registry) error { 495 if swag.IsZero(m.PgOperatorRmdata) { // not required 496 return nil 497 } 498 499 for k := range m.PgOperatorRmdata { 500 501 if err := validate.Required("pgOperatorRmdata"+"."+k, "body", m.PgOperatorRmdata[k]); err != nil { 502 return err 503 } 504 if val, ok := m.PgOperatorRmdata[k]; ok { 505 if err := val.Validate(formats); err != nil { 506 if ve, ok := err.(*errors.Validation); ok { 507 return ve.ValidateName("pgOperatorRmdata" + "." + k) 508 } else if ce, ok := err.(*errors.CompositeError); ok { 509 return ce.ValidateName("pgOperatorRmdata" + "." + k) 510 } 511 return err 512 } 513 } 514 515 } 516 517 return nil 518 } 519 520 func (m *VersionVersionMatrix) validatePgOperatorScheduler(formats strfmt.Registry) error { 521 if swag.IsZero(m.PgOperatorScheduler) { // not required 522 return nil 523 } 524 525 for k := range m.PgOperatorScheduler { 526 527 if err := validate.Required("pgOperatorScheduler"+"."+k, "body", m.PgOperatorScheduler[k]); err != nil { 528 return err 529 } 530 if val, ok := m.PgOperatorScheduler[k]; ok { 531 if err := val.Validate(formats); err != nil { 532 if ve, ok := err.(*errors.Validation); ok { 533 return ve.ValidateName("pgOperatorScheduler" + "." + k) 534 } else if ce, ok := err.(*errors.CompositeError); ok { 535 return ce.ValidateName("pgOperatorScheduler" + "." + k) 536 } 537 return err 538 } 539 } 540 541 } 542 543 return nil 544 } 545 546 func (m *VersionVersionMatrix) validatePgbackrest(formats strfmt.Registry) error { 547 if swag.IsZero(m.Pgbackrest) { // not required 548 return nil 549 } 550 551 for k := range m.Pgbackrest { 552 553 if err := validate.Required("pgbackrest"+"."+k, "body", m.Pgbackrest[k]); err != nil { 554 return err 555 } 556 if val, ok := m.Pgbackrest[k]; ok { 557 if err := val.Validate(formats); err != nil { 558 if ve, ok := err.(*errors.Validation); ok { 559 return ve.ValidateName("pgbackrest" + "." + k) 560 } else if ce, ok := err.(*errors.CompositeError); ok { 561 return ce.ValidateName("pgbackrest" + "." + k) 562 } 563 return err 564 } 565 } 566 567 } 568 569 return nil 570 } 571 572 func (m *VersionVersionMatrix) validatePgbackrestRepo(formats strfmt.Registry) error { 573 if swag.IsZero(m.PgbackrestRepo) { // not required 574 return nil 575 } 576 577 for k := range m.PgbackrestRepo { 578 579 if err := validate.Required("pgbackrestRepo"+"."+k, "body", m.PgbackrestRepo[k]); err != nil { 580 return err 581 } 582 if val, ok := m.PgbackrestRepo[k]; ok { 583 if err := val.Validate(formats); err != nil { 584 if ve, ok := err.(*errors.Validation); ok { 585 return ve.ValidateName("pgbackrestRepo" + "." + k) 586 } else if ce, ok := err.(*errors.CompositeError); ok { 587 return ce.ValidateName("pgbackrestRepo" + "." + k) 588 } 589 return err 590 } 591 } 592 593 } 594 595 return nil 596 } 597 598 func (m *VersionVersionMatrix) validatePgbadger(formats strfmt.Registry) error { 599 if swag.IsZero(m.Pgbadger) { // not required 600 return nil 601 } 602 603 for k := range m.Pgbadger { 604 605 if err := validate.Required("pgbadger"+"."+k, "body", m.Pgbadger[k]); err != nil { 606 return err 607 } 608 if val, ok := m.Pgbadger[k]; ok { 609 if err := val.Validate(formats); err != nil { 610 if ve, ok := err.(*errors.Validation); ok { 611 return ve.ValidateName("pgbadger" + "." + k) 612 } else if ce, ok := err.(*errors.CompositeError); ok { 613 return ce.ValidateName("pgbadger" + "." + k) 614 } 615 return err 616 } 617 } 618 619 } 620 621 return nil 622 } 623 624 func (m *VersionVersionMatrix) validatePgbouncer(formats strfmt.Registry) error { 625 if swag.IsZero(m.Pgbouncer) { // not required 626 return nil 627 } 628 629 for k := range m.Pgbouncer { 630 631 if err := validate.Required("pgbouncer"+"."+k, "body", m.Pgbouncer[k]); err != nil { 632 return err 633 } 634 if val, ok := m.Pgbouncer[k]; ok { 635 if err := val.Validate(formats); err != nil { 636 if ve, ok := err.(*errors.Validation); ok { 637 return ve.ValidateName("pgbouncer" + "." + k) 638 } else if ce, ok := err.(*errors.CompositeError); ok { 639 return ce.ValidateName("pgbouncer" + "." + k) 640 } 641 return err 642 } 643 } 644 645 } 646 647 return nil 648 } 649 650 func (m *VersionVersionMatrix) validatePmm(formats strfmt.Registry) error { 651 if swag.IsZero(m.Pmm) { // not required 652 return nil 653 } 654 655 for k := range m.Pmm { 656 657 if err := validate.Required("pmm"+"."+k, "body", m.Pmm[k]); err != nil { 658 return err 659 } 660 if val, ok := m.Pmm[k]; ok { 661 if err := val.Validate(formats); err != nil { 662 if ve, ok := err.(*errors.Validation); ok { 663 return ve.ValidateName("pmm" + "." + k) 664 } else if ce, ok := err.(*errors.CompositeError); ok { 665 return ce.ValidateName("pmm" + "." + k) 666 } 667 return err 668 } 669 } 670 671 } 672 673 return nil 674 } 675 676 func (m *VersionVersionMatrix) validatePostgresql(formats strfmt.Registry) error { 677 if swag.IsZero(m.Postgresql) { // not required 678 return nil 679 } 680 681 for k := range m.Postgresql { 682 683 if err := validate.Required("postgresql"+"."+k, "body", m.Postgresql[k]); err != nil { 684 return err 685 } 686 if val, ok := m.Postgresql[k]; ok { 687 if err := val.Validate(formats); err != nil { 688 if ve, ok := err.(*errors.Validation); ok { 689 return ve.ValidateName("postgresql" + "." + k) 690 } else if ce, ok := err.(*errors.CompositeError); ok { 691 return ce.ValidateName("postgresql" + "." + k) 692 } 693 return err 694 } 695 } 696 697 } 698 699 return nil 700 } 701 702 func (m *VersionVersionMatrix) validateProxysql(formats strfmt.Registry) error { 703 if swag.IsZero(m.Proxysql) { // not required 704 return nil 705 } 706 707 for k := range m.Proxysql { 708 709 if err := validate.Required("proxysql"+"."+k, "body", m.Proxysql[k]); err != nil { 710 return err 711 } 712 if val, ok := m.Proxysql[k]; ok { 713 if err := val.Validate(formats); err != nil { 714 if ve, ok := err.(*errors.Validation); ok { 715 return ve.ValidateName("proxysql" + "." + k) 716 } else if ce, ok := err.(*errors.CompositeError); ok { 717 return ce.ValidateName("proxysql" + "." + k) 718 } 719 return err 720 } 721 } 722 723 } 724 725 return nil 726 } 727 728 func (m *VersionVersionMatrix) validatePsOperator(formats strfmt.Registry) error { 729 if swag.IsZero(m.PsOperator) { // not required 730 return nil 731 } 732 733 for k := range m.PsOperator { 734 735 if err := validate.Required("psOperator"+"."+k, "body", m.PsOperator[k]); err != nil { 736 return err 737 } 738 if val, ok := m.PsOperator[k]; ok { 739 if err := val.Validate(formats); err != nil { 740 if ve, ok := err.(*errors.Validation); ok { 741 return ve.ValidateName("psOperator" + "." + k) 742 } else if ce, ok := err.(*errors.CompositeError); ok { 743 return ce.ValidateName("psOperator" + "." + k) 744 } 745 return err 746 } 747 } 748 749 } 750 751 return nil 752 } 753 754 func (m *VersionVersionMatrix) validatePsmdbOperator(formats strfmt.Registry) error { 755 if swag.IsZero(m.PsmdbOperator) { // not required 756 return nil 757 } 758 759 for k := range m.PsmdbOperator { 760 761 if err := validate.Required("psmdbOperator"+"."+k, "body", m.PsmdbOperator[k]); err != nil { 762 return err 763 } 764 if val, ok := m.PsmdbOperator[k]; ok { 765 if err := val.Validate(formats); err != nil { 766 if ve, ok := err.(*errors.Validation); ok { 767 return ve.ValidateName("psmdbOperator" + "." + k) 768 } else if ce, ok := err.(*errors.CompositeError); ok { 769 return ce.ValidateName("psmdbOperator" + "." + k) 770 } 771 return err 772 } 773 } 774 775 } 776 777 return nil 778 } 779 780 func (m *VersionVersionMatrix) validatePxc(formats strfmt.Registry) error { 781 if swag.IsZero(m.Pxc) { // not required 782 return nil 783 } 784 785 for k := range m.Pxc { 786 787 if err := validate.Required("pxc"+"."+k, "body", m.Pxc[k]); err != nil { 788 return err 789 } 790 if val, ok := m.Pxc[k]; ok { 791 if err := val.Validate(formats); err != nil { 792 if ve, ok := err.(*errors.Validation); ok { 793 return ve.ValidateName("pxc" + "." + k) 794 } else if ce, ok := err.(*errors.CompositeError); ok { 795 return ce.ValidateName("pxc" + "." + k) 796 } 797 return err 798 } 799 } 800 801 } 802 803 return nil 804 } 805 806 func (m *VersionVersionMatrix) validatePxcOperator(formats strfmt.Registry) error { 807 if swag.IsZero(m.PxcOperator) { // not required 808 return nil 809 } 810 811 for k := range m.PxcOperator { 812 813 if err := validate.Required("pxcOperator"+"."+k, "body", m.PxcOperator[k]); err != nil { 814 return err 815 } 816 if val, ok := m.PxcOperator[k]; ok { 817 if err := val.Validate(formats); err != nil { 818 if ve, ok := err.(*errors.Validation); ok { 819 return ve.ValidateName("pxcOperator" + "." + k) 820 } else if ce, ok := err.(*errors.CompositeError); ok { 821 return ce.ValidateName("pxcOperator" + "." + k) 822 } 823 return err 824 } 825 } 826 827 } 828 829 return nil 830 } 831 832 func (m *VersionVersionMatrix) validateRouter(formats strfmt.Registry) error { 833 if swag.IsZero(m.Router) { // not required 834 return nil 835 } 836 837 for k := range m.Router { 838 839 if err := validate.Required("router"+"."+k, "body", m.Router[k]); err != nil { 840 return err 841 } 842 if val, ok := m.Router[k]; ok { 843 if err := val.Validate(formats); err != nil { 844 if ve, ok := err.(*errors.Validation); ok { 845 return ve.ValidateName("router" + "." + k) 846 } else if ce, ok := err.(*errors.CompositeError); ok { 847 return ce.ValidateName("router" + "." + k) 848 } 849 return err 850 } 851 } 852 853 } 854 855 return nil 856 } 857 858 // ContextValidate validate this version version matrix based on the context it is used 859 func (m *VersionVersionMatrix) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 860 var res []error 861 862 if err := m.contextValidateBackup(ctx, formats); err != nil { 863 res = append(res, err) 864 } 865 866 if err := m.contextValidateHaproxy(ctx, formats); err != nil { 867 res = append(res, err) 868 } 869 870 if err := m.contextValidateLogCollector(ctx, formats); err != nil { 871 res = append(res, err) 872 } 873 874 if err := m.contextValidateMongod(ctx, formats); err != nil { 875 res = append(res, err) 876 } 877 878 if err := m.contextValidateMysql(ctx, formats); err != nil { 879 res = append(res, err) 880 } 881 882 if err := m.contextValidateOperator(ctx, formats); err != nil { 883 res = append(res, err) 884 } 885 886 if err := m.contextValidateOrchestrator(ctx, formats); err != nil { 887 res = append(res, err) 888 } 889 890 if err := m.contextValidatePgOperator(ctx, formats); err != nil { 891 res = append(res, err) 892 } 893 894 if err := m.contextValidatePgOperatorApiserver(ctx, formats); err != nil { 895 res = append(res, err) 896 } 897 898 if err := m.contextValidatePgOperatorDeployer(ctx, formats); err != nil { 899 res = append(res, err) 900 } 901 902 if err := m.contextValidatePgOperatorEvent(ctx, formats); err != nil { 903 res = append(res, err) 904 } 905 906 if err := m.contextValidatePgOperatorRmdata(ctx, formats); err != nil { 907 res = append(res, err) 908 } 909 910 if err := m.contextValidatePgOperatorScheduler(ctx, formats); err != nil { 911 res = append(res, err) 912 } 913 914 if err := m.contextValidatePgbackrest(ctx, formats); err != nil { 915 res = append(res, err) 916 } 917 918 if err := m.contextValidatePgbackrestRepo(ctx, formats); err != nil { 919 res = append(res, err) 920 } 921 922 if err := m.contextValidatePgbadger(ctx, formats); err != nil { 923 res = append(res, err) 924 } 925 926 if err := m.contextValidatePgbouncer(ctx, formats); err != nil { 927 res = append(res, err) 928 } 929 930 if err := m.contextValidatePmm(ctx, formats); err != nil { 931 res = append(res, err) 932 } 933 934 if err := m.contextValidatePostgresql(ctx, formats); err != nil { 935 res = append(res, err) 936 } 937 938 if err := m.contextValidateProxysql(ctx, formats); err != nil { 939 res = append(res, err) 940 } 941 942 if err := m.contextValidatePsOperator(ctx, formats); err != nil { 943 res = append(res, err) 944 } 945 946 if err := m.contextValidatePsmdbOperator(ctx, formats); err != nil { 947 res = append(res, err) 948 } 949 950 if err := m.contextValidatePxc(ctx, formats); err != nil { 951 res = append(res, err) 952 } 953 954 if err := m.contextValidatePxcOperator(ctx, formats); err != nil { 955 res = append(res, err) 956 } 957 958 if err := m.contextValidateRouter(ctx, formats); err != nil { 959 res = append(res, err) 960 } 961 962 if len(res) > 0 { 963 return errors.CompositeValidationError(res...) 964 } 965 return nil 966 } 967 968 func (m *VersionVersionMatrix) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { 969 970 for k := range m.Backup { 971 972 if val, ok := m.Backup[k]; ok { 973 if err := val.ContextValidate(ctx, formats); err != nil { 974 return err 975 } 976 } 977 978 } 979 980 return nil 981 } 982 983 func (m *VersionVersionMatrix) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { 984 985 for k := range m.Haproxy { 986 987 if val, ok := m.Haproxy[k]; ok { 988 if err := val.ContextValidate(ctx, formats); err != nil { 989 return err 990 } 991 } 992 993 } 994 995 return nil 996 } 997 998 func (m *VersionVersionMatrix) contextValidateLogCollector(ctx context.Context, formats strfmt.Registry) error { 999 1000 for k := range m.LogCollector { 1001 1002 if val, ok := m.LogCollector[k]; ok { 1003 if err := val.ContextValidate(ctx, formats); err != nil { 1004 return err 1005 } 1006 } 1007 1008 } 1009 1010 return nil 1011 } 1012 1013 func (m *VersionVersionMatrix) contextValidateMongod(ctx context.Context, formats strfmt.Registry) error { 1014 1015 for k := range m.Mongod { 1016 1017 if val, ok := m.Mongod[k]; ok { 1018 if err := val.ContextValidate(ctx, formats); err != nil { 1019 return err 1020 } 1021 } 1022 1023 } 1024 1025 return nil 1026 } 1027 1028 func (m *VersionVersionMatrix) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { 1029 1030 for k := range m.Mysql { 1031 1032 if val, ok := m.Mysql[k]; ok { 1033 if err := val.ContextValidate(ctx, formats); err != nil { 1034 return err 1035 } 1036 } 1037 1038 } 1039 1040 return nil 1041 } 1042 1043 func (m *VersionVersionMatrix) contextValidateOperator(ctx context.Context, formats strfmt.Registry) error { 1044 1045 for k := range m.Operator { 1046 1047 if val, ok := m.Operator[k]; ok { 1048 if err := val.ContextValidate(ctx, formats); err != nil { 1049 return err 1050 } 1051 } 1052 1053 } 1054 1055 return nil 1056 } 1057 1058 func (m *VersionVersionMatrix) contextValidateOrchestrator(ctx context.Context, formats strfmt.Registry) error { 1059 1060 for k := range m.Orchestrator { 1061 1062 if val, ok := m.Orchestrator[k]; ok { 1063 if err := val.ContextValidate(ctx, formats); err != nil { 1064 return err 1065 } 1066 } 1067 1068 } 1069 1070 return nil 1071 } 1072 1073 func (m *VersionVersionMatrix) contextValidatePgOperator(ctx context.Context, formats strfmt.Registry) error { 1074 1075 for k := range m.PgOperator { 1076 1077 if val, ok := m.PgOperator[k]; ok { 1078 if err := val.ContextValidate(ctx, formats); err != nil { 1079 return err 1080 } 1081 } 1082 1083 } 1084 1085 return nil 1086 } 1087 1088 func (m *VersionVersionMatrix) contextValidatePgOperatorApiserver(ctx context.Context, formats strfmt.Registry) error { 1089 1090 for k := range m.PgOperatorApiserver { 1091 1092 if val, ok := m.PgOperatorApiserver[k]; ok { 1093 if err := val.ContextValidate(ctx, formats); err != nil { 1094 return err 1095 } 1096 } 1097 1098 } 1099 1100 return nil 1101 } 1102 1103 func (m *VersionVersionMatrix) contextValidatePgOperatorDeployer(ctx context.Context, formats strfmt.Registry) error { 1104 1105 for k := range m.PgOperatorDeployer { 1106 1107 if val, ok := m.PgOperatorDeployer[k]; ok { 1108 if err := val.ContextValidate(ctx, formats); err != nil { 1109 return err 1110 } 1111 } 1112 1113 } 1114 1115 return nil 1116 } 1117 1118 func (m *VersionVersionMatrix) contextValidatePgOperatorEvent(ctx context.Context, formats strfmt.Registry) error { 1119 1120 for k := range m.PgOperatorEvent { 1121 1122 if val, ok := m.PgOperatorEvent[k]; ok { 1123 if err := val.ContextValidate(ctx, formats); err != nil { 1124 return err 1125 } 1126 } 1127 1128 } 1129 1130 return nil 1131 } 1132 1133 func (m *VersionVersionMatrix) contextValidatePgOperatorRmdata(ctx context.Context, formats strfmt.Registry) error { 1134 1135 for k := range m.PgOperatorRmdata { 1136 1137 if val, ok := m.PgOperatorRmdata[k]; ok { 1138 if err := val.ContextValidate(ctx, formats); err != nil { 1139 return err 1140 } 1141 } 1142 1143 } 1144 1145 return nil 1146 } 1147 1148 func (m *VersionVersionMatrix) contextValidatePgOperatorScheduler(ctx context.Context, formats strfmt.Registry) error { 1149 1150 for k := range m.PgOperatorScheduler { 1151 1152 if val, ok := m.PgOperatorScheduler[k]; ok { 1153 if err := val.ContextValidate(ctx, formats); err != nil { 1154 return err 1155 } 1156 } 1157 1158 } 1159 1160 return nil 1161 } 1162 1163 func (m *VersionVersionMatrix) contextValidatePgbackrest(ctx context.Context, formats strfmt.Registry) error { 1164 1165 for k := range m.Pgbackrest { 1166 1167 if val, ok := m.Pgbackrest[k]; ok { 1168 if err := val.ContextValidate(ctx, formats); err != nil { 1169 return err 1170 } 1171 } 1172 1173 } 1174 1175 return nil 1176 } 1177 1178 func (m *VersionVersionMatrix) contextValidatePgbackrestRepo(ctx context.Context, formats strfmt.Registry) error { 1179 1180 for k := range m.PgbackrestRepo { 1181 1182 if val, ok := m.PgbackrestRepo[k]; ok { 1183 if err := val.ContextValidate(ctx, formats); err != nil { 1184 return err 1185 } 1186 } 1187 1188 } 1189 1190 return nil 1191 } 1192 1193 func (m *VersionVersionMatrix) contextValidatePgbadger(ctx context.Context, formats strfmt.Registry) error { 1194 1195 for k := range m.Pgbadger { 1196 1197 if val, ok := m.Pgbadger[k]; ok { 1198 if err := val.ContextValidate(ctx, formats); err != nil { 1199 return err 1200 } 1201 } 1202 1203 } 1204 1205 return nil 1206 } 1207 1208 func (m *VersionVersionMatrix) contextValidatePgbouncer(ctx context.Context, formats strfmt.Registry) error { 1209 1210 for k := range m.Pgbouncer { 1211 1212 if val, ok := m.Pgbouncer[k]; ok { 1213 if err := val.ContextValidate(ctx, formats); err != nil { 1214 return err 1215 } 1216 } 1217 1218 } 1219 1220 return nil 1221 } 1222 1223 func (m *VersionVersionMatrix) contextValidatePmm(ctx context.Context, formats strfmt.Registry) error { 1224 1225 for k := range m.Pmm { 1226 1227 if val, ok := m.Pmm[k]; ok { 1228 if err := val.ContextValidate(ctx, formats); err != nil { 1229 return err 1230 } 1231 } 1232 1233 } 1234 1235 return nil 1236 } 1237 1238 func (m *VersionVersionMatrix) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { 1239 1240 for k := range m.Postgresql { 1241 1242 if val, ok := m.Postgresql[k]; ok { 1243 if err := val.ContextValidate(ctx, formats); err != nil { 1244 return err 1245 } 1246 } 1247 1248 } 1249 1250 return nil 1251 } 1252 1253 func (m *VersionVersionMatrix) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { 1254 1255 for k := range m.Proxysql { 1256 1257 if val, ok := m.Proxysql[k]; ok { 1258 if err := val.ContextValidate(ctx, formats); err != nil { 1259 return err 1260 } 1261 } 1262 1263 } 1264 1265 return nil 1266 } 1267 1268 func (m *VersionVersionMatrix) contextValidatePsOperator(ctx context.Context, formats strfmt.Registry) error { 1269 1270 for k := range m.PsOperator { 1271 1272 if val, ok := m.PsOperator[k]; ok { 1273 if err := val.ContextValidate(ctx, formats); err != nil { 1274 return err 1275 } 1276 } 1277 1278 } 1279 1280 return nil 1281 } 1282 1283 func (m *VersionVersionMatrix) contextValidatePsmdbOperator(ctx context.Context, formats strfmt.Registry) error { 1284 1285 for k := range m.PsmdbOperator { 1286 1287 if val, ok := m.PsmdbOperator[k]; ok { 1288 if err := val.ContextValidate(ctx, formats); err != nil { 1289 return err 1290 } 1291 } 1292 1293 } 1294 1295 return nil 1296 } 1297 1298 func (m *VersionVersionMatrix) contextValidatePxc(ctx context.Context, formats strfmt.Registry) error { 1299 1300 for k := range m.Pxc { 1301 1302 if val, ok := m.Pxc[k]; ok { 1303 if err := val.ContextValidate(ctx, formats); err != nil { 1304 return err 1305 } 1306 } 1307 1308 } 1309 1310 return nil 1311 } 1312 1313 func (m *VersionVersionMatrix) contextValidatePxcOperator(ctx context.Context, formats strfmt.Registry) error { 1314 1315 for k := range m.PxcOperator { 1316 1317 if val, ok := m.PxcOperator[k]; ok { 1318 if err := val.ContextValidate(ctx, formats); err != nil { 1319 return err 1320 } 1321 } 1322 1323 } 1324 1325 return nil 1326 } 1327 1328 func (m *VersionVersionMatrix) contextValidateRouter(ctx context.Context, formats strfmt.Registry) error { 1329 1330 for k := range m.Router { 1331 1332 if val, ok := m.Router[k]; ok { 1333 if err := val.ContextValidate(ctx, formats); err != nil { 1334 return err 1335 } 1336 } 1337 1338 } 1339 1340 return nil 1341 } 1342 1343 // MarshalBinary interface implementation 1344 func (m *VersionVersionMatrix) MarshalBinary() ([]byte, error) { 1345 if m == nil { 1346 return nil, nil 1347 } 1348 return swag.WriteJSON(m) 1349 } 1350 1351 // UnmarshalBinary interface implementation 1352 func (m *VersionVersionMatrix) UnmarshalBinary(b []byte) error { 1353 var res VersionVersionMatrix 1354 if err := swag.ReadJSON(b, &res); err != nil { 1355 return err 1356 } 1357 *m = res 1358 return nil 1359 }