github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/config/overload/v3/overload.pb.validate.go (about) 1 // Code generated by protoc-gen-validate. DO NOT EDIT. 2 // source: envoy/config/overload/v3/overload.proto 3 4 package envoy_config_overload_v3 5 6 import ( 7 "bytes" 8 "errors" 9 "fmt" 10 "net" 11 "net/mail" 12 "net/url" 13 "regexp" 14 "strings" 15 "time" 16 "unicode/utf8" 17 18 "google.golang.org/protobuf/types/known/anypb" 19 ) 20 21 // ensure the imports are used 22 var ( 23 _ = bytes.MinRead 24 _ = errors.New("") 25 _ = fmt.Print 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 29 _ = net.IPv4len 30 _ = time.Duration(0) 31 _ = (*url.URL)(nil) 32 _ = (*mail.Address)(nil) 33 _ = anypb.Any{} 34 ) 35 36 // Validate checks the field values on ResourceMonitor with the rules defined 37 // in the proto definition for this message. If any rules are violated, an 38 // error is returned. 39 func (m *ResourceMonitor) Validate() error { 40 if m == nil { 41 return nil 42 } 43 44 if utf8.RuneCountInString(m.GetName()) < 1 { 45 return ResourceMonitorValidationError{ 46 field: "Name", 47 reason: "value length must be at least 1 runes", 48 } 49 } 50 51 switch m.ConfigType.(type) { 52 53 case *ResourceMonitor_TypedConfig: 54 55 if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { 56 if err := v.Validate(); err != nil { 57 return ResourceMonitorValidationError{ 58 field: "TypedConfig", 59 reason: "embedded message failed validation", 60 cause: err, 61 } 62 } 63 } 64 65 case *ResourceMonitor_HiddenEnvoyDeprecatedConfig: 66 67 if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok { 68 if err := v.Validate(); err != nil { 69 return ResourceMonitorValidationError{ 70 field: "HiddenEnvoyDeprecatedConfig", 71 reason: "embedded message failed validation", 72 cause: err, 73 } 74 } 75 } 76 77 } 78 79 return nil 80 } 81 82 // ResourceMonitorValidationError is the validation error returned by 83 // ResourceMonitor.Validate if the designated constraints aren't met. 84 type ResourceMonitorValidationError struct { 85 field string 86 reason string 87 cause error 88 key bool 89 } 90 91 // Field function returns field value. 92 func (e ResourceMonitorValidationError) Field() string { return e.field } 93 94 // Reason function returns reason value. 95 func (e ResourceMonitorValidationError) Reason() string { return e.reason } 96 97 // Cause function returns cause value. 98 func (e ResourceMonitorValidationError) Cause() error { return e.cause } 99 100 // Key function returns key value. 101 func (e ResourceMonitorValidationError) Key() bool { return e.key } 102 103 // ErrorName returns error name. 104 func (e ResourceMonitorValidationError) ErrorName() string { return "ResourceMonitorValidationError" } 105 106 // Error satisfies the builtin error interface 107 func (e ResourceMonitorValidationError) Error() string { 108 cause := "" 109 if e.cause != nil { 110 cause = fmt.Sprintf(" | caused by: %v", e.cause) 111 } 112 113 key := "" 114 if e.key { 115 key = "key for " 116 } 117 118 return fmt.Sprintf( 119 "invalid %sResourceMonitor.%s: %s%s", 120 key, 121 e.field, 122 e.reason, 123 cause) 124 } 125 126 var _ error = ResourceMonitorValidationError{} 127 128 var _ interface { 129 Field() string 130 Reason() string 131 Key() bool 132 Cause() error 133 ErrorName() string 134 } = ResourceMonitorValidationError{} 135 136 // Validate checks the field values on ThresholdTrigger with the rules defined 137 // in the proto definition for this message. If any rules are violated, an 138 // error is returned. 139 func (m *ThresholdTrigger) Validate() error { 140 if m == nil { 141 return nil 142 } 143 144 if val := m.GetValue(); val < 0 || val > 1 { 145 return ThresholdTriggerValidationError{ 146 field: "Value", 147 reason: "value must be inside range [0, 1]", 148 } 149 } 150 151 return nil 152 } 153 154 // ThresholdTriggerValidationError is the validation error returned by 155 // ThresholdTrigger.Validate if the designated constraints aren't met. 156 type ThresholdTriggerValidationError struct { 157 field string 158 reason string 159 cause error 160 key bool 161 } 162 163 // Field function returns field value. 164 func (e ThresholdTriggerValidationError) Field() string { return e.field } 165 166 // Reason function returns reason value. 167 func (e ThresholdTriggerValidationError) Reason() string { return e.reason } 168 169 // Cause function returns cause value. 170 func (e ThresholdTriggerValidationError) Cause() error { return e.cause } 171 172 // Key function returns key value. 173 func (e ThresholdTriggerValidationError) Key() bool { return e.key } 174 175 // ErrorName returns error name. 176 func (e ThresholdTriggerValidationError) ErrorName() string { return "ThresholdTriggerValidationError" } 177 178 // Error satisfies the builtin error interface 179 func (e ThresholdTriggerValidationError) 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 %sThresholdTrigger.%s: %s%s", 192 key, 193 e.field, 194 e.reason, 195 cause) 196 } 197 198 var _ error = ThresholdTriggerValidationError{} 199 200 var _ interface { 201 Field() string 202 Reason() string 203 Key() bool 204 Cause() error 205 ErrorName() string 206 } = ThresholdTriggerValidationError{} 207 208 // Validate checks the field values on ScaledTrigger with the rules defined in 209 // the proto definition for this message. If any rules are violated, an error 210 // is returned. 211 func (m *ScaledTrigger) Validate() error { 212 if m == nil { 213 return nil 214 } 215 216 if val := m.GetScalingThreshold(); val < 0 || val > 1 { 217 return ScaledTriggerValidationError{ 218 field: "ScalingThreshold", 219 reason: "value must be inside range [0, 1]", 220 } 221 } 222 223 if val := m.GetSaturationThreshold(); val < 0 || val > 1 { 224 return ScaledTriggerValidationError{ 225 field: "SaturationThreshold", 226 reason: "value must be inside range [0, 1]", 227 } 228 } 229 230 return nil 231 } 232 233 // ScaledTriggerValidationError is the validation error returned by 234 // ScaledTrigger.Validate if the designated constraints aren't met. 235 type ScaledTriggerValidationError struct { 236 field string 237 reason string 238 cause error 239 key bool 240 } 241 242 // Field function returns field value. 243 func (e ScaledTriggerValidationError) Field() string { return e.field } 244 245 // Reason function returns reason value. 246 func (e ScaledTriggerValidationError) Reason() string { return e.reason } 247 248 // Cause function returns cause value. 249 func (e ScaledTriggerValidationError) Cause() error { return e.cause } 250 251 // Key function returns key value. 252 func (e ScaledTriggerValidationError) Key() bool { return e.key } 253 254 // ErrorName returns error name. 255 func (e ScaledTriggerValidationError) ErrorName() string { return "ScaledTriggerValidationError" } 256 257 // Error satisfies the builtin error interface 258 func (e ScaledTriggerValidationError) Error() string { 259 cause := "" 260 if e.cause != nil { 261 cause = fmt.Sprintf(" | caused by: %v", e.cause) 262 } 263 264 key := "" 265 if e.key { 266 key = "key for " 267 } 268 269 return fmt.Sprintf( 270 "invalid %sScaledTrigger.%s: %s%s", 271 key, 272 e.field, 273 e.reason, 274 cause) 275 } 276 277 var _ error = ScaledTriggerValidationError{} 278 279 var _ interface { 280 Field() string 281 Reason() string 282 Key() bool 283 Cause() error 284 ErrorName() string 285 } = ScaledTriggerValidationError{} 286 287 // Validate checks the field values on Trigger with the rules defined in the 288 // proto definition for this message. If any rules are violated, an error is returned. 289 func (m *Trigger) Validate() error { 290 if m == nil { 291 return nil 292 } 293 294 if utf8.RuneCountInString(m.GetName()) < 1 { 295 return TriggerValidationError{ 296 field: "Name", 297 reason: "value length must be at least 1 runes", 298 } 299 } 300 301 switch m.TriggerOneof.(type) { 302 303 case *Trigger_Threshold: 304 305 if v, ok := interface{}(m.GetThreshold()).(interface{ Validate() error }); ok { 306 if err := v.Validate(); err != nil { 307 return TriggerValidationError{ 308 field: "Threshold", 309 reason: "embedded message failed validation", 310 cause: err, 311 } 312 } 313 } 314 315 case *Trigger_Scaled: 316 317 if v, ok := interface{}(m.GetScaled()).(interface{ Validate() error }); ok { 318 if err := v.Validate(); err != nil { 319 return TriggerValidationError{ 320 field: "Scaled", 321 reason: "embedded message failed validation", 322 cause: err, 323 } 324 } 325 } 326 327 default: 328 return TriggerValidationError{ 329 field: "TriggerOneof", 330 reason: "value is required", 331 } 332 333 } 334 335 return nil 336 } 337 338 // TriggerValidationError is the validation error returned by Trigger.Validate 339 // if the designated constraints aren't met. 340 type TriggerValidationError struct { 341 field string 342 reason string 343 cause error 344 key bool 345 } 346 347 // Field function returns field value. 348 func (e TriggerValidationError) Field() string { return e.field } 349 350 // Reason function returns reason value. 351 func (e TriggerValidationError) Reason() string { return e.reason } 352 353 // Cause function returns cause value. 354 func (e TriggerValidationError) Cause() error { return e.cause } 355 356 // Key function returns key value. 357 func (e TriggerValidationError) Key() bool { return e.key } 358 359 // ErrorName returns error name. 360 func (e TriggerValidationError) ErrorName() string { return "TriggerValidationError" } 361 362 // Error satisfies the builtin error interface 363 func (e TriggerValidationError) Error() string { 364 cause := "" 365 if e.cause != nil { 366 cause = fmt.Sprintf(" | caused by: %v", e.cause) 367 } 368 369 key := "" 370 if e.key { 371 key = "key for " 372 } 373 374 return fmt.Sprintf( 375 "invalid %sTrigger.%s: %s%s", 376 key, 377 e.field, 378 e.reason, 379 cause) 380 } 381 382 var _ error = TriggerValidationError{} 383 384 var _ interface { 385 Field() string 386 Reason() string 387 Key() bool 388 Cause() error 389 ErrorName() string 390 } = TriggerValidationError{} 391 392 // Validate checks the field values on ScaleTimersOverloadActionConfig with the 393 // rules defined in the proto definition for this message. If any rules are 394 // violated, an error is returned. 395 func (m *ScaleTimersOverloadActionConfig) Validate() error { 396 if m == nil { 397 return nil 398 } 399 400 if len(m.GetTimerScaleFactors()) < 1 { 401 return ScaleTimersOverloadActionConfigValidationError{ 402 field: "TimerScaleFactors", 403 reason: "value must contain at least 1 item(s)", 404 } 405 } 406 407 for idx, item := range m.GetTimerScaleFactors() { 408 _, _ = idx, item 409 410 if v, ok := interface{}(item).(interface{ Validate() error }); ok { 411 if err := v.Validate(); err != nil { 412 return ScaleTimersOverloadActionConfigValidationError{ 413 field: fmt.Sprintf("TimerScaleFactors[%v]", idx), 414 reason: "embedded message failed validation", 415 cause: err, 416 } 417 } 418 } 419 420 } 421 422 return nil 423 } 424 425 // ScaleTimersOverloadActionConfigValidationError is the validation error 426 // returned by ScaleTimersOverloadActionConfig.Validate if the designated 427 // constraints aren't met. 428 type ScaleTimersOverloadActionConfigValidationError struct { 429 field string 430 reason string 431 cause error 432 key bool 433 } 434 435 // Field function returns field value. 436 func (e ScaleTimersOverloadActionConfigValidationError) Field() string { return e.field } 437 438 // Reason function returns reason value. 439 func (e ScaleTimersOverloadActionConfigValidationError) Reason() string { return e.reason } 440 441 // Cause function returns cause value. 442 func (e ScaleTimersOverloadActionConfigValidationError) Cause() error { return e.cause } 443 444 // Key function returns key value. 445 func (e ScaleTimersOverloadActionConfigValidationError) Key() bool { return e.key } 446 447 // ErrorName returns error name. 448 func (e ScaleTimersOverloadActionConfigValidationError) ErrorName() string { 449 return "ScaleTimersOverloadActionConfigValidationError" 450 } 451 452 // Error satisfies the builtin error interface 453 func (e ScaleTimersOverloadActionConfigValidationError) Error() string { 454 cause := "" 455 if e.cause != nil { 456 cause = fmt.Sprintf(" | caused by: %v", e.cause) 457 } 458 459 key := "" 460 if e.key { 461 key = "key for " 462 } 463 464 return fmt.Sprintf( 465 "invalid %sScaleTimersOverloadActionConfig.%s: %s%s", 466 key, 467 e.field, 468 e.reason, 469 cause) 470 } 471 472 var _ error = ScaleTimersOverloadActionConfigValidationError{} 473 474 var _ interface { 475 Field() string 476 Reason() string 477 Key() bool 478 Cause() error 479 ErrorName() string 480 } = ScaleTimersOverloadActionConfigValidationError{} 481 482 // Validate checks the field values on OverloadAction with the rules defined in 483 // the proto definition for this message. If any rules are violated, an error 484 // is returned. 485 func (m *OverloadAction) Validate() error { 486 if m == nil { 487 return nil 488 } 489 490 if utf8.RuneCountInString(m.GetName()) < 1 { 491 return OverloadActionValidationError{ 492 field: "Name", 493 reason: "value length must be at least 1 runes", 494 } 495 } 496 497 if len(m.GetTriggers()) < 1 { 498 return OverloadActionValidationError{ 499 field: "Triggers", 500 reason: "value must contain at least 1 item(s)", 501 } 502 } 503 504 for idx, item := range m.GetTriggers() { 505 _, _ = idx, item 506 507 if v, ok := interface{}(item).(interface{ Validate() error }); ok { 508 if err := v.Validate(); err != nil { 509 return OverloadActionValidationError{ 510 field: fmt.Sprintf("Triggers[%v]", idx), 511 reason: "embedded message failed validation", 512 cause: err, 513 } 514 } 515 } 516 517 } 518 519 if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { 520 if err := v.Validate(); err != nil { 521 return OverloadActionValidationError{ 522 field: "TypedConfig", 523 reason: "embedded message failed validation", 524 cause: err, 525 } 526 } 527 } 528 529 return nil 530 } 531 532 // OverloadActionValidationError is the validation error returned by 533 // OverloadAction.Validate if the designated constraints aren't met. 534 type OverloadActionValidationError struct { 535 field string 536 reason string 537 cause error 538 key bool 539 } 540 541 // Field function returns field value. 542 func (e OverloadActionValidationError) Field() string { return e.field } 543 544 // Reason function returns reason value. 545 func (e OverloadActionValidationError) Reason() string { return e.reason } 546 547 // Cause function returns cause value. 548 func (e OverloadActionValidationError) Cause() error { return e.cause } 549 550 // Key function returns key value. 551 func (e OverloadActionValidationError) Key() bool { return e.key } 552 553 // ErrorName returns error name. 554 func (e OverloadActionValidationError) ErrorName() string { return "OverloadActionValidationError" } 555 556 // Error satisfies the builtin error interface 557 func (e OverloadActionValidationError) Error() string { 558 cause := "" 559 if e.cause != nil { 560 cause = fmt.Sprintf(" | caused by: %v", e.cause) 561 } 562 563 key := "" 564 if e.key { 565 key = "key for " 566 } 567 568 return fmt.Sprintf( 569 "invalid %sOverloadAction.%s: %s%s", 570 key, 571 e.field, 572 e.reason, 573 cause) 574 } 575 576 var _ error = OverloadActionValidationError{} 577 578 var _ interface { 579 Field() string 580 Reason() string 581 Key() bool 582 Cause() error 583 ErrorName() string 584 } = OverloadActionValidationError{} 585 586 // Validate checks the field values on BufferFactoryConfig with the rules 587 // defined in the proto definition for this message. If any rules are 588 // violated, an error is returned. 589 func (m *BufferFactoryConfig) Validate() error { 590 if m == nil { 591 return nil 592 } 593 594 if val := m.GetMinimumAccountToTrackPowerOfTwo(); val < 10 || val > 56 { 595 return BufferFactoryConfigValidationError{ 596 field: "MinimumAccountToTrackPowerOfTwo", 597 reason: "value must be inside range [10, 56]", 598 } 599 } 600 601 return nil 602 } 603 604 // BufferFactoryConfigValidationError is the validation error returned by 605 // BufferFactoryConfig.Validate if the designated constraints aren't met. 606 type BufferFactoryConfigValidationError struct { 607 field string 608 reason string 609 cause error 610 key bool 611 } 612 613 // Field function returns field value. 614 func (e BufferFactoryConfigValidationError) Field() string { return e.field } 615 616 // Reason function returns reason value. 617 func (e BufferFactoryConfigValidationError) Reason() string { return e.reason } 618 619 // Cause function returns cause value. 620 func (e BufferFactoryConfigValidationError) Cause() error { return e.cause } 621 622 // Key function returns key value. 623 func (e BufferFactoryConfigValidationError) Key() bool { return e.key } 624 625 // ErrorName returns error name. 626 func (e BufferFactoryConfigValidationError) ErrorName() string { 627 return "BufferFactoryConfigValidationError" 628 } 629 630 // Error satisfies the builtin error interface 631 func (e BufferFactoryConfigValidationError) Error() string { 632 cause := "" 633 if e.cause != nil { 634 cause = fmt.Sprintf(" | caused by: %v", e.cause) 635 } 636 637 key := "" 638 if e.key { 639 key = "key for " 640 } 641 642 return fmt.Sprintf( 643 "invalid %sBufferFactoryConfig.%s: %s%s", 644 key, 645 e.field, 646 e.reason, 647 cause) 648 } 649 650 var _ error = BufferFactoryConfigValidationError{} 651 652 var _ interface { 653 Field() string 654 Reason() string 655 Key() bool 656 Cause() error 657 ErrorName() string 658 } = BufferFactoryConfigValidationError{} 659 660 // Validate checks the field values on OverloadManager with the rules defined 661 // in the proto definition for this message. If any rules are violated, an 662 // error is returned. 663 func (m *OverloadManager) Validate() error { 664 if m == nil { 665 return nil 666 } 667 668 if v, ok := interface{}(m.GetRefreshInterval()).(interface{ Validate() error }); ok { 669 if err := v.Validate(); err != nil { 670 return OverloadManagerValidationError{ 671 field: "RefreshInterval", 672 reason: "embedded message failed validation", 673 cause: err, 674 } 675 } 676 } 677 678 if len(m.GetResourceMonitors()) < 1 { 679 return OverloadManagerValidationError{ 680 field: "ResourceMonitors", 681 reason: "value must contain at least 1 item(s)", 682 } 683 } 684 685 for idx, item := range m.GetResourceMonitors() { 686 _, _ = idx, item 687 688 if v, ok := interface{}(item).(interface{ Validate() error }); ok { 689 if err := v.Validate(); err != nil { 690 return OverloadManagerValidationError{ 691 field: fmt.Sprintf("ResourceMonitors[%v]", idx), 692 reason: "embedded message failed validation", 693 cause: err, 694 } 695 } 696 } 697 698 } 699 700 for idx, item := range m.GetActions() { 701 _, _ = idx, item 702 703 if v, ok := interface{}(item).(interface{ Validate() error }); ok { 704 if err := v.Validate(); err != nil { 705 return OverloadManagerValidationError{ 706 field: fmt.Sprintf("Actions[%v]", idx), 707 reason: "embedded message failed validation", 708 cause: err, 709 } 710 } 711 } 712 713 } 714 715 if v, ok := interface{}(m.GetBufferFactoryConfig()).(interface{ Validate() error }); ok { 716 if err := v.Validate(); err != nil { 717 return OverloadManagerValidationError{ 718 field: "BufferFactoryConfig", 719 reason: "embedded message failed validation", 720 cause: err, 721 } 722 } 723 } 724 725 return nil 726 } 727 728 // OverloadManagerValidationError is the validation error returned by 729 // OverloadManager.Validate if the designated constraints aren't met. 730 type OverloadManagerValidationError struct { 731 field string 732 reason string 733 cause error 734 key bool 735 } 736 737 // Field function returns field value. 738 func (e OverloadManagerValidationError) Field() string { return e.field } 739 740 // Reason function returns reason value. 741 func (e OverloadManagerValidationError) Reason() string { return e.reason } 742 743 // Cause function returns cause value. 744 func (e OverloadManagerValidationError) Cause() error { return e.cause } 745 746 // Key function returns key value. 747 func (e OverloadManagerValidationError) Key() bool { return e.key } 748 749 // ErrorName returns error name. 750 func (e OverloadManagerValidationError) ErrorName() string { return "OverloadManagerValidationError" } 751 752 // Error satisfies the builtin error interface 753 func (e OverloadManagerValidationError) Error() string { 754 cause := "" 755 if e.cause != nil { 756 cause = fmt.Sprintf(" | caused by: %v", e.cause) 757 } 758 759 key := "" 760 if e.key { 761 key = "key for " 762 } 763 764 return fmt.Sprintf( 765 "invalid %sOverloadManager.%s: %s%s", 766 key, 767 e.field, 768 e.reason, 769 cause) 770 } 771 772 var _ error = OverloadManagerValidationError{} 773 774 var _ interface { 775 Field() string 776 Reason() string 777 Key() bool 778 Cause() error 779 ErrorName() string 780 } = OverloadManagerValidationError{} 781 782 // Validate checks the field values on 783 // ScaleTimersOverloadActionConfig_ScaleTimer with the rules defined in the 784 // proto definition for this message. If any rules are violated, an error is returned. 785 func (m *ScaleTimersOverloadActionConfig_ScaleTimer) Validate() error { 786 if m == nil { 787 return nil 788 } 789 790 if _, ok := _ScaleTimersOverloadActionConfig_ScaleTimer_Timer_NotInLookup[m.GetTimer()]; ok { 791 return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ 792 field: "Timer", 793 reason: "value must not be in list [0]", 794 } 795 } 796 797 if _, ok := ScaleTimersOverloadActionConfig_TimerType_name[int32(m.GetTimer())]; !ok { 798 return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ 799 field: "Timer", 800 reason: "value must be one of the defined enum values", 801 } 802 } 803 804 switch m.OverloadAdjust.(type) { 805 806 case *ScaleTimersOverloadActionConfig_ScaleTimer_MinTimeout: 807 808 if v, ok := interface{}(m.GetMinTimeout()).(interface{ Validate() error }); ok { 809 if err := v.Validate(); err != nil { 810 return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ 811 field: "MinTimeout", 812 reason: "embedded message failed validation", 813 cause: err, 814 } 815 } 816 } 817 818 case *ScaleTimersOverloadActionConfig_ScaleTimer_MinScale: 819 820 if v, ok := interface{}(m.GetMinScale()).(interface{ Validate() error }); ok { 821 if err := v.Validate(); err != nil { 822 return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ 823 field: "MinScale", 824 reason: "embedded message failed validation", 825 cause: err, 826 } 827 } 828 } 829 830 default: 831 return ScaleTimersOverloadActionConfig_ScaleTimerValidationError{ 832 field: "OverloadAdjust", 833 reason: "value is required", 834 } 835 836 } 837 838 return nil 839 } 840 841 // ScaleTimersOverloadActionConfig_ScaleTimerValidationError is the validation 842 // error returned by ScaleTimersOverloadActionConfig_ScaleTimer.Validate if 843 // the designated constraints aren't met. 844 type ScaleTimersOverloadActionConfig_ScaleTimerValidationError struct { 845 field string 846 reason string 847 cause error 848 key bool 849 } 850 851 // Field function returns field value. 852 func (e ScaleTimersOverloadActionConfig_ScaleTimerValidationError) Field() string { return e.field } 853 854 // Reason function returns reason value. 855 func (e ScaleTimersOverloadActionConfig_ScaleTimerValidationError) Reason() string { return e.reason } 856 857 // Cause function returns cause value. 858 func (e ScaleTimersOverloadActionConfig_ScaleTimerValidationError) Cause() error { return e.cause } 859 860 // Key function returns key value. 861 func (e ScaleTimersOverloadActionConfig_ScaleTimerValidationError) Key() bool { return e.key } 862 863 // ErrorName returns error name. 864 func (e ScaleTimersOverloadActionConfig_ScaleTimerValidationError) ErrorName() string { 865 return "ScaleTimersOverloadActionConfig_ScaleTimerValidationError" 866 } 867 868 // Error satisfies the builtin error interface 869 func (e ScaleTimersOverloadActionConfig_ScaleTimerValidationError) Error() string { 870 cause := "" 871 if e.cause != nil { 872 cause = fmt.Sprintf(" | caused by: %v", e.cause) 873 } 874 875 key := "" 876 if e.key { 877 key = "key for " 878 } 879 880 return fmt.Sprintf( 881 "invalid %sScaleTimersOverloadActionConfig_ScaleTimer.%s: %s%s", 882 key, 883 e.field, 884 e.reason, 885 cause) 886 } 887 888 var _ error = ScaleTimersOverloadActionConfig_ScaleTimerValidationError{} 889 890 var _ interface { 891 Field() string 892 Reason() string 893 Key() bool 894 Cause() error 895 ErrorName() string 896 } = ScaleTimersOverloadActionConfig_ScaleTimerValidationError{} 897 898 var _ScaleTimersOverloadActionConfig_ScaleTimer_Timer_NotInLookup = map[ScaleTimersOverloadActionConfig_TimerType]struct{}{ 899 0: {}, 900 }