go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/internal/run/storage.pb.validate.go (about) 1 // Code generated by protoc-gen-validate. DO NOT EDIT. 2 // source: go.chromium.org/luci/cv/internal/run/storage.proto 3 4 package run 5 6 import ( 7 "bytes" 8 "errors" 9 "fmt" 10 "net" 11 "net/mail" 12 "net/url" 13 "regexp" 14 "sort" 15 "strings" 16 "time" 17 "unicode/utf8" 18 19 "google.golang.org/protobuf/types/known/anypb" 20 21 gerrit "go.chromium.org/luci/cv/internal/gerrit" 22 23 tryjob "go.chromium.org/luci/cv/internal/tryjob" 24 ) 25 26 // ensure the imports are used 27 var ( 28 _ = bytes.MinRead 29 _ = errors.New("") 30 _ = fmt.Print 31 _ = utf8.UTFMax 32 _ = (*regexp.Regexp)(nil) 33 _ = (*strings.Reader)(nil) 34 _ = net.IPv4len 35 _ = time.Duration(0) 36 _ = (*url.URL)(nil) 37 _ = (*mail.Address)(nil) 38 _ = anypb.Any{} 39 _ = sort.Sort 40 41 _ = gerrit.Whom(0) 42 43 _ = tryjob.Status(0) 44 ) 45 46 // Validate checks the field values on Trigger with the rules defined in the 47 // proto definition for this message. If any rules are violated, the first 48 // error encountered is returned, or nil if there are no violations. 49 func (m *Trigger) Validate() error { 50 return m.validate(false) 51 } 52 53 // ValidateAll checks the field values on Trigger with the rules defined in the 54 // proto definition for this message. If any rules are violated, the result is 55 // a list of violation errors wrapped in TriggerMultiError, or nil if none found. 56 func (m *Trigger) ValidateAll() error { 57 return m.validate(true) 58 } 59 60 func (m *Trigger) validate(all bool) error { 61 if m == nil { 62 return nil 63 } 64 65 var errors []error 66 67 if all { 68 switch v := interface{}(m.GetTime()).(type) { 69 case interface{ ValidateAll() error }: 70 if err := v.ValidateAll(); err != nil { 71 errors = append(errors, TriggerValidationError{ 72 field: "Time", 73 reason: "embedded message failed validation", 74 cause: err, 75 }) 76 } 77 case interface{ Validate() error }: 78 if err := v.Validate(); err != nil { 79 errors = append(errors, TriggerValidationError{ 80 field: "Time", 81 reason: "embedded message failed validation", 82 cause: err, 83 }) 84 } 85 } 86 } else if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok { 87 if err := v.Validate(); err != nil { 88 return TriggerValidationError{ 89 field: "Time", 90 reason: "embedded message failed validation", 91 cause: err, 92 } 93 } 94 } 95 96 // no validation rules for Mode 97 98 if all { 99 switch v := interface{}(m.GetModeDefinition()).(type) { 100 case interface{ ValidateAll() error }: 101 if err := v.ValidateAll(); err != nil { 102 errors = append(errors, TriggerValidationError{ 103 field: "ModeDefinition", 104 reason: "embedded message failed validation", 105 cause: err, 106 }) 107 } 108 case interface{ Validate() error }: 109 if err := v.Validate(); err != nil { 110 errors = append(errors, TriggerValidationError{ 111 field: "ModeDefinition", 112 reason: "embedded message failed validation", 113 cause: err, 114 }) 115 } 116 } 117 } else if v, ok := interface{}(m.GetModeDefinition()).(interface{ Validate() error }); ok { 118 if err := v.Validate(); err != nil { 119 return TriggerValidationError{ 120 field: "ModeDefinition", 121 reason: "embedded message failed validation", 122 cause: err, 123 } 124 } 125 } 126 127 // no validation rules for Email 128 129 // no validation rules for GerritAccountId 130 131 if len(errors) > 0 { 132 return TriggerMultiError(errors) 133 } 134 135 return nil 136 } 137 138 // TriggerMultiError is an error wrapping multiple validation errors returned 139 // by Trigger.ValidateAll() if the designated constraints aren't met. 140 type TriggerMultiError []error 141 142 // Error returns a concatenation of all the error messages it wraps. 143 func (m TriggerMultiError) Error() string { 144 var msgs []string 145 for _, err := range m { 146 msgs = append(msgs, err.Error()) 147 } 148 return strings.Join(msgs, "; ") 149 } 150 151 // AllErrors returns a list of validation violation errors. 152 func (m TriggerMultiError) AllErrors() []error { return m } 153 154 // TriggerValidationError is the validation error returned by Trigger.Validate 155 // if the designated constraints aren't met. 156 type TriggerValidationError struct { 157 field string 158 reason string 159 cause error 160 key bool 161 } 162 163 // Field function returns field value. 164 func (e TriggerValidationError) Field() string { return e.field } 165 166 // Reason function returns reason value. 167 func (e TriggerValidationError) Reason() string { return e.reason } 168 169 // Cause function returns cause value. 170 func (e TriggerValidationError) Cause() error { return e.cause } 171 172 // Key function returns key value. 173 func (e TriggerValidationError) Key() bool { return e.key } 174 175 // ErrorName returns error name. 176 func (e TriggerValidationError) ErrorName() string { return "TriggerValidationError" } 177 178 // Error satisfies the builtin error interface 179 func (e TriggerValidationError) Error() string { 180 cause := "" 181 if e.cause != nil { 182 cause = fmt.Sprintf(" | caused by: %v", e.cause) 183 } 184 185 key := "" 186 if e.key { 187 key = "key for " 188 } 189 190 return fmt.Sprintf( 191 "invalid %sTrigger.%s: %s%s", 192 key, 193 e.field, 194 e.reason, 195 cause) 196 } 197 198 var _ error = TriggerValidationError{} 199 200 var _ interface { 201 Field() string 202 Reason() string 203 Key() bool 204 Cause() error 205 ErrorName() string 206 } = TriggerValidationError{} 207 208 // Validate checks the field values on Triggers with the rules defined in the 209 // proto definition for this message. If any rules are violated, the first 210 // error encountered is returned, or nil if there are no violations. 211 func (m *Triggers) Validate() error { 212 return m.validate(false) 213 } 214 215 // ValidateAll checks the field values on Triggers with the rules defined in 216 // the proto definition for this message. If any rules are violated, the 217 // result is a list of violation errors wrapped in TriggersMultiError, or nil 218 // if none found. 219 func (m *Triggers) ValidateAll() error { 220 return m.validate(true) 221 } 222 223 func (m *Triggers) validate(all bool) error { 224 if m == nil { 225 return nil 226 } 227 228 var errors []error 229 230 if all { 231 switch v := interface{}(m.GetCqVoteTrigger()).(type) { 232 case interface{ ValidateAll() error }: 233 if err := v.ValidateAll(); err != nil { 234 errors = append(errors, TriggersValidationError{ 235 field: "CqVoteTrigger", 236 reason: "embedded message failed validation", 237 cause: err, 238 }) 239 } 240 case interface{ Validate() error }: 241 if err := v.Validate(); err != nil { 242 errors = append(errors, TriggersValidationError{ 243 field: "CqVoteTrigger", 244 reason: "embedded message failed validation", 245 cause: err, 246 }) 247 } 248 } 249 } else if v, ok := interface{}(m.GetCqVoteTrigger()).(interface{ Validate() error }); ok { 250 if err := v.Validate(); err != nil { 251 return TriggersValidationError{ 252 field: "CqVoteTrigger", 253 reason: "embedded message failed validation", 254 cause: err, 255 } 256 } 257 } 258 259 if all { 260 switch v := interface{}(m.GetNewPatchsetRunTrigger()).(type) { 261 case interface{ ValidateAll() error }: 262 if err := v.ValidateAll(); err != nil { 263 errors = append(errors, TriggersValidationError{ 264 field: "NewPatchsetRunTrigger", 265 reason: "embedded message failed validation", 266 cause: err, 267 }) 268 } 269 case interface{ Validate() error }: 270 if err := v.Validate(); err != nil { 271 errors = append(errors, TriggersValidationError{ 272 field: "NewPatchsetRunTrigger", 273 reason: "embedded message failed validation", 274 cause: err, 275 }) 276 } 277 } 278 } else if v, ok := interface{}(m.GetNewPatchsetRunTrigger()).(interface{ Validate() error }); ok { 279 if err := v.Validate(); err != nil { 280 return TriggersValidationError{ 281 field: "NewPatchsetRunTrigger", 282 reason: "embedded message failed validation", 283 cause: err, 284 } 285 } 286 } 287 288 if len(errors) > 0 { 289 return TriggersMultiError(errors) 290 } 291 292 return nil 293 } 294 295 // TriggersMultiError is an error wrapping multiple validation errors returned 296 // by Triggers.ValidateAll() if the designated constraints aren't met. 297 type TriggersMultiError []error 298 299 // Error returns a concatenation of all the error messages it wraps. 300 func (m TriggersMultiError) Error() string { 301 var msgs []string 302 for _, err := range m { 303 msgs = append(msgs, err.Error()) 304 } 305 return strings.Join(msgs, "; ") 306 } 307 308 // AllErrors returns a list of validation violation errors. 309 func (m TriggersMultiError) AllErrors() []error { return m } 310 311 // TriggersValidationError is the validation error returned by 312 // Triggers.Validate if the designated constraints aren't met. 313 type TriggersValidationError struct { 314 field string 315 reason string 316 cause error 317 key bool 318 } 319 320 // Field function returns field value. 321 func (e TriggersValidationError) Field() string { return e.field } 322 323 // Reason function returns reason value. 324 func (e TriggersValidationError) Reason() string { return e.reason } 325 326 // Cause function returns cause value. 327 func (e TriggersValidationError) Cause() error { return e.cause } 328 329 // Key function returns key value. 330 func (e TriggersValidationError) Key() bool { return e.key } 331 332 // ErrorName returns error name. 333 func (e TriggersValidationError) ErrorName() string { return "TriggersValidationError" } 334 335 // Error satisfies the builtin error interface 336 func (e TriggersValidationError) Error() string { 337 cause := "" 338 if e.cause != nil { 339 cause = fmt.Sprintf(" | caused by: %v", e.cause) 340 } 341 342 key := "" 343 if e.key { 344 key = "key for " 345 } 346 347 return fmt.Sprintf( 348 "invalid %sTriggers.%s: %s%s", 349 key, 350 e.field, 351 e.reason, 352 cause) 353 } 354 355 var _ error = TriggersValidationError{} 356 357 var _ interface { 358 Field() string 359 Reason() string 360 Key() bool 361 Cause() error 362 ErrorName() string 363 } = TriggersValidationError{} 364 365 // Validate checks the field values on Submission with the rules defined in the 366 // proto definition for this message. If any rules are violated, the first 367 // error encountered is returned, or nil if there are no violations. 368 func (m *Submission) Validate() error { 369 return m.validate(false) 370 } 371 372 // ValidateAll checks the field values on Submission with the rules defined in 373 // the proto definition for this message. If any rules are violated, the 374 // result is a list of violation errors wrapped in SubmissionMultiError, or 375 // nil if none found. 376 func (m *Submission) ValidateAll() error { 377 return m.validate(true) 378 } 379 380 func (m *Submission) validate(all bool) error { 381 if m == nil { 382 return nil 383 } 384 385 var errors []error 386 387 if all { 388 switch v := interface{}(m.GetDeadline()).(type) { 389 case interface{ ValidateAll() error }: 390 if err := v.ValidateAll(); err != nil { 391 errors = append(errors, SubmissionValidationError{ 392 field: "Deadline", 393 reason: "embedded message failed validation", 394 cause: err, 395 }) 396 } 397 case interface{ Validate() error }: 398 if err := v.Validate(); err != nil { 399 errors = append(errors, SubmissionValidationError{ 400 field: "Deadline", 401 reason: "embedded message failed validation", 402 cause: err, 403 }) 404 } 405 } 406 } else if v, ok := interface{}(m.GetDeadline()).(interface{ Validate() error }); ok { 407 if err := v.Validate(); err != nil { 408 return SubmissionValidationError{ 409 field: "Deadline", 410 reason: "embedded message failed validation", 411 cause: err, 412 } 413 } 414 } 415 416 // no validation rules for TaskId 417 418 // no validation rules for TreeOpen 419 420 if all { 421 switch v := interface{}(m.GetLastTreeCheckTime()).(type) { 422 case interface{ ValidateAll() error }: 423 if err := v.ValidateAll(); err != nil { 424 errors = append(errors, SubmissionValidationError{ 425 field: "LastTreeCheckTime", 426 reason: "embedded message failed validation", 427 cause: err, 428 }) 429 } 430 case interface{ Validate() error }: 431 if err := v.Validate(); err != nil { 432 errors = append(errors, SubmissionValidationError{ 433 field: "LastTreeCheckTime", 434 reason: "embedded message failed validation", 435 cause: err, 436 }) 437 } 438 } 439 } else if v, ok := interface{}(m.GetLastTreeCheckTime()).(interface{ Validate() error }); ok { 440 if err := v.Validate(); err != nil { 441 return SubmissionValidationError{ 442 field: "LastTreeCheckTime", 443 reason: "embedded message failed validation", 444 cause: err, 445 } 446 } 447 } 448 449 if all { 450 switch v := interface{}(m.GetTreeErrorSince()).(type) { 451 case interface{ ValidateAll() error }: 452 if err := v.ValidateAll(); err != nil { 453 errors = append(errors, SubmissionValidationError{ 454 field: "TreeErrorSince", 455 reason: "embedded message failed validation", 456 cause: err, 457 }) 458 } 459 case interface{ Validate() error }: 460 if err := v.Validate(); err != nil { 461 errors = append(errors, SubmissionValidationError{ 462 field: "TreeErrorSince", 463 reason: "embedded message failed validation", 464 cause: err, 465 }) 466 } 467 } 468 } else if v, ok := interface{}(m.GetTreeErrorSince()).(interface{ Validate() error }); ok { 469 if err := v.Validate(); err != nil { 470 return SubmissionValidationError{ 471 field: "TreeErrorSince", 472 reason: "embedded message failed validation", 473 cause: err, 474 } 475 } 476 } 477 478 if len(errors) > 0 { 479 return SubmissionMultiError(errors) 480 } 481 482 return nil 483 } 484 485 // SubmissionMultiError is an error wrapping multiple validation errors 486 // returned by Submission.ValidateAll() if the designated constraints aren't met. 487 type SubmissionMultiError []error 488 489 // Error returns a concatenation of all the error messages it wraps. 490 func (m SubmissionMultiError) Error() string { 491 var msgs []string 492 for _, err := range m { 493 msgs = append(msgs, err.Error()) 494 } 495 return strings.Join(msgs, "; ") 496 } 497 498 // AllErrors returns a list of validation violation errors. 499 func (m SubmissionMultiError) AllErrors() []error { return m } 500 501 // SubmissionValidationError is the validation error returned by 502 // Submission.Validate if the designated constraints aren't met. 503 type SubmissionValidationError struct { 504 field string 505 reason string 506 cause error 507 key bool 508 } 509 510 // Field function returns field value. 511 func (e SubmissionValidationError) Field() string { return e.field } 512 513 // Reason function returns reason value. 514 func (e SubmissionValidationError) Reason() string { return e.reason } 515 516 // Cause function returns cause value. 517 func (e SubmissionValidationError) Cause() error { return e.cause } 518 519 // Key function returns key value. 520 func (e SubmissionValidationError) Key() bool { return e.key } 521 522 // ErrorName returns error name. 523 func (e SubmissionValidationError) ErrorName() string { return "SubmissionValidationError" } 524 525 // Error satisfies the builtin error interface 526 func (e SubmissionValidationError) Error() string { 527 cause := "" 528 if e.cause != nil { 529 cause = fmt.Sprintf(" | caused by: %v", e.cause) 530 } 531 532 key := "" 533 if e.key { 534 key = "key for " 535 } 536 537 return fmt.Sprintf( 538 "invalid %sSubmission.%s: %s%s", 539 key, 540 e.field, 541 e.reason, 542 cause) 543 } 544 545 var _ error = SubmissionValidationError{} 546 547 var _ interface { 548 Field() string 549 Reason() string 550 Key() bool 551 Cause() error 552 ErrorName() string 553 } = SubmissionValidationError{} 554 555 // Validate checks the field values on Options with the rules defined in the 556 // proto definition for this message. If any rules are violated, the first 557 // error encountered is returned, or nil if there are no violations. 558 func (m *Options) Validate() error { 559 return m.validate(false) 560 } 561 562 // ValidateAll checks the field values on Options with the rules defined in the 563 // proto definition for this message. If any rules are violated, the result is 564 // a list of violation errors wrapped in OptionsMultiError, or nil if none found. 565 func (m *Options) ValidateAll() error { 566 return m.validate(true) 567 } 568 569 func (m *Options) validate(all bool) error { 570 if m == nil { 571 return nil 572 } 573 574 var errors []error 575 576 // no validation rules for SkipTreeChecks 577 578 // no validation rules for SkipEquivalentBuilders 579 580 // no validation rules for AvoidCancellingTryjobs 581 582 // no validation rules for SkipTryjobs 583 584 // no validation rules for SkipPresubmit 585 586 if len(errors) > 0 { 587 return OptionsMultiError(errors) 588 } 589 590 return nil 591 } 592 593 // OptionsMultiError is an error wrapping multiple validation errors returned 594 // by Options.ValidateAll() if the designated constraints aren't met. 595 type OptionsMultiError []error 596 597 // Error returns a concatenation of all the error messages it wraps. 598 func (m OptionsMultiError) Error() string { 599 var msgs []string 600 for _, err := range m { 601 msgs = append(msgs, err.Error()) 602 } 603 return strings.Join(msgs, "; ") 604 } 605 606 // AllErrors returns a list of validation violation errors. 607 func (m OptionsMultiError) AllErrors() []error { return m } 608 609 // OptionsValidationError is the validation error returned by Options.Validate 610 // if the designated constraints aren't met. 611 type OptionsValidationError struct { 612 field string 613 reason string 614 cause error 615 key bool 616 } 617 618 // Field function returns field value. 619 func (e OptionsValidationError) Field() string { return e.field } 620 621 // Reason function returns reason value. 622 func (e OptionsValidationError) Reason() string { return e.reason } 623 624 // Cause function returns cause value. 625 func (e OptionsValidationError) Cause() error { return e.cause } 626 627 // Key function returns key value. 628 func (e OptionsValidationError) Key() bool { return e.key } 629 630 // ErrorName returns error name. 631 func (e OptionsValidationError) ErrorName() string { return "OptionsValidationError" } 632 633 // Error satisfies the builtin error interface 634 func (e OptionsValidationError) Error() string { 635 cause := "" 636 if e.cause != nil { 637 cause = fmt.Sprintf(" | caused by: %v", e.cause) 638 } 639 640 key := "" 641 if e.key { 642 key = "key for " 643 } 644 645 return fmt.Sprintf( 646 "invalid %sOptions.%s: %s%s", 647 key, 648 e.field, 649 e.reason, 650 cause) 651 } 652 653 var _ error = OptionsValidationError{} 654 655 var _ interface { 656 Field() string 657 Reason() string 658 Key() bool 659 Cause() error 660 ErrorName() string 661 } = OptionsValidationError{} 662 663 // Validate checks the field values on LogEntries with the rules defined in the 664 // proto definition for this message. If any rules are violated, the first 665 // error encountered is returned, or nil if there are no violations. 666 func (m *LogEntries) Validate() error { 667 return m.validate(false) 668 } 669 670 // ValidateAll checks the field values on LogEntries with the rules defined in 671 // the proto definition for this message. If any rules are violated, the 672 // result is a list of violation errors wrapped in LogEntriesMultiError, or 673 // nil if none found. 674 func (m *LogEntries) ValidateAll() error { 675 return m.validate(true) 676 } 677 678 func (m *LogEntries) validate(all bool) error { 679 if m == nil { 680 return nil 681 } 682 683 var errors []error 684 685 for idx, item := range m.GetEntries() { 686 _, _ = idx, item 687 688 if all { 689 switch v := interface{}(item).(type) { 690 case interface{ ValidateAll() error }: 691 if err := v.ValidateAll(); err != nil { 692 errors = append(errors, LogEntriesValidationError{ 693 field: fmt.Sprintf("Entries[%v]", idx), 694 reason: "embedded message failed validation", 695 cause: err, 696 }) 697 } 698 case interface{ Validate() error }: 699 if err := v.Validate(); err != nil { 700 errors = append(errors, LogEntriesValidationError{ 701 field: fmt.Sprintf("Entries[%v]", idx), 702 reason: "embedded message failed validation", 703 cause: err, 704 }) 705 } 706 } 707 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { 708 if err := v.Validate(); err != nil { 709 return LogEntriesValidationError{ 710 field: fmt.Sprintf("Entries[%v]", idx), 711 reason: "embedded message failed validation", 712 cause: err, 713 } 714 } 715 } 716 717 } 718 719 if len(errors) > 0 { 720 return LogEntriesMultiError(errors) 721 } 722 723 return nil 724 } 725 726 // LogEntriesMultiError is an error wrapping multiple validation errors 727 // returned by LogEntries.ValidateAll() if the designated constraints aren't met. 728 type LogEntriesMultiError []error 729 730 // Error returns a concatenation of all the error messages it wraps. 731 func (m LogEntriesMultiError) Error() string { 732 var msgs []string 733 for _, err := range m { 734 msgs = append(msgs, err.Error()) 735 } 736 return strings.Join(msgs, "; ") 737 } 738 739 // AllErrors returns a list of validation violation errors. 740 func (m LogEntriesMultiError) AllErrors() []error { return m } 741 742 // LogEntriesValidationError is the validation error returned by 743 // LogEntries.Validate if the designated constraints aren't met. 744 type LogEntriesValidationError struct { 745 field string 746 reason string 747 cause error 748 key bool 749 } 750 751 // Field function returns field value. 752 func (e LogEntriesValidationError) Field() string { return e.field } 753 754 // Reason function returns reason value. 755 func (e LogEntriesValidationError) Reason() string { return e.reason } 756 757 // Cause function returns cause value. 758 func (e LogEntriesValidationError) Cause() error { return e.cause } 759 760 // Key function returns key value. 761 func (e LogEntriesValidationError) Key() bool { return e.key } 762 763 // ErrorName returns error name. 764 func (e LogEntriesValidationError) ErrorName() string { return "LogEntriesValidationError" } 765 766 // Error satisfies the builtin error interface 767 func (e LogEntriesValidationError) Error() string { 768 cause := "" 769 if e.cause != nil { 770 cause = fmt.Sprintf(" | caused by: %v", e.cause) 771 } 772 773 key := "" 774 if e.key { 775 key = "key for " 776 } 777 778 return fmt.Sprintf( 779 "invalid %sLogEntries.%s: %s%s", 780 key, 781 e.field, 782 e.reason, 783 cause) 784 } 785 786 var _ error = LogEntriesValidationError{} 787 788 var _ interface { 789 Field() string 790 Reason() string 791 Key() bool 792 Cause() error 793 ErrorName() string 794 } = LogEntriesValidationError{} 795 796 // Validate checks the field values on LogEntry with the rules defined in the 797 // proto definition for this message. If any rules are violated, the first 798 // error encountered is returned, or nil if there are no violations. 799 func (m *LogEntry) Validate() error { 800 return m.validate(false) 801 } 802 803 // ValidateAll checks the field values on LogEntry with the rules defined in 804 // the proto definition for this message. If any rules are violated, the 805 // result is a list of violation errors wrapped in LogEntryMultiError, or nil 806 // if none found. 807 func (m *LogEntry) ValidateAll() error { 808 return m.validate(true) 809 } 810 811 func (m *LogEntry) validate(all bool) error { 812 if m == nil { 813 return nil 814 } 815 816 var errors []error 817 818 if all { 819 switch v := interface{}(m.GetTime()).(type) { 820 case interface{ ValidateAll() error }: 821 if err := v.ValidateAll(); err != nil { 822 errors = append(errors, LogEntryValidationError{ 823 field: "Time", 824 reason: "embedded message failed validation", 825 cause: err, 826 }) 827 } 828 case interface{ Validate() error }: 829 if err := v.Validate(); err != nil { 830 errors = append(errors, LogEntryValidationError{ 831 field: "Time", 832 reason: "embedded message failed validation", 833 cause: err, 834 }) 835 } 836 } 837 } else if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok { 838 if err := v.Validate(); err != nil { 839 return LogEntryValidationError{ 840 field: "Time", 841 reason: "embedded message failed validation", 842 cause: err, 843 } 844 } 845 } 846 847 switch v := m.Kind.(type) { 848 case *LogEntry_Created_: 849 if v == nil { 850 err := LogEntryValidationError{ 851 field: "Kind", 852 reason: "oneof value cannot be a typed-nil", 853 } 854 if !all { 855 return err 856 } 857 errors = append(errors, err) 858 } 859 860 if all { 861 switch v := interface{}(m.GetCreated()).(type) { 862 case interface{ ValidateAll() error }: 863 if err := v.ValidateAll(); err != nil { 864 errors = append(errors, LogEntryValidationError{ 865 field: "Created", 866 reason: "embedded message failed validation", 867 cause: err, 868 }) 869 } 870 case interface{ Validate() error }: 871 if err := v.Validate(); err != nil { 872 errors = append(errors, LogEntryValidationError{ 873 field: "Created", 874 reason: "embedded message failed validation", 875 cause: err, 876 }) 877 } 878 } 879 } else if v, ok := interface{}(m.GetCreated()).(interface{ Validate() error }); ok { 880 if err := v.Validate(); err != nil { 881 return LogEntryValidationError{ 882 field: "Created", 883 reason: "embedded message failed validation", 884 cause: err, 885 } 886 } 887 } 888 889 case *LogEntry_Started_: 890 if v == nil { 891 err := LogEntryValidationError{ 892 field: "Kind", 893 reason: "oneof value cannot be a typed-nil", 894 } 895 if !all { 896 return err 897 } 898 errors = append(errors, err) 899 } 900 901 if all { 902 switch v := interface{}(m.GetStarted()).(type) { 903 case interface{ ValidateAll() error }: 904 if err := v.ValidateAll(); err != nil { 905 errors = append(errors, LogEntryValidationError{ 906 field: "Started", 907 reason: "embedded message failed validation", 908 cause: err, 909 }) 910 } 911 case interface{ Validate() error }: 912 if err := v.Validate(); err != nil { 913 errors = append(errors, LogEntryValidationError{ 914 field: "Started", 915 reason: "embedded message failed validation", 916 cause: err, 917 }) 918 } 919 } 920 } else if v, ok := interface{}(m.GetStarted()).(interface{ Validate() error }); ok { 921 if err := v.Validate(); err != nil { 922 return LogEntryValidationError{ 923 field: "Started", 924 reason: "embedded message failed validation", 925 cause: err, 926 } 927 } 928 } 929 930 case *LogEntry_ConfigChanged_: 931 if v == nil { 932 err := LogEntryValidationError{ 933 field: "Kind", 934 reason: "oneof value cannot be a typed-nil", 935 } 936 if !all { 937 return err 938 } 939 errors = append(errors, err) 940 } 941 942 if all { 943 switch v := interface{}(m.GetConfigChanged()).(type) { 944 case interface{ ValidateAll() error }: 945 if err := v.ValidateAll(); err != nil { 946 errors = append(errors, LogEntryValidationError{ 947 field: "ConfigChanged", 948 reason: "embedded message failed validation", 949 cause: err, 950 }) 951 } 952 case interface{ Validate() error }: 953 if err := v.Validate(); err != nil { 954 errors = append(errors, LogEntryValidationError{ 955 field: "ConfigChanged", 956 reason: "embedded message failed validation", 957 cause: err, 958 }) 959 } 960 } 961 } else if v, ok := interface{}(m.GetConfigChanged()).(interface{ Validate() error }); ok { 962 if err := v.Validate(); err != nil { 963 return LogEntryValidationError{ 964 field: "ConfigChanged", 965 reason: "embedded message failed validation", 966 cause: err, 967 } 968 } 969 } 970 971 case *LogEntry_TryjobsRequirementUpdated_: 972 if v == nil { 973 err := LogEntryValidationError{ 974 field: "Kind", 975 reason: "oneof value cannot be a typed-nil", 976 } 977 if !all { 978 return err 979 } 980 errors = append(errors, err) 981 } 982 983 if all { 984 switch v := interface{}(m.GetTryjobsRequirementUpdated()).(type) { 985 case interface{ ValidateAll() error }: 986 if err := v.ValidateAll(); err != nil { 987 errors = append(errors, LogEntryValidationError{ 988 field: "TryjobsRequirementUpdated", 989 reason: "embedded message failed validation", 990 cause: err, 991 }) 992 } 993 case interface{ Validate() error }: 994 if err := v.Validate(); err != nil { 995 errors = append(errors, LogEntryValidationError{ 996 field: "TryjobsRequirementUpdated", 997 reason: "embedded message failed validation", 998 cause: err, 999 }) 1000 } 1001 } 1002 } else if v, ok := interface{}(m.GetTryjobsRequirementUpdated()).(interface{ Validate() error }); ok { 1003 if err := v.Validate(); err != nil { 1004 return LogEntryValidationError{ 1005 field: "TryjobsRequirementUpdated", 1006 reason: "embedded message failed validation", 1007 cause: err, 1008 } 1009 } 1010 } 1011 1012 case *LogEntry_TryjobsUpdated_: 1013 if v == nil { 1014 err := LogEntryValidationError{ 1015 field: "Kind", 1016 reason: "oneof value cannot be a typed-nil", 1017 } 1018 if !all { 1019 return err 1020 } 1021 errors = append(errors, err) 1022 } 1023 1024 if all { 1025 switch v := interface{}(m.GetTryjobsUpdated()).(type) { 1026 case interface{ ValidateAll() error }: 1027 if err := v.ValidateAll(); err != nil { 1028 errors = append(errors, LogEntryValidationError{ 1029 field: "TryjobsUpdated", 1030 reason: "embedded message failed validation", 1031 cause: err, 1032 }) 1033 } 1034 case interface{ Validate() error }: 1035 if err := v.Validate(); err != nil { 1036 errors = append(errors, LogEntryValidationError{ 1037 field: "TryjobsUpdated", 1038 reason: "embedded message failed validation", 1039 cause: err, 1040 }) 1041 } 1042 } 1043 } else if v, ok := interface{}(m.GetTryjobsUpdated()).(interface{ Validate() error }); ok { 1044 if err := v.Validate(); err != nil { 1045 return LogEntryValidationError{ 1046 field: "TryjobsUpdated", 1047 reason: "embedded message failed validation", 1048 cause: err, 1049 } 1050 } 1051 } 1052 1053 case *LogEntry_Info_: 1054 if v == nil { 1055 err := LogEntryValidationError{ 1056 field: "Kind", 1057 reason: "oneof value cannot be a typed-nil", 1058 } 1059 if !all { 1060 return err 1061 } 1062 errors = append(errors, err) 1063 } 1064 1065 if all { 1066 switch v := interface{}(m.GetInfo()).(type) { 1067 case interface{ ValidateAll() error }: 1068 if err := v.ValidateAll(); err != nil { 1069 errors = append(errors, LogEntryValidationError{ 1070 field: "Info", 1071 reason: "embedded message failed validation", 1072 cause: err, 1073 }) 1074 } 1075 case interface{ Validate() error }: 1076 if err := v.Validate(); err != nil { 1077 errors = append(errors, LogEntryValidationError{ 1078 field: "Info", 1079 reason: "embedded message failed validation", 1080 cause: err, 1081 }) 1082 } 1083 } 1084 } else if v, ok := interface{}(m.GetInfo()).(interface{ Validate() error }); ok { 1085 if err := v.Validate(); err != nil { 1086 return LogEntryValidationError{ 1087 field: "Info", 1088 reason: "embedded message failed validation", 1089 cause: err, 1090 } 1091 } 1092 } 1093 1094 case *LogEntry_TreeChecked_: 1095 if v == nil { 1096 err := LogEntryValidationError{ 1097 field: "Kind", 1098 reason: "oneof value cannot be a typed-nil", 1099 } 1100 if !all { 1101 return err 1102 } 1103 errors = append(errors, err) 1104 } 1105 1106 if all { 1107 switch v := interface{}(m.GetTreeChecked()).(type) { 1108 case interface{ ValidateAll() error }: 1109 if err := v.ValidateAll(); err != nil { 1110 errors = append(errors, LogEntryValidationError{ 1111 field: "TreeChecked", 1112 reason: "embedded message failed validation", 1113 cause: err, 1114 }) 1115 } 1116 case interface{ Validate() error }: 1117 if err := v.Validate(); err != nil { 1118 errors = append(errors, LogEntryValidationError{ 1119 field: "TreeChecked", 1120 reason: "embedded message failed validation", 1121 cause: err, 1122 }) 1123 } 1124 } 1125 } else if v, ok := interface{}(m.GetTreeChecked()).(interface{ Validate() error }); ok { 1126 if err := v.Validate(); err != nil { 1127 return LogEntryValidationError{ 1128 field: "TreeChecked", 1129 reason: "embedded message failed validation", 1130 cause: err, 1131 } 1132 } 1133 } 1134 1135 case *LogEntry_Waitlisted_: 1136 if v == nil { 1137 err := LogEntryValidationError{ 1138 field: "Kind", 1139 reason: "oneof value cannot be a typed-nil", 1140 } 1141 if !all { 1142 return err 1143 } 1144 errors = append(errors, err) 1145 } 1146 1147 if all { 1148 switch v := interface{}(m.GetWaitlisted()).(type) { 1149 case interface{ ValidateAll() error }: 1150 if err := v.ValidateAll(); err != nil { 1151 errors = append(errors, LogEntryValidationError{ 1152 field: "Waitlisted", 1153 reason: "embedded message failed validation", 1154 cause: err, 1155 }) 1156 } 1157 case interface{ Validate() error }: 1158 if err := v.Validate(); err != nil { 1159 errors = append(errors, LogEntryValidationError{ 1160 field: "Waitlisted", 1161 reason: "embedded message failed validation", 1162 cause: err, 1163 }) 1164 } 1165 } 1166 } else if v, ok := interface{}(m.GetWaitlisted()).(interface{ Validate() error }); ok { 1167 if err := v.Validate(); err != nil { 1168 return LogEntryValidationError{ 1169 field: "Waitlisted", 1170 reason: "embedded message failed validation", 1171 cause: err, 1172 } 1173 } 1174 } 1175 1176 case *LogEntry_AcquiredSubmitQueue_: 1177 if v == nil { 1178 err := LogEntryValidationError{ 1179 field: "Kind", 1180 reason: "oneof value cannot be a typed-nil", 1181 } 1182 if !all { 1183 return err 1184 } 1185 errors = append(errors, err) 1186 } 1187 1188 if all { 1189 switch v := interface{}(m.GetAcquiredSubmitQueue()).(type) { 1190 case interface{ ValidateAll() error }: 1191 if err := v.ValidateAll(); err != nil { 1192 errors = append(errors, LogEntryValidationError{ 1193 field: "AcquiredSubmitQueue", 1194 reason: "embedded message failed validation", 1195 cause: err, 1196 }) 1197 } 1198 case interface{ Validate() error }: 1199 if err := v.Validate(); err != nil { 1200 errors = append(errors, LogEntryValidationError{ 1201 field: "AcquiredSubmitQueue", 1202 reason: "embedded message failed validation", 1203 cause: err, 1204 }) 1205 } 1206 } 1207 } else if v, ok := interface{}(m.GetAcquiredSubmitQueue()).(interface{ Validate() error }); ok { 1208 if err := v.Validate(); err != nil { 1209 return LogEntryValidationError{ 1210 field: "AcquiredSubmitQueue", 1211 reason: "embedded message failed validation", 1212 cause: err, 1213 } 1214 } 1215 } 1216 1217 case *LogEntry_ReleasedSubmitQueue_: 1218 if v == nil { 1219 err := LogEntryValidationError{ 1220 field: "Kind", 1221 reason: "oneof value cannot be a typed-nil", 1222 } 1223 if !all { 1224 return err 1225 } 1226 errors = append(errors, err) 1227 } 1228 1229 if all { 1230 switch v := interface{}(m.GetReleasedSubmitQueue()).(type) { 1231 case interface{ ValidateAll() error }: 1232 if err := v.ValidateAll(); err != nil { 1233 errors = append(errors, LogEntryValidationError{ 1234 field: "ReleasedSubmitQueue", 1235 reason: "embedded message failed validation", 1236 cause: err, 1237 }) 1238 } 1239 case interface{ Validate() error }: 1240 if err := v.Validate(); err != nil { 1241 errors = append(errors, LogEntryValidationError{ 1242 field: "ReleasedSubmitQueue", 1243 reason: "embedded message failed validation", 1244 cause: err, 1245 }) 1246 } 1247 } 1248 } else if v, ok := interface{}(m.GetReleasedSubmitQueue()).(interface{ Validate() error }); ok { 1249 if err := v.Validate(); err != nil { 1250 return LogEntryValidationError{ 1251 field: "ReleasedSubmitQueue", 1252 reason: "embedded message failed validation", 1253 cause: err, 1254 } 1255 } 1256 } 1257 1258 case *LogEntry_ClSubmitted: 1259 if v == nil { 1260 err := LogEntryValidationError{ 1261 field: "Kind", 1262 reason: "oneof value cannot be a typed-nil", 1263 } 1264 if !all { 1265 return err 1266 } 1267 errors = append(errors, err) 1268 } 1269 1270 if all { 1271 switch v := interface{}(m.GetClSubmitted()).(type) { 1272 case interface{ ValidateAll() error }: 1273 if err := v.ValidateAll(); err != nil { 1274 errors = append(errors, LogEntryValidationError{ 1275 field: "ClSubmitted", 1276 reason: "embedded message failed validation", 1277 cause: err, 1278 }) 1279 } 1280 case interface{ Validate() error }: 1281 if err := v.Validate(); err != nil { 1282 errors = append(errors, LogEntryValidationError{ 1283 field: "ClSubmitted", 1284 reason: "embedded message failed validation", 1285 cause: err, 1286 }) 1287 } 1288 } 1289 } else if v, ok := interface{}(m.GetClSubmitted()).(interface{ Validate() error }); ok { 1290 if err := v.Validate(); err != nil { 1291 return LogEntryValidationError{ 1292 field: "ClSubmitted", 1293 reason: "embedded message failed validation", 1294 cause: err, 1295 } 1296 } 1297 } 1298 1299 case *LogEntry_SubmissionFailure_: 1300 if v == nil { 1301 err := LogEntryValidationError{ 1302 field: "Kind", 1303 reason: "oneof value cannot be a typed-nil", 1304 } 1305 if !all { 1306 return err 1307 } 1308 errors = append(errors, err) 1309 } 1310 1311 if all { 1312 switch v := interface{}(m.GetSubmissionFailure()).(type) { 1313 case interface{ ValidateAll() error }: 1314 if err := v.ValidateAll(); err != nil { 1315 errors = append(errors, LogEntryValidationError{ 1316 field: "SubmissionFailure", 1317 reason: "embedded message failed validation", 1318 cause: err, 1319 }) 1320 } 1321 case interface{ Validate() error }: 1322 if err := v.Validate(); err != nil { 1323 errors = append(errors, LogEntryValidationError{ 1324 field: "SubmissionFailure", 1325 reason: "embedded message failed validation", 1326 cause: err, 1327 }) 1328 } 1329 } 1330 } else if v, ok := interface{}(m.GetSubmissionFailure()).(interface{ Validate() error }); ok { 1331 if err := v.Validate(); err != nil { 1332 return LogEntryValidationError{ 1333 field: "SubmissionFailure", 1334 reason: "embedded message failed validation", 1335 cause: err, 1336 } 1337 } 1338 } 1339 1340 case *LogEntry_RunEnded_: 1341 if v == nil { 1342 err := LogEntryValidationError{ 1343 field: "Kind", 1344 reason: "oneof value cannot be a typed-nil", 1345 } 1346 if !all { 1347 return err 1348 } 1349 errors = append(errors, err) 1350 } 1351 1352 if all { 1353 switch v := interface{}(m.GetRunEnded()).(type) { 1354 case interface{ ValidateAll() error }: 1355 if err := v.ValidateAll(); err != nil { 1356 errors = append(errors, LogEntryValidationError{ 1357 field: "RunEnded", 1358 reason: "embedded message failed validation", 1359 cause: err, 1360 }) 1361 } 1362 case interface{ Validate() error }: 1363 if err := v.Validate(); err != nil { 1364 errors = append(errors, LogEntryValidationError{ 1365 field: "RunEnded", 1366 reason: "embedded message failed validation", 1367 cause: err, 1368 }) 1369 } 1370 } 1371 } else if v, ok := interface{}(m.GetRunEnded()).(interface{ Validate() error }); ok { 1372 if err := v.Validate(); err != nil { 1373 return LogEntryValidationError{ 1374 field: "RunEnded", 1375 reason: "embedded message failed validation", 1376 cause: err, 1377 } 1378 } 1379 } 1380 1381 default: 1382 _ = v // ensures v is used 1383 } 1384 1385 if len(errors) > 0 { 1386 return LogEntryMultiError(errors) 1387 } 1388 1389 return nil 1390 } 1391 1392 // LogEntryMultiError is an error wrapping multiple validation errors returned 1393 // by LogEntry.ValidateAll() if the designated constraints aren't met. 1394 type LogEntryMultiError []error 1395 1396 // Error returns a concatenation of all the error messages it wraps. 1397 func (m LogEntryMultiError) Error() string { 1398 var msgs []string 1399 for _, err := range m { 1400 msgs = append(msgs, err.Error()) 1401 } 1402 return strings.Join(msgs, "; ") 1403 } 1404 1405 // AllErrors returns a list of validation violation errors. 1406 func (m LogEntryMultiError) AllErrors() []error { return m } 1407 1408 // LogEntryValidationError is the validation error returned by 1409 // LogEntry.Validate if the designated constraints aren't met. 1410 type LogEntryValidationError struct { 1411 field string 1412 reason string 1413 cause error 1414 key bool 1415 } 1416 1417 // Field function returns field value. 1418 func (e LogEntryValidationError) Field() string { return e.field } 1419 1420 // Reason function returns reason value. 1421 func (e LogEntryValidationError) Reason() string { return e.reason } 1422 1423 // Cause function returns cause value. 1424 func (e LogEntryValidationError) Cause() error { return e.cause } 1425 1426 // Key function returns key value. 1427 func (e LogEntryValidationError) Key() bool { return e.key } 1428 1429 // ErrorName returns error name. 1430 func (e LogEntryValidationError) ErrorName() string { return "LogEntryValidationError" } 1431 1432 // Error satisfies the builtin error interface 1433 func (e LogEntryValidationError) Error() string { 1434 cause := "" 1435 if e.cause != nil { 1436 cause = fmt.Sprintf(" | caused by: %v", e.cause) 1437 } 1438 1439 key := "" 1440 if e.key { 1441 key = "key for " 1442 } 1443 1444 return fmt.Sprintf( 1445 "invalid %sLogEntry.%s: %s%s", 1446 key, 1447 e.field, 1448 e.reason, 1449 cause) 1450 } 1451 1452 var _ error = LogEntryValidationError{} 1453 1454 var _ interface { 1455 Field() string 1456 Reason() string 1457 Key() bool 1458 Cause() error 1459 ErrorName() string 1460 } = LogEntryValidationError{} 1461 1462 // Validate checks the field values on Tryjobs with the rules defined in the 1463 // proto definition for this message. If any rules are violated, the first 1464 // error encountered is returned, or nil if there are no violations. 1465 func (m *Tryjobs) Validate() error { 1466 return m.validate(false) 1467 } 1468 1469 // ValidateAll checks the field values on Tryjobs with the rules defined in the 1470 // proto definition for this message. If any rules are violated, the result is 1471 // a list of violation errors wrapped in TryjobsMultiError, or nil if none found. 1472 func (m *Tryjobs) ValidateAll() error { 1473 return m.validate(true) 1474 } 1475 1476 func (m *Tryjobs) validate(all bool) error { 1477 if m == nil { 1478 return nil 1479 } 1480 1481 var errors []error 1482 1483 if all { 1484 switch v := interface{}(m.GetRequirement()).(type) { 1485 case interface{ ValidateAll() error }: 1486 if err := v.ValidateAll(); err != nil { 1487 errors = append(errors, TryjobsValidationError{ 1488 field: "Requirement", 1489 reason: "embedded message failed validation", 1490 cause: err, 1491 }) 1492 } 1493 case interface{ Validate() error }: 1494 if err := v.Validate(); err != nil { 1495 errors = append(errors, TryjobsValidationError{ 1496 field: "Requirement", 1497 reason: "embedded message failed validation", 1498 cause: err, 1499 }) 1500 } 1501 } 1502 } else if v, ok := interface{}(m.GetRequirement()).(interface{ Validate() error }); ok { 1503 if err := v.Validate(); err != nil { 1504 return TryjobsValidationError{ 1505 field: "Requirement", 1506 reason: "embedded message failed validation", 1507 cause: err, 1508 } 1509 } 1510 } 1511 1512 if all { 1513 switch v := interface{}(m.GetStagingRequirement()).(type) { 1514 case interface{ ValidateAll() error }: 1515 if err := v.ValidateAll(); err != nil { 1516 errors = append(errors, TryjobsValidationError{ 1517 field: "StagingRequirement", 1518 reason: "embedded message failed validation", 1519 cause: err, 1520 }) 1521 } 1522 case interface{ Validate() error }: 1523 if err := v.Validate(); err != nil { 1524 errors = append(errors, TryjobsValidationError{ 1525 field: "StagingRequirement", 1526 reason: "embedded message failed validation", 1527 cause: err, 1528 }) 1529 } 1530 } 1531 } else if v, ok := interface{}(m.GetStagingRequirement()).(interface{ Validate() error }); ok { 1532 if err := v.Validate(); err != nil { 1533 return TryjobsValidationError{ 1534 field: "StagingRequirement", 1535 reason: "embedded message failed validation", 1536 cause: err, 1537 } 1538 } 1539 } 1540 1541 // no validation rules for RequirementVersion 1542 1543 if all { 1544 switch v := interface{}(m.GetRequirementComputedAt()).(type) { 1545 case interface{ ValidateAll() error }: 1546 if err := v.ValidateAll(); err != nil { 1547 errors = append(errors, TryjobsValidationError{ 1548 field: "RequirementComputedAt", 1549 reason: "embedded message failed validation", 1550 cause: err, 1551 }) 1552 } 1553 case interface{ Validate() error }: 1554 if err := v.Validate(); err != nil { 1555 errors = append(errors, TryjobsValidationError{ 1556 field: "RequirementComputedAt", 1557 reason: "embedded message failed validation", 1558 cause: err, 1559 }) 1560 } 1561 } 1562 } else if v, ok := interface{}(m.GetRequirementComputedAt()).(interface{ Validate() error }); ok { 1563 if err := v.Validate(); err != nil { 1564 return TryjobsValidationError{ 1565 field: "RequirementComputedAt", 1566 reason: "embedded message failed validation", 1567 cause: err, 1568 } 1569 } 1570 } 1571 1572 for idx, item := range m.GetTryjobs() { 1573 _, _ = idx, item 1574 1575 if all { 1576 switch v := interface{}(item).(type) { 1577 case interface{ ValidateAll() error }: 1578 if err := v.ValidateAll(); err != nil { 1579 errors = append(errors, TryjobsValidationError{ 1580 field: fmt.Sprintf("Tryjobs[%v]", idx), 1581 reason: "embedded message failed validation", 1582 cause: err, 1583 }) 1584 } 1585 case interface{ Validate() error }: 1586 if err := v.Validate(); err != nil { 1587 errors = append(errors, TryjobsValidationError{ 1588 field: fmt.Sprintf("Tryjobs[%v]", idx), 1589 reason: "embedded message failed validation", 1590 cause: err, 1591 }) 1592 } 1593 } 1594 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { 1595 if err := v.Validate(); err != nil { 1596 return TryjobsValidationError{ 1597 field: fmt.Sprintf("Tryjobs[%v]", idx), 1598 reason: "embedded message failed validation", 1599 cause: err, 1600 } 1601 } 1602 } 1603 1604 } 1605 1606 if all { 1607 switch v := interface{}(m.GetCqdUpdateTime()).(type) { 1608 case interface{ ValidateAll() error }: 1609 if err := v.ValidateAll(); err != nil { 1610 errors = append(errors, TryjobsValidationError{ 1611 field: "CqdUpdateTime", 1612 reason: "embedded message failed validation", 1613 cause: err, 1614 }) 1615 } 1616 case interface{ Validate() error }: 1617 if err := v.Validate(); err != nil { 1618 errors = append(errors, TryjobsValidationError{ 1619 field: "CqdUpdateTime", 1620 reason: "embedded message failed validation", 1621 cause: err, 1622 }) 1623 } 1624 } 1625 } else if v, ok := interface{}(m.GetCqdUpdateTime()).(interface{ Validate() error }); ok { 1626 if err := v.Validate(); err != nil { 1627 return TryjobsValidationError{ 1628 field: "CqdUpdateTime", 1629 reason: "embedded message failed validation", 1630 cause: err, 1631 } 1632 } 1633 } 1634 1635 if all { 1636 switch v := interface{}(m.GetState()).(type) { 1637 case interface{ ValidateAll() error }: 1638 if err := v.ValidateAll(); err != nil { 1639 errors = append(errors, TryjobsValidationError{ 1640 field: "State", 1641 reason: "embedded message failed validation", 1642 cause: err, 1643 }) 1644 } 1645 case interface{ Validate() error }: 1646 if err := v.Validate(); err != nil { 1647 errors = append(errors, TryjobsValidationError{ 1648 field: "State", 1649 reason: "embedded message failed validation", 1650 cause: err, 1651 }) 1652 } 1653 } 1654 } else if v, ok := interface{}(m.GetState()).(interface{ Validate() error }); ok { 1655 if err := v.Validate(); err != nil { 1656 return TryjobsValidationError{ 1657 field: "State", 1658 reason: "embedded message failed validation", 1659 cause: err, 1660 } 1661 } 1662 } 1663 1664 if len(errors) > 0 { 1665 return TryjobsMultiError(errors) 1666 } 1667 1668 return nil 1669 } 1670 1671 // TryjobsMultiError is an error wrapping multiple validation errors returned 1672 // by Tryjobs.ValidateAll() if the designated constraints aren't met. 1673 type TryjobsMultiError []error 1674 1675 // Error returns a concatenation of all the error messages it wraps. 1676 func (m TryjobsMultiError) Error() string { 1677 var msgs []string 1678 for _, err := range m { 1679 msgs = append(msgs, err.Error()) 1680 } 1681 return strings.Join(msgs, "; ") 1682 } 1683 1684 // AllErrors returns a list of validation violation errors. 1685 func (m TryjobsMultiError) AllErrors() []error { return m } 1686 1687 // TryjobsValidationError is the validation error returned by Tryjobs.Validate 1688 // if the designated constraints aren't met. 1689 type TryjobsValidationError struct { 1690 field string 1691 reason string 1692 cause error 1693 key bool 1694 } 1695 1696 // Field function returns field value. 1697 func (e TryjobsValidationError) Field() string { return e.field } 1698 1699 // Reason function returns reason value. 1700 func (e TryjobsValidationError) Reason() string { return e.reason } 1701 1702 // Cause function returns cause value. 1703 func (e TryjobsValidationError) Cause() error { return e.cause } 1704 1705 // Key function returns key value. 1706 func (e TryjobsValidationError) Key() bool { return e.key } 1707 1708 // ErrorName returns error name. 1709 func (e TryjobsValidationError) ErrorName() string { return "TryjobsValidationError" } 1710 1711 // Error satisfies the builtin error interface 1712 func (e TryjobsValidationError) Error() string { 1713 cause := "" 1714 if e.cause != nil { 1715 cause = fmt.Sprintf(" | caused by: %v", e.cause) 1716 } 1717 1718 key := "" 1719 if e.key { 1720 key = "key for " 1721 } 1722 1723 return fmt.Sprintf( 1724 "invalid %sTryjobs.%s: %s%s", 1725 key, 1726 e.field, 1727 e.reason, 1728 cause) 1729 } 1730 1731 var _ error = TryjobsValidationError{} 1732 1733 var _ interface { 1734 Field() string 1735 Reason() string 1736 Key() bool 1737 Cause() error 1738 ErrorName() string 1739 } = TryjobsValidationError{} 1740 1741 // Validate checks the field values on Tryjob with the rules defined in the 1742 // proto definition for this message. If any rules are violated, the first 1743 // error encountered is returned, or nil if there are no violations. 1744 func (m *Tryjob) Validate() error { 1745 return m.validate(false) 1746 } 1747 1748 // ValidateAll checks the field values on Tryjob with the rules defined in the 1749 // proto definition for this message. If any rules are violated, the result is 1750 // a list of violation errors wrapped in TryjobMultiError, or nil if none found. 1751 func (m *Tryjob) ValidateAll() error { 1752 return m.validate(true) 1753 } 1754 1755 func (m *Tryjob) validate(all bool) error { 1756 if m == nil { 1757 return nil 1758 } 1759 1760 var errors []error 1761 1762 if all { 1763 switch v := interface{}(m.GetDefinition()).(type) { 1764 case interface{ ValidateAll() error }: 1765 if err := v.ValidateAll(); err != nil { 1766 errors = append(errors, TryjobValidationError{ 1767 field: "Definition", 1768 reason: "embedded message failed validation", 1769 cause: err, 1770 }) 1771 } 1772 case interface{ Validate() error }: 1773 if err := v.Validate(); err != nil { 1774 errors = append(errors, TryjobValidationError{ 1775 field: "Definition", 1776 reason: "embedded message failed validation", 1777 cause: err, 1778 }) 1779 } 1780 } 1781 } else if v, ok := interface{}(m.GetDefinition()).(interface{ Validate() error }); ok { 1782 if err := v.Validate(); err != nil { 1783 return TryjobValidationError{ 1784 field: "Definition", 1785 reason: "embedded message failed validation", 1786 cause: err, 1787 } 1788 } 1789 } 1790 1791 // no validation rules for Id 1792 1793 // no validation rules for Eversion 1794 1795 // no validation rules for ExternalId 1796 1797 // no validation rules for Status 1798 1799 // no validation rules for Reused 1800 1801 // no validation rules for Critical 1802 1803 if all { 1804 switch v := interface{}(m.GetResult()).(type) { 1805 case interface{ ValidateAll() error }: 1806 if err := v.ValidateAll(); err != nil { 1807 errors = append(errors, TryjobValidationError{ 1808 field: "Result", 1809 reason: "embedded message failed validation", 1810 cause: err, 1811 }) 1812 } 1813 case interface{ Validate() error }: 1814 if err := v.Validate(); err != nil { 1815 errors = append(errors, TryjobValidationError{ 1816 field: "Result", 1817 reason: "embedded message failed validation", 1818 cause: err, 1819 }) 1820 } 1821 } 1822 } else if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { 1823 if err := v.Validate(); err != nil { 1824 return TryjobValidationError{ 1825 field: "Result", 1826 reason: "embedded message failed validation", 1827 cause: err, 1828 } 1829 } 1830 } 1831 1832 // no validation rules for CqdDerived 1833 1834 if len(errors) > 0 { 1835 return TryjobMultiError(errors) 1836 } 1837 1838 return nil 1839 } 1840 1841 // TryjobMultiError is an error wrapping multiple validation errors returned by 1842 // Tryjob.ValidateAll() if the designated constraints aren't met. 1843 type TryjobMultiError []error 1844 1845 // Error returns a concatenation of all the error messages it wraps. 1846 func (m TryjobMultiError) Error() string { 1847 var msgs []string 1848 for _, err := range m { 1849 msgs = append(msgs, err.Error()) 1850 } 1851 return strings.Join(msgs, "; ") 1852 } 1853 1854 // AllErrors returns a list of validation violation errors. 1855 func (m TryjobMultiError) AllErrors() []error { return m } 1856 1857 // TryjobValidationError is the validation error returned by Tryjob.Validate if 1858 // the designated constraints aren't met. 1859 type TryjobValidationError struct { 1860 field string 1861 reason string 1862 cause error 1863 key bool 1864 } 1865 1866 // Field function returns field value. 1867 func (e TryjobValidationError) Field() string { return e.field } 1868 1869 // Reason function returns reason value. 1870 func (e TryjobValidationError) Reason() string { return e.reason } 1871 1872 // Cause function returns cause value. 1873 func (e TryjobValidationError) Cause() error { return e.cause } 1874 1875 // Key function returns key value. 1876 func (e TryjobValidationError) Key() bool { return e.key } 1877 1878 // ErrorName returns error name. 1879 func (e TryjobValidationError) ErrorName() string { return "TryjobValidationError" } 1880 1881 // Error satisfies the builtin error interface 1882 func (e TryjobValidationError) Error() string { 1883 cause := "" 1884 if e.cause != nil { 1885 cause = fmt.Sprintf(" | caused by: %v", e.cause) 1886 } 1887 1888 key := "" 1889 if e.key { 1890 key = "key for " 1891 } 1892 1893 return fmt.Sprintf( 1894 "invalid %sTryjob.%s: %s%s", 1895 key, 1896 e.field, 1897 e.reason, 1898 cause) 1899 } 1900 1901 var _ error = TryjobValidationError{} 1902 1903 var _ interface { 1904 Field() string 1905 Reason() string 1906 Key() bool 1907 Cause() error 1908 ErrorName() string 1909 } = TryjobValidationError{} 1910 1911 // Validate checks the field values on OngoingLongOps with the rules defined in 1912 // the proto definition for this message. If any rules are violated, the first 1913 // error encountered is returned, or nil if there are no violations. 1914 func (m *OngoingLongOps) Validate() error { 1915 return m.validate(false) 1916 } 1917 1918 // ValidateAll checks the field values on OngoingLongOps with the rules defined 1919 // in the proto definition for this message. If any rules are violated, the 1920 // result is a list of violation errors wrapped in OngoingLongOpsMultiError, 1921 // or nil if none found. 1922 func (m *OngoingLongOps) ValidateAll() error { 1923 return m.validate(true) 1924 } 1925 1926 func (m *OngoingLongOps) validate(all bool) error { 1927 if m == nil { 1928 return nil 1929 } 1930 1931 var errors []error 1932 1933 { 1934 sorted_keys := make([]string, len(m.GetOps())) 1935 i := 0 1936 for key := range m.GetOps() { 1937 sorted_keys[i] = key 1938 i++ 1939 } 1940 sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) 1941 for _, key := range sorted_keys { 1942 val := m.GetOps()[key] 1943 _ = val 1944 1945 // no validation rules for Ops[key] 1946 1947 if all { 1948 switch v := interface{}(val).(type) { 1949 case interface{ ValidateAll() error }: 1950 if err := v.ValidateAll(); err != nil { 1951 errors = append(errors, OngoingLongOpsValidationError{ 1952 field: fmt.Sprintf("Ops[%v]", key), 1953 reason: "embedded message failed validation", 1954 cause: err, 1955 }) 1956 } 1957 case interface{ Validate() error }: 1958 if err := v.Validate(); err != nil { 1959 errors = append(errors, OngoingLongOpsValidationError{ 1960 field: fmt.Sprintf("Ops[%v]", key), 1961 reason: "embedded message failed validation", 1962 cause: err, 1963 }) 1964 } 1965 } 1966 } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { 1967 if err := v.Validate(); err != nil { 1968 return OngoingLongOpsValidationError{ 1969 field: fmt.Sprintf("Ops[%v]", key), 1970 reason: "embedded message failed validation", 1971 cause: err, 1972 } 1973 } 1974 } 1975 1976 } 1977 } 1978 1979 if len(errors) > 0 { 1980 return OngoingLongOpsMultiError(errors) 1981 } 1982 1983 return nil 1984 } 1985 1986 // OngoingLongOpsMultiError is an error wrapping multiple validation errors 1987 // returned by OngoingLongOps.ValidateAll() if the designated constraints 1988 // aren't met. 1989 type OngoingLongOpsMultiError []error 1990 1991 // Error returns a concatenation of all the error messages it wraps. 1992 func (m OngoingLongOpsMultiError) Error() string { 1993 var msgs []string 1994 for _, err := range m { 1995 msgs = append(msgs, err.Error()) 1996 } 1997 return strings.Join(msgs, "; ") 1998 } 1999 2000 // AllErrors returns a list of validation violation errors. 2001 func (m OngoingLongOpsMultiError) AllErrors() []error { return m } 2002 2003 // OngoingLongOpsValidationError is the validation error returned by 2004 // OngoingLongOps.Validate if the designated constraints aren't met. 2005 type OngoingLongOpsValidationError struct { 2006 field string 2007 reason string 2008 cause error 2009 key bool 2010 } 2011 2012 // Field function returns field value. 2013 func (e OngoingLongOpsValidationError) Field() string { return e.field } 2014 2015 // Reason function returns reason value. 2016 func (e OngoingLongOpsValidationError) Reason() string { return e.reason } 2017 2018 // Cause function returns cause value. 2019 func (e OngoingLongOpsValidationError) Cause() error { return e.cause } 2020 2021 // Key function returns key value. 2022 func (e OngoingLongOpsValidationError) Key() bool { return e.key } 2023 2024 // ErrorName returns error name. 2025 func (e OngoingLongOpsValidationError) ErrorName() string { return "OngoingLongOpsValidationError" } 2026 2027 // Error satisfies the builtin error interface 2028 func (e OngoingLongOpsValidationError) Error() string { 2029 cause := "" 2030 if e.cause != nil { 2031 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2032 } 2033 2034 key := "" 2035 if e.key { 2036 key = "key for " 2037 } 2038 2039 return fmt.Sprintf( 2040 "invalid %sOngoingLongOps.%s: %s%s", 2041 key, 2042 e.field, 2043 e.reason, 2044 cause) 2045 } 2046 2047 var _ error = OngoingLongOpsValidationError{} 2048 2049 var _ interface { 2050 Field() string 2051 Reason() string 2052 Key() bool 2053 Cause() error 2054 ErrorName() string 2055 } = OngoingLongOpsValidationError{} 2056 2057 // Validate checks the field values on LogEntry_Created with the rules defined 2058 // in the proto definition for this message. If any rules are violated, the 2059 // first error encountered is returned, or nil if there are no violations. 2060 func (m *LogEntry_Created) Validate() error { 2061 return m.validate(false) 2062 } 2063 2064 // ValidateAll checks the field values on LogEntry_Created with the rules 2065 // defined in the proto definition for this message. If any rules are 2066 // violated, the result is a list of violation errors wrapped in 2067 // LogEntry_CreatedMultiError, or nil if none found. 2068 func (m *LogEntry_Created) ValidateAll() error { 2069 return m.validate(true) 2070 } 2071 2072 func (m *LogEntry_Created) validate(all bool) error { 2073 if m == nil { 2074 return nil 2075 } 2076 2077 var errors []error 2078 2079 // no validation rules for ConfigGroupId 2080 2081 if len(errors) > 0 { 2082 return LogEntry_CreatedMultiError(errors) 2083 } 2084 2085 return nil 2086 } 2087 2088 // LogEntry_CreatedMultiError is an error wrapping multiple validation errors 2089 // returned by LogEntry_Created.ValidateAll() if the designated constraints 2090 // aren't met. 2091 type LogEntry_CreatedMultiError []error 2092 2093 // Error returns a concatenation of all the error messages it wraps. 2094 func (m LogEntry_CreatedMultiError) Error() string { 2095 var msgs []string 2096 for _, err := range m { 2097 msgs = append(msgs, err.Error()) 2098 } 2099 return strings.Join(msgs, "; ") 2100 } 2101 2102 // AllErrors returns a list of validation violation errors. 2103 func (m LogEntry_CreatedMultiError) AllErrors() []error { return m } 2104 2105 // LogEntry_CreatedValidationError is the validation error returned by 2106 // LogEntry_Created.Validate if the designated constraints aren't met. 2107 type LogEntry_CreatedValidationError struct { 2108 field string 2109 reason string 2110 cause error 2111 key bool 2112 } 2113 2114 // Field function returns field value. 2115 func (e LogEntry_CreatedValidationError) Field() string { return e.field } 2116 2117 // Reason function returns reason value. 2118 func (e LogEntry_CreatedValidationError) Reason() string { return e.reason } 2119 2120 // Cause function returns cause value. 2121 func (e LogEntry_CreatedValidationError) Cause() error { return e.cause } 2122 2123 // Key function returns key value. 2124 func (e LogEntry_CreatedValidationError) Key() bool { return e.key } 2125 2126 // ErrorName returns error name. 2127 func (e LogEntry_CreatedValidationError) ErrorName() string { return "LogEntry_CreatedValidationError" } 2128 2129 // Error satisfies the builtin error interface 2130 func (e LogEntry_CreatedValidationError) Error() string { 2131 cause := "" 2132 if e.cause != nil { 2133 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2134 } 2135 2136 key := "" 2137 if e.key { 2138 key = "key for " 2139 } 2140 2141 return fmt.Sprintf( 2142 "invalid %sLogEntry_Created.%s: %s%s", 2143 key, 2144 e.field, 2145 e.reason, 2146 cause) 2147 } 2148 2149 var _ error = LogEntry_CreatedValidationError{} 2150 2151 var _ interface { 2152 Field() string 2153 Reason() string 2154 Key() bool 2155 Cause() error 2156 ErrorName() string 2157 } = LogEntry_CreatedValidationError{} 2158 2159 // Validate checks the field values on LogEntry_Started with the rules defined 2160 // in the proto definition for this message. If any rules are violated, the 2161 // first error encountered is returned, or nil if there are no violations. 2162 func (m *LogEntry_Started) Validate() error { 2163 return m.validate(false) 2164 } 2165 2166 // ValidateAll checks the field values on LogEntry_Started with the rules 2167 // defined in the proto definition for this message. If any rules are 2168 // violated, the result is a list of violation errors wrapped in 2169 // LogEntry_StartedMultiError, or nil if none found. 2170 func (m *LogEntry_Started) ValidateAll() error { 2171 return m.validate(true) 2172 } 2173 2174 func (m *LogEntry_Started) validate(all bool) error { 2175 if m == nil { 2176 return nil 2177 } 2178 2179 var errors []error 2180 2181 if len(errors) > 0 { 2182 return LogEntry_StartedMultiError(errors) 2183 } 2184 2185 return nil 2186 } 2187 2188 // LogEntry_StartedMultiError is an error wrapping multiple validation errors 2189 // returned by LogEntry_Started.ValidateAll() if the designated constraints 2190 // aren't met. 2191 type LogEntry_StartedMultiError []error 2192 2193 // Error returns a concatenation of all the error messages it wraps. 2194 func (m LogEntry_StartedMultiError) Error() string { 2195 var msgs []string 2196 for _, err := range m { 2197 msgs = append(msgs, err.Error()) 2198 } 2199 return strings.Join(msgs, "; ") 2200 } 2201 2202 // AllErrors returns a list of validation violation errors. 2203 func (m LogEntry_StartedMultiError) AllErrors() []error { return m } 2204 2205 // LogEntry_StartedValidationError is the validation error returned by 2206 // LogEntry_Started.Validate if the designated constraints aren't met. 2207 type LogEntry_StartedValidationError struct { 2208 field string 2209 reason string 2210 cause error 2211 key bool 2212 } 2213 2214 // Field function returns field value. 2215 func (e LogEntry_StartedValidationError) Field() string { return e.field } 2216 2217 // Reason function returns reason value. 2218 func (e LogEntry_StartedValidationError) Reason() string { return e.reason } 2219 2220 // Cause function returns cause value. 2221 func (e LogEntry_StartedValidationError) Cause() error { return e.cause } 2222 2223 // Key function returns key value. 2224 func (e LogEntry_StartedValidationError) Key() bool { return e.key } 2225 2226 // ErrorName returns error name. 2227 func (e LogEntry_StartedValidationError) ErrorName() string { return "LogEntry_StartedValidationError" } 2228 2229 // Error satisfies the builtin error interface 2230 func (e LogEntry_StartedValidationError) Error() string { 2231 cause := "" 2232 if e.cause != nil { 2233 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2234 } 2235 2236 key := "" 2237 if e.key { 2238 key = "key for " 2239 } 2240 2241 return fmt.Sprintf( 2242 "invalid %sLogEntry_Started.%s: %s%s", 2243 key, 2244 e.field, 2245 e.reason, 2246 cause) 2247 } 2248 2249 var _ error = LogEntry_StartedValidationError{} 2250 2251 var _ interface { 2252 Field() string 2253 Reason() string 2254 Key() bool 2255 Cause() error 2256 ErrorName() string 2257 } = LogEntry_StartedValidationError{} 2258 2259 // Validate checks the field values on LogEntry_ConfigChanged with the rules 2260 // defined in the proto definition for this message. If any rules are 2261 // violated, the first error encountered is returned, or nil if there are no violations. 2262 func (m *LogEntry_ConfigChanged) Validate() error { 2263 return m.validate(false) 2264 } 2265 2266 // ValidateAll checks the field values on LogEntry_ConfigChanged with the rules 2267 // defined in the proto definition for this message. If any rules are 2268 // violated, the result is a list of violation errors wrapped in 2269 // LogEntry_ConfigChangedMultiError, or nil if none found. 2270 func (m *LogEntry_ConfigChanged) ValidateAll() error { 2271 return m.validate(true) 2272 } 2273 2274 func (m *LogEntry_ConfigChanged) validate(all bool) error { 2275 if m == nil { 2276 return nil 2277 } 2278 2279 var errors []error 2280 2281 // no validation rules for ConfigGroupId 2282 2283 if len(errors) > 0 { 2284 return LogEntry_ConfigChangedMultiError(errors) 2285 } 2286 2287 return nil 2288 } 2289 2290 // LogEntry_ConfigChangedMultiError is an error wrapping multiple validation 2291 // errors returned by LogEntry_ConfigChanged.ValidateAll() if the designated 2292 // constraints aren't met. 2293 type LogEntry_ConfigChangedMultiError []error 2294 2295 // Error returns a concatenation of all the error messages it wraps. 2296 func (m LogEntry_ConfigChangedMultiError) Error() string { 2297 var msgs []string 2298 for _, err := range m { 2299 msgs = append(msgs, err.Error()) 2300 } 2301 return strings.Join(msgs, "; ") 2302 } 2303 2304 // AllErrors returns a list of validation violation errors. 2305 func (m LogEntry_ConfigChangedMultiError) AllErrors() []error { return m } 2306 2307 // LogEntry_ConfigChangedValidationError is the validation error returned by 2308 // LogEntry_ConfigChanged.Validate if the designated constraints aren't met. 2309 type LogEntry_ConfigChangedValidationError struct { 2310 field string 2311 reason string 2312 cause error 2313 key bool 2314 } 2315 2316 // Field function returns field value. 2317 func (e LogEntry_ConfigChangedValidationError) Field() string { return e.field } 2318 2319 // Reason function returns reason value. 2320 func (e LogEntry_ConfigChangedValidationError) Reason() string { return e.reason } 2321 2322 // Cause function returns cause value. 2323 func (e LogEntry_ConfigChangedValidationError) Cause() error { return e.cause } 2324 2325 // Key function returns key value. 2326 func (e LogEntry_ConfigChangedValidationError) Key() bool { return e.key } 2327 2328 // ErrorName returns error name. 2329 func (e LogEntry_ConfigChangedValidationError) ErrorName() string { 2330 return "LogEntry_ConfigChangedValidationError" 2331 } 2332 2333 // Error satisfies the builtin error interface 2334 func (e LogEntry_ConfigChangedValidationError) Error() string { 2335 cause := "" 2336 if e.cause != nil { 2337 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2338 } 2339 2340 key := "" 2341 if e.key { 2342 key = "key for " 2343 } 2344 2345 return fmt.Sprintf( 2346 "invalid %sLogEntry_ConfigChanged.%s: %s%s", 2347 key, 2348 e.field, 2349 e.reason, 2350 cause) 2351 } 2352 2353 var _ error = LogEntry_ConfigChangedValidationError{} 2354 2355 var _ interface { 2356 Field() string 2357 Reason() string 2358 Key() bool 2359 Cause() error 2360 ErrorName() string 2361 } = LogEntry_ConfigChangedValidationError{} 2362 2363 // Validate checks the field values on LogEntry_TryjobsRequirementUpdated with 2364 // the rules defined in the proto definition for this message. If any rules 2365 // are violated, the first error encountered is returned, or nil if there are 2366 // no violations. 2367 func (m *LogEntry_TryjobsRequirementUpdated) Validate() error { 2368 return m.validate(false) 2369 } 2370 2371 // ValidateAll checks the field values on LogEntry_TryjobsRequirementUpdated 2372 // with the rules defined in the proto definition for this message. If any 2373 // rules are violated, the result is a list of violation errors wrapped in 2374 // LogEntry_TryjobsRequirementUpdatedMultiError, or nil if none found. 2375 func (m *LogEntry_TryjobsRequirementUpdated) ValidateAll() error { 2376 return m.validate(true) 2377 } 2378 2379 func (m *LogEntry_TryjobsRequirementUpdated) validate(all bool) error { 2380 if m == nil { 2381 return nil 2382 } 2383 2384 var errors []error 2385 2386 if len(errors) > 0 { 2387 return LogEntry_TryjobsRequirementUpdatedMultiError(errors) 2388 } 2389 2390 return nil 2391 } 2392 2393 // LogEntry_TryjobsRequirementUpdatedMultiError is an error wrapping multiple 2394 // validation errors returned by 2395 // LogEntry_TryjobsRequirementUpdated.ValidateAll() if the designated 2396 // constraints aren't met. 2397 type LogEntry_TryjobsRequirementUpdatedMultiError []error 2398 2399 // Error returns a concatenation of all the error messages it wraps. 2400 func (m LogEntry_TryjobsRequirementUpdatedMultiError) Error() string { 2401 var msgs []string 2402 for _, err := range m { 2403 msgs = append(msgs, err.Error()) 2404 } 2405 return strings.Join(msgs, "; ") 2406 } 2407 2408 // AllErrors returns a list of validation violation errors. 2409 func (m LogEntry_TryjobsRequirementUpdatedMultiError) AllErrors() []error { return m } 2410 2411 // LogEntry_TryjobsRequirementUpdatedValidationError is the validation error 2412 // returned by LogEntry_TryjobsRequirementUpdated.Validate if the designated 2413 // constraints aren't met. 2414 type LogEntry_TryjobsRequirementUpdatedValidationError struct { 2415 field string 2416 reason string 2417 cause error 2418 key bool 2419 } 2420 2421 // Field function returns field value. 2422 func (e LogEntry_TryjobsRequirementUpdatedValidationError) Field() string { return e.field } 2423 2424 // Reason function returns reason value. 2425 func (e LogEntry_TryjobsRequirementUpdatedValidationError) Reason() string { return e.reason } 2426 2427 // Cause function returns cause value. 2428 func (e LogEntry_TryjobsRequirementUpdatedValidationError) Cause() error { return e.cause } 2429 2430 // Key function returns key value. 2431 func (e LogEntry_TryjobsRequirementUpdatedValidationError) Key() bool { return e.key } 2432 2433 // ErrorName returns error name. 2434 func (e LogEntry_TryjobsRequirementUpdatedValidationError) ErrorName() string { 2435 return "LogEntry_TryjobsRequirementUpdatedValidationError" 2436 } 2437 2438 // Error satisfies the builtin error interface 2439 func (e LogEntry_TryjobsRequirementUpdatedValidationError) Error() string { 2440 cause := "" 2441 if e.cause != nil { 2442 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2443 } 2444 2445 key := "" 2446 if e.key { 2447 key = "key for " 2448 } 2449 2450 return fmt.Sprintf( 2451 "invalid %sLogEntry_TryjobsRequirementUpdated.%s: %s%s", 2452 key, 2453 e.field, 2454 e.reason, 2455 cause) 2456 } 2457 2458 var _ error = LogEntry_TryjobsRequirementUpdatedValidationError{} 2459 2460 var _ interface { 2461 Field() string 2462 Reason() string 2463 Key() bool 2464 Cause() error 2465 ErrorName() string 2466 } = LogEntry_TryjobsRequirementUpdatedValidationError{} 2467 2468 // Validate checks the field values on LogEntry_Info with the rules defined in 2469 // the proto definition for this message. If any rules are violated, the first 2470 // error encountered is returned, or nil if there are no violations. 2471 func (m *LogEntry_Info) Validate() error { 2472 return m.validate(false) 2473 } 2474 2475 // ValidateAll checks the field values on LogEntry_Info with the rules defined 2476 // in the proto definition for this message. If any rules are violated, the 2477 // result is a list of violation errors wrapped in LogEntry_InfoMultiError, or 2478 // nil if none found. 2479 func (m *LogEntry_Info) ValidateAll() error { 2480 return m.validate(true) 2481 } 2482 2483 func (m *LogEntry_Info) validate(all bool) error { 2484 if m == nil { 2485 return nil 2486 } 2487 2488 var errors []error 2489 2490 // no validation rules for Label 2491 2492 // no validation rules for Message 2493 2494 if len(errors) > 0 { 2495 return LogEntry_InfoMultiError(errors) 2496 } 2497 2498 return nil 2499 } 2500 2501 // LogEntry_InfoMultiError is an error wrapping multiple validation errors 2502 // returned by LogEntry_Info.ValidateAll() if the designated constraints 2503 // aren't met. 2504 type LogEntry_InfoMultiError []error 2505 2506 // Error returns a concatenation of all the error messages it wraps. 2507 func (m LogEntry_InfoMultiError) Error() string { 2508 var msgs []string 2509 for _, err := range m { 2510 msgs = append(msgs, err.Error()) 2511 } 2512 return strings.Join(msgs, "; ") 2513 } 2514 2515 // AllErrors returns a list of validation violation errors. 2516 func (m LogEntry_InfoMultiError) AllErrors() []error { return m } 2517 2518 // LogEntry_InfoValidationError is the validation error returned by 2519 // LogEntry_Info.Validate if the designated constraints aren't met. 2520 type LogEntry_InfoValidationError struct { 2521 field string 2522 reason string 2523 cause error 2524 key bool 2525 } 2526 2527 // Field function returns field value. 2528 func (e LogEntry_InfoValidationError) Field() string { return e.field } 2529 2530 // Reason function returns reason value. 2531 func (e LogEntry_InfoValidationError) Reason() string { return e.reason } 2532 2533 // Cause function returns cause value. 2534 func (e LogEntry_InfoValidationError) Cause() error { return e.cause } 2535 2536 // Key function returns key value. 2537 func (e LogEntry_InfoValidationError) Key() bool { return e.key } 2538 2539 // ErrorName returns error name. 2540 func (e LogEntry_InfoValidationError) ErrorName() string { return "LogEntry_InfoValidationError" } 2541 2542 // Error satisfies the builtin error interface 2543 func (e LogEntry_InfoValidationError) Error() string { 2544 cause := "" 2545 if e.cause != nil { 2546 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2547 } 2548 2549 key := "" 2550 if e.key { 2551 key = "key for " 2552 } 2553 2554 return fmt.Sprintf( 2555 "invalid %sLogEntry_Info.%s: %s%s", 2556 key, 2557 e.field, 2558 e.reason, 2559 cause) 2560 } 2561 2562 var _ error = LogEntry_InfoValidationError{} 2563 2564 var _ interface { 2565 Field() string 2566 Reason() string 2567 Key() bool 2568 Cause() error 2569 ErrorName() string 2570 } = LogEntry_InfoValidationError{} 2571 2572 // Validate checks the field values on LogEntry_TryjobsUpdated with the rules 2573 // defined in the proto definition for this message. If any rules are 2574 // violated, the first error encountered is returned, or nil if there are no violations. 2575 func (m *LogEntry_TryjobsUpdated) Validate() error { 2576 return m.validate(false) 2577 } 2578 2579 // ValidateAll checks the field values on LogEntry_TryjobsUpdated with the 2580 // rules defined in the proto definition for this message. If any rules are 2581 // violated, the result is a list of violation errors wrapped in 2582 // LogEntry_TryjobsUpdatedMultiError, or nil if none found. 2583 func (m *LogEntry_TryjobsUpdated) ValidateAll() error { 2584 return m.validate(true) 2585 } 2586 2587 func (m *LogEntry_TryjobsUpdated) validate(all bool) error { 2588 if m == nil { 2589 return nil 2590 } 2591 2592 var errors []error 2593 2594 for idx, item := range m.GetTryjobs() { 2595 _, _ = idx, item 2596 2597 if all { 2598 switch v := interface{}(item).(type) { 2599 case interface{ ValidateAll() error }: 2600 if err := v.ValidateAll(); err != nil { 2601 errors = append(errors, LogEntry_TryjobsUpdatedValidationError{ 2602 field: fmt.Sprintf("Tryjobs[%v]", idx), 2603 reason: "embedded message failed validation", 2604 cause: err, 2605 }) 2606 } 2607 case interface{ Validate() error }: 2608 if err := v.Validate(); err != nil { 2609 errors = append(errors, LogEntry_TryjobsUpdatedValidationError{ 2610 field: fmt.Sprintf("Tryjobs[%v]", idx), 2611 reason: "embedded message failed validation", 2612 cause: err, 2613 }) 2614 } 2615 } 2616 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { 2617 if err := v.Validate(); err != nil { 2618 return LogEntry_TryjobsUpdatedValidationError{ 2619 field: fmt.Sprintf("Tryjobs[%v]", idx), 2620 reason: "embedded message failed validation", 2621 cause: err, 2622 } 2623 } 2624 } 2625 2626 } 2627 2628 if len(errors) > 0 { 2629 return LogEntry_TryjobsUpdatedMultiError(errors) 2630 } 2631 2632 return nil 2633 } 2634 2635 // LogEntry_TryjobsUpdatedMultiError is an error wrapping multiple validation 2636 // errors returned by LogEntry_TryjobsUpdated.ValidateAll() if the designated 2637 // constraints aren't met. 2638 type LogEntry_TryjobsUpdatedMultiError []error 2639 2640 // Error returns a concatenation of all the error messages it wraps. 2641 func (m LogEntry_TryjobsUpdatedMultiError) Error() string { 2642 var msgs []string 2643 for _, err := range m { 2644 msgs = append(msgs, err.Error()) 2645 } 2646 return strings.Join(msgs, "; ") 2647 } 2648 2649 // AllErrors returns a list of validation violation errors. 2650 func (m LogEntry_TryjobsUpdatedMultiError) AllErrors() []error { return m } 2651 2652 // LogEntry_TryjobsUpdatedValidationError is the validation error returned by 2653 // LogEntry_TryjobsUpdated.Validate if the designated constraints aren't met. 2654 type LogEntry_TryjobsUpdatedValidationError struct { 2655 field string 2656 reason string 2657 cause error 2658 key bool 2659 } 2660 2661 // Field function returns field value. 2662 func (e LogEntry_TryjobsUpdatedValidationError) Field() string { return e.field } 2663 2664 // Reason function returns reason value. 2665 func (e LogEntry_TryjobsUpdatedValidationError) Reason() string { return e.reason } 2666 2667 // Cause function returns cause value. 2668 func (e LogEntry_TryjobsUpdatedValidationError) Cause() error { return e.cause } 2669 2670 // Key function returns key value. 2671 func (e LogEntry_TryjobsUpdatedValidationError) Key() bool { return e.key } 2672 2673 // ErrorName returns error name. 2674 func (e LogEntry_TryjobsUpdatedValidationError) ErrorName() string { 2675 return "LogEntry_TryjobsUpdatedValidationError" 2676 } 2677 2678 // Error satisfies the builtin error interface 2679 func (e LogEntry_TryjobsUpdatedValidationError) Error() string { 2680 cause := "" 2681 if e.cause != nil { 2682 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2683 } 2684 2685 key := "" 2686 if e.key { 2687 key = "key for " 2688 } 2689 2690 return fmt.Sprintf( 2691 "invalid %sLogEntry_TryjobsUpdated.%s: %s%s", 2692 key, 2693 e.field, 2694 e.reason, 2695 cause) 2696 } 2697 2698 var _ error = LogEntry_TryjobsUpdatedValidationError{} 2699 2700 var _ interface { 2701 Field() string 2702 Reason() string 2703 Key() bool 2704 Cause() error 2705 ErrorName() string 2706 } = LogEntry_TryjobsUpdatedValidationError{} 2707 2708 // Validate checks the field values on LogEntry_TreeChecked with the rules 2709 // defined in the proto definition for this message. If any rules are 2710 // violated, the first error encountered is returned, or nil if there are no violations. 2711 func (m *LogEntry_TreeChecked) Validate() error { 2712 return m.validate(false) 2713 } 2714 2715 // ValidateAll checks the field values on LogEntry_TreeChecked with the rules 2716 // defined in the proto definition for this message. If any rules are 2717 // violated, the result is a list of violation errors wrapped in 2718 // LogEntry_TreeCheckedMultiError, or nil if none found. 2719 func (m *LogEntry_TreeChecked) ValidateAll() error { 2720 return m.validate(true) 2721 } 2722 2723 func (m *LogEntry_TreeChecked) validate(all bool) error { 2724 if m == nil { 2725 return nil 2726 } 2727 2728 var errors []error 2729 2730 // no validation rules for Open 2731 2732 if len(errors) > 0 { 2733 return LogEntry_TreeCheckedMultiError(errors) 2734 } 2735 2736 return nil 2737 } 2738 2739 // LogEntry_TreeCheckedMultiError is an error wrapping multiple validation 2740 // errors returned by LogEntry_TreeChecked.ValidateAll() if the designated 2741 // constraints aren't met. 2742 type LogEntry_TreeCheckedMultiError []error 2743 2744 // Error returns a concatenation of all the error messages it wraps. 2745 func (m LogEntry_TreeCheckedMultiError) Error() string { 2746 var msgs []string 2747 for _, err := range m { 2748 msgs = append(msgs, err.Error()) 2749 } 2750 return strings.Join(msgs, "; ") 2751 } 2752 2753 // AllErrors returns a list of validation violation errors. 2754 func (m LogEntry_TreeCheckedMultiError) AllErrors() []error { return m } 2755 2756 // LogEntry_TreeCheckedValidationError is the validation error returned by 2757 // LogEntry_TreeChecked.Validate if the designated constraints aren't met. 2758 type LogEntry_TreeCheckedValidationError struct { 2759 field string 2760 reason string 2761 cause error 2762 key bool 2763 } 2764 2765 // Field function returns field value. 2766 func (e LogEntry_TreeCheckedValidationError) Field() string { return e.field } 2767 2768 // Reason function returns reason value. 2769 func (e LogEntry_TreeCheckedValidationError) Reason() string { return e.reason } 2770 2771 // Cause function returns cause value. 2772 func (e LogEntry_TreeCheckedValidationError) Cause() error { return e.cause } 2773 2774 // Key function returns key value. 2775 func (e LogEntry_TreeCheckedValidationError) Key() bool { return e.key } 2776 2777 // ErrorName returns error name. 2778 func (e LogEntry_TreeCheckedValidationError) ErrorName() string { 2779 return "LogEntry_TreeCheckedValidationError" 2780 } 2781 2782 // Error satisfies the builtin error interface 2783 func (e LogEntry_TreeCheckedValidationError) Error() string { 2784 cause := "" 2785 if e.cause != nil { 2786 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2787 } 2788 2789 key := "" 2790 if e.key { 2791 key = "key for " 2792 } 2793 2794 return fmt.Sprintf( 2795 "invalid %sLogEntry_TreeChecked.%s: %s%s", 2796 key, 2797 e.field, 2798 e.reason, 2799 cause) 2800 } 2801 2802 var _ error = LogEntry_TreeCheckedValidationError{} 2803 2804 var _ interface { 2805 Field() string 2806 Reason() string 2807 Key() bool 2808 Cause() error 2809 ErrorName() string 2810 } = LogEntry_TreeCheckedValidationError{} 2811 2812 // Validate checks the field values on LogEntry_Waitlisted with the rules 2813 // defined in the proto definition for this message. If any rules are 2814 // violated, the first error encountered is returned, or nil if there are no violations. 2815 func (m *LogEntry_Waitlisted) Validate() error { 2816 return m.validate(false) 2817 } 2818 2819 // ValidateAll checks the field values on LogEntry_Waitlisted with the rules 2820 // defined in the proto definition for this message. If any rules are 2821 // violated, the result is a list of violation errors wrapped in 2822 // LogEntry_WaitlistedMultiError, or nil if none found. 2823 func (m *LogEntry_Waitlisted) ValidateAll() error { 2824 return m.validate(true) 2825 } 2826 2827 func (m *LogEntry_Waitlisted) validate(all bool) error { 2828 if m == nil { 2829 return nil 2830 } 2831 2832 var errors []error 2833 2834 if len(errors) > 0 { 2835 return LogEntry_WaitlistedMultiError(errors) 2836 } 2837 2838 return nil 2839 } 2840 2841 // LogEntry_WaitlistedMultiError is an error wrapping multiple validation 2842 // errors returned by LogEntry_Waitlisted.ValidateAll() if the designated 2843 // constraints aren't met. 2844 type LogEntry_WaitlistedMultiError []error 2845 2846 // Error returns a concatenation of all the error messages it wraps. 2847 func (m LogEntry_WaitlistedMultiError) Error() string { 2848 var msgs []string 2849 for _, err := range m { 2850 msgs = append(msgs, err.Error()) 2851 } 2852 return strings.Join(msgs, "; ") 2853 } 2854 2855 // AllErrors returns a list of validation violation errors. 2856 func (m LogEntry_WaitlistedMultiError) AllErrors() []error { return m } 2857 2858 // LogEntry_WaitlistedValidationError is the validation error returned by 2859 // LogEntry_Waitlisted.Validate if the designated constraints aren't met. 2860 type LogEntry_WaitlistedValidationError struct { 2861 field string 2862 reason string 2863 cause error 2864 key bool 2865 } 2866 2867 // Field function returns field value. 2868 func (e LogEntry_WaitlistedValidationError) Field() string { return e.field } 2869 2870 // Reason function returns reason value. 2871 func (e LogEntry_WaitlistedValidationError) Reason() string { return e.reason } 2872 2873 // Cause function returns cause value. 2874 func (e LogEntry_WaitlistedValidationError) Cause() error { return e.cause } 2875 2876 // Key function returns key value. 2877 func (e LogEntry_WaitlistedValidationError) Key() bool { return e.key } 2878 2879 // ErrorName returns error name. 2880 func (e LogEntry_WaitlistedValidationError) ErrorName() string { 2881 return "LogEntry_WaitlistedValidationError" 2882 } 2883 2884 // Error satisfies the builtin error interface 2885 func (e LogEntry_WaitlistedValidationError) Error() string { 2886 cause := "" 2887 if e.cause != nil { 2888 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2889 } 2890 2891 key := "" 2892 if e.key { 2893 key = "key for " 2894 } 2895 2896 return fmt.Sprintf( 2897 "invalid %sLogEntry_Waitlisted.%s: %s%s", 2898 key, 2899 e.field, 2900 e.reason, 2901 cause) 2902 } 2903 2904 var _ error = LogEntry_WaitlistedValidationError{} 2905 2906 var _ interface { 2907 Field() string 2908 Reason() string 2909 Key() bool 2910 Cause() error 2911 ErrorName() string 2912 } = LogEntry_WaitlistedValidationError{} 2913 2914 // Validate checks the field values on LogEntry_AcquiredSubmitQueue with the 2915 // rules defined in the proto definition for this message. If any rules are 2916 // violated, the first error encountered is returned, or nil if there are no violations. 2917 func (m *LogEntry_AcquiredSubmitQueue) Validate() error { 2918 return m.validate(false) 2919 } 2920 2921 // ValidateAll checks the field values on LogEntry_AcquiredSubmitQueue with the 2922 // rules defined in the proto definition for this message. If any rules are 2923 // violated, the result is a list of violation errors wrapped in 2924 // LogEntry_AcquiredSubmitQueueMultiError, or nil if none found. 2925 func (m *LogEntry_AcquiredSubmitQueue) ValidateAll() error { 2926 return m.validate(true) 2927 } 2928 2929 func (m *LogEntry_AcquiredSubmitQueue) validate(all bool) error { 2930 if m == nil { 2931 return nil 2932 } 2933 2934 var errors []error 2935 2936 if len(errors) > 0 { 2937 return LogEntry_AcquiredSubmitQueueMultiError(errors) 2938 } 2939 2940 return nil 2941 } 2942 2943 // LogEntry_AcquiredSubmitQueueMultiError is an error wrapping multiple 2944 // validation errors returned by LogEntry_AcquiredSubmitQueue.ValidateAll() if 2945 // the designated constraints aren't met. 2946 type LogEntry_AcquiredSubmitQueueMultiError []error 2947 2948 // Error returns a concatenation of all the error messages it wraps. 2949 func (m LogEntry_AcquiredSubmitQueueMultiError) Error() string { 2950 var msgs []string 2951 for _, err := range m { 2952 msgs = append(msgs, err.Error()) 2953 } 2954 return strings.Join(msgs, "; ") 2955 } 2956 2957 // AllErrors returns a list of validation violation errors. 2958 func (m LogEntry_AcquiredSubmitQueueMultiError) AllErrors() []error { return m } 2959 2960 // LogEntry_AcquiredSubmitQueueValidationError is the validation error returned 2961 // by LogEntry_AcquiredSubmitQueue.Validate if the designated constraints 2962 // aren't met. 2963 type LogEntry_AcquiredSubmitQueueValidationError struct { 2964 field string 2965 reason string 2966 cause error 2967 key bool 2968 } 2969 2970 // Field function returns field value. 2971 func (e LogEntry_AcquiredSubmitQueueValidationError) Field() string { return e.field } 2972 2973 // Reason function returns reason value. 2974 func (e LogEntry_AcquiredSubmitQueueValidationError) Reason() string { return e.reason } 2975 2976 // Cause function returns cause value. 2977 func (e LogEntry_AcquiredSubmitQueueValidationError) Cause() error { return e.cause } 2978 2979 // Key function returns key value. 2980 func (e LogEntry_AcquiredSubmitQueueValidationError) Key() bool { return e.key } 2981 2982 // ErrorName returns error name. 2983 func (e LogEntry_AcquiredSubmitQueueValidationError) ErrorName() string { 2984 return "LogEntry_AcquiredSubmitQueueValidationError" 2985 } 2986 2987 // Error satisfies the builtin error interface 2988 func (e LogEntry_AcquiredSubmitQueueValidationError) Error() string { 2989 cause := "" 2990 if e.cause != nil { 2991 cause = fmt.Sprintf(" | caused by: %v", e.cause) 2992 } 2993 2994 key := "" 2995 if e.key { 2996 key = "key for " 2997 } 2998 2999 return fmt.Sprintf( 3000 "invalid %sLogEntry_AcquiredSubmitQueue.%s: %s%s", 3001 key, 3002 e.field, 3003 e.reason, 3004 cause) 3005 } 3006 3007 var _ error = LogEntry_AcquiredSubmitQueueValidationError{} 3008 3009 var _ interface { 3010 Field() string 3011 Reason() string 3012 Key() bool 3013 Cause() error 3014 ErrorName() string 3015 } = LogEntry_AcquiredSubmitQueueValidationError{} 3016 3017 // Validate checks the field values on LogEntry_ReleasedSubmitQueue with the 3018 // rules defined in the proto definition for this message. If any rules are 3019 // violated, the first error encountered is returned, or nil if there are no violations. 3020 func (m *LogEntry_ReleasedSubmitQueue) Validate() error { 3021 return m.validate(false) 3022 } 3023 3024 // ValidateAll checks the field values on LogEntry_ReleasedSubmitQueue with the 3025 // rules defined in the proto definition for this message. If any rules are 3026 // violated, the result is a list of violation errors wrapped in 3027 // LogEntry_ReleasedSubmitQueueMultiError, or nil if none found. 3028 func (m *LogEntry_ReleasedSubmitQueue) ValidateAll() error { 3029 return m.validate(true) 3030 } 3031 3032 func (m *LogEntry_ReleasedSubmitQueue) validate(all bool) error { 3033 if m == nil { 3034 return nil 3035 } 3036 3037 var errors []error 3038 3039 if len(errors) > 0 { 3040 return LogEntry_ReleasedSubmitQueueMultiError(errors) 3041 } 3042 3043 return nil 3044 } 3045 3046 // LogEntry_ReleasedSubmitQueueMultiError is an error wrapping multiple 3047 // validation errors returned by LogEntry_ReleasedSubmitQueue.ValidateAll() if 3048 // the designated constraints aren't met. 3049 type LogEntry_ReleasedSubmitQueueMultiError []error 3050 3051 // Error returns a concatenation of all the error messages it wraps. 3052 func (m LogEntry_ReleasedSubmitQueueMultiError) Error() string { 3053 var msgs []string 3054 for _, err := range m { 3055 msgs = append(msgs, err.Error()) 3056 } 3057 return strings.Join(msgs, "; ") 3058 } 3059 3060 // AllErrors returns a list of validation violation errors. 3061 func (m LogEntry_ReleasedSubmitQueueMultiError) AllErrors() []error { return m } 3062 3063 // LogEntry_ReleasedSubmitQueueValidationError is the validation error returned 3064 // by LogEntry_ReleasedSubmitQueue.Validate if the designated constraints 3065 // aren't met. 3066 type LogEntry_ReleasedSubmitQueueValidationError struct { 3067 field string 3068 reason string 3069 cause error 3070 key bool 3071 } 3072 3073 // Field function returns field value. 3074 func (e LogEntry_ReleasedSubmitQueueValidationError) Field() string { return e.field } 3075 3076 // Reason function returns reason value. 3077 func (e LogEntry_ReleasedSubmitQueueValidationError) Reason() string { return e.reason } 3078 3079 // Cause function returns cause value. 3080 func (e LogEntry_ReleasedSubmitQueueValidationError) Cause() error { return e.cause } 3081 3082 // Key function returns key value. 3083 func (e LogEntry_ReleasedSubmitQueueValidationError) Key() bool { return e.key } 3084 3085 // ErrorName returns error name. 3086 func (e LogEntry_ReleasedSubmitQueueValidationError) ErrorName() string { 3087 return "LogEntry_ReleasedSubmitQueueValidationError" 3088 } 3089 3090 // Error satisfies the builtin error interface 3091 func (e LogEntry_ReleasedSubmitQueueValidationError) Error() string { 3092 cause := "" 3093 if e.cause != nil { 3094 cause = fmt.Sprintf(" | caused by: %v", e.cause) 3095 } 3096 3097 key := "" 3098 if e.key { 3099 key = "key for " 3100 } 3101 3102 return fmt.Sprintf( 3103 "invalid %sLogEntry_ReleasedSubmitQueue.%s: %s%s", 3104 key, 3105 e.field, 3106 e.reason, 3107 cause) 3108 } 3109 3110 var _ error = LogEntry_ReleasedSubmitQueueValidationError{} 3111 3112 var _ interface { 3113 Field() string 3114 Reason() string 3115 Key() bool 3116 Cause() error 3117 ErrorName() string 3118 } = LogEntry_ReleasedSubmitQueueValidationError{} 3119 3120 // Validate checks the field values on LogEntry_CLSubmitted with the rules 3121 // defined in the proto definition for this message. If any rules are 3122 // violated, the first error encountered is returned, or nil if there are no violations. 3123 func (m *LogEntry_CLSubmitted) Validate() error { 3124 return m.validate(false) 3125 } 3126 3127 // ValidateAll checks the field values on LogEntry_CLSubmitted with the rules 3128 // defined in the proto definition for this message. If any rules are 3129 // violated, the result is a list of violation errors wrapped in 3130 // LogEntry_CLSubmittedMultiError, or nil if none found. 3131 func (m *LogEntry_CLSubmitted) ValidateAll() error { 3132 return m.validate(true) 3133 } 3134 3135 func (m *LogEntry_CLSubmitted) validate(all bool) error { 3136 if m == nil { 3137 return nil 3138 } 3139 3140 var errors []error 3141 3142 // no validation rules for TotalSubmitted 3143 3144 if len(errors) > 0 { 3145 return LogEntry_CLSubmittedMultiError(errors) 3146 } 3147 3148 return nil 3149 } 3150 3151 // LogEntry_CLSubmittedMultiError is an error wrapping multiple validation 3152 // errors returned by LogEntry_CLSubmitted.ValidateAll() if the designated 3153 // constraints aren't met. 3154 type LogEntry_CLSubmittedMultiError []error 3155 3156 // Error returns a concatenation of all the error messages it wraps. 3157 func (m LogEntry_CLSubmittedMultiError) Error() string { 3158 var msgs []string 3159 for _, err := range m { 3160 msgs = append(msgs, err.Error()) 3161 } 3162 return strings.Join(msgs, "; ") 3163 } 3164 3165 // AllErrors returns a list of validation violation errors. 3166 func (m LogEntry_CLSubmittedMultiError) AllErrors() []error { return m } 3167 3168 // LogEntry_CLSubmittedValidationError is the validation error returned by 3169 // LogEntry_CLSubmitted.Validate if the designated constraints aren't met. 3170 type LogEntry_CLSubmittedValidationError struct { 3171 field string 3172 reason string 3173 cause error 3174 key bool 3175 } 3176 3177 // Field function returns field value. 3178 func (e LogEntry_CLSubmittedValidationError) Field() string { return e.field } 3179 3180 // Reason function returns reason value. 3181 func (e LogEntry_CLSubmittedValidationError) Reason() string { return e.reason } 3182 3183 // Cause function returns cause value. 3184 func (e LogEntry_CLSubmittedValidationError) Cause() error { return e.cause } 3185 3186 // Key function returns key value. 3187 func (e LogEntry_CLSubmittedValidationError) Key() bool { return e.key } 3188 3189 // ErrorName returns error name. 3190 func (e LogEntry_CLSubmittedValidationError) ErrorName() string { 3191 return "LogEntry_CLSubmittedValidationError" 3192 } 3193 3194 // Error satisfies the builtin error interface 3195 func (e LogEntry_CLSubmittedValidationError) Error() string { 3196 cause := "" 3197 if e.cause != nil { 3198 cause = fmt.Sprintf(" | caused by: %v", e.cause) 3199 } 3200 3201 key := "" 3202 if e.key { 3203 key = "key for " 3204 } 3205 3206 return fmt.Sprintf( 3207 "invalid %sLogEntry_CLSubmitted.%s: %s%s", 3208 key, 3209 e.field, 3210 e.reason, 3211 cause) 3212 } 3213 3214 var _ error = LogEntry_CLSubmittedValidationError{} 3215 3216 var _ interface { 3217 Field() string 3218 Reason() string 3219 Key() bool 3220 Cause() error 3221 ErrorName() string 3222 } = LogEntry_CLSubmittedValidationError{} 3223 3224 // Validate checks the field values on LogEntry_SubmissionFailure with the 3225 // rules defined in the proto definition for this message. If any rules are 3226 // violated, the first error encountered is returned, or nil if there are no violations. 3227 func (m *LogEntry_SubmissionFailure) Validate() error { 3228 return m.validate(false) 3229 } 3230 3231 // ValidateAll checks the field values on LogEntry_SubmissionFailure with the 3232 // rules defined in the proto definition for this message. If any rules are 3233 // violated, the result is a list of violation errors wrapped in 3234 // LogEntry_SubmissionFailureMultiError, or nil if none found. 3235 func (m *LogEntry_SubmissionFailure) ValidateAll() error { 3236 return m.validate(true) 3237 } 3238 3239 func (m *LogEntry_SubmissionFailure) validate(all bool) error { 3240 if m == nil { 3241 return nil 3242 } 3243 3244 var errors []error 3245 3246 if all { 3247 switch v := interface{}(m.GetEvent()).(type) { 3248 case interface{ ValidateAll() error }: 3249 if err := v.ValidateAll(); err != nil { 3250 errors = append(errors, LogEntry_SubmissionFailureValidationError{ 3251 field: "Event", 3252 reason: "embedded message failed validation", 3253 cause: err, 3254 }) 3255 } 3256 case interface{ Validate() error }: 3257 if err := v.Validate(); err != nil { 3258 errors = append(errors, LogEntry_SubmissionFailureValidationError{ 3259 field: "Event", 3260 reason: "embedded message failed validation", 3261 cause: err, 3262 }) 3263 } 3264 } 3265 } else if v, ok := interface{}(m.GetEvent()).(interface{ Validate() error }); ok { 3266 if err := v.Validate(); err != nil { 3267 return LogEntry_SubmissionFailureValidationError{ 3268 field: "Event", 3269 reason: "embedded message failed validation", 3270 cause: err, 3271 } 3272 } 3273 } 3274 3275 if len(errors) > 0 { 3276 return LogEntry_SubmissionFailureMultiError(errors) 3277 } 3278 3279 return nil 3280 } 3281 3282 // LogEntry_SubmissionFailureMultiError is an error wrapping multiple 3283 // validation errors returned by LogEntry_SubmissionFailure.ValidateAll() if 3284 // the designated constraints aren't met. 3285 type LogEntry_SubmissionFailureMultiError []error 3286 3287 // Error returns a concatenation of all the error messages it wraps. 3288 func (m LogEntry_SubmissionFailureMultiError) Error() string { 3289 var msgs []string 3290 for _, err := range m { 3291 msgs = append(msgs, err.Error()) 3292 } 3293 return strings.Join(msgs, "; ") 3294 } 3295 3296 // AllErrors returns a list of validation violation errors. 3297 func (m LogEntry_SubmissionFailureMultiError) AllErrors() []error { return m } 3298 3299 // LogEntry_SubmissionFailureValidationError is the validation error returned 3300 // by LogEntry_SubmissionFailure.Validate if the designated constraints aren't met. 3301 type LogEntry_SubmissionFailureValidationError struct { 3302 field string 3303 reason string 3304 cause error 3305 key bool 3306 } 3307 3308 // Field function returns field value. 3309 func (e LogEntry_SubmissionFailureValidationError) Field() string { return e.field } 3310 3311 // Reason function returns reason value. 3312 func (e LogEntry_SubmissionFailureValidationError) Reason() string { return e.reason } 3313 3314 // Cause function returns cause value. 3315 func (e LogEntry_SubmissionFailureValidationError) Cause() error { return e.cause } 3316 3317 // Key function returns key value. 3318 func (e LogEntry_SubmissionFailureValidationError) Key() bool { return e.key } 3319 3320 // ErrorName returns error name. 3321 func (e LogEntry_SubmissionFailureValidationError) ErrorName() string { 3322 return "LogEntry_SubmissionFailureValidationError" 3323 } 3324 3325 // Error satisfies the builtin error interface 3326 func (e LogEntry_SubmissionFailureValidationError) Error() string { 3327 cause := "" 3328 if e.cause != nil { 3329 cause = fmt.Sprintf(" | caused by: %v", e.cause) 3330 } 3331 3332 key := "" 3333 if e.key { 3334 key = "key for " 3335 } 3336 3337 return fmt.Sprintf( 3338 "invalid %sLogEntry_SubmissionFailure.%s: %s%s", 3339 key, 3340 e.field, 3341 e.reason, 3342 cause) 3343 } 3344 3345 var _ error = LogEntry_SubmissionFailureValidationError{} 3346 3347 var _ interface { 3348 Field() string 3349 Reason() string 3350 Key() bool 3351 Cause() error 3352 ErrorName() string 3353 } = LogEntry_SubmissionFailureValidationError{} 3354 3355 // Validate checks the field values on LogEntry_RunEnded with the rules defined 3356 // in the proto definition for this message. If any rules are violated, the 3357 // first error encountered is returned, or nil if there are no violations. 3358 func (m *LogEntry_RunEnded) Validate() error { 3359 return m.validate(false) 3360 } 3361 3362 // ValidateAll checks the field values on LogEntry_RunEnded with the rules 3363 // defined in the proto definition for this message. If any rules are 3364 // violated, the result is a list of violation errors wrapped in 3365 // LogEntry_RunEndedMultiError, or nil if none found. 3366 func (m *LogEntry_RunEnded) ValidateAll() error { 3367 return m.validate(true) 3368 } 3369 3370 func (m *LogEntry_RunEnded) validate(all bool) error { 3371 if m == nil { 3372 return nil 3373 } 3374 3375 var errors []error 3376 3377 if len(errors) > 0 { 3378 return LogEntry_RunEndedMultiError(errors) 3379 } 3380 3381 return nil 3382 } 3383 3384 // LogEntry_RunEndedMultiError is an error wrapping multiple validation errors 3385 // returned by LogEntry_RunEnded.ValidateAll() if the designated constraints 3386 // aren't met. 3387 type LogEntry_RunEndedMultiError []error 3388 3389 // Error returns a concatenation of all the error messages it wraps. 3390 func (m LogEntry_RunEndedMultiError) Error() string { 3391 var msgs []string 3392 for _, err := range m { 3393 msgs = append(msgs, err.Error()) 3394 } 3395 return strings.Join(msgs, "; ") 3396 } 3397 3398 // AllErrors returns a list of validation violation errors. 3399 func (m LogEntry_RunEndedMultiError) AllErrors() []error { return m } 3400 3401 // LogEntry_RunEndedValidationError is the validation error returned by 3402 // LogEntry_RunEnded.Validate if the designated constraints aren't met. 3403 type LogEntry_RunEndedValidationError struct { 3404 field string 3405 reason string 3406 cause error 3407 key bool 3408 } 3409 3410 // Field function returns field value. 3411 func (e LogEntry_RunEndedValidationError) Field() string { return e.field } 3412 3413 // Reason function returns reason value. 3414 func (e LogEntry_RunEndedValidationError) Reason() string { return e.reason } 3415 3416 // Cause function returns cause value. 3417 func (e LogEntry_RunEndedValidationError) Cause() error { return e.cause } 3418 3419 // Key function returns key value. 3420 func (e LogEntry_RunEndedValidationError) Key() bool { return e.key } 3421 3422 // ErrorName returns error name. 3423 func (e LogEntry_RunEndedValidationError) ErrorName() string { 3424 return "LogEntry_RunEndedValidationError" 3425 } 3426 3427 // Error satisfies the builtin error interface 3428 func (e LogEntry_RunEndedValidationError) Error() string { 3429 cause := "" 3430 if e.cause != nil { 3431 cause = fmt.Sprintf(" | caused by: %v", e.cause) 3432 } 3433 3434 key := "" 3435 if e.key { 3436 key = "key for " 3437 } 3438 3439 return fmt.Sprintf( 3440 "invalid %sLogEntry_RunEnded.%s: %s%s", 3441 key, 3442 e.field, 3443 e.reason, 3444 cause) 3445 } 3446 3447 var _ error = LogEntry_RunEndedValidationError{} 3448 3449 var _ interface { 3450 Field() string 3451 Reason() string 3452 Key() bool 3453 Cause() error 3454 ErrorName() string 3455 } = LogEntry_RunEndedValidationError{} 3456 3457 // Validate checks the field values on OngoingLongOps_Op with the rules defined 3458 // in the proto definition for this message. If any rules are violated, the 3459 // first error encountered is returned, or nil if there are no violations. 3460 func (m *OngoingLongOps_Op) Validate() error { 3461 return m.validate(false) 3462 } 3463 3464 // ValidateAll checks the field values on OngoingLongOps_Op with the rules 3465 // defined in the proto definition for this message. If any rules are 3466 // violated, the result is a list of violation errors wrapped in 3467 // OngoingLongOps_OpMultiError, or nil if none found. 3468 func (m *OngoingLongOps_Op) ValidateAll() error { 3469 return m.validate(true) 3470 } 3471 3472 func (m *OngoingLongOps_Op) validate(all bool) error { 3473 if m == nil { 3474 return nil 3475 } 3476 3477 var errors []error 3478 3479 if all { 3480 switch v := interface{}(m.GetDeadline()).(type) { 3481 case interface{ ValidateAll() error }: 3482 if err := v.ValidateAll(); err != nil { 3483 errors = append(errors, OngoingLongOps_OpValidationError{ 3484 field: "Deadline", 3485 reason: "embedded message failed validation", 3486 cause: err, 3487 }) 3488 } 3489 case interface{ Validate() error }: 3490 if err := v.Validate(); err != nil { 3491 errors = append(errors, OngoingLongOps_OpValidationError{ 3492 field: "Deadline", 3493 reason: "embedded message failed validation", 3494 cause: err, 3495 }) 3496 } 3497 } 3498 } else if v, ok := interface{}(m.GetDeadline()).(interface{ Validate() error }); ok { 3499 if err := v.Validate(); err != nil { 3500 return OngoingLongOps_OpValidationError{ 3501 field: "Deadline", 3502 reason: "embedded message failed validation", 3503 cause: err, 3504 } 3505 } 3506 } 3507 3508 // no validation rules for CancelRequested 3509 3510 switch v := m.Work.(type) { 3511 case *OngoingLongOps_Op_PostStartMessage: 3512 if v == nil { 3513 err := OngoingLongOps_OpValidationError{ 3514 field: "Work", 3515 reason: "oneof value cannot be a typed-nil", 3516 } 3517 if !all { 3518 return err 3519 } 3520 errors = append(errors, err) 3521 } 3522 // no validation rules for PostStartMessage 3523 case *OngoingLongOps_Op_ResetTriggers_: 3524 if v == nil { 3525 err := OngoingLongOps_OpValidationError{ 3526 field: "Work", 3527 reason: "oneof value cannot be a typed-nil", 3528 } 3529 if !all { 3530 return err 3531 } 3532 errors = append(errors, err) 3533 } 3534 3535 if all { 3536 switch v := interface{}(m.GetResetTriggers()).(type) { 3537 case interface{ ValidateAll() error }: 3538 if err := v.ValidateAll(); err != nil { 3539 errors = append(errors, OngoingLongOps_OpValidationError{ 3540 field: "ResetTriggers", 3541 reason: "embedded message failed validation", 3542 cause: err, 3543 }) 3544 } 3545 case interface{ Validate() error }: 3546 if err := v.Validate(); err != nil { 3547 errors = append(errors, OngoingLongOps_OpValidationError{ 3548 field: "ResetTriggers", 3549 reason: "embedded message failed validation", 3550 cause: err, 3551 }) 3552 } 3553 } 3554 } else if v, ok := interface{}(m.GetResetTriggers()).(interface{ Validate() error }); ok { 3555 if err := v.Validate(); err != nil { 3556 return OngoingLongOps_OpValidationError{ 3557 field: "ResetTriggers", 3558 reason: "embedded message failed validation", 3559 cause: err, 3560 } 3561 } 3562 } 3563 3564 case *OngoingLongOps_Op_ExecuteTryjobs: 3565 if v == nil { 3566 err := OngoingLongOps_OpValidationError{ 3567 field: "Work", 3568 reason: "oneof value cannot be a typed-nil", 3569 } 3570 if !all { 3571 return err 3572 } 3573 errors = append(errors, err) 3574 } 3575 3576 if all { 3577 switch v := interface{}(m.GetExecuteTryjobs()).(type) { 3578 case interface{ ValidateAll() error }: 3579 if err := v.ValidateAll(); err != nil { 3580 errors = append(errors, OngoingLongOps_OpValidationError{ 3581 field: "ExecuteTryjobs", 3582 reason: "embedded message failed validation", 3583 cause: err, 3584 }) 3585 } 3586 case interface{ Validate() error }: 3587 if err := v.Validate(); err != nil { 3588 errors = append(errors, OngoingLongOps_OpValidationError{ 3589 field: "ExecuteTryjobs", 3590 reason: "embedded message failed validation", 3591 cause: err, 3592 }) 3593 } 3594 } 3595 } else if v, ok := interface{}(m.GetExecuteTryjobs()).(interface{ Validate() error }); ok { 3596 if err := v.Validate(); err != nil { 3597 return OngoingLongOps_OpValidationError{ 3598 field: "ExecuteTryjobs", 3599 reason: "embedded message failed validation", 3600 cause: err, 3601 } 3602 } 3603 } 3604 3605 case *OngoingLongOps_Op_ExecutePostAction: 3606 if v == nil { 3607 err := OngoingLongOps_OpValidationError{ 3608 field: "Work", 3609 reason: "oneof value cannot be a typed-nil", 3610 } 3611 if !all { 3612 return err 3613 } 3614 errors = append(errors, err) 3615 } 3616 3617 if all { 3618 switch v := interface{}(m.GetExecutePostAction()).(type) { 3619 case interface{ ValidateAll() error }: 3620 if err := v.ValidateAll(); err != nil { 3621 errors = append(errors, OngoingLongOps_OpValidationError{ 3622 field: "ExecutePostAction", 3623 reason: "embedded message failed validation", 3624 cause: err, 3625 }) 3626 } 3627 case interface{ Validate() error }: 3628 if err := v.Validate(); err != nil { 3629 errors = append(errors, OngoingLongOps_OpValidationError{ 3630 field: "ExecutePostAction", 3631 reason: "embedded message failed validation", 3632 cause: err, 3633 }) 3634 } 3635 } 3636 } else if v, ok := interface{}(m.GetExecutePostAction()).(interface{ Validate() error }); ok { 3637 if err := v.Validate(); err != nil { 3638 return OngoingLongOps_OpValidationError{ 3639 field: "ExecutePostAction", 3640 reason: "embedded message failed validation", 3641 cause: err, 3642 } 3643 } 3644 } 3645 3646 case *OngoingLongOps_Op_PostGerritMessage_: 3647 if v == nil { 3648 err := OngoingLongOps_OpValidationError{ 3649 field: "Work", 3650 reason: "oneof value cannot be a typed-nil", 3651 } 3652 if !all { 3653 return err 3654 } 3655 errors = append(errors, err) 3656 } 3657 3658 if all { 3659 switch v := interface{}(m.GetPostGerritMessage()).(type) { 3660 case interface{ ValidateAll() error }: 3661 if err := v.ValidateAll(); err != nil { 3662 errors = append(errors, OngoingLongOps_OpValidationError{ 3663 field: "PostGerritMessage", 3664 reason: "embedded message failed validation", 3665 cause: err, 3666 }) 3667 } 3668 case interface{ Validate() error }: 3669 if err := v.Validate(); err != nil { 3670 errors = append(errors, OngoingLongOps_OpValidationError{ 3671 field: "PostGerritMessage", 3672 reason: "embedded message failed validation", 3673 cause: err, 3674 }) 3675 } 3676 } 3677 } else if v, ok := interface{}(m.GetPostGerritMessage()).(interface{ Validate() error }); ok { 3678 if err := v.Validate(); err != nil { 3679 return OngoingLongOps_OpValidationError{ 3680 field: "PostGerritMessage", 3681 reason: "embedded message failed validation", 3682 cause: err, 3683 } 3684 } 3685 } 3686 3687 default: 3688 _ = v // ensures v is used 3689 } 3690 3691 if len(errors) > 0 { 3692 return OngoingLongOps_OpMultiError(errors) 3693 } 3694 3695 return nil 3696 } 3697 3698 // OngoingLongOps_OpMultiError is an error wrapping multiple validation errors 3699 // returned by OngoingLongOps_Op.ValidateAll() if the designated constraints 3700 // aren't met. 3701 type OngoingLongOps_OpMultiError []error 3702 3703 // Error returns a concatenation of all the error messages it wraps. 3704 func (m OngoingLongOps_OpMultiError) Error() string { 3705 var msgs []string 3706 for _, err := range m { 3707 msgs = append(msgs, err.Error()) 3708 } 3709 return strings.Join(msgs, "; ") 3710 } 3711 3712 // AllErrors returns a list of validation violation errors. 3713 func (m OngoingLongOps_OpMultiError) AllErrors() []error { return m } 3714 3715 // OngoingLongOps_OpValidationError is the validation error returned by 3716 // OngoingLongOps_Op.Validate if the designated constraints aren't met. 3717 type OngoingLongOps_OpValidationError struct { 3718 field string 3719 reason string 3720 cause error 3721 key bool 3722 } 3723 3724 // Field function returns field value. 3725 func (e OngoingLongOps_OpValidationError) Field() string { return e.field } 3726 3727 // Reason function returns reason value. 3728 func (e OngoingLongOps_OpValidationError) Reason() string { return e.reason } 3729 3730 // Cause function returns cause value. 3731 func (e OngoingLongOps_OpValidationError) Cause() error { return e.cause } 3732 3733 // Key function returns key value. 3734 func (e OngoingLongOps_OpValidationError) Key() bool { return e.key } 3735 3736 // ErrorName returns error name. 3737 func (e OngoingLongOps_OpValidationError) ErrorName() string { 3738 return "OngoingLongOps_OpValidationError" 3739 } 3740 3741 // Error satisfies the builtin error interface 3742 func (e OngoingLongOps_OpValidationError) Error() string { 3743 cause := "" 3744 if e.cause != nil { 3745 cause = fmt.Sprintf(" | caused by: %v", e.cause) 3746 } 3747 3748 key := "" 3749 if e.key { 3750 key = "key for " 3751 } 3752 3753 return fmt.Sprintf( 3754 "invalid %sOngoingLongOps_Op.%s: %s%s", 3755 key, 3756 e.field, 3757 e.reason, 3758 cause) 3759 } 3760 3761 var _ error = OngoingLongOps_OpValidationError{} 3762 3763 var _ interface { 3764 Field() string 3765 Reason() string 3766 Key() bool 3767 Cause() error 3768 ErrorName() string 3769 } = OngoingLongOps_OpValidationError{} 3770 3771 // Validate checks the field values on OngoingLongOps_Op_ResetTriggers with the 3772 // rules defined in the proto definition for this message. If any rules are 3773 // violated, the first error encountered is returned, or nil if there are no violations. 3774 func (m *OngoingLongOps_Op_ResetTriggers) Validate() error { 3775 return m.validate(false) 3776 } 3777 3778 // ValidateAll checks the field values on OngoingLongOps_Op_ResetTriggers with 3779 // the rules defined in the proto definition for this message. If any rules 3780 // are violated, the result is a list of violation errors wrapped in 3781 // OngoingLongOps_Op_ResetTriggersMultiError, or nil if none found. 3782 func (m *OngoingLongOps_Op_ResetTriggers) ValidateAll() error { 3783 return m.validate(true) 3784 } 3785 3786 func (m *OngoingLongOps_Op_ResetTriggers) validate(all bool) error { 3787 if m == nil { 3788 return nil 3789 } 3790 3791 var errors []error 3792 3793 for idx, item := range m.GetRequests() { 3794 _, _ = idx, item 3795 3796 if all { 3797 switch v := interface{}(item).(type) { 3798 case interface{ ValidateAll() error }: 3799 if err := v.ValidateAll(); err != nil { 3800 errors = append(errors, OngoingLongOps_Op_ResetTriggersValidationError{ 3801 field: fmt.Sprintf("Requests[%v]", idx), 3802 reason: "embedded message failed validation", 3803 cause: err, 3804 }) 3805 } 3806 case interface{ Validate() error }: 3807 if err := v.Validate(); err != nil { 3808 errors = append(errors, OngoingLongOps_Op_ResetTriggersValidationError{ 3809 field: fmt.Sprintf("Requests[%v]", idx), 3810 reason: "embedded message failed validation", 3811 cause: err, 3812 }) 3813 } 3814 } 3815 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { 3816 if err := v.Validate(); err != nil { 3817 return OngoingLongOps_Op_ResetTriggersValidationError{ 3818 field: fmt.Sprintf("Requests[%v]", idx), 3819 reason: "embedded message failed validation", 3820 cause: err, 3821 } 3822 } 3823 } 3824 3825 } 3826 3827 // no validation rules for RunStatusIfSucceeded 3828 3829 if len(errors) > 0 { 3830 return OngoingLongOps_Op_ResetTriggersMultiError(errors) 3831 } 3832 3833 return nil 3834 } 3835 3836 // OngoingLongOps_Op_ResetTriggersMultiError is an error wrapping multiple 3837 // validation errors returned by OngoingLongOps_Op_ResetTriggers.ValidateAll() 3838 // if the designated constraints aren't met. 3839 type OngoingLongOps_Op_ResetTriggersMultiError []error 3840 3841 // Error returns a concatenation of all the error messages it wraps. 3842 func (m OngoingLongOps_Op_ResetTriggersMultiError) Error() string { 3843 var msgs []string 3844 for _, err := range m { 3845 msgs = append(msgs, err.Error()) 3846 } 3847 return strings.Join(msgs, "; ") 3848 } 3849 3850 // AllErrors returns a list of validation violation errors. 3851 func (m OngoingLongOps_Op_ResetTriggersMultiError) AllErrors() []error { return m } 3852 3853 // OngoingLongOps_Op_ResetTriggersValidationError is the validation error 3854 // returned by OngoingLongOps_Op_ResetTriggers.Validate if the designated 3855 // constraints aren't met. 3856 type OngoingLongOps_Op_ResetTriggersValidationError struct { 3857 field string 3858 reason string 3859 cause error 3860 key bool 3861 } 3862 3863 // Field function returns field value. 3864 func (e OngoingLongOps_Op_ResetTriggersValidationError) Field() string { return e.field } 3865 3866 // Reason function returns reason value. 3867 func (e OngoingLongOps_Op_ResetTriggersValidationError) Reason() string { return e.reason } 3868 3869 // Cause function returns cause value. 3870 func (e OngoingLongOps_Op_ResetTriggersValidationError) Cause() error { return e.cause } 3871 3872 // Key function returns key value. 3873 func (e OngoingLongOps_Op_ResetTriggersValidationError) Key() bool { return e.key } 3874 3875 // ErrorName returns error name. 3876 func (e OngoingLongOps_Op_ResetTriggersValidationError) ErrorName() string { 3877 return "OngoingLongOps_Op_ResetTriggersValidationError" 3878 } 3879 3880 // Error satisfies the builtin error interface 3881 func (e OngoingLongOps_Op_ResetTriggersValidationError) Error() string { 3882 cause := "" 3883 if e.cause != nil { 3884 cause = fmt.Sprintf(" | caused by: %v", e.cause) 3885 } 3886 3887 key := "" 3888 if e.key { 3889 key = "key for " 3890 } 3891 3892 return fmt.Sprintf( 3893 "invalid %sOngoingLongOps_Op_ResetTriggers.%s: %s%s", 3894 key, 3895 e.field, 3896 e.reason, 3897 cause) 3898 } 3899 3900 var _ error = OngoingLongOps_Op_ResetTriggersValidationError{} 3901 3902 var _ interface { 3903 Field() string 3904 Reason() string 3905 Key() bool 3906 Cause() error 3907 ErrorName() string 3908 } = OngoingLongOps_Op_ResetTriggersValidationError{} 3909 3910 // Validate checks the field values on 3911 // OngoingLongOps_Op_ExecutePostActionPayload with the rules defined in the 3912 // proto definition for this message. If any rules are violated, the first 3913 // error encountered is returned, or nil if there are no violations. 3914 func (m *OngoingLongOps_Op_ExecutePostActionPayload) Validate() error { 3915 return m.validate(false) 3916 } 3917 3918 // ValidateAll checks the field values on 3919 // OngoingLongOps_Op_ExecutePostActionPayload with the rules defined in the 3920 // proto definition for this message. If any rules are violated, the result is 3921 // a list of violation errors wrapped in 3922 // OngoingLongOps_Op_ExecutePostActionPayloadMultiError, or nil if none found. 3923 func (m *OngoingLongOps_Op_ExecutePostActionPayload) ValidateAll() error { 3924 return m.validate(true) 3925 } 3926 3927 func (m *OngoingLongOps_Op_ExecutePostActionPayload) validate(all bool) error { 3928 if m == nil { 3929 return nil 3930 } 3931 3932 var errors []error 3933 3934 // no validation rules for Name 3935 3936 switch v := m.Kind.(type) { 3937 case *OngoingLongOps_Op_ExecutePostActionPayload_ConfigAction: 3938 if v == nil { 3939 err := OngoingLongOps_Op_ExecutePostActionPayloadValidationError{ 3940 field: "Kind", 3941 reason: "oneof value cannot be a typed-nil", 3942 } 3943 if !all { 3944 return err 3945 } 3946 errors = append(errors, err) 3947 } 3948 3949 if all { 3950 switch v := interface{}(m.GetConfigAction()).(type) { 3951 case interface{ ValidateAll() error }: 3952 if err := v.ValidateAll(); err != nil { 3953 errors = append(errors, OngoingLongOps_Op_ExecutePostActionPayloadValidationError{ 3954 field: "ConfigAction", 3955 reason: "embedded message failed validation", 3956 cause: err, 3957 }) 3958 } 3959 case interface{ Validate() error }: 3960 if err := v.Validate(); err != nil { 3961 errors = append(errors, OngoingLongOps_Op_ExecutePostActionPayloadValidationError{ 3962 field: "ConfigAction", 3963 reason: "embedded message failed validation", 3964 cause: err, 3965 }) 3966 } 3967 } 3968 } else if v, ok := interface{}(m.GetConfigAction()).(interface{ Validate() error }); ok { 3969 if err := v.Validate(); err != nil { 3970 return OngoingLongOps_Op_ExecutePostActionPayloadValidationError{ 3971 field: "ConfigAction", 3972 reason: "embedded message failed validation", 3973 cause: err, 3974 } 3975 } 3976 } 3977 3978 case *OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota_: 3979 if v == nil { 3980 err := OngoingLongOps_Op_ExecutePostActionPayloadValidationError{ 3981 field: "Kind", 3982 reason: "oneof value cannot be a typed-nil", 3983 } 3984 if !all { 3985 return err 3986 } 3987 errors = append(errors, err) 3988 } 3989 3990 if all { 3991 switch v := interface{}(m.GetCreditRunQuota()).(type) { 3992 case interface{ ValidateAll() error }: 3993 if err := v.ValidateAll(); err != nil { 3994 errors = append(errors, OngoingLongOps_Op_ExecutePostActionPayloadValidationError{ 3995 field: "CreditRunQuota", 3996 reason: "embedded message failed validation", 3997 cause: err, 3998 }) 3999 } 4000 case interface{ Validate() error }: 4001 if err := v.Validate(); err != nil { 4002 errors = append(errors, OngoingLongOps_Op_ExecutePostActionPayloadValidationError{ 4003 field: "CreditRunQuota", 4004 reason: "embedded message failed validation", 4005 cause: err, 4006 }) 4007 } 4008 } 4009 } else if v, ok := interface{}(m.GetCreditRunQuota()).(interface{ Validate() error }); ok { 4010 if err := v.Validate(); err != nil { 4011 return OngoingLongOps_Op_ExecutePostActionPayloadValidationError{ 4012 field: "CreditRunQuota", 4013 reason: "embedded message failed validation", 4014 cause: err, 4015 } 4016 } 4017 } 4018 4019 default: 4020 _ = v // ensures v is used 4021 } 4022 4023 if len(errors) > 0 { 4024 return OngoingLongOps_Op_ExecutePostActionPayloadMultiError(errors) 4025 } 4026 4027 return nil 4028 } 4029 4030 // OngoingLongOps_Op_ExecutePostActionPayloadMultiError is an error wrapping 4031 // multiple validation errors returned by 4032 // OngoingLongOps_Op_ExecutePostActionPayload.ValidateAll() if the designated 4033 // constraints aren't met. 4034 type OngoingLongOps_Op_ExecutePostActionPayloadMultiError []error 4035 4036 // Error returns a concatenation of all the error messages it wraps. 4037 func (m OngoingLongOps_Op_ExecutePostActionPayloadMultiError) Error() string { 4038 var msgs []string 4039 for _, err := range m { 4040 msgs = append(msgs, err.Error()) 4041 } 4042 return strings.Join(msgs, "; ") 4043 } 4044 4045 // AllErrors returns a list of validation violation errors. 4046 func (m OngoingLongOps_Op_ExecutePostActionPayloadMultiError) AllErrors() []error { return m } 4047 4048 // OngoingLongOps_Op_ExecutePostActionPayloadValidationError is the validation 4049 // error returned by OngoingLongOps_Op_ExecutePostActionPayload.Validate if 4050 // the designated constraints aren't met. 4051 type OngoingLongOps_Op_ExecutePostActionPayloadValidationError struct { 4052 field string 4053 reason string 4054 cause error 4055 key bool 4056 } 4057 4058 // Field function returns field value. 4059 func (e OngoingLongOps_Op_ExecutePostActionPayloadValidationError) Field() string { return e.field } 4060 4061 // Reason function returns reason value. 4062 func (e OngoingLongOps_Op_ExecutePostActionPayloadValidationError) Reason() string { return e.reason } 4063 4064 // Cause function returns cause value. 4065 func (e OngoingLongOps_Op_ExecutePostActionPayloadValidationError) Cause() error { return e.cause } 4066 4067 // Key function returns key value. 4068 func (e OngoingLongOps_Op_ExecutePostActionPayloadValidationError) Key() bool { return e.key } 4069 4070 // ErrorName returns error name. 4071 func (e OngoingLongOps_Op_ExecutePostActionPayloadValidationError) ErrorName() string { 4072 return "OngoingLongOps_Op_ExecutePostActionPayloadValidationError" 4073 } 4074 4075 // Error satisfies the builtin error interface 4076 func (e OngoingLongOps_Op_ExecutePostActionPayloadValidationError) Error() string { 4077 cause := "" 4078 if e.cause != nil { 4079 cause = fmt.Sprintf(" | caused by: %v", e.cause) 4080 } 4081 4082 key := "" 4083 if e.key { 4084 key = "key for " 4085 } 4086 4087 return fmt.Sprintf( 4088 "invalid %sOngoingLongOps_Op_ExecutePostActionPayload.%s: %s%s", 4089 key, 4090 e.field, 4091 e.reason, 4092 cause) 4093 } 4094 4095 var _ error = OngoingLongOps_Op_ExecutePostActionPayloadValidationError{} 4096 4097 var _ interface { 4098 Field() string 4099 Reason() string 4100 Key() bool 4101 Cause() error 4102 ErrorName() string 4103 } = OngoingLongOps_Op_ExecutePostActionPayloadValidationError{} 4104 4105 // Validate checks the field values on OngoingLongOps_Op_PostGerritMessage with 4106 // the rules defined in the proto definition for this message. If any rules 4107 // are violated, the first error encountered is returned, or nil if there are 4108 // no violations. 4109 func (m *OngoingLongOps_Op_PostGerritMessage) Validate() error { 4110 return m.validate(false) 4111 } 4112 4113 // ValidateAll checks the field values on OngoingLongOps_Op_PostGerritMessage 4114 // with the rules defined in the proto definition for this message. If any 4115 // rules are violated, the result is a list of violation errors wrapped in 4116 // OngoingLongOps_Op_PostGerritMessageMultiError, or nil if none found. 4117 func (m *OngoingLongOps_Op_PostGerritMessage) ValidateAll() error { 4118 return m.validate(true) 4119 } 4120 4121 func (m *OngoingLongOps_Op_PostGerritMessage) validate(all bool) error { 4122 if m == nil { 4123 return nil 4124 } 4125 4126 var errors []error 4127 4128 // no validation rules for Message 4129 4130 if len(errors) > 0 { 4131 return OngoingLongOps_Op_PostGerritMessageMultiError(errors) 4132 } 4133 4134 return nil 4135 } 4136 4137 // OngoingLongOps_Op_PostGerritMessageMultiError is an error wrapping multiple 4138 // validation errors returned by 4139 // OngoingLongOps_Op_PostGerritMessage.ValidateAll() if the designated 4140 // constraints aren't met. 4141 type OngoingLongOps_Op_PostGerritMessageMultiError []error 4142 4143 // Error returns a concatenation of all the error messages it wraps. 4144 func (m OngoingLongOps_Op_PostGerritMessageMultiError) Error() string { 4145 var msgs []string 4146 for _, err := range m { 4147 msgs = append(msgs, err.Error()) 4148 } 4149 return strings.Join(msgs, "; ") 4150 } 4151 4152 // AllErrors returns a list of validation violation errors. 4153 func (m OngoingLongOps_Op_PostGerritMessageMultiError) AllErrors() []error { return m } 4154 4155 // OngoingLongOps_Op_PostGerritMessageValidationError is the validation error 4156 // returned by OngoingLongOps_Op_PostGerritMessage.Validate if the designated 4157 // constraints aren't met. 4158 type OngoingLongOps_Op_PostGerritMessageValidationError struct { 4159 field string 4160 reason string 4161 cause error 4162 key bool 4163 } 4164 4165 // Field function returns field value. 4166 func (e OngoingLongOps_Op_PostGerritMessageValidationError) Field() string { return e.field } 4167 4168 // Reason function returns reason value. 4169 func (e OngoingLongOps_Op_PostGerritMessageValidationError) Reason() string { return e.reason } 4170 4171 // Cause function returns cause value. 4172 func (e OngoingLongOps_Op_PostGerritMessageValidationError) Cause() error { return e.cause } 4173 4174 // Key function returns key value. 4175 func (e OngoingLongOps_Op_PostGerritMessageValidationError) Key() bool { return e.key } 4176 4177 // ErrorName returns error name. 4178 func (e OngoingLongOps_Op_PostGerritMessageValidationError) ErrorName() string { 4179 return "OngoingLongOps_Op_PostGerritMessageValidationError" 4180 } 4181 4182 // Error satisfies the builtin error interface 4183 func (e OngoingLongOps_Op_PostGerritMessageValidationError) Error() string { 4184 cause := "" 4185 if e.cause != nil { 4186 cause = fmt.Sprintf(" | caused by: %v", e.cause) 4187 } 4188 4189 key := "" 4190 if e.key { 4191 key = "key for " 4192 } 4193 4194 return fmt.Sprintf( 4195 "invalid %sOngoingLongOps_Op_PostGerritMessage.%s: %s%s", 4196 key, 4197 e.field, 4198 e.reason, 4199 cause) 4200 } 4201 4202 var _ error = OngoingLongOps_Op_PostGerritMessageValidationError{} 4203 4204 var _ interface { 4205 Field() string 4206 Reason() string 4207 Key() bool 4208 Cause() error 4209 ErrorName() string 4210 } = OngoingLongOps_Op_PostGerritMessageValidationError{} 4211 4212 // Validate checks the field values on OngoingLongOps_Op_ResetTriggers_Request 4213 // with the rules defined in the proto definition for this message. If any 4214 // rules are violated, the first error encountered is returned, or nil if 4215 // there are no violations. 4216 func (m *OngoingLongOps_Op_ResetTriggers_Request) Validate() error { 4217 return m.validate(false) 4218 } 4219 4220 // ValidateAll checks the field values on 4221 // OngoingLongOps_Op_ResetTriggers_Request with the rules defined in the proto 4222 // definition for this message. If any rules are violated, the result is a 4223 // list of violation errors wrapped in 4224 // OngoingLongOps_Op_ResetTriggers_RequestMultiError, or nil if none found. 4225 func (m *OngoingLongOps_Op_ResetTriggers_Request) ValidateAll() error { 4226 return m.validate(true) 4227 } 4228 4229 func (m *OngoingLongOps_Op_ResetTriggers_Request) validate(all bool) error { 4230 if m == nil { 4231 return nil 4232 } 4233 4234 var errors []error 4235 4236 // no validation rules for Clid 4237 4238 // no validation rules for Message 4239 4240 // no validation rules for AddToAttentionReason 4241 4242 if len(errors) > 0 { 4243 return OngoingLongOps_Op_ResetTriggers_RequestMultiError(errors) 4244 } 4245 4246 return nil 4247 } 4248 4249 // OngoingLongOps_Op_ResetTriggers_RequestMultiError is an error wrapping 4250 // multiple validation errors returned by 4251 // OngoingLongOps_Op_ResetTriggers_Request.ValidateAll() if the designated 4252 // constraints aren't met. 4253 type OngoingLongOps_Op_ResetTriggers_RequestMultiError []error 4254 4255 // Error returns a concatenation of all the error messages it wraps. 4256 func (m OngoingLongOps_Op_ResetTriggers_RequestMultiError) Error() string { 4257 var msgs []string 4258 for _, err := range m { 4259 msgs = append(msgs, err.Error()) 4260 } 4261 return strings.Join(msgs, "; ") 4262 } 4263 4264 // AllErrors returns a list of validation violation errors. 4265 func (m OngoingLongOps_Op_ResetTriggers_RequestMultiError) AllErrors() []error { return m } 4266 4267 // OngoingLongOps_Op_ResetTriggers_RequestValidationError is the validation 4268 // error returned by OngoingLongOps_Op_ResetTriggers_Request.Validate if the 4269 // designated constraints aren't met. 4270 type OngoingLongOps_Op_ResetTriggers_RequestValidationError struct { 4271 field string 4272 reason string 4273 cause error 4274 key bool 4275 } 4276 4277 // Field function returns field value. 4278 func (e OngoingLongOps_Op_ResetTriggers_RequestValidationError) Field() string { return e.field } 4279 4280 // Reason function returns reason value. 4281 func (e OngoingLongOps_Op_ResetTriggers_RequestValidationError) Reason() string { return e.reason } 4282 4283 // Cause function returns cause value. 4284 func (e OngoingLongOps_Op_ResetTriggers_RequestValidationError) Cause() error { return e.cause } 4285 4286 // Key function returns key value. 4287 func (e OngoingLongOps_Op_ResetTriggers_RequestValidationError) Key() bool { return e.key } 4288 4289 // ErrorName returns error name. 4290 func (e OngoingLongOps_Op_ResetTriggers_RequestValidationError) ErrorName() string { 4291 return "OngoingLongOps_Op_ResetTriggers_RequestValidationError" 4292 } 4293 4294 // Error satisfies the builtin error interface 4295 func (e OngoingLongOps_Op_ResetTriggers_RequestValidationError) Error() string { 4296 cause := "" 4297 if e.cause != nil { 4298 cause = fmt.Sprintf(" | caused by: %v", e.cause) 4299 } 4300 4301 key := "" 4302 if e.key { 4303 key = "key for " 4304 } 4305 4306 return fmt.Sprintf( 4307 "invalid %sOngoingLongOps_Op_ResetTriggers_Request.%s: %s%s", 4308 key, 4309 e.field, 4310 e.reason, 4311 cause) 4312 } 4313 4314 var _ error = OngoingLongOps_Op_ResetTriggers_RequestValidationError{} 4315 4316 var _ interface { 4317 Field() string 4318 Reason() string 4319 Key() bool 4320 Cause() error 4321 ErrorName() string 4322 } = OngoingLongOps_Op_ResetTriggers_RequestValidationError{} 4323 4324 // Validate checks the field values on 4325 // OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota with the rules 4326 // defined in the proto definition for this message. If any rules are 4327 // violated, the first error encountered is returned, or nil if there are no violations. 4328 func (m *OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota) Validate() error { 4329 return m.validate(false) 4330 } 4331 4332 // ValidateAll checks the field values on 4333 // OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota with the rules 4334 // defined in the proto definition for this message. If any rules are 4335 // violated, the result is a list of violation errors wrapped in 4336 // OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaMultiError, or nil 4337 // if none found. 4338 func (m *OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota) ValidateAll() error { 4339 return m.validate(true) 4340 } 4341 4342 func (m *OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota) validate(all bool) error { 4343 if m == nil { 4344 return nil 4345 } 4346 4347 var errors []error 4348 4349 if len(errors) > 0 { 4350 return OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaMultiError(errors) 4351 } 4352 4353 return nil 4354 } 4355 4356 // OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaMultiError is an 4357 // error wrapping multiple validation errors returned by 4358 // OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota.ValidateAll() if 4359 // the designated constraints aren't met. 4360 type OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaMultiError []error 4361 4362 // Error returns a concatenation of all the error messages it wraps. 4363 func (m OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaMultiError) Error() string { 4364 var msgs []string 4365 for _, err := range m { 4366 msgs = append(msgs, err.Error()) 4367 } 4368 return strings.Join(msgs, "; ") 4369 } 4370 4371 // AllErrors returns a list of validation violation errors. 4372 func (m OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaMultiError) AllErrors() []error { 4373 return m 4374 } 4375 4376 // OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError is 4377 // the validation error returned by 4378 // OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota.Validate if the 4379 // designated constraints aren't met. 4380 type OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError struct { 4381 field string 4382 reason string 4383 cause error 4384 key bool 4385 } 4386 4387 // Field function returns field value. 4388 func (e OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError) Field() string { 4389 return e.field 4390 } 4391 4392 // Reason function returns reason value. 4393 func (e OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError) Reason() string { 4394 return e.reason 4395 } 4396 4397 // Cause function returns cause value. 4398 func (e OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError) Cause() error { 4399 return e.cause 4400 } 4401 4402 // Key function returns key value. 4403 func (e OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError) Key() bool { 4404 return e.key 4405 } 4406 4407 // ErrorName returns error name. 4408 func (e OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError) ErrorName() string { 4409 return "OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError" 4410 } 4411 4412 // Error satisfies the builtin error interface 4413 func (e OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError) Error() string { 4414 cause := "" 4415 if e.cause != nil { 4416 cause = fmt.Sprintf(" | caused by: %v", e.cause) 4417 } 4418 4419 key := "" 4420 if e.key { 4421 key = "key for " 4422 } 4423 4424 return fmt.Sprintf( 4425 "invalid %sOngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuota.%s: %s%s", 4426 key, 4427 e.field, 4428 e.reason, 4429 cause) 4430 } 4431 4432 var _ error = OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError{} 4433 4434 var _ interface { 4435 Field() string 4436 Reason() string 4437 Key() bool 4438 Cause() error 4439 ErrorName() string 4440 } = OngoingLongOps_Op_ExecutePostActionPayload_CreditRunQuotaValidationError{}