Debian Codegraph @

envoy/config/core/v3/health_check.pb.validate.go

raw
1 //go:build !disable_pgv
2 // Code generated by protoc-gen-validate. DO NOT EDIT.
3 // source: envoy/config/core/v3/health_check.proto
4
5 package corev3
6
7 import (
8 "bytes"
9 "errors"
10 "fmt"
11 "net"
12 "net/mail"
13 "net/url"
14 "regexp"
15 "sort"
16 "strings"
17 "time"
18 "unicode/utf8"
19
20 "google.golang.org/protobuf/types/known/anypb"
21
22 v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3"
23 )
24
25 // ensure the imports are used
26 var (
27 _ = bytes.MinRead
28 _ = errors.New("")
29 _ = fmt.Print
30 _ = utf8.UTFMax
31 _ = (*regexp.Regexp)(nil)
32 _ = (*strings.Reader)(nil)
33 _ = net.IPv4len
34 _ = time.Duration(0)
35 _ = (*url.URL)(nil)
36 _ = (*mail.Address)(nil)
37 _ = anypb.Any{}
38 _ = sort.Sort
39
40 _ = v3.CodecClientType(0)
41 )
42
43 // Validate checks the field values on HealthStatusSet with the rules defined
44 // in the proto definition for this message. If any rules are violated, the
45 // first error encountered is returned, or nil if there are no violations.
46 func (m *HealthStatusSet) Validate() error {
47 return m.validate(false)
48 }
49
50 // ValidateAll checks the field values on HealthStatusSet with the rules
51 // defined in the proto definition for this message. If any rules are
52 // violated, the result is a list of violation errors wrapped in
53 // HealthStatusSetMultiError, or nil if none found.
54 func (m *HealthStatusSet) ValidateAll() error {
55 return m.validate(true)
56 }
57
58 func (m *HealthStatusSet) validate(all bool) error {
59 if m == nil {
60 return nil
61 }
62
63 var errors []error
64
65 for idx, item := range m.GetStatuses() {
66 _, _ = idx, item
67
68 if _, ok := HealthStatus_name[int32(item)]; !ok {
69 err := HealthStatusSetValidationError{
70 field: fmt.Sprintf("Statuses[%v]", idx),
71 reason: "value must be one of the defined enum values",
72 }
73 if !all {
74 return err
75 }
76 errors = append(errors, err)
77 }
78
79 }
80
81 if len(errors) > 0 {
82 return HealthStatusSetMultiError(errors)
83 }
84
85 return nil
86 }
87
88 // HealthStatusSetMultiError is an error wrapping multiple validation errors
89 // returned by HealthStatusSet.ValidateAll() if the designated constraints
90 // aren't met.
91 type HealthStatusSetMultiError []error
92
93 // Error returns a concatenation of all the error messages it wraps.
94 func (m HealthStatusSetMultiError) Error() string {
95 var msgs []string
96 for _, err := range m {
97 msgs = append(msgs, err.Error())
98 }
99 return strings.Join(msgs, "; ")
100 }
101
102 // AllErrors returns a list of validation violation errors.
103 func (m HealthStatusSetMultiError) AllErrors() []error { return m }
104
105 // HealthStatusSetValidationError is the validation error returned by
106 // HealthStatusSet.Validate if the designated constraints aren't met.
107 type HealthStatusSetValidationError struct {
108 field string
109 reason string
110 cause error
111 key bool
112 }
113
114 // Field function returns field value.
115 func (e HealthStatusSetValidationError) Field() string { return e.field }
116
117 // Reason function returns reason value.
118 func (e HealthStatusSetValidationError) Reason() string { return e.reason }
119
120 // Cause function returns cause value.
121 func (e HealthStatusSetValidationError) Cause() error { return e.cause }
122
123 // Key function returns key value.
124 func (e HealthStatusSetValidationError) Key() bool { return e.key }
125
126 // ErrorName returns error name.
127 func (e HealthStatusSetValidationError) ErrorName() string { return "HealthStatusSetValidationError" }
128
129 // Error satisfies the builtin error interface
130 func (e HealthStatusSetValidationError) Error() string {
131 cause := ""
132 if e.cause != nil {
133 cause = fmt.Sprintf(" | caused by: %v", e.cause)
134 }
135
136 key := ""
137 if e.key {
138 key = "key for "
139 }
140
141 return fmt.Sprintf(
142 "invalid %sHealthStatusSet.%s: %s%s",
143 key,
144 e.field,
145 e.reason,
146 cause)
147 }
148
149 var _ error = HealthStatusSetValidationError{}
150
151 var _ interface {
152 Field() string
153 Reason() string
154 Key() bool
155 Cause() error
156 ErrorName() string
157 } = HealthStatusSetValidationError{}
158
159 // Validate checks the field values on HealthCheck with the rules defined in
160 // the proto definition for this message. If any rules are violated, the first
161 // error encountered is returned, or nil if there are no violations.
162 func (m *HealthCheck) Validate() error {
163 return m.validate(false)
164 }
165
166 // ValidateAll checks the field values on HealthCheck with the rules defined in
167 // the proto definition for this message. If any rules are violated, the
168 // result is a list of violation errors wrapped in HealthCheckMultiError, or
169 // nil if none found.
170 func (m *HealthCheck) ValidateAll() error {
171 return m.validate(true)
172 }
173
174 func (m *HealthCheck) validate(all bool) error {
175 if m == nil {
176 return nil
177 }
178
179 var errors []error
180
181 if m.GetTimeout() == nil {
182 err := HealthCheckValidationError{
183 field: "Timeout",
184 reason: "value is required",
185 }
186 if !all {
187 return err
188 }
189 errors = append(errors, err)
190 }
191
192 if d := m.GetTimeout(); d != nil {
193 dur, err := d.AsDuration(), d.CheckValid()
194 if err != nil {
195 err = HealthCheckValidationError{
196 field: "Timeout",
197 reason: "value is not a valid duration",
198 cause: err,
199 }
200 if !all {
201 return err
202 }
203 errors = append(errors, err)
204 } else {
205
206 gt := time.Duration(0*time.Second + 0*time.Nanosecond)
207
208 if dur <= gt {
209 err := HealthCheckValidationError{
210 field: "Timeout",
211 reason: "value must be greater than 0s",
212 }
213 if !all {
214 return err
215 }
216 errors = append(errors, err)
217 }
218
219 }
220 }
221
222 if m.GetInterval() == nil {
223 err := HealthCheckValidationError{
224 field: "Interval",
225 reason: "value is required",
226 }
227 if !all {
228 return err
229 }
230 errors = append(errors, err)
231 }
232
233 if d := m.GetInterval(); d != nil {
234 dur, err := d.AsDuration(), d.CheckValid()
235 if err != nil {
236 err = HealthCheckValidationError{
237 field: "Interval",
238 reason: "value is not a valid duration",
239 cause: err,
240 }
241 if !all {
242 return err
243 }
244 errors = append(errors, err)
245 } else {
246
247 gt := time.Duration(0*time.Second + 0*time.Nanosecond)
248
249 if dur <= gt {
250 err := HealthCheckValidationError{
251 field: "Interval",
252 reason: "value must be greater than 0s",
253 }
254 if !all {
255 return err
256 }
257 errors = append(errors, err)
258 }
259
260 }
261 }
262
263 if all {
264 switch v := interface{}(m.GetInitialJitter()).(type) {
265 case interface{ ValidateAll() error }:
266 if err := v.ValidateAll(); err != nil {
267 errors = append(errors, HealthCheckValidationError{
268 field: "InitialJitter",
269 reason: "embedded message failed validation",
270 cause: err,
271 })
272 }
273 case interface{ Validate() error }:
274 if err := v.Validate(); err != nil {
275 errors = append(errors, HealthCheckValidationError{
276 field: "InitialJitter",
277 reason: "embedded message failed validation",
278 cause: err,
279 })
280 }
281 }
282 } else if v, ok := interface{}(m.GetInitialJitter()).(interface{ Validate() error }); ok {
283 if err := v.Validate(); err != nil {
284 return HealthCheckValidationError{
285 field: "InitialJitter",
286 reason: "embedded message failed validation",
287 cause: err,
288 }
289 }
290 }
291
292 if all {
293 switch v := interface{}(m.GetIntervalJitter()).(type) {
294 case interface{ ValidateAll() error }:
295 if err := v.ValidateAll(); err != nil {
296 errors = append(errors, HealthCheckValidationError{
297 field: "IntervalJitter",
298 reason: "embedded message failed validation",
299 cause: err,
300 })
301 }
302 case interface{ Validate() error }:
303 if err := v.Validate(); err != nil {
304 errors = append(errors, HealthCheckValidationError{
305 field: "IntervalJitter",
306 reason: "embedded message failed validation",
307 cause: err,
308 })
309 }
310 }
311 } else if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok {
312 if err := v.Validate(); err != nil {
313 return HealthCheckValidationError{
314 field: "IntervalJitter",
315 reason: "embedded message failed validation",
316 cause: err,
317 }
318 }
319 }
320
321 // no validation rules for IntervalJitterPercent
322
323 if m.GetUnhealthyThreshold() == nil {
324 err := HealthCheckValidationError{
325 field: "UnhealthyThreshold",
326 reason: "value is required",
327 }
328 if !all {
329 return err
330 }
331 errors = append(errors, err)
332 }
333
334 if all {
335 switch v := interface{}(m.GetUnhealthyThreshold()).(type) {
336 case interface{ ValidateAll() error }:
337 if err := v.ValidateAll(); err != nil {
338 errors = append(errors, HealthCheckValidationError{
339 field: "UnhealthyThreshold",
340 reason: "embedded message failed validation",
341 cause: err,
342 })
343 }
344 case interface{ Validate() error }:
345 if err := v.Validate(); err != nil {
346 errors = append(errors, HealthCheckValidationError{
347 field: "UnhealthyThreshold",
348 reason: "embedded message failed validation",
349 cause: err,
350 })
351 }
352 }
353 } else if v, ok := interface{}(m.GetUnhealthyThreshold()).(interface{ Validate() error }); ok {
354 if err := v.Validate(); err != nil {
355 return HealthCheckValidationError{
356 field: "UnhealthyThreshold",
357 reason: "embedded message failed validation",
358 cause: err,
359 }
360 }
361 }
362
363 if m.GetHealthyThreshold() == nil {
364 err := HealthCheckValidationError{
365 field: "HealthyThreshold",
366 reason: "value is required",
367 }
368 if !all {
369 return err
370 }
371 errors = append(errors, err)
372 }
373
374 if all {
375 switch v := interface{}(m.GetHealthyThreshold()).(type) {
376 case interface{ ValidateAll() error }:
377 if err := v.ValidateAll(); err != nil {
378 errors = append(errors, HealthCheckValidationError{
379 field: "HealthyThreshold",
380 reason: "embedded message failed validation",
381 cause: err,
382 })
383 }
384 case interface{ Validate() error }:
385 if err := v.Validate(); err != nil {
386 errors = append(errors, HealthCheckValidationError{
387 field: "HealthyThreshold",
388 reason: "embedded message failed validation",
389 cause: err,
390 })
391 }
392 }
393 } else if v, ok := interface{}(m.GetHealthyThreshold()).(interface{ Validate() error }); ok {
394 if err := v.Validate(); err != nil {
395 return HealthCheckValidationError{
396 field: "HealthyThreshold",
397 reason: "embedded message failed validation",
398 cause: err,
399 }
400 }
401 }
402
403 if all {
404 switch v := interface{}(m.GetAltPort()).(type) {
405 case interface{ ValidateAll() error }:
406 if err := v.ValidateAll(); err != nil {
407 errors = append(errors, HealthCheckValidationError{
408 field: "AltPort",
409 reason: "embedded message failed validation",
410 cause: err,
411 })
412 }
413 case interface{ Validate() error }:
414 if err := v.Validate(); err != nil {
415 errors = append(errors, HealthCheckValidationError{
416 field: "AltPort",
417 reason: "embedded message failed validation",
418 cause: err,
419 })
420 }
421 }
422 } else if v, ok := interface{}(m.GetAltPort()).(interface{ Validate() error }); ok {
423 if err := v.Validate(); err != nil {
424 return HealthCheckValidationError{
425 field: "AltPort",
426 reason: "embedded message failed validation",
427 cause: err,
428 }
429 }
430 }
431
432 if all {
433 switch v := interface{}(m.GetReuseConnection()).(type) {
434 case interface{ ValidateAll() error }:
435 if err := v.ValidateAll(); err != nil {
436 errors = append(errors, HealthCheckValidationError{
437 field: "ReuseConnection",
438 reason: "embedded message failed validation",
439 cause: err,
440 })
441 }
442 case interface{ Validate() error }:
443 if err := v.Validate(); err != nil {
444 errors = append(errors, HealthCheckValidationError{
445 field: "ReuseConnection",
446 reason: "embedded message failed validation",
447 cause: err,
448 })
449 }
450 }
451 } else if v, ok := interface{}(m.GetReuseConnection()).(interface{ Validate() error }); ok {
452 if err := v.Validate(); err != nil {
453 return HealthCheckValidationError{
454 field: "ReuseConnection",
455 reason: "embedded message failed validation",
456 cause: err,
457 }
458 }
459 }
460
461 if d := m.GetNoTrafficInterval(); d != nil {
462 dur, err := d.AsDuration(), d.CheckValid()
463 if err != nil {
464 err = HealthCheckValidationError{
465 field: "NoTrafficInterval",
466 reason: "value is not a valid duration",
467 cause: err,
468 }
469 if !all {
470 return err
471 }
472 errors = append(errors, err)
473 } else {
474
475 gt := time.Duration(0*time.Second + 0*time.Nanosecond)
476
477 if dur <= gt {
478 err := HealthCheckValidationError{
479 field: "NoTrafficInterval",
480 reason: "value must be greater than 0s",
481 }
482 if !all {
483 return err
484 }
485 errors = append(errors, err)
486 }
487
488 }
489 }
490
491 if d := m.GetNoTrafficHealthyInterval(); d != nil {
492 dur, err := d.AsDuration(), d.CheckValid()
493 if err != nil {
494 err = HealthCheckValidationError{
495 field: "NoTrafficHealthyInterval",
496 reason: "value is not a valid duration",
497 cause: err,
498 }
499 if !all {
500 return err
501 }
502 errors = append(errors, err)
503 } else {
504
505 gt := time.Duration(0*time.Second + 0*time.Nanosecond)
506
507 if dur <= gt {
508 err := HealthCheckValidationError{
509 field: "NoTrafficHealthyInterval",
510 reason: "value must be greater than 0s",
511 }
512 if !all {
513 return err
514 }
515 errors = append(errors, err)
516 }
517
518 }
519 }
520
521 if d := m.GetUnhealthyInterval(); d != nil {
522 dur, err := d.AsDuration(), d.CheckValid()
523 if err != nil {
524 err = HealthCheckValidationError{
525 field: "UnhealthyInterval",
526 reason: "value is not a valid duration",
527 cause: err,
528 }
529 if !all {
530 return err
531 }
532 errors = append(errors, err)
533 } else {
534
535 gt := time.Duration(0*time.Second + 0*time.Nanosecond)
536
537 if dur <= gt {
538 err := HealthCheckValidationError{
539 field: "UnhealthyInterval",
540 reason: "value must be greater than 0s",
541 }
542 if !all {
543 return err
544 }
545 errors = append(errors, err)
546 }
547
548 }
549 }
550
551 if d := m.GetUnhealthyEdgeInterval(); d != nil {
552 dur, err := d.AsDuration(), d.CheckValid()
553 if err != nil {
554 err = HealthCheckValidationError{
555 field: "UnhealthyEdgeInterval",
556 reason: "value is not a valid duration",
557 cause: err,
558 }
559 if !all {
560 return err
561 }
562 errors = append(errors, err)
563 } else {
564
565 gt := time.Duration(0*time.Second + 0*time.Nanosecond)
566
567 if dur <= gt {
568 err := HealthCheckValidationError{
569 field: "UnhealthyEdgeInterval",
570 reason: "value must be greater than 0s",
571 }
572 if !all {
573 return err
574 }
575 errors = append(errors, err)
576 }
577
578 }
579 }
580
581 if d := m.GetHealthyEdgeInterval(); d != nil {
582 dur, err := d.AsDuration(), d.CheckValid()
583 if err != nil {
584 err = HealthCheckValidationError{
585 field: "HealthyEdgeInterval",
586 reason: "value is not a valid duration",
587 cause: err,
588 }
589 if !all {
590 return err
591 }
592 errors = append(errors, err)
593 } else {
594
595 gt := time.Duration(0*time.Second + 0*time.Nanosecond)
596
597 if dur <= gt {
598 err := HealthCheckValidationError{
599 field: "HealthyEdgeInterval",
600 reason: "value must be greater than 0s",
601 }
602 if !all {
603 return err
604 }
605 errors = append(errors, err)
606 }
607
608 }
609 }
610
611 // no validation rules for EventLogPath
612
613 for idx, item := range m.GetEventLogger() {
614 _, _ = idx, item
615
616 if all {
617 switch v := interface{}(item).(type) {
618 case interface{ ValidateAll() error }:
619 if err := v.ValidateAll(); err != nil {
620 errors = append(errors, HealthCheckValidationError{
621 field: fmt.Sprintf("EventLogger[%v]", idx),
622 reason: "embedded message failed validation",
623 cause: err,
624 })
625 }
626 case interface{ Validate() error }:
627 if err := v.Validate(); err != nil {
628 errors = append(errors, HealthCheckValidationError{
629 field: fmt.Sprintf("EventLogger[%v]", idx),
630 reason: "embedded message failed validation",
631 cause: err,
632 })
633 }
634 }
635 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
636 if err := v.Validate(); err != nil {
637 return HealthCheckValidationError{
638 field: fmt.Sprintf("EventLogger[%v]", idx),
639 reason: "embedded message failed validation",
640 cause: err,
641 }
642 }
643 }
644
645 }
646
647 if all {
648 switch v := interface{}(m.GetEventService()).(type) {
649 case interface{ ValidateAll() error }:
650 if err := v.ValidateAll(); err != nil {
651 errors = append(errors, HealthCheckValidationError{
652 field: "EventService",
653 reason: "embedded message failed validation",
654 cause: err,
655 })
656 }
657 case interface{ Validate() error }:
658 if err := v.Validate(); err != nil {
659 errors = append(errors, HealthCheckValidationError{
660 field: "EventService",
661 reason: "embedded message failed validation",
662 cause: err,
663 })
664 }
665 }
666 } else if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok {
667 if err := v.Validate(); err != nil {
668 return HealthCheckValidationError{
669 field: "EventService",
670 reason: "embedded message failed validation",
671 cause: err,
672 }
673 }
674 }
675
676 // no validation rules for AlwaysLogHealthCheckFailures
677
678 // no validation rules for AlwaysLogHealthCheckSuccess
679
680 if all {
681 switch v := interface{}(m.GetTlsOptions()).(type) {
682 case interface{ ValidateAll() error }:
683 if err := v.ValidateAll(); err != nil {
684 errors = append(errors, HealthCheckValidationError{
685 field: "TlsOptions",
686 reason: "embedded message failed validation",
687 cause: err,
688 })
689 }
690 case interface{ Validate() error }:
691 if err := v.Validate(); err != nil {
692 errors = append(errors, HealthCheckValidationError{
693 field: "TlsOptions",
694 reason: "embedded message failed validation",
695 cause: err,
696 })
697 }
698 }
699 } else if v, ok := interface{}(m.GetTlsOptions()).(interface{ Validate() error }); ok {
700 if err := v.Validate(); err != nil {
701 return HealthCheckValidationError{
702 field: "TlsOptions",
703 reason: "embedded message failed validation",
704 cause: err,
705 }
706 }
707 }
708
709 if all {
710 switch v := interface{}(m.GetTransportSocketMatchCriteria()).(type) {
711 case interface{ ValidateAll() error }:
712 if err := v.ValidateAll(); err != nil {
713 errors = append(errors, HealthCheckValidationError{
714 field: "TransportSocketMatchCriteria",
715 reason: "embedded message failed validation",
716 cause: err,
717 })
718 }
719 case interface{ Validate() error }:
720 if err := v.Validate(); err != nil {
721 errors = append(errors, HealthCheckValidationError{
722 field: "TransportSocketMatchCriteria",
723 reason: "embedded message failed validation",
724 cause: err,
725 })
726 }
727 }
728 } else if v, ok := interface{}(m.GetTransportSocketMatchCriteria()).(interface{ Validate() error }); ok {
729 if err := v.Validate(); err != nil {
730 return HealthCheckValidationError{
731 field: "TransportSocketMatchCriteria",
732 reason: "embedded message failed validation",
733 cause: err,
734 }
735 }
736 }
737
738 oneofHealthCheckerPresent := false
739 switch v := m.HealthChecker.(type) {
740 case *HealthCheck_HttpHealthCheck_:
741 if v == nil {
742 err := HealthCheckValidationError{
743 field: "HealthChecker",
744 reason: "oneof value cannot be a typed-nil",
745 }
746 if !all {
747 return err
748 }
749 errors = append(errors, err)
750 }
751 oneofHealthCheckerPresent = true
752
753 if all {
754 switch v := interface{}(m.GetHttpHealthCheck()).(type) {
755 case interface{ ValidateAll() error }:
756 if err := v.ValidateAll(); err != nil {
757 errors = append(errors, HealthCheckValidationError{
758 field: "HttpHealthCheck",
759 reason: "embedded message failed validation",
760 cause: err,
761 })
762 }
763 case interface{ Validate() error }:
764 if err := v.Validate(); err != nil {
765 errors = append(errors, HealthCheckValidationError{
766 field: "HttpHealthCheck",
767 reason: "embedded message failed validation",
768 cause: err,
769 })
770 }
771 }
772 } else if v, ok := interface{}(m.GetHttpHealthCheck()).(interface{ Validate() error }); ok {
773 if err := v.Validate(); err != nil {
774 return HealthCheckValidationError{
775 field: "HttpHealthCheck",
776 reason: "embedded message failed validation",
777 cause: err,
778 }
779 }
780 }
781
782 case *HealthCheck_TcpHealthCheck_:
783 if v == nil {
784 err := HealthCheckValidationError{
785 field: "HealthChecker",
786 reason: "oneof value cannot be a typed-nil",
787 }
788 if !all {
789 return err
790 }
791 errors = append(errors, err)
792 }
793 oneofHealthCheckerPresent = true
794
795 if all {
796 switch v := interface{}(m.GetTcpHealthCheck()).(type) {
797 case interface{ ValidateAll() error }:
798 if err := v.ValidateAll(); err != nil {
799 errors = append(errors, HealthCheckValidationError{
800 field: "TcpHealthCheck",
801 reason: "embedded message failed validation",
802 cause: err,
803 })
804 }
805 case interface{ Validate() error }:
806 if err := v.Validate(); err != nil {
807 errors = append(errors, HealthCheckValidationError{
808 field: "TcpHealthCheck",
809 reason: "embedded message failed validation",
810 cause: err,
811 })
812 }
813 }
814 } else if v, ok := interface{}(m.GetTcpHealthCheck()).(interface{ Validate() error }); ok {
815 if err := v.Validate(); err != nil {
816 return HealthCheckValidationError{
817 field: "TcpHealthCheck",
818 reason: "embedded message failed validation",
819 cause: err,
820 }
821 }
822 }
823
824 case *HealthCheck_GrpcHealthCheck_:
825 if v == nil {
826 err := HealthCheckValidationError{
827 field: "HealthChecker",
828 reason: "oneof value cannot be a typed-nil",
829 }
830 if !all {
831 return err
832 }
833 errors = append(errors, err)
834 }
835 oneofHealthCheckerPresent = true
836
837 if all {
838 switch v := interface{}(m.GetGrpcHealthCheck()).(type) {
839 case interface{ ValidateAll() error }:
840 if err := v.ValidateAll(); err != nil {
841 errors = append(errors, HealthCheckValidationError{
842 field: "GrpcHealthCheck",
843 reason: "embedded message failed validation",
844 cause: err,
845 })
846 }
847 case interface{ Validate() error }:
848 if err := v.Validate(); err != nil {
849 errors = append(errors, HealthCheckValidationError{
850 field: "GrpcHealthCheck",
851 reason: "embedded message failed validation",
852 cause: err,
853 })
854 }
855 }
856 } else if v, ok := interface{}(m.GetGrpcHealthCheck()).(interface{ Validate() error }); ok {
857 if err := v.Validate(); err != nil {
858 return HealthCheckValidationError{
859 field: "GrpcHealthCheck",
860 reason: "embedded message failed validation",
861 cause: err,
862 }
863 }
864 }
865
866 case *HealthCheck_CustomHealthCheck_:
867 if v == nil {
868 err := HealthCheckValidationError{
869 field: "HealthChecker",
870 reason: "oneof value cannot be a typed-nil",
871 }
872 if !all {
873 return err
874 }
875 errors = append(errors, err)
876 }
877 oneofHealthCheckerPresent = true
878
879 if all {
880 switch v := interface{}(m.GetCustomHealthCheck()).(type) {
881 case interface{ ValidateAll() error }:
882 if err := v.ValidateAll(); err != nil {
883 errors = append(errors, HealthCheckValidationError{
884 field: "CustomHealthCheck",
885 reason: "embedded message failed validation",
886 cause: err,
887 })
888 }
889 case interface{ Validate() error }:
890 if err := v.Validate(); err != nil {
891 errors = append(errors, HealthCheckValidationError{
892 field: "CustomHealthCheck",
893 reason: "embedded message failed validation",
894 cause: err,
895 })
896 }
897 }
898 } else if v, ok := interface{}(m.GetCustomHealthCheck()).(interface{ Validate() error }); ok {
899 if err := v.Validate(); err != nil {
900 return HealthCheckValidationError{
901 field: "CustomHealthCheck",
902 reason: "embedded message failed validation",
903 cause: err,
904 }
905 }
906 }
907
908 default:
909 _ = v // ensures v is used
910 }
911 if !oneofHealthCheckerPresent {
912 err := HealthCheckValidationError{
913 field: "HealthChecker",
914 reason: "value is required",
915 }
916 if !all {
917 return err
918 }
919 errors = append(errors, err)
920 }
921
922 if len(errors) > 0 {
923 return HealthCheckMultiError(errors)
924 }
925
926 return nil
927 }
928
929 // HealthCheckMultiError is an error wrapping multiple validation errors
930 // returned by HealthCheck.ValidateAll() if the designated constraints aren't met.
931 type HealthCheckMultiError []error
932
933 // Error returns a concatenation of all the error messages it wraps.
934 func (m HealthCheckMultiError) Error() string {
935 var msgs []string
936 for _, err := range m {
937 msgs = append(msgs, err.Error())
938 }
939 return strings.Join(msgs, "; ")
940 }
941
942 // AllErrors returns a list of validation violation errors.
943 func (m HealthCheckMultiError) AllErrors() []error { return m }
944
945 // HealthCheckValidationError is the validation error returned by
946 // HealthCheck.Validate if the designated constraints aren't met.
947 type HealthCheckValidationError struct {
948 field string
949 reason string
950 cause error
951 key bool
952 }
953
954 // Field function returns field value.
955 func (e HealthCheckValidationError) Field() string { return e.field }
956
957 // Reason function returns reason value.
958 func (e HealthCheckValidationError) Reason() string { return e.reason }
959
960 // Cause function returns cause value.
961 func (e HealthCheckValidationError) Cause() error { return e.cause }
962
963 // Key function returns key value.
964 func (e HealthCheckValidationError) Key() bool { return e.key }
965
966 // ErrorName returns error name.
967 func (e HealthCheckValidationError) ErrorName() string { return "HealthCheckValidationError" }
968
969 // Error satisfies the builtin error interface
970 func (e HealthCheckValidationError) Error() string {
971 cause := ""
972 if e.cause != nil {
973 cause = fmt.Sprintf(" | caused by: %v", e.cause)
974 }
975
976 key := ""
977 if e.key {
978 key = "key for "
979 }
980
981 return fmt.Sprintf(
982 "invalid %sHealthCheck.%s: %s%s",
983 key,
984 e.field,
985 e.reason,
986 cause)
987 }
988
989 var _ error = HealthCheckValidationError{}
990
991 var _ interface {
992 Field() string
993 Reason() string
994 Key() bool
995 Cause() error
996 ErrorName() string
997 } = HealthCheckValidationError{}
998
999 // Validate checks the field values on HealthCheck_Payload with the rules
1000 // defined in the proto definition for this message. If any rules are
1001 // violated, the first error encountered is returned, or nil if there are no violations.
1002 func (m *HealthCheck_Payload) Validate() error {
1003 return m.validate(false)
1004 }
1005
1006 // ValidateAll checks the field values on HealthCheck_Payload with the rules
1007 // defined in the proto definition for this message. If any rules are
1008 // violated, the result is a list of violation errors wrapped in
1009 // HealthCheck_PayloadMultiError, or nil if none found.
1010 func (m *HealthCheck_Payload) ValidateAll() error {
1011 return m.validate(true)
1012 }
1013
1014 func (m *HealthCheck_Payload) validate(all bool) error {
1015 if m == nil {
1016 return nil
1017 }
1018
1019 var errors []error
1020
1021 oneofPayloadPresent := false
1022 switch v := m.Payload.(type) {
1023 case *HealthCheck_Payload_Text:
1024 if v == nil {
1025 err := HealthCheck_PayloadValidationError{
1026 field: "Payload",
1027 reason: "oneof value cannot be a typed-nil",
1028 }
1029 if !all {
1030 return err
1031 }
1032 errors = append(errors, err)
1033 }
1034 oneofPayloadPresent = true
1035
1036 if utf8.RuneCountInString(m.GetText()) < 1 {
1037 err := HealthCheck_PayloadValidationError{
1038 field: "Text",
1039 reason: "value length must be at least 1 runes",
1040 }
1041 if !all {
1042 return err
1043 }
1044 errors = append(errors, err)
1045 }
1046
1047 case *HealthCheck_Payload_Binary:
1048 if v == nil {
1049 err := HealthCheck_PayloadValidationError{
1050 field: "Payload",
1051 reason: "oneof value cannot be a typed-nil",
1052 }
1053 if !all {
1054 return err
1055 }
1056 errors = append(errors, err)
1057 }
1058 oneofPayloadPresent = true
1059 // no validation rules for Binary
1060 default:
1061 _ = v // ensures v is used
1062 }
1063 if !oneofPayloadPresent {
1064 err := HealthCheck_PayloadValidationError{
1065 field: "Payload",
1066 reason: "value is required",
1067 }
1068 if !all {
1069 return err
1070 }
1071 errors = append(errors, err)
1072 }
1073
1074 if len(errors) > 0 {
1075 return HealthCheck_PayloadMultiError(errors)
1076 }
1077
1078 return nil
1079 }
1080
1081 // HealthCheck_PayloadMultiError is an error wrapping multiple validation
1082 // errors returned by HealthCheck_Payload.ValidateAll() if the designated
1083 // constraints aren't met.
1084 type HealthCheck_PayloadMultiError []error
1085
1086 // Error returns a concatenation of all the error messages it wraps.
1087 func (m HealthCheck_PayloadMultiError) Error() string {
1088 var msgs []string
1089 for _, err := range m {
1090 msgs = append(msgs, err.Error())
1091 }
1092 return strings.Join(msgs, "; ")
1093 }
1094
1095 // AllErrors returns a list of validation violation errors.
1096 func (m HealthCheck_PayloadMultiError) AllErrors() []error { return m }
1097
1098 // HealthCheck_PayloadValidationError is the validation error returned by
1099 // HealthCheck_Payload.Validate if the designated constraints aren't met.
1100 type HealthCheck_PayloadValidationError struct {
1101 field string
1102 reason string
1103 cause error
1104 key bool
1105 }
1106
1107 // Field function returns field value.
1108 func (e HealthCheck_PayloadValidationError) Field() string { return e.field }
1109
1110 // Reason function returns reason value.
1111 func (e HealthCheck_PayloadValidationError) Reason() string { return e.reason }
1112
1113 // Cause function returns cause value.
1114 func (e HealthCheck_PayloadValidationError) Cause() error { return e.cause }
1115
1116 // Key function returns key value.
1117 func (e HealthCheck_PayloadValidationError) Key() bool { return e.key }
1118
1119 // ErrorName returns error name.
1120 func (e HealthCheck_PayloadValidationError) ErrorName() string {
1121 return "HealthCheck_PayloadValidationError"
1122 }
1123
1124 // Error satisfies the builtin error interface
1125 func (e HealthCheck_PayloadValidationError) Error() string {
1126 cause := ""
1127 if e.cause != nil {
1128 cause = fmt.Sprintf(" | caused by: %v", e.cause)
1129 }
1130
1131 key := ""
1132 if e.key {
1133 key = "key for "
1134 }
1135
1136 return fmt.Sprintf(
1137 "invalid %sHealthCheck_Payload.%s: %s%s",
1138 key,
1139 e.field,
1140 e.reason,
1141 cause)
1142 }
1143
1144 var _ error = HealthCheck_PayloadValidationError{}
1145
1146 var _ interface {
1147 Field() string
1148 Reason() string
1149 Key() bool
1150 Cause() error
1151 ErrorName() string
1152 } = HealthCheck_PayloadValidationError{}
1153
1154 // Validate checks the field values on HealthCheck_HttpHealthCheck with the
1155 // rules defined in the proto definition for this message. If any rules are
1156 // violated, the first error encountered is returned, or nil if there are no violations.
1157 func (m *HealthCheck_HttpHealthCheck) Validate() error {
1158 return m.validate(false)
1159 }
1160
1161 // ValidateAll checks the field values on HealthCheck_HttpHealthCheck with the
1162 // rules defined in the proto definition for this message. If any rules are
1163 // violated, the result is a list of violation errors wrapped in
1164 // HealthCheck_HttpHealthCheckMultiError, or nil if none found.
1165 func (m *HealthCheck_HttpHealthCheck) ValidateAll() error {
1166 return m.validate(true)
1167 }
1168
1169 func (m *HealthCheck_HttpHealthCheck) validate(all bool) error {
1170 if m == nil {
1171 return nil
1172 }
1173
1174 var errors []error
1175
1176 if !_HealthCheck_HttpHealthCheck_Host_Pattern.MatchString(m.GetHost()) {
1177 err := HealthCheck_HttpHealthCheckValidationError{
1178 field: "Host",
1179 reason: "value does not match regex pattern \"^[^\\x00-\\b\\n-\\x1f\\x7f]*$\"",
1180 }
1181 if !all {
1182 return err
1183 }
1184 errors = append(errors, err)
1185 }
1186
1187 if utf8.RuneCountInString(m.GetPath()) < 1 {
1188 err := HealthCheck_HttpHealthCheckValidationError{
1189 field: "Path",
1190 reason: "value length must be at least 1 runes",
1191 }
1192 if !all {
1193 return err
1194 }
1195 errors = append(errors, err)
1196 }
1197
1198 if !_HealthCheck_HttpHealthCheck_Path_Pattern.MatchString(m.GetPath()) {
1199 err := HealthCheck_HttpHealthCheckValidationError{
1200 field: "Path",
1201 reason: "value does not match regex pattern \"^[^\\x00-\\b\\n-\\x1f\\x7f]*$\"",
1202 }
1203 if !all {
1204 return err
1205 }
1206 errors = append(errors, err)
1207 }
1208
1209 if all {
1210 switch v := interface{}(m.GetSend()).(type) {
1211 case interface{ ValidateAll() error }:
1212 if err := v.ValidateAll(); err != nil {
1213 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1214 field: "Send",
1215 reason: "embedded message failed validation",
1216 cause: err,
1217 })
1218 }
1219 case interface{ Validate() error }:
1220 if err := v.Validate(); err != nil {
1221 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1222 field: "Send",
1223 reason: "embedded message failed validation",
1224 cause: err,
1225 })
1226 }
1227 }
1228 } else if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok {
1229 if err := v.Validate(); err != nil {
1230 return HealthCheck_HttpHealthCheckValidationError{
1231 field: "Send",
1232 reason: "embedded message failed validation",
1233 cause: err,
1234 }
1235 }
1236 }
1237
1238 for idx, item := range m.GetReceive() {
1239 _, _ = idx, item
1240
1241 if all {
1242 switch v := interface{}(item).(type) {
1243 case interface{ ValidateAll() error }:
1244 if err := v.ValidateAll(); err != nil {
1245 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1246 field: fmt.Sprintf("Receive[%v]", idx),
1247 reason: "embedded message failed validation",
1248 cause: err,
1249 })
1250 }
1251 case interface{ Validate() error }:
1252 if err := v.Validate(); err != nil {
1253 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1254 field: fmt.Sprintf("Receive[%v]", idx),
1255 reason: "embedded message failed validation",
1256 cause: err,
1257 })
1258 }
1259 }
1260 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
1261 if err := v.Validate(); err != nil {
1262 return HealthCheck_HttpHealthCheckValidationError{
1263 field: fmt.Sprintf("Receive[%v]", idx),
1264 reason: "embedded message failed validation",
1265 cause: err,
1266 }
1267 }
1268 }
1269
1270 }
1271
1272 if wrapper := m.GetResponseBufferSize(); wrapper != nil {
1273
1274 if wrapper.GetValue() < 0 {
1275 err := HealthCheck_HttpHealthCheckValidationError{
1276 field: "ResponseBufferSize",
1277 reason: "value must be greater than or equal to 0",
1278 }
1279 if !all {
1280 return err
1281 }
1282 errors = append(errors, err)
1283 }
1284
1285 }
1286
1287 if len(m.GetRequestHeadersToAdd()) > 1000 {
1288 err := HealthCheck_HttpHealthCheckValidationError{
1289 field: "RequestHeadersToAdd",
1290 reason: "value must contain no more than 1000 item(s)",
1291 }
1292 if !all {
1293 return err
1294 }
1295 errors = append(errors, err)
1296 }
1297
1298 for idx, item := range m.GetRequestHeadersToAdd() {
1299 _, _ = idx, item
1300
1301 if all {
1302 switch v := interface{}(item).(type) {
1303 case interface{ ValidateAll() error }:
1304 if err := v.ValidateAll(); err != nil {
1305 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1306 field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx),
1307 reason: "embedded message failed validation",
1308 cause: err,
1309 })
1310 }
1311 case interface{ Validate() error }:
1312 if err := v.Validate(); err != nil {
1313 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1314 field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx),
1315 reason: "embedded message failed validation",
1316 cause: err,
1317 })
1318 }
1319 }
1320 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
1321 if err := v.Validate(); err != nil {
1322 return HealthCheck_HttpHealthCheckValidationError{
1323 field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx),
1324 reason: "embedded message failed validation",
1325 cause: err,
1326 }
1327 }
1328 }
1329
1330 }
1331
1332 for idx, item := range m.GetRequestHeadersToRemove() {
1333 _, _ = idx, item
1334
1335 if !_HealthCheck_HttpHealthCheck_RequestHeadersToRemove_Pattern.MatchString(item) {
1336 err := HealthCheck_HttpHealthCheckValidationError{
1337 field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx),
1338 reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
1339 }
1340 if !all {
1341 return err
1342 }
1343 errors = append(errors, err)
1344 }
1345
1346 }
1347
1348 for idx, item := range m.GetExpectedStatuses() {
1349 _, _ = idx, item
1350
1351 if all {
1352 switch v := interface{}(item).(type) {
1353 case interface{ ValidateAll() error }:
1354 if err := v.ValidateAll(); err != nil {
1355 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1356 field: fmt.Sprintf("ExpectedStatuses[%v]", idx),
1357 reason: "embedded message failed validation",
1358 cause: err,
1359 })
1360 }
1361 case interface{ Validate() error }:
1362 if err := v.Validate(); err != nil {
1363 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1364 field: fmt.Sprintf("ExpectedStatuses[%v]", idx),
1365 reason: "embedded message failed validation",
1366 cause: err,
1367 })
1368 }
1369 }
1370 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
1371 if err := v.Validate(); err != nil {
1372 return HealthCheck_HttpHealthCheckValidationError{
1373 field: fmt.Sprintf("ExpectedStatuses[%v]", idx),
1374 reason: "embedded message failed validation",
1375 cause: err,
1376 }
1377 }
1378 }
1379
1380 }
1381
1382 for idx, item := range m.GetRetriableStatuses() {
1383 _, _ = idx, item
1384
1385 if all {
1386 switch v := interface{}(item).(type) {
1387 case interface{ ValidateAll() error }:
1388 if err := v.ValidateAll(); err != nil {
1389 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1390 field: fmt.Sprintf("RetriableStatuses[%v]", idx),
1391 reason: "embedded message failed validation",
1392 cause: err,
1393 })
1394 }
1395 case interface{ Validate() error }:
1396 if err := v.Validate(); err != nil {
1397 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1398 field: fmt.Sprintf("RetriableStatuses[%v]", idx),
1399 reason: "embedded message failed validation",
1400 cause: err,
1401 })
1402 }
1403 }
1404 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
1405 if err := v.Validate(); err != nil {
1406 return HealthCheck_HttpHealthCheckValidationError{
1407 field: fmt.Sprintf("RetriableStatuses[%v]", idx),
1408 reason: "embedded message failed validation",
1409 cause: err,
1410 }
1411 }
1412 }
1413
1414 }
1415
1416 if _, ok := v3.CodecClientType_name[int32(m.GetCodecClientType())]; !ok {
1417 err := HealthCheck_HttpHealthCheckValidationError{
1418 field: "CodecClientType",
1419 reason: "value must be one of the defined enum values",
1420 }
1421 if !all {
1422 return err
1423 }
1424 errors = append(errors, err)
1425 }
1426
1427 if all {
1428 switch v := interface{}(m.GetServiceNameMatcher()).(type) {
1429 case interface{ ValidateAll() error }:
1430 if err := v.ValidateAll(); err != nil {
1431 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1432 field: "ServiceNameMatcher",
1433 reason: "embedded message failed validation",
1434 cause: err,
1435 })
1436 }
1437 case interface{ Validate() error }:
1438 if err := v.Validate(); err != nil {
1439 errors = append(errors, HealthCheck_HttpHealthCheckValidationError{
1440 field: "ServiceNameMatcher",
1441 reason: "embedded message failed validation",
1442 cause: err,
1443 })
1444 }
1445 }
1446 } else if v, ok := interface{}(m.GetServiceNameMatcher()).(interface{ Validate() error }); ok {
1447 if err := v.Validate(); err != nil {
1448 return HealthCheck_HttpHealthCheckValidationError{
1449 field: "ServiceNameMatcher",
1450 reason: "embedded message failed validation",
1451 cause: err,
1452 }
1453 }
1454 }
1455
1456 if _, ok := _HealthCheck_HttpHealthCheck_Method_NotInLookup[m.GetMethod()]; ok {
1457 err := HealthCheck_HttpHealthCheckValidationError{
1458 field: "Method",
1459 reason: "value must not be in list [CONNECT]",
1460 }
1461 if !all {
1462 return err
1463 }
1464 errors = append(errors, err)
1465 }
1466
1467 if _, ok := RequestMethod_name[int32(m.GetMethod())]; !ok {
1468 err := HealthCheck_HttpHealthCheckValidationError{
1469 field: "Method",
1470 reason: "value must be one of the defined enum values",
1471 }
1472 if !all {
1473 return err
1474 }
1475 errors = append(errors, err)
1476 }
1477
1478 if len(errors) > 0 {
1479 return HealthCheck_HttpHealthCheckMultiError(errors)
1480 }
1481
1482 return nil
1483 }
1484
1485 // HealthCheck_HttpHealthCheckMultiError is an error wrapping multiple
1486 // validation errors returned by HealthCheck_HttpHealthCheck.ValidateAll() if
1487 // the designated constraints aren't met.
1488 type HealthCheck_HttpHealthCheckMultiError []error
1489
1490 // Error returns a concatenation of all the error messages it wraps.
1491 func (m HealthCheck_HttpHealthCheckMultiError) Error() string {
1492 var msgs []string
1493 for _, err := range m {
1494 msgs = append(msgs, err.Error())
1495 }
1496 return strings.Join(msgs, "; ")
1497 }
1498
1499 // AllErrors returns a list of validation violation errors.
1500 func (m HealthCheck_HttpHealthCheckMultiError) AllErrors() []error { return m }
1501
1502 // HealthCheck_HttpHealthCheckValidationError is the validation error returned
1503 // by HealthCheck_HttpHealthCheck.Validate if the designated constraints
1504 // aren't met.
1505 type HealthCheck_HttpHealthCheckValidationError struct {
1506 field string
1507 reason string
1508 cause error
1509 key bool
1510 }
1511
1512 // Field function returns field value.
1513 func (e HealthCheck_HttpHealthCheckValidationError) Field() string { return e.field }
1514
1515 // Reason function returns reason value.
1516 func (e HealthCheck_HttpHealthCheckValidationError) Reason() string { return e.reason }
1517
1518 // Cause function returns cause value.
1519 func (e HealthCheck_HttpHealthCheckValidationError) Cause() error { return e.cause }
1520
1521 // Key function returns key value.
1522 func (e HealthCheck_HttpHealthCheckValidationError) Key() bool { return e.key }
1523
1524 // ErrorName returns error name.
1525 func (e HealthCheck_HttpHealthCheckValidationError) ErrorName() string {
1526 return "HealthCheck_HttpHealthCheckValidationError"
1527 }
1528
1529 // Error satisfies the builtin error interface
1530 func (e HealthCheck_HttpHealthCheckValidationError) Error() string {
1531 cause := ""
1532 if e.cause != nil {
1533 cause = fmt.Sprintf(" | caused by: %v", e.cause)
1534 }
1535
1536 key := ""
1537 if e.key {
1538 key = "key for "
1539 }
1540
1541 return fmt.Sprintf(
1542 "invalid %sHealthCheck_HttpHealthCheck.%s: %s%s",
1543 key,
1544 e.field,
1545 e.reason,
1546 cause)
1547 }
1548
1549 var _ error = HealthCheck_HttpHealthCheckValidationError{}
1550
1551 var _ interface {
1552 Field() string
1553 Reason() string
1554 Key() bool
1555 Cause() error
1556 ErrorName() string
1557 } = HealthCheck_HttpHealthCheckValidationError{}
1558
1559 var _HealthCheck_HttpHealthCheck_Host_Pattern = regexp.MustCompile("^[^\x00-\b\n-\x1f\x7f]*$")
1560
1561 var _HealthCheck_HttpHealthCheck_Path_Pattern = regexp.MustCompile("^[^\x00-\b\n-\x1f\x7f]*$")
1562
1563 var _HealthCheck_HttpHealthCheck_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
1564
1565 var _HealthCheck_HttpHealthCheck_Method_NotInLookup = map[RequestMethod]struct{}{
1566 6: {},
1567 }
1568
1569 // Validate checks the field values on HealthCheck_TcpHealthCheck with the
1570 // rules defined in the proto definition for this message. If any rules are
1571 // violated, the first error encountered is returned, or nil if there are no violations.
1572 func (m *HealthCheck_TcpHealthCheck) Validate() error {
1573 return m.validate(false)
1574 }
1575
1576 // ValidateAll checks the field values on HealthCheck_TcpHealthCheck with the
1577 // rules defined in the proto definition for this message. If any rules are
1578 // violated, the result is a list of violation errors wrapped in
1579 // HealthCheck_TcpHealthCheckMultiError, or nil if none found.
1580 func (m *HealthCheck_TcpHealthCheck) ValidateAll() error {
1581 return m.validate(true)
1582 }
1583
1584 func (m *HealthCheck_TcpHealthCheck) validate(all bool) error {
1585 if m == nil {
1586 return nil
1587 }
1588
1589 var errors []error
1590
1591 if all {
1592 switch v := interface{}(m.GetSend()).(type) {
1593 case interface{ ValidateAll() error }:
1594 if err := v.ValidateAll(); err != nil {
1595 errors = append(errors, HealthCheck_TcpHealthCheckValidationError{
1596 field: "Send",
1597 reason: "embedded message failed validation",
1598 cause: err,
1599 })
1600 }
1601 case interface{ Validate() error }:
1602 if err := v.Validate(); err != nil {
1603 errors = append(errors, HealthCheck_TcpHealthCheckValidationError{
1604 field: "Send",
1605 reason: "embedded message failed validation",
1606 cause: err,
1607 })
1608 }
1609 }
1610 } else if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok {
1611 if err := v.Validate(); err != nil {
1612 return HealthCheck_TcpHealthCheckValidationError{
1613 field: "Send",
1614 reason: "embedded message failed validation",
1615 cause: err,
1616 }
1617 }
1618 }
1619
1620 for idx, item := range m.GetReceive() {
1621 _, _ = idx, item
1622
1623 if all {
1624 switch v := interface{}(item).(type) {
1625 case interface{ ValidateAll() error }:
1626 if err := v.ValidateAll(); err != nil {
1627 errors = append(errors, HealthCheck_TcpHealthCheckValidationError{
1628 field: fmt.Sprintf("Receive[%v]", idx),
1629 reason: "embedded message failed validation",
1630 cause: err,
1631 })
1632 }
1633 case interface{ Validate() error }:
1634 if err := v.Validate(); err != nil {
1635 errors = append(errors, HealthCheck_TcpHealthCheckValidationError{
1636 field: fmt.Sprintf("Receive[%v]", idx),
1637 reason: "embedded message failed validation",
1638 cause: err,
1639 })
1640 }
1641 }
1642 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
1643 if err := v.Validate(); err != nil {
1644 return HealthCheck_TcpHealthCheckValidationError{
1645 field: fmt.Sprintf("Receive[%v]", idx),
1646 reason: "embedded message failed validation",
1647 cause: err,
1648 }
1649 }
1650 }
1651
1652 }
1653
1654 if all {
1655 switch v := interface{}(m.GetProxyProtocolConfig()).(type) {
1656 case interface{ ValidateAll() error }:
1657 if err := v.ValidateAll(); err != nil {
1658 errors = append(errors, HealthCheck_TcpHealthCheckValidationError{
1659 field: "ProxyProtocolConfig",
1660 reason: "embedded message failed validation",
1661 cause: err,
1662 })
1663 }
1664 case interface{ Validate() error }:
1665 if err := v.Validate(); err != nil {
1666 errors = append(errors, HealthCheck_TcpHealthCheckValidationError{
1667 field: "ProxyProtocolConfig",
1668 reason: "embedded message failed validation",
1669 cause: err,
1670 })
1671 }
1672 }
1673 } else if v, ok := interface{}(m.GetProxyProtocolConfig()).(interface{ Validate() error }); ok {
1674 if err := v.Validate(); err != nil {
1675 return HealthCheck_TcpHealthCheckValidationError{
1676 field: "ProxyProtocolConfig",
1677 reason: "embedded message failed validation",
1678 cause: err,
1679 }
1680 }
1681 }
1682
1683 if len(errors) > 0 {
1684 return HealthCheck_TcpHealthCheckMultiError(errors)
1685 }
1686
1687 return nil
1688 }
1689
1690 // HealthCheck_TcpHealthCheckMultiError is an error wrapping multiple
1691 // validation errors returned by HealthCheck_TcpHealthCheck.ValidateAll() if
1692 // the designated constraints aren't met.
1693 type HealthCheck_TcpHealthCheckMultiError []error
1694
1695 // Error returns a concatenation of all the error messages it wraps.
1696 func (m HealthCheck_TcpHealthCheckMultiError) Error() string {
1697 var msgs []string
1698 for _, err := range m {
1699 msgs = append(msgs, err.Error())
1700 }
1701 return strings.Join(msgs, "; ")
1702 }
1703
1704 // AllErrors returns a list of validation violation errors.
1705 func (m HealthCheck_TcpHealthCheckMultiError) AllErrors() []error { return m }
1706
1707 // HealthCheck_TcpHealthCheckValidationError is the validation error returned
1708 // by HealthCheck_TcpHealthCheck.Validate if the designated constraints aren't met.
1709 type HealthCheck_TcpHealthCheckValidationError struct {
1710 field string
1711 reason string
1712 cause error
1713 key bool
1714 }
1715
1716 // Field function returns field value.
1717 func (e HealthCheck_TcpHealthCheckValidationError) Field() string { return e.field }
1718
1719 // Reason function returns reason value.
1720 func (e HealthCheck_TcpHealthCheckValidationError) Reason() string { return e.reason }
1721
1722 // Cause function returns cause value.
1723 func (e HealthCheck_TcpHealthCheckValidationError) Cause() error { return e.cause }
1724
1725 // Key function returns key value.
1726 func (e HealthCheck_TcpHealthCheckValidationError) Key() bool { return e.key }
1727
1728 // ErrorName returns error name.
1729 func (e HealthCheck_TcpHealthCheckValidationError) ErrorName() string {
1730 return "HealthCheck_TcpHealthCheckValidationError"
1731 }
1732
1733 // Error satisfies the builtin error interface
1734 func (e HealthCheck_TcpHealthCheckValidationError) Error() string {
1735 cause := ""
1736 if e.cause != nil {
1737 cause = fmt.Sprintf(" | caused by: %v", e.cause)
1738 }
1739
1740 key := ""
1741 if e.key {
1742 key = "key for "
1743 }
1744
1745 return fmt.Sprintf(
1746 "invalid %sHealthCheck_TcpHealthCheck.%s: %s%s",
1747 key,
1748 e.field,
1749 e.reason,
1750 cause)
1751 }
1752
1753 var _ error = HealthCheck_TcpHealthCheckValidationError{}
1754
1755 var _ interface {
1756 Field() string
1757 Reason() string
1758 Key() bool
1759 Cause() error
1760 ErrorName() string
1761 } = HealthCheck_TcpHealthCheckValidationError{}
1762
1763 // Validate checks the field values on HealthCheck_RedisHealthCheck with the
1764 // rules defined in the proto definition for this message. If any rules are
1765 // violated, the first error encountered is returned, or nil if there are no violations.
1766 func (m *HealthCheck_RedisHealthCheck) Validate() error {
1767 return m.validate(false)
1768 }
1769
1770 // ValidateAll checks the field values on HealthCheck_RedisHealthCheck with the
1771 // rules defined in the proto definition for this message. If any rules are
1772 // violated, the result is a list of violation errors wrapped in
1773 // HealthCheck_RedisHealthCheckMultiError, or nil if none found.
1774 func (m *HealthCheck_RedisHealthCheck) ValidateAll() error {
1775 return m.validate(true)
1776 }
1777
1778 func (m *HealthCheck_RedisHealthCheck) validate(all bool) error {
1779 if m == nil {
1780 return nil
1781 }
1782
1783 var errors []error
1784
1785 // no validation rules for Key
1786
1787 if len(errors) > 0 {
1788 return HealthCheck_RedisHealthCheckMultiError(errors)
1789 }
1790
1791 return nil
1792 }
1793
1794 // HealthCheck_RedisHealthCheckMultiError is an error wrapping multiple
1795 // validation errors returned by HealthCheck_RedisHealthCheck.ValidateAll() if
1796 // the designated constraints aren't met.
1797 type HealthCheck_RedisHealthCheckMultiError []error
1798
1799 // Error returns a concatenation of all the error messages it wraps.
1800 func (m HealthCheck_RedisHealthCheckMultiError) Error() string {
1801 var msgs []string
1802 for _, err := range m {
1803 msgs = append(msgs, err.Error())
1804 }
1805 return strings.Join(msgs, "; ")
1806 }
1807
1808 // AllErrors returns a list of validation violation errors.
1809 func (m HealthCheck_RedisHealthCheckMultiError) AllErrors() []error { return m }
1810
1811 // HealthCheck_RedisHealthCheckValidationError is the validation error returned
1812 // by HealthCheck_RedisHealthCheck.Validate if the designated constraints
1813 // aren't met.
1814 type HealthCheck_RedisHealthCheckValidationError struct {
1815 field string
1816 reason string
1817 cause error
1818 key bool
1819 }
1820
1821 // Field function returns field value.
1822 func (e HealthCheck_RedisHealthCheckValidationError) Field() string { return e.field }
1823
1824 // Reason function returns reason value.
1825 func (e HealthCheck_RedisHealthCheckValidationError) Reason() string { return e.reason }
1826
1827 // Cause function returns cause value.
1828 func (e HealthCheck_RedisHealthCheckValidationError) Cause() error { return e.cause }
1829
1830 // Key function returns key value.
1831 func (e HealthCheck_RedisHealthCheckValidationError) Key() bool { return e.key }
1832
1833 // ErrorName returns error name.
1834 func (e HealthCheck_RedisHealthCheckValidationError) ErrorName() string {
1835 return "HealthCheck_RedisHealthCheckValidationError"
1836 }
1837
1838 // Error satisfies the builtin error interface
1839 func (e HealthCheck_RedisHealthCheckValidationError) Error() string {
1840 cause := ""
1841 if e.cause != nil {
1842 cause = fmt.Sprintf(" | caused by: %v", e.cause)
1843 }
1844
1845 key := ""
1846 if e.key {
1847 key = "key for "
1848 }
1849
1850 return fmt.Sprintf(
1851 "invalid %sHealthCheck_RedisHealthCheck.%s: %s%s",
1852 key,
1853 e.field,
1854 e.reason,
1855 cause)
1856 }
1857
1858 var _ error = HealthCheck_RedisHealthCheckValidationError{}
1859
1860 var _ interface {
1861 Field() string
1862 Reason() string
1863 Key() bool
1864 Cause() error
1865 ErrorName() string
1866 } = HealthCheck_RedisHealthCheckValidationError{}
1867
1868 // Validate checks the field values on HealthCheck_GrpcHealthCheck with the
1869 // rules defined in the proto definition for this message. If any rules are
1870 // violated, the first error encountered is returned, or nil if there are no violations.
1871 func (m *HealthCheck_GrpcHealthCheck) Validate() error {
1872 return m.validate(false)
1873 }
1874
1875 // ValidateAll checks the field values on HealthCheck_GrpcHealthCheck with the
1876 // rules defined in the proto definition for this message. If any rules are
1877 // violated, the result is a list of violation errors wrapped in
1878 // HealthCheck_GrpcHealthCheckMultiError, or nil if none found.
1879 func (m *HealthCheck_GrpcHealthCheck) ValidateAll() error {
1880 return m.validate(true)
1881 }
1882
1883 func (m *HealthCheck_GrpcHealthCheck) validate(all bool) error {
1884 if m == nil {
1885 return nil
1886 }
1887
1888 var errors []error
1889
1890 // no validation rules for ServiceName
1891
1892 if !_HealthCheck_GrpcHealthCheck_Authority_Pattern.MatchString(m.GetAuthority()) {
1893 err := HealthCheck_GrpcHealthCheckValidationError{
1894 field: "Authority",
1895 reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
1896 }
1897 if !all {
1898 return err
1899 }
1900 errors = append(errors, err)
1901 }
1902
1903 if len(m.GetInitialMetadata()) > 1000 {
1904 err := HealthCheck_GrpcHealthCheckValidationError{
1905 field: "InitialMetadata",
1906 reason: "value must contain no more than 1000 item(s)",
1907 }
1908 if !all {
1909 return err
1910 }
1911 errors = append(errors, err)
1912 }
1913
1914 for idx, item := range m.GetInitialMetadata() {
1915 _, _ = idx, item
1916
1917 if all {
1918 switch v := interface{}(item).(type) {
1919 case interface{ ValidateAll() error }:
1920 if err := v.ValidateAll(); err != nil {
1921 errors = append(errors, HealthCheck_GrpcHealthCheckValidationError{
1922 field: fmt.Sprintf("InitialMetadata[%v]", idx),
1923 reason: "embedded message failed validation",
1924 cause: err,
1925 })
1926 }
1927 case interface{ Validate() error }:
1928 if err := v.Validate(); err != nil {
1929 errors = append(errors, HealthCheck_GrpcHealthCheckValidationError{
1930 field: fmt.Sprintf("InitialMetadata[%v]", idx),
1931 reason: "embedded message failed validation",
1932 cause: err,
1933 })
1934 }
1935 }
1936 } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
1937 if err := v.Validate(); err != nil {
1938 return HealthCheck_GrpcHealthCheckValidationError{
1939 field: fmt.Sprintf("InitialMetadata[%v]", idx),
1940 reason: "embedded message failed validation",
1941 cause: err,
1942 }
1943 }
1944 }
1945
1946 }
1947
1948 if len(errors) > 0 {
1949 return HealthCheck_GrpcHealthCheckMultiError(errors)
1950 }
1951
1952 return nil
1953 }
1954
1955 // HealthCheck_GrpcHealthCheckMultiError is an error wrapping multiple
1956 // validation errors returned by HealthCheck_GrpcHealthCheck.ValidateAll() if
1957 // the designated constraints aren't met.
1958 type HealthCheck_GrpcHealthCheckMultiError []error
1959
1960 // Error returns a concatenation of all the error messages it wraps.
1961 func (m HealthCheck_GrpcHealthCheckMultiError) Error() string {
1962 var msgs []string
1963 for _, err := range m {
1964 msgs = append(msgs, err.Error())
1965 }
1966 return strings.Join(msgs, "; ")
1967 }
1968
1969 // AllErrors returns a list of validation violation errors.
1970 func (m HealthCheck_GrpcHealthCheckMultiError) AllErrors() []error { return m }
1971
1972 // HealthCheck_GrpcHealthCheckValidationError is the validation error returned
1973 // by HealthCheck_GrpcHealthCheck.Validate if the designated constraints
1974 // aren't met.
1975 type HealthCheck_GrpcHealthCheckValidationError struct {
1976 field string
1977 reason string
1978 cause error
1979 key bool
1980 }
1981
1982 // Field function returns field value.
1983 func (e HealthCheck_GrpcHealthCheckValidationError) Field() string { return e.field }
1984
1985 // Reason function returns reason value.
1986 func (e HealthCheck_GrpcHealthCheckValidationError) Reason() string { return e.reason }
1987
1988 // Cause function returns cause value.
1989 func (e HealthCheck_GrpcHealthCheckValidationError) Cause() error { return e.cause }
1990
1991 // Key function returns key value.
1992 func (e HealthCheck_GrpcHealthCheckValidationError) Key() bool { return e.key }
1993
1994 // ErrorName returns error name.
1995 func (e HealthCheck_GrpcHealthCheckValidationError) ErrorName() string {
1996 return "HealthCheck_GrpcHealthCheckValidationError"
1997 }
1998
1999 // Error satisfies the builtin error interface
2000 func (e HealthCheck_GrpcHealthCheckValidationError) Error() string {
2001 cause := ""
2002 if e.cause != nil {
2003 cause = fmt.Sprintf(" | caused by: %v", e.cause)
2004 }
2005
2006 key := ""
2007 if e.key {
2008 key = "key for "
2009 }
2010
2011 return fmt.Sprintf(
2012 "invalid %sHealthCheck_GrpcHealthCheck.%s: %s%s",
2013 key,
2014 e.field,
2015 e.reason,
2016 cause)
2017 }
2018
2019 var _ error = HealthCheck_GrpcHealthCheckValidationError{}
2020
2021 var _ interface {
2022 Field() string
2023 Reason() string
2024 Key() bool
2025 Cause() error
2026 ErrorName() string
2027 } = HealthCheck_GrpcHealthCheckValidationError{}
2028
2029 var _HealthCheck_GrpcHealthCheck_Authority_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
2030
2031 // Validate checks the field values on HealthCheck_CustomHealthCheck with the
2032 // rules defined in the proto definition for this message. If any rules are
2033 // violated, the first error encountered is returned, or nil if there are no violations.
2034 func (m *HealthCheck_CustomHealthCheck) Validate() error {
2035 return m.validate(false)
2036 }
2037
2038 // ValidateAll checks the field values on HealthCheck_CustomHealthCheck with
2039 // the rules defined in the proto definition for this message. If any rules
2040 // are violated, the result is a list of violation errors wrapped in
2041 // HealthCheck_CustomHealthCheckMultiError, or nil if none found.
2042 func (m *HealthCheck_CustomHealthCheck) ValidateAll() error {
2043 return m.validate(true)
2044 }
2045
2046 func (m *HealthCheck_CustomHealthCheck) validate(all bool) error {
2047 if m == nil {
2048 return nil
2049 }
2050
2051 var errors []error
2052
2053 if utf8.RuneCountInString(m.GetName()) < 1 {
2054 err := HealthCheck_CustomHealthCheckValidationError{
2055 field: "Name",
2056 reason: "value length must be at least 1 runes",
2057 }
2058 if !all {
2059 return err
2060 }
2061 errors = append(errors, err)
2062 }
2063
2064 switch v := m.ConfigType.(type) {
2065 case *HealthCheck_CustomHealthCheck_TypedConfig:
2066 if v == nil {
2067 err := HealthCheck_CustomHealthCheckValidationError{
2068 field: "ConfigType",
2069 reason: "oneof value cannot be a typed-nil",
2070 }
2071 if !all {
2072 return err
2073 }
2074 errors = append(errors, err)
2075 }
2076
2077 if all {
2078 switch v := interface{}(m.GetTypedConfig()).(type) {
2079 case interface{ ValidateAll() error }:
2080 if err := v.ValidateAll(); err != nil {
2081 errors = append(errors, HealthCheck_CustomHealthCheckValidationError{
2082 field: "TypedConfig",
2083 reason: "embedded message failed validation",
2084 cause: err,
2085 })
2086 }
2087 case interface{ Validate() error }:
2088 if err := v.Validate(); err != nil {
2089 errors = append(errors, HealthCheck_CustomHealthCheckValidationError{
2090 field: "TypedConfig",
2091 reason: "embedded message failed validation",
2092 cause: err,
2093 })
2094 }
2095 }
2096 } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok {
2097 if err := v.Validate(); err != nil {
2098 return HealthCheck_CustomHealthCheckValidationError{
2099 field: "TypedConfig",
2100 reason: "embedded message failed validation",
2101 cause: err,
2102 }
2103 }
2104 }
2105
2106 default:
2107 _ = v // ensures v is used
2108 }
2109
2110 if len(errors) > 0 {
2111 return HealthCheck_CustomHealthCheckMultiError(errors)
2112 }
2113
2114 return nil
2115 }
2116
2117 // HealthCheck_CustomHealthCheckMultiError is an error wrapping multiple
2118 // validation errors returned by HealthCheck_CustomHealthCheck.ValidateAll()
2119 // if the designated constraints aren't met.
2120 type HealthCheck_CustomHealthCheckMultiError []error
2121
2122 // Error returns a concatenation of all the error messages it wraps.
2123 func (m HealthCheck_CustomHealthCheckMultiError) Error() string {
2124 var msgs []string
2125 for _, err := range m {
2126 msgs = append(msgs, err.Error())
2127 }
2128 return strings.Join(msgs, "; ")
2129 }
2130
2131 // AllErrors returns a list of validation violation errors.
2132 func (m HealthCheck_CustomHealthCheckMultiError) AllErrors() []error { return m }
2133
2134 // HealthCheck_CustomHealthCheckValidationError is the validation error
2135 // returned by HealthCheck_CustomHealthCheck.Validate if the designated
2136 // constraints aren't met.
2137 type HealthCheck_CustomHealthCheckValidationError struct {
2138 field string
2139 reason string
2140 cause error
2141 key bool
2142 }
2143
2144 // Field function returns field value.
2145 func (e HealthCheck_CustomHealthCheckValidationError) Field() string { return e.field }
2146
2147 // Reason function returns reason value.
2148 func (e HealthCheck_CustomHealthCheckValidationError) Reason() string { return e.reason }
2149
2150 // Cause function returns cause value.
2151 func (e HealthCheck_CustomHealthCheckValidationError) Cause() error { return e.cause }
2152
2153 // Key function returns key value.
2154 func (e HealthCheck_CustomHealthCheckValidationError) Key() bool { return e.key }
2155
2156 // ErrorName returns error name.
2157 func (e HealthCheck_CustomHealthCheckValidationError) ErrorName() string {
2158 return "HealthCheck_CustomHealthCheckValidationError"
2159 }
2160
2161 // Error satisfies the builtin error interface
2162 func (e HealthCheck_CustomHealthCheckValidationError) Error() string {
2163 cause := ""
2164 if e.cause != nil {
2165 cause = fmt.Sprintf(" | caused by: %v", e.cause)
2166 }
2167
2168 key := ""
2169 if e.key {
2170 key = "key for "
2171 }
2172
2173 return fmt.Sprintf(
2174 "invalid %sHealthCheck_CustomHealthCheck.%s: %s%s",
2175 key,
2176 e.field,
2177 e.reason,
2178 cause)
2179 }
2180
2181 var _ error = HealthCheck_CustomHealthCheckValidationError{}
2182
2183 var _ interface {
2184 Field() string
2185 Reason() string
2186 Key() bool
2187 Cause() error
2188 ErrorName() string
2189 } = HealthCheck_CustomHealthCheckValidationError{}
2190
2191 // Validate checks the field values on HealthCheck_TlsOptions with the rules
2192 // defined in the proto definition for this message. If any rules are
2193 // violated, the first error encountered is returned, or nil if there are no violations.
2194 func (m *HealthCheck_TlsOptions) Validate() error {
2195 return m.validate(false)
2196 }
2197
2198 // ValidateAll checks the field values on HealthCheck_TlsOptions with the rules
2199 // defined in the proto definition for this message. If any rules are
2200 // violated, the result is a list of violation errors wrapped in
2201 // HealthCheck_TlsOptionsMultiError, or nil if none found.
2202 func (m *HealthCheck_TlsOptions) ValidateAll() error {
2203 return m.validate(true)
2204 }
2205
2206 func (m *HealthCheck_TlsOptions) validate(all bool) error {
2207 if m == nil {
2208 return nil
2209 }
2210
2211 var errors []error
2212
2213 if len(errors) > 0 {
2214 return HealthCheck_TlsOptionsMultiError(errors)
2215 }
2216
2217 return nil
2218 }
2219
2220 // HealthCheck_TlsOptionsMultiError is an error wrapping multiple validation
2221 // errors returned by HealthCheck_TlsOptions.ValidateAll() if the designated
2222 // constraints aren't met.
2223 type HealthCheck_TlsOptionsMultiError []error
2224
2225 // Error returns a concatenation of all the error messages it wraps.
2226 func (m HealthCheck_TlsOptionsMultiError) Error() string {
2227 var msgs []string
2228 for _, err := range m {
2229 msgs = append(msgs, err.Error())
2230 }
2231 return strings.Join(msgs, "; ")
2232 }
2233
2234 // AllErrors returns a list of validation violation errors.
2235 func (m HealthCheck_TlsOptionsMultiError) AllErrors() []error { return m }
2236
2237 // HealthCheck_TlsOptionsValidationError is the validation error returned by
2238 // HealthCheck_TlsOptions.Validate if the designated constraints aren't met.
2239 type HealthCheck_TlsOptionsValidationError struct {
2240 field string
2241 reason string
2242 cause error
2243 key bool
2244 }
2245
2246 // Field function returns field value.
2247 func (e HealthCheck_TlsOptionsValidationError) Field() string { return e.field }
2248
2249 // Reason function returns reason value.
2250 func (e HealthCheck_TlsOptionsValidationError) Reason() string { return e.reason }
2251
2252 // Cause function returns cause value.
2253 func (e HealthCheck_TlsOptionsValidationError) Cause() error { return e.cause }
2254
2255 // Key function returns key value.
2256 func (e HealthCheck_TlsOptionsValidationError) Key() bool { return e.key }
2257
2258 // ErrorName returns error name.
2259 func (e HealthCheck_TlsOptionsValidationError) ErrorName() string {
2260 return "HealthCheck_TlsOptionsValidationError"
2261 }
2262
2263 // Error satisfies the builtin error interface
2264 func (e HealthCheck_TlsOptionsValidationError) Error() string {
2265 cause := ""
2266 if e.cause != nil {
2267 cause = fmt.Sprintf(" | caused by: %v", e.cause)
2268 }
2269
2270 key := ""
2271 if e.key {
2272 key = "key for "
2273 }
2274
2275 return fmt.Sprintf(
2276 "invalid %sHealthCheck_TlsOptions.%s: %s%s",
2277 key,
2278 e.field,
2279 e.reason,
2280 cause)
2281 }
2282
2283 var _ error = HealthCheck_TlsOptionsValidationError{}
2284
2285 var _ interface {
2286 Field() string
2287 Reason() string
2288 Key() bool
2289 Cause() error
2290 ErrorName() string
2291 } = HealthCheck_TlsOptionsValidationError{}