1// Code generated by protoc-gen-validate. DO NOT EDIT.
2// source: envoy/config/core/v3/base.proto
3
4package envoy_config_core_v3
5
6import (
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	"github.com/golang/protobuf/ptypes"
19)
20
21// ensure the imports are used
22var (
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	_ = ptypes.DynamicAny{}
34)
35
36// Validate checks the field values on Locality with the rules defined in the
37// proto definition for this message. If any rules are violated, an error is returned.
38func (m *Locality) Validate() error {
39	if m == nil {
40		return nil
41	}
42
43	// no validation rules for Region
44
45	// no validation rules for Zone
46
47	// no validation rules for SubZone
48
49	return nil
50}
51
52// LocalityValidationError is the validation error returned by
53// Locality.Validate if the designated constraints aren't met.
54type LocalityValidationError struct {
55	field  string
56	reason string
57	cause  error
58	key    bool
59}
60
61// Field function returns field value.
62func (e LocalityValidationError) Field() string { return e.field }
63
64// Reason function returns reason value.
65func (e LocalityValidationError) Reason() string { return e.reason }
66
67// Cause function returns cause value.
68func (e LocalityValidationError) Cause() error { return e.cause }
69
70// Key function returns key value.
71func (e LocalityValidationError) Key() bool { return e.key }
72
73// ErrorName returns error name.
74func (e LocalityValidationError) ErrorName() string { return "LocalityValidationError" }
75
76// Error satisfies the builtin error interface
77func (e LocalityValidationError) Error() string {
78	cause := ""
79	if e.cause != nil {
80		cause = fmt.Sprintf(" | caused by: %v", e.cause)
81	}
82
83	key := ""
84	if e.key {
85		key = "key for "
86	}
87
88	return fmt.Sprintf(
89		"invalid %sLocality.%s: %s%s",
90		key,
91		e.field,
92		e.reason,
93		cause)
94}
95
96var _ error = LocalityValidationError{}
97
98var _ interface {
99	Field() string
100	Reason() string
101	Key() bool
102	Cause() error
103	ErrorName() string
104} = LocalityValidationError{}
105
106// Validate checks the field values on BuildVersion with the rules defined in
107// the proto definition for this message. If any rules are violated, an error
108// is returned.
109func (m *BuildVersion) Validate() error {
110	if m == nil {
111		return nil
112	}
113
114	if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok {
115		if err := v.Validate(); err != nil {
116			return BuildVersionValidationError{
117				field:  "Version",
118				reason: "embedded message failed validation",
119				cause:  err,
120			}
121		}
122	}
123
124	if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
125		if err := v.Validate(); err != nil {
126			return BuildVersionValidationError{
127				field:  "Metadata",
128				reason: "embedded message failed validation",
129				cause:  err,
130			}
131		}
132	}
133
134	return nil
135}
136
137// BuildVersionValidationError is the validation error returned by
138// BuildVersion.Validate if the designated constraints aren't met.
139type BuildVersionValidationError struct {
140	field  string
141	reason string
142	cause  error
143	key    bool
144}
145
146// Field function returns field value.
147func (e BuildVersionValidationError) Field() string { return e.field }
148
149// Reason function returns reason value.
150func (e BuildVersionValidationError) Reason() string { return e.reason }
151
152// Cause function returns cause value.
153func (e BuildVersionValidationError) Cause() error { return e.cause }
154
155// Key function returns key value.
156func (e BuildVersionValidationError) Key() bool { return e.key }
157
158// ErrorName returns error name.
159func (e BuildVersionValidationError) ErrorName() string { return "BuildVersionValidationError" }
160
161// Error satisfies the builtin error interface
162func (e BuildVersionValidationError) Error() string {
163	cause := ""
164	if e.cause != nil {
165		cause = fmt.Sprintf(" | caused by: %v", e.cause)
166	}
167
168	key := ""
169	if e.key {
170		key = "key for "
171	}
172
173	return fmt.Sprintf(
174		"invalid %sBuildVersion.%s: %s%s",
175		key,
176		e.field,
177		e.reason,
178		cause)
179}
180
181var _ error = BuildVersionValidationError{}
182
183var _ interface {
184	Field() string
185	Reason() string
186	Key() bool
187	Cause() error
188	ErrorName() string
189} = BuildVersionValidationError{}
190
191// Validate checks the field values on Extension with the rules defined in the
192// proto definition for this message. If any rules are violated, an error is returned.
193func (m *Extension) Validate() error {
194	if m == nil {
195		return nil
196	}
197
198	// no validation rules for Name
199
200	// no validation rules for Category
201
202	// no validation rules for TypeDescriptor
203
204	if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok {
205		if err := v.Validate(); err != nil {
206			return ExtensionValidationError{
207				field:  "Version",
208				reason: "embedded message failed validation",
209				cause:  err,
210			}
211		}
212	}
213
214	// no validation rules for Disabled
215
216	return nil
217}
218
219// ExtensionValidationError is the validation error returned by
220// Extension.Validate if the designated constraints aren't met.
221type ExtensionValidationError struct {
222	field  string
223	reason string
224	cause  error
225	key    bool
226}
227
228// Field function returns field value.
229func (e ExtensionValidationError) Field() string { return e.field }
230
231// Reason function returns reason value.
232func (e ExtensionValidationError) Reason() string { return e.reason }
233
234// Cause function returns cause value.
235func (e ExtensionValidationError) Cause() error { return e.cause }
236
237// Key function returns key value.
238func (e ExtensionValidationError) Key() bool { return e.key }
239
240// ErrorName returns error name.
241func (e ExtensionValidationError) ErrorName() string { return "ExtensionValidationError" }
242
243// Error satisfies the builtin error interface
244func (e ExtensionValidationError) Error() string {
245	cause := ""
246	if e.cause != nil {
247		cause = fmt.Sprintf(" | caused by: %v", e.cause)
248	}
249
250	key := ""
251	if e.key {
252		key = "key for "
253	}
254
255	return fmt.Sprintf(
256		"invalid %sExtension.%s: %s%s",
257		key,
258		e.field,
259		e.reason,
260		cause)
261}
262
263var _ error = ExtensionValidationError{}
264
265var _ interface {
266	Field() string
267	Reason() string
268	Key() bool
269	Cause() error
270	ErrorName() string
271} = ExtensionValidationError{}
272
273// Validate checks the field values on Node with the rules defined in the proto
274// definition for this message. If any rules are violated, an error is returned.
275func (m *Node) Validate() error {
276	if m == nil {
277		return nil
278	}
279
280	// no validation rules for Id
281
282	// no validation rules for Cluster
283
284	if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
285		if err := v.Validate(); err != nil {
286			return NodeValidationError{
287				field:  "Metadata",
288				reason: "embedded message failed validation",
289				cause:  err,
290			}
291		}
292	}
293
294	if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok {
295		if err := v.Validate(); err != nil {
296			return NodeValidationError{
297				field:  "Locality",
298				reason: "embedded message failed validation",
299				cause:  err,
300			}
301		}
302	}
303
304	// no validation rules for UserAgentName
305
306	for idx, item := range m.GetExtensions() {
307		_, _ = idx, item
308
309		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
310			if err := v.Validate(); err != nil {
311				return NodeValidationError{
312					field:  fmt.Sprintf("Extensions[%v]", idx),
313					reason: "embedded message failed validation",
314					cause:  err,
315				}
316			}
317		}
318
319	}
320
321	for idx, item := range m.GetListeningAddresses() {
322		_, _ = idx, item
323
324		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
325			if err := v.Validate(); err != nil {
326				return NodeValidationError{
327					field:  fmt.Sprintf("ListeningAddresses[%v]", idx),
328					reason: "embedded message failed validation",
329					cause:  err,
330				}
331			}
332		}
333
334	}
335
336	// no validation rules for HiddenEnvoyDeprecatedBuildVersion
337
338	switch m.UserAgentVersionType.(type) {
339
340	case *Node_UserAgentVersion:
341		// no validation rules for UserAgentVersion
342
343	case *Node_UserAgentBuildVersion:
344
345		if v, ok := interface{}(m.GetUserAgentBuildVersion()).(interface{ Validate() error }); ok {
346			if err := v.Validate(); err != nil {
347				return NodeValidationError{
348					field:  "UserAgentBuildVersion",
349					reason: "embedded message failed validation",
350					cause:  err,
351				}
352			}
353		}
354
355	}
356
357	return nil
358}
359
360// NodeValidationError is the validation error returned by Node.Validate if the
361// designated constraints aren't met.
362type NodeValidationError struct {
363	field  string
364	reason string
365	cause  error
366	key    bool
367}
368
369// Field function returns field value.
370func (e NodeValidationError) Field() string { return e.field }
371
372// Reason function returns reason value.
373func (e NodeValidationError) Reason() string { return e.reason }
374
375// Cause function returns cause value.
376func (e NodeValidationError) Cause() error { return e.cause }
377
378// Key function returns key value.
379func (e NodeValidationError) Key() bool { return e.key }
380
381// ErrorName returns error name.
382func (e NodeValidationError) ErrorName() string { return "NodeValidationError" }
383
384// Error satisfies the builtin error interface
385func (e NodeValidationError) Error() string {
386	cause := ""
387	if e.cause != nil {
388		cause = fmt.Sprintf(" | caused by: %v", e.cause)
389	}
390
391	key := ""
392	if e.key {
393		key = "key for "
394	}
395
396	return fmt.Sprintf(
397		"invalid %sNode.%s: %s%s",
398		key,
399		e.field,
400		e.reason,
401		cause)
402}
403
404var _ error = NodeValidationError{}
405
406var _ interface {
407	Field() string
408	Reason() string
409	Key() bool
410	Cause() error
411	ErrorName() string
412} = NodeValidationError{}
413
414// Validate checks the field values on Metadata with the rules defined in the
415// proto definition for this message. If any rules are violated, an error is returned.
416func (m *Metadata) Validate() error {
417	if m == nil {
418		return nil
419	}
420
421	for key, val := range m.GetFilterMetadata() {
422		_ = val
423
424		// no validation rules for FilterMetadata[key]
425
426		if v, ok := interface{}(val).(interface{ Validate() error }); ok {
427			if err := v.Validate(); err != nil {
428				return MetadataValidationError{
429					field:  fmt.Sprintf("FilterMetadata[%v]", key),
430					reason: "embedded message failed validation",
431					cause:  err,
432				}
433			}
434		}
435
436	}
437
438	return nil
439}
440
441// MetadataValidationError is the validation error returned by
442// Metadata.Validate if the designated constraints aren't met.
443type MetadataValidationError struct {
444	field  string
445	reason string
446	cause  error
447	key    bool
448}
449
450// Field function returns field value.
451func (e MetadataValidationError) Field() string { return e.field }
452
453// Reason function returns reason value.
454func (e MetadataValidationError) Reason() string { return e.reason }
455
456// Cause function returns cause value.
457func (e MetadataValidationError) Cause() error { return e.cause }
458
459// Key function returns key value.
460func (e MetadataValidationError) Key() bool { return e.key }
461
462// ErrorName returns error name.
463func (e MetadataValidationError) ErrorName() string { return "MetadataValidationError" }
464
465// Error satisfies the builtin error interface
466func (e MetadataValidationError) Error() string {
467	cause := ""
468	if e.cause != nil {
469		cause = fmt.Sprintf(" | caused by: %v", e.cause)
470	}
471
472	key := ""
473	if e.key {
474		key = "key for "
475	}
476
477	return fmt.Sprintf(
478		"invalid %sMetadata.%s: %s%s",
479		key,
480		e.field,
481		e.reason,
482		cause)
483}
484
485var _ error = MetadataValidationError{}
486
487var _ interface {
488	Field() string
489	Reason() string
490	Key() bool
491	Cause() error
492	ErrorName() string
493} = MetadataValidationError{}
494
495// Validate checks the field values on RuntimeUInt32 with the rules defined in
496// the proto definition for this message. If any rules are violated, an error
497// is returned.
498func (m *RuntimeUInt32) Validate() error {
499	if m == nil {
500		return nil
501	}
502
503	// no validation rules for DefaultValue
504
505	if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 {
506		return RuntimeUInt32ValidationError{
507			field:  "RuntimeKey",
508			reason: "value length must be at least 1 runes",
509		}
510	}
511
512	return nil
513}
514
515// RuntimeUInt32ValidationError is the validation error returned by
516// RuntimeUInt32.Validate if the designated constraints aren't met.
517type RuntimeUInt32ValidationError struct {
518	field  string
519	reason string
520	cause  error
521	key    bool
522}
523
524// Field function returns field value.
525func (e RuntimeUInt32ValidationError) Field() string { return e.field }
526
527// Reason function returns reason value.
528func (e RuntimeUInt32ValidationError) Reason() string { return e.reason }
529
530// Cause function returns cause value.
531func (e RuntimeUInt32ValidationError) Cause() error { return e.cause }
532
533// Key function returns key value.
534func (e RuntimeUInt32ValidationError) Key() bool { return e.key }
535
536// ErrorName returns error name.
537func (e RuntimeUInt32ValidationError) ErrorName() string { return "RuntimeUInt32ValidationError" }
538
539// Error satisfies the builtin error interface
540func (e RuntimeUInt32ValidationError) Error() string {
541	cause := ""
542	if e.cause != nil {
543		cause = fmt.Sprintf(" | caused by: %v", e.cause)
544	}
545
546	key := ""
547	if e.key {
548		key = "key for "
549	}
550
551	return fmt.Sprintf(
552		"invalid %sRuntimeUInt32.%s: %s%s",
553		key,
554		e.field,
555		e.reason,
556		cause)
557}
558
559var _ error = RuntimeUInt32ValidationError{}
560
561var _ interface {
562	Field() string
563	Reason() string
564	Key() bool
565	Cause() error
566	ErrorName() string
567} = RuntimeUInt32ValidationError{}
568
569// Validate checks the field values on RuntimePercent with the rules defined in
570// the proto definition for this message. If any rules are violated, an error
571// is returned.
572func (m *RuntimePercent) Validate() error {
573	if m == nil {
574		return nil
575	}
576
577	if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok {
578		if err := v.Validate(); err != nil {
579			return RuntimePercentValidationError{
580				field:  "DefaultValue",
581				reason: "embedded message failed validation",
582				cause:  err,
583			}
584		}
585	}
586
587	if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 {
588		return RuntimePercentValidationError{
589			field:  "RuntimeKey",
590			reason: "value length must be at least 1 runes",
591		}
592	}
593
594	return nil
595}
596
597// RuntimePercentValidationError is the validation error returned by
598// RuntimePercent.Validate if the designated constraints aren't met.
599type RuntimePercentValidationError struct {
600	field  string
601	reason string
602	cause  error
603	key    bool
604}
605
606// Field function returns field value.
607func (e RuntimePercentValidationError) Field() string { return e.field }
608
609// Reason function returns reason value.
610func (e RuntimePercentValidationError) Reason() string { return e.reason }
611
612// Cause function returns cause value.
613func (e RuntimePercentValidationError) Cause() error { return e.cause }
614
615// Key function returns key value.
616func (e RuntimePercentValidationError) Key() bool { return e.key }
617
618// ErrorName returns error name.
619func (e RuntimePercentValidationError) ErrorName() string { return "RuntimePercentValidationError" }
620
621// Error satisfies the builtin error interface
622func (e RuntimePercentValidationError) Error() string {
623	cause := ""
624	if e.cause != nil {
625		cause = fmt.Sprintf(" | caused by: %v", e.cause)
626	}
627
628	key := ""
629	if e.key {
630		key = "key for "
631	}
632
633	return fmt.Sprintf(
634		"invalid %sRuntimePercent.%s: %s%s",
635		key,
636		e.field,
637		e.reason,
638		cause)
639}
640
641var _ error = RuntimePercentValidationError{}
642
643var _ interface {
644	Field() string
645	Reason() string
646	Key() bool
647	Cause() error
648	ErrorName() string
649} = RuntimePercentValidationError{}
650
651// Validate checks the field values on RuntimeDouble with the rules defined in
652// the proto definition for this message. If any rules are violated, an error
653// is returned.
654func (m *RuntimeDouble) Validate() error {
655	if m == nil {
656		return nil
657	}
658
659	// no validation rules for DefaultValue
660
661	if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 {
662		return RuntimeDoubleValidationError{
663			field:  "RuntimeKey",
664			reason: "value length must be at least 1 runes",
665		}
666	}
667
668	return nil
669}
670
671// RuntimeDoubleValidationError is the validation error returned by
672// RuntimeDouble.Validate if the designated constraints aren't met.
673type RuntimeDoubleValidationError struct {
674	field  string
675	reason string
676	cause  error
677	key    bool
678}
679
680// Field function returns field value.
681func (e RuntimeDoubleValidationError) Field() string { return e.field }
682
683// Reason function returns reason value.
684func (e RuntimeDoubleValidationError) Reason() string { return e.reason }
685
686// Cause function returns cause value.
687func (e RuntimeDoubleValidationError) Cause() error { return e.cause }
688
689// Key function returns key value.
690func (e RuntimeDoubleValidationError) Key() bool { return e.key }
691
692// ErrorName returns error name.
693func (e RuntimeDoubleValidationError) ErrorName() string { return "RuntimeDoubleValidationError" }
694
695// Error satisfies the builtin error interface
696func (e RuntimeDoubleValidationError) Error() string {
697	cause := ""
698	if e.cause != nil {
699		cause = fmt.Sprintf(" | caused by: %v", e.cause)
700	}
701
702	key := ""
703	if e.key {
704		key = "key for "
705	}
706
707	return fmt.Sprintf(
708		"invalid %sRuntimeDouble.%s: %s%s",
709		key,
710		e.field,
711		e.reason,
712		cause)
713}
714
715var _ error = RuntimeDoubleValidationError{}
716
717var _ interface {
718	Field() string
719	Reason() string
720	Key() bool
721	Cause() error
722	ErrorName() string
723} = RuntimeDoubleValidationError{}
724
725// Validate checks the field values on RuntimeFeatureFlag with the rules
726// defined in the proto definition for this message. If any rules are
727// violated, an error is returned.
728func (m *RuntimeFeatureFlag) Validate() error {
729	if m == nil {
730		return nil
731	}
732
733	if m.GetDefaultValue() == nil {
734		return RuntimeFeatureFlagValidationError{
735			field:  "DefaultValue",
736			reason: "value is required",
737		}
738	}
739
740	if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok {
741		if err := v.Validate(); err != nil {
742			return RuntimeFeatureFlagValidationError{
743				field:  "DefaultValue",
744				reason: "embedded message failed validation",
745				cause:  err,
746			}
747		}
748	}
749
750	if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 {
751		return RuntimeFeatureFlagValidationError{
752			field:  "RuntimeKey",
753			reason: "value length must be at least 1 runes",
754		}
755	}
756
757	return nil
758}
759
760// RuntimeFeatureFlagValidationError is the validation error returned by
761// RuntimeFeatureFlag.Validate if the designated constraints aren't met.
762type RuntimeFeatureFlagValidationError struct {
763	field  string
764	reason string
765	cause  error
766	key    bool
767}
768
769// Field function returns field value.
770func (e RuntimeFeatureFlagValidationError) Field() string { return e.field }
771
772// Reason function returns reason value.
773func (e RuntimeFeatureFlagValidationError) Reason() string { return e.reason }
774
775// Cause function returns cause value.
776func (e RuntimeFeatureFlagValidationError) Cause() error { return e.cause }
777
778// Key function returns key value.
779func (e RuntimeFeatureFlagValidationError) Key() bool { return e.key }
780
781// ErrorName returns error name.
782func (e RuntimeFeatureFlagValidationError) ErrorName() string {
783	return "RuntimeFeatureFlagValidationError"
784}
785
786// Error satisfies the builtin error interface
787func (e RuntimeFeatureFlagValidationError) Error() string {
788	cause := ""
789	if e.cause != nil {
790		cause = fmt.Sprintf(" | caused by: %v", e.cause)
791	}
792
793	key := ""
794	if e.key {
795		key = "key for "
796	}
797
798	return fmt.Sprintf(
799		"invalid %sRuntimeFeatureFlag.%s: %s%s",
800		key,
801		e.field,
802		e.reason,
803		cause)
804}
805
806var _ error = RuntimeFeatureFlagValidationError{}
807
808var _ interface {
809	Field() string
810	Reason() string
811	Key() bool
812	Cause() error
813	ErrorName() string
814} = RuntimeFeatureFlagValidationError{}
815
816// Validate checks the field values on HeaderValue with the rules defined in
817// the proto definition for this message. If any rules are violated, an error
818// is returned.
819func (m *HeaderValue) Validate() error {
820	if m == nil {
821		return nil
822	}
823
824	if utf8.RuneCountInString(m.GetKey()) < 1 {
825		return HeaderValueValidationError{
826			field:  "Key",
827			reason: "value length must be at least 1 runes",
828		}
829	}
830
831	if len(m.GetKey()) > 16384 {
832		return HeaderValueValidationError{
833			field:  "Key",
834			reason: "value length must be at most 16384 bytes",
835		}
836	}
837
838	if !_HeaderValue_Key_Pattern.MatchString(m.GetKey()) {
839		return HeaderValueValidationError{
840			field:  "Key",
841			reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
842		}
843	}
844
845	if len(m.GetValue()) > 16384 {
846		return HeaderValueValidationError{
847			field:  "Value",
848			reason: "value length must be at most 16384 bytes",
849		}
850	}
851
852	if !_HeaderValue_Value_Pattern.MatchString(m.GetValue()) {
853		return HeaderValueValidationError{
854			field:  "Value",
855			reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
856		}
857	}
858
859	return nil
860}
861
862// HeaderValueValidationError is the validation error returned by
863// HeaderValue.Validate if the designated constraints aren't met.
864type HeaderValueValidationError struct {
865	field  string
866	reason string
867	cause  error
868	key    bool
869}
870
871// Field function returns field value.
872func (e HeaderValueValidationError) Field() string { return e.field }
873
874// Reason function returns reason value.
875func (e HeaderValueValidationError) Reason() string { return e.reason }
876
877// Cause function returns cause value.
878func (e HeaderValueValidationError) Cause() error { return e.cause }
879
880// Key function returns key value.
881func (e HeaderValueValidationError) Key() bool { return e.key }
882
883// ErrorName returns error name.
884func (e HeaderValueValidationError) ErrorName() string { return "HeaderValueValidationError" }
885
886// Error satisfies the builtin error interface
887func (e HeaderValueValidationError) Error() string {
888	cause := ""
889	if e.cause != nil {
890		cause = fmt.Sprintf(" | caused by: %v", e.cause)
891	}
892
893	key := ""
894	if e.key {
895		key = "key for "
896	}
897
898	return fmt.Sprintf(
899		"invalid %sHeaderValue.%s: %s%s",
900		key,
901		e.field,
902		e.reason,
903		cause)
904}
905
906var _ error = HeaderValueValidationError{}
907
908var _ interface {
909	Field() string
910	Reason() string
911	Key() bool
912	Cause() error
913	ErrorName() string
914} = HeaderValueValidationError{}
915
916var _HeaderValue_Key_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
917
918var _HeaderValue_Value_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
919
920// Validate checks the field values on HeaderValueOption with the rules defined
921// in the proto definition for this message. If any rules are violated, an
922// error is returned.
923func (m *HeaderValueOption) Validate() error {
924	if m == nil {
925		return nil
926	}
927
928	if m.GetHeader() == nil {
929		return HeaderValueOptionValidationError{
930			field:  "Header",
931			reason: "value is required",
932		}
933	}
934
935	if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok {
936		if err := v.Validate(); err != nil {
937			return HeaderValueOptionValidationError{
938				field:  "Header",
939				reason: "embedded message failed validation",
940				cause:  err,
941			}
942		}
943	}
944
945	if v, ok := interface{}(m.GetAppend()).(interface{ Validate() error }); ok {
946		if err := v.Validate(); err != nil {
947			return HeaderValueOptionValidationError{
948				field:  "Append",
949				reason: "embedded message failed validation",
950				cause:  err,
951			}
952		}
953	}
954
955	return nil
956}
957
958// HeaderValueOptionValidationError is the validation error returned by
959// HeaderValueOption.Validate if the designated constraints aren't met.
960type HeaderValueOptionValidationError struct {
961	field  string
962	reason string
963	cause  error
964	key    bool
965}
966
967// Field function returns field value.
968func (e HeaderValueOptionValidationError) Field() string { return e.field }
969
970// Reason function returns reason value.
971func (e HeaderValueOptionValidationError) Reason() string { return e.reason }
972
973// Cause function returns cause value.
974func (e HeaderValueOptionValidationError) Cause() error { return e.cause }
975
976// Key function returns key value.
977func (e HeaderValueOptionValidationError) Key() bool { return e.key }
978
979// ErrorName returns error name.
980func (e HeaderValueOptionValidationError) ErrorName() string {
981	return "HeaderValueOptionValidationError"
982}
983
984// Error satisfies the builtin error interface
985func (e HeaderValueOptionValidationError) Error() string {
986	cause := ""
987	if e.cause != nil {
988		cause = fmt.Sprintf(" | caused by: %v", e.cause)
989	}
990
991	key := ""
992	if e.key {
993		key = "key for "
994	}
995
996	return fmt.Sprintf(
997		"invalid %sHeaderValueOption.%s: %s%s",
998		key,
999		e.field,
1000		e.reason,
1001		cause)
1002}
1003
1004var _ error = HeaderValueOptionValidationError{}
1005
1006var _ interface {
1007	Field() string
1008	Reason() string
1009	Key() bool
1010	Cause() error
1011	ErrorName() string
1012} = HeaderValueOptionValidationError{}
1013
1014// Validate checks the field values on HeaderMap with the rules defined in the
1015// proto definition for this message. If any rules are violated, an error is returned.
1016func (m *HeaderMap) Validate() error {
1017	if m == nil {
1018		return nil
1019	}
1020
1021	for idx, item := range m.GetHeaders() {
1022		_, _ = idx, item
1023
1024		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
1025			if err := v.Validate(); err != nil {
1026				return HeaderMapValidationError{
1027					field:  fmt.Sprintf("Headers[%v]", idx),
1028					reason: "embedded message failed validation",
1029					cause:  err,
1030				}
1031			}
1032		}
1033
1034	}
1035
1036	return nil
1037}
1038
1039// HeaderMapValidationError is the validation error returned by
1040// HeaderMap.Validate if the designated constraints aren't met.
1041type HeaderMapValidationError struct {
1042	field  string
1043	reason string
1044	cause  error
1045	key    bool
1046}
1047
1048// Field function returns field value.
1049func (e HeaderMapValidationError) Field() string { return e.field }
1050
1051// Reason function returns reason value.
1052func (e HeaderMapValidationError) Reason() string { return e.reason }
1053
1054// Cause function returns cause value.
1055func (e HeaderMapValidationError) Cause() error { return e.cause }
1056
1057// Key function returns key value.
1058func (e HeaderMapValidationError) Key() bool { return e.key }
1059
1060// ErrorName returns error name.
1061func (e HeaderMapValidationError) ErrorName() string { return "HeaderMapValidationError" }
1062
1063// Error satisfies the builtin error interface
1064func (e HeaderMapValidationError) Error() string {
1065	cause := ""
1066	if e.cause != nil {
1067		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1068	}
1069
1070	key := ""
1071	if e.key {
1072		key = "key for "
1073	}
1074
1075	return fmt.Sprintf(
1076		"invalid %sHeaderMap.%s: %s%s",
1077		key,
1078		e.field,
1079		e.reason,
1080		cause)
1081}
1082
1083var _ error = HeaderMapValidationError{}
1084
1085var _ interface {
1086	Field() string
1087	Reason() string
1088	Key() bool
1089	Cause() error
1090	ErrorName() string
1091} = HeaderMapValidationError{}
1092
1093// Validate checks the field values on WatchedDirectory with the rules defined
1094// in the proto definition for this message. If any rules are violated, an
1095// error is returned.
1096func (m *WatchedDirectory) Validate() error {
1097	if m == nil {
1098		return nil
1099	}
1100
1101	if utf8.RuneCountInString(m.GetPath()) < 1 {
1102		return WatchedDirectoryValidationError{
1103			field:  "Path",
1104			reason: "value length must be at least 1 runes",
1105		}
1106	}
1107
1108	return nil
1109}
1110
1111// WatchedDirectoryValidationError is the validation error returned by
1112// WatchedDirectory.Validate if the designated constraints aren't met.
1113type WatchedDirectoryValidationError struct {
1114	field  string
1115	reason string
1116	cause  error
1117	key    bool
1118}
1119
1120// Field function returns field value.
1121func (e WatchedDirectoryValidationError) Field() string { return e.field }
1122
1123// Reason function returns reason value.
1124func (e WatchedDirectoryValidationError) Reason() string { return e.reason }
1125
1126// Cause function returns cause value.
1127func (e WatchedDirectoryValidationError) Cause() error { return e.cause }
1128
1129// Key function returns key value.
1130func (e WatchedDirectoryValidationError) Key() bool { return e.key }
1131
1132// ErrorName returns error name.
1133func (e WatchedDirectoryValidationError) ErrorName() string { return "WatchedDirectoryValidationError" }
1134
1135// Error satisfies the builtin error interface
1136func (e WatchedDirectoryValidationError) Error() string {
1137	cause := ""
1138	if e.cause != nil {
1139		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1140	}
1141
1142	key := ""
1143	if e.key {
1144		key = "key for "
1145	}
1146
1147	return fmt.Sprintf(
1148		"invalid %sWatchedDirectory.%s: %s%s",
1149		key,
1150		e.field,
1151		e.reason,
1152		cause)
1153}
1154
1155var _ error = WatchedDirectoryValidationError{}
1156
1157var _ interface {
1158	Field() string
1159	Reason() string
1160	Key() bool
1161	Cause() error
1162	ErrorName() string
1163} = WatchedDirectoryValidationError{}
1164
1165// Validate checks the field values on DataSource with the rules defined in the
1166// proto definition for this message. If any rules are violated, an error is returned.
1167func (m *DataSource) Validate() error {
1168	if m == nil {
1169		return nil
1170	}
1171
1172	switch m.Specifier.(type) {
1173
1174	case *DataSource_Filename:
1175
1176		if utf8.RuneCountInString(m.GetFilename()) < 1 {
1177			return DataSourceValidationError{
1178				field:  "Filename",
1179				reason: "value length must be at least 1 runes",
1180			}
1181		}
1182
1183	case *DataSource_InlineBytes:
1184		// no validation rules for InlineBytes
1185
1186	case *DataSource_InlineString:
1187		// no validation rules for InlineString
1188
1189	default:
1190		return DataSourceValidationError{
1191			field:  "Specifier",
1192			reason: "value is required",
1193		}
1194
1195	}
1196
1197	return nil
1198}
1199
1200// DataSourceValidationError is the validation error returned by
1201// DataSource.Validate if the designated constraints aren't met.
1202type DataSourceValidationError struct {
1203	field  string
1204	reason string
1205	cause  error
1206	key    bool
1207}
1208
1209// Field function returns field value.
1210func (e DataSourceValidationError) Field() string { return e.field }
1211
1212// Reason function returns reason value.
1213func (e DataSourceValidationError) Reason() string { return e.reason }
1214
1215// Cause function returns cause value.
1216func (e DataSourceValidationError) Cause() error { return e.cause }
1217
1218// Key function returns key value.
1219func (e DataSourceValidationError) Key() bool { return e.key }
1220
1221// ErrorName returns error name.
1222func (e DataSourceValidationError) ErrorName() string { return "DataSourceValidationError" }
1223
1224// Error satisfies the builtin error interface
1225func (e DataSourceValidationError) Error() string {
1226	cause := ""
1227	if e.cause != nil {
1228		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1229	}
1230
1231	key := ""
1232	if e.key {
1233		key = "key for "
1234	}
1235
1236	return fmt.Sprintf(
1237		"invalid %sDataSource.%s: %s%s",
1238		key,
1239		e.field,
1240		e.reason,
1241		cause)
1242}
1243
1244var _ error = DataSourceValidationError{}
1245
1246var _ interface {
1247	Field() string
1248	Reason() string
1249	Key() bool
1250	Cause() error
1251	ErrorName() string
1252} = DataSourceValidationError{}
1253
1254// Validate checks the field values on RetryPolicy with the rules defined in
1255// the proto definition for this message. If any rules are violated, an error
1256// is returned.
1257func (m *RetryPolicy) Validate() error {
1258	if m == nil {
1259		return nil
1260	}
1261
1262	if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok {
1263		if err := v.Validate(); err != nil {
1264			return RetryPolicyValidationError{
1265				field:  "RetryBackOff",
1266				reason: "embedded message failed validation",
1267				cause:  err,
1268			}
1269		}
1270	}
1271
1272	if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok {
1273		if err := v.Validate(); err != nil {
1274			return RetryPolicyValidationError{
1275				field:  "NumRetries",
1276				reason: "embedded message failed validation",
1277				cause:  err,
1278			}
1279		}
1280	}
1281
1282	return nil
1283}
1284
1285// RetryPolicyValidationError is the validation error returned by
1286// RetryPolicy.Validate if the designated constraints aren't met.
1287type RetryPolicyValidationError struct {
1288	field  string
1289	reason string
1290	cause  error
1291	key    bool
1292}
1293
1294// Field function returns field value.
1295func (e RetryPolicyValidationError) Field() string { return e.field }
1296
1297// Reason function returns reason value.
1298func (e RetryPolicyValidationError) Reason() string { return e.reason }
1299
1300// Cause function returns cause value.
1301func (e RetryPolicyValidationError) Cause() error { return e.cause }
1302
1303// Key function returns key value.
1304func (e RetryPolicyValidationError) Key() bool { return e.key }
1305
1306// ErrorName returns error name.
1307func (e RetryPolicyValidationError) ErrorName() string { return "RetryPolicyValidationError" }
1308
1309// Error satisfies the builtin error interface
1310func (e RetryPolicyValidationError) Error() string {
1311	cause := ""
1312	if e.cause != nil {
1313		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1314	}
1315
1316	key := ""
1317	if e.key {
1318		key = "key for "
1319	}
1320
1321	return fmt.Sprintf(
1322		"invalid %sRetryPolicy.%s: %s%s",
1323		key,
1324		e.field,
1325		e.reason,
1326		cause)
1327}
1328
1329var _ error = RetryPolicyValidationError{}
1330
1331var _ interface {
1332	Field() string
1333	Reason() string
1334	Key() bool
1335	Cause() error
1336	ErrorName() string
1337} = RetryPolicyValidationError{}
1338
1339// Validate checks the field values on RemoteDataSource with the rules defined
1340// in the proto definition for this message. If any rules are violated, an
1341// error is returned.
1342func (m *RemoteDataSource) Validate() error {
1343	if m == nil {
1344		return nil
1345	}
1346
1347	if m.GetHttpUri() == nil {
1348		return RemoteDataSourceValidationError{
1349			field:  "HttpUri",
1350			reason: "value is required",
1351		}
1352	}
1353
1354	if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok {
1355		if err := v.Validate(); err != nil {
1356			return RemoteDataSourceValidationError{
1357				field:  "HttpUri",
1358				reason: "embedded message failed validation",
1359				cause:  err,
1360			}
1361		}
1362	}
1363
1364	if utf8.RuneCountInString(m.GetSha256()) < 1 {
1365		return RemoteDataSourceValidationError{
1366			field:  "Sha256",
1367			reason: "value length must be at least 1 runes",
1368		}
1369	}
1370
1371	if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok {
1372		if err := v.Validate(); err != nil {
1373			return RemoteDataSourceValidationError{
1374				field:  "RetryPolicy",
1375				reason: "embedded message failed validation",
1376				cause:  err,
1377			}
1378		}
1379	}
1380
1381	return nil
1382}
1383
1384// RemoteDataSourceValidationError is the validation error returned by
1385// RemoteDataSource.Validate if the designated constraints aren't met.
1386type RemoteDataSourceValidationError struct {
1387	field  string
1388	reason string
1389	cause  error
1390	key    bool
1391}
1392
1393// Field function returns field value.
1394func (e RemoteDataSourceValidationError) Field() string { return e.field }
1395
1396// Reason function returns reason value.
1397func (e RemoteDataSourceValidationError) Reason() string { return e.reason }
1398
1399// Cause function returns cause value.
1400func (e RemoteDataSourceValidationError) Cause() error { return e.cause }
1401
1402// Key function returns key value.
1403func (e RemoteDataSourceValidationError) Key() bool { return e.key }
1404
1405// ErrorName returns error name.
1406func (e RemoteDataSourceValidationError) ErrorName() string { return "RemoteDataSourceValidationError" }
1407
1408// Error satisfies the builtin error interface
1409func (e RemoteDataSourceValidationError) Error() string {
1410	cause := ""
1411	if e.cause != nil {
1412		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1413	}
1414
1415	key := ""
1416	if e.key {
1417		key = "key for "
1418	}
1419
1420	return fmt.Sprintf(
1421		"invalid %sRemoteDataSource.%s: %s%s",
1422		key,
1423		e.field,
1424		e.reason,
1425		cause)
1426}
1427
1428var _ error = RemoteDataSourceValidationError{}
1429
1430var _ interface {
1431	Field() string
1432	Reason() string
1433	Key() bool
1434	Cause() error
1435	ErrorName() string
1436} = RemoteDataSourceValidationError{}
1437
1438// Validate checks the field values on AsyncDataSource with the rules defined
1439// in the proto definition for this message. If any rules are violated, an
1440// error is returned.
1441func (m *AsyncDataSource) Validate() error {
1442	if m == nil {
1443		return nil
1444	}
1445
1446	switch m.Specifier.(type) {
1447
1448	case *AsyncDataSource_Local:
1449
1450		if v, ok := interface{}(m.GetLocal()).(interface{ Validate() error }); ok {
1451			if err := v.Validate(); err != nil {
1452				return AsyncDataSourceValidationError{
1453					field:  "Local",
1454					reason: "embedded message failed validation",
1455					cause:  err,
1456				}
1457			}
1458		}
1459
1460	case *AsyncDataSource_Remote:
1461
1462		if v, ok := interface{}(m.GetRemote()).(interface{ Validate() error }); ok {
1463			if err := v.Validate(); err != nil {
1464				return AsyncDataSourceValidationError{
1465					field:  "Remote",
1466					reason: "embedded message failed validation",
1467					cause:  err,
1468				}
1469			}
1470		}
1471
1472	default:
1473		return AsyncDataSourceValidationError{
1474			field:  "Specifier",
1475			reason: "value is required",
1476		}
1477
1478	}
1479
1480	return nil
1481}
1482
1483// AsyncDataSourceValidationError is the validation error returned by
1484// AsyncDataSource.Validate if the designated constraints aren't met.
1485type AsyncDataSourceValidationError struct {
1486	field  string
1487	reason string
1488	cause  error
1489	key    bool
1490}
1491
1492// Field function returns field value.
1493func (e AsyncDataSourceValidationError) Field() string { return e.field }
1494
1495// Reason function returns reason value.
1496func (e AsyncDataSourceValidationError) Reason() string { return e.reason }
1497
1498// Cause function returns cause value.
1499func (e AsyncDataSourceValidationError) Cause() error { return e.cause }
1500
1501// Key function returns key value.
1502func (e AsyncDataSourceValidationError) Key() bool { return e.key }
1503
1504// ErrorName returns error name.
1505func (e AsyncDataSourceValidationError) ErrorName() string { return "AsyncDataSourceValidationError" }
1506
1507// Error satisfies the builtin error interface
1508func (e AsyncDataSourceValidationError) Error() string {
1509	cause := ""
1510	if e.cause != nil {
1511		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1512	}
1513
1514	key := ""
1515	if e.key {
1516		key = "key for "
1517	}
1518
1519	return fmt.Sprintf(
1520		"invalid %sAsyncDataSource.%s: %s%s",
1521		key,
1522		e.field,
1523		e.reason,
1524		cause)
1525}
1526
1527var _ error = AsyncDataSourceValidationError{}
1528
1529var _ interface {
1530	Field() string
1531	Reason() string
1532	Key() bool
1533	Cause() error
1534	ErrorName() string
1535} = AsyncDataSourceValidationError{}
1536
1537// Validate checks the field values on TransportSocket with the rules defined
1538// in the proto definition for this message. If any rules are violated, an
1539// error is returned.
1540func (m *TransportSocket) Validate() error {
1541	if m == nil {
1542		return nil
1543	}
1544
1545	if utf8.RuneCountInString(m.GetName()) < 1 {
1546		return TransportSocketValidationError{
1547			field:  "Name",
1548			reason: "value length must be at least 1 runes",
1549		}
1550	}
1551
1552	switch m.ConfigType.(type) {
1553
1554	case *TransportSocket_TypedConfig:
1555
1556		if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok {
1557			if err := v.Validate(); err != nil {
1558				return TransportSocketValidationError{
1559					field:  "TypedConfig",
1560					reason: "embedded message failed validation",
1561					cause:  err,
1562				}
1563			}
1564		}
1565
1566	case *TransportSocket_HiddenEnvoyDeprecatedConfig:
1567
1568		if v, ok := interface{}(m.GetHiddenEnvoyDeprecatedConfig()).(interface{ Validate() error }); ok {
1569			if err := v.Validate(); err != nil {
1570				return TransportSocketValidationError{
1571					field:  "HiddenEnvoyDeprecatedConfig",
1572					reason: "embedded message failed validation",
1573					cause:  err,
1574				}
1575			}
1576		}
1577
1578	}
1579
1580	return nil
1581}
1582
1583// TransportSocketValidationError is the validation error returned by
1584// TransportSocket.Validate if the designated constraints aren't met.
1585type TransportSocketValidationError struct {
1586	field  string
1587	reason string
1588	cause  error
1589	key    bool
1590}
1591
1592// Field function returns field value.
1593func (e TransportSocketValidationError) Field() string { return e.field }
1594
1595// Reason function returns reason value.
1596func (e TransportSocketValidationError) Reason() string { return e.reason }
1597
1598// Cause function returns cause value.
1599func (e TransportSocketValidationError) Cause() error { return e.cause }
1600
1601// Key function returns key value.
1602func (e TransportSocketValidationError) Key() bool { return e.key }
1603
1604// ErrorName returns error name.
1605func (e TransportSocketValidationError) ErrorName() string { return "TransportSocketValidationError" }
1606
1607// Error satisfies the builtin error interface
1608func (e TransportSocketValidationError) Error() string {
1609	cause := ""
1610	if e.cause != nil {
1611		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1612	}
1613
1614	key := ""
1615	if e.key {
1616		key = "key for "
1617	}
1618
1619	return fmt.Sprintf(
1620		"invalid %sTransportSocket.%s: %s%s",
1621		key,
1622		e.field,
1623		e.reason,
1624		cause)
1625}
1626
1627var _ error = TransportSocketValidationError{}
1628
1629var _ interface {
1630	Field() string
1631	Reason() string
1632	Key() bool
1633	Cause() error
1634	ErrorName() string
1635} = TransportSocketValidationError{}
1636
1637// Validate checks the field values on RuntimeFractionalPercent with the rules
1638// defined in the proto definition for this message. If any rules are
1639// violated, an error is returned.
1640func (m *RuntimeFractionalPercent) Validate() error {
1641	if m == nil {
1642		return nil
1643	}
1644
1645	if m.GetDefaultValue() == nil {
1646		return RuntimeFractionalPercentValidationError{
1647			field:  "DefaultValue",
1648			reason: "value is required",
1649		}
1650	}
1651
1652	if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok {
1653		if err := v.Validate(); err != nil {
1654			return RuntimeFractionalPercentValidationError{
1655				field:  "DefaultValue",
1656				reason: "embedded message failed validation",
1657				cause:  err,
1658			}
1659		}
1660	}
1661
1662	// no validation rules for RuntimeKey
1663
1664	return nil
1665}
1666
1667// RuntimeFractionalPercentValidationError is the validation error returned by
1668// RuntimeFractionalPercent.Validate if the designated constraints aren't met.
1669type RuntimeFractionalPercentValidationError struct {
1670	field  string
1671	reason string
1672	cause  error
1673	key    bool
1674}
1675
1676// Field function returns field value.
1677func (e RuntimeFractionalPercentValidationError) Field() string { return e.field }
1678
1679// Reason function returns reason value.
1680func (e RuntimeFractionalPercentValidationError) Reason() string { return e.reason }
1681
1682// Cause function returns cause value.
1683func (e RuntimeFractionalPercentValidationError) Cause() error { return e.cause }
1684
1685// Key function returns key value.
1686func (e RuntimeFractionalPercentValidationError) Key() bool { return e.key }
1687
1688// ErrorName returns error name.
1689func (e RuntimeFractionalPercentValidationError) ErrorName() string {
1690	return "RuntimeFractionalPercentValidationError"
1691}
1692
1693// Error satisfies the builtin error interface
1694func (e RuntimeFractionalPercentValidationError) Error() string {
1695	cause := ""
1696	if e.cause != nil {
1697		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1698	}
1699
1700	key := ""
1701	if e.key {
1702		key = "key for "
1703	}
1704
1705	return fmt.Sprintf(
1706		"invalid %sRuntimeFractionalPercent.%s: %s%s",
1707		key,
1708		e.field,
1709		e.reason,
1710		cause)
1711}
1712
1713var _ error = RuntimeFractionalPercentValidationError{}
1714
1715var _ interface {
1716	Field() string
1717	Reason() string
1718	Key() bool
1719	Cause() error
1720	ErrorName() string
1721} = RuntimeFractionalPercentValidationError{}
1722
1723// Validate checks the field values on ControlPlane with the rules defined in
1724// the proto definition for this message. If any rules are violated, an error
1725// is returned.
1726func (m *ControlPlane) Validate() error {
1727	if m == nil {
1728		return nil
1729	}
1730
1731	// no validation rules for Identifier
1732
1733	return nil
1734}
1735
1736// ControlPlaneValidationError is the validation error returned by
1737// ControlPlane.Validate if the designated constraints aren't met.
1738type ControlPlaneValidationError struct {
1739	field  string
1740	reason string
1741	cause  error
1742	key    bool
1743}
1744
1745// Field function returns field value.
1746func (e ControlPlaneValidationError) Field() string { return e.field }
1747
1748// Reason function returns reason value.
1749func (e ControlPlaneValidationError) Reason() string { return e.reason }
1750
1751// Cause function returns cause value.
1752func (e ControlPlaneValidationError) Cause() error { return e.cause }
1753
1754// Key function returns key value.
1755func (e ControlPlaneValidationError) Key() bool { return e.key }
1756
1757// ErrorName returns error name.
1758func (e ControlPlaneValidationError) ErrorName() string { return "ControlPlaneValidationError" }
1759
1760// Error satisfies the builtin error interface
1761func (e ControlPlaneValidationError) Error() string {
1762	cause := ""
1763	if e.cause != nil {
1764		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1765	}
1766
1767	key := ""
1768	if e.key {
1769		key = "key for "
1770	}
1771
1772	return fmt.Sprintf(
1773		"invalid %sControlPlane.%s: %s%s",
1774		key,
1775		e.field,
1776		e.reason,
1777		cause)
1778}
1779
1780var _ error = ControlPlaneValidationError{}
1781
1782var _ interface {
1783	Field() string
1784	Reason() string
1785	Key() bool
1786	Cause() error
1787	ErrorName() string
1788} = ControlPlaneValidationError{}
1789