1// Code generated by protoc-gen-validate. DO NOT EDIT.
2// source: xds/annotations/v3/migrate.proto
3
4package 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	"google.golang.org/protobuf/types/known/anypb"
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	_ = anypb.Any{}
34)
35
36// Validate checks the field values on MigrateAnnotation with the rules defined
37// in the proto definition for this message. If any rules are violated, an
38// error is returned.
39func (m *MigrateAnnotation) Validate() error {
40	if m == nil {
41		return nil
42	}
43
44	// no validation rules for Rename
45
46	return nil
47}
48
49// MigrateAnnotationValidationError is the validation error returned by
50// MigrateAnnotation.Validate if the designated constraints aren't met.
51type MigrateAnnotationValidationError struct {
52	field  string
53	reason string
54	cause  error
55	key    bool
56}
57
58// Field function returns field value.
59func (e MigrateAnnotationValidationError) Field() string { return e.field }
60
61// Reason function returns reason value.
62func (e MigrateAnnotationValidationError) Reason() string { return e.reason }
63
64// Cause function returns cause value.
65func (e MigrateAnnotationValidationError) Cause() error { return e.cause }
66
67// Key function returns key value.
68func (e MigrateAnnotationValidationError) Key() bool { return e.key }
69
70// ErrorName returns error name.
71func (e MigrateAnnotationValidationError) ErrorName() string {
72	return "MigrateAnnotationValidationError"
73}
74
75// Error satisfies the builtin error interface
76func (e MigrateAnnotationValidationError) Error() string {
77	cause := ""
78	if e.cause != nil {
79		cause = fmt.Sprintf(" | caused by: %v", e.cause)
80	}
81
82	key := ""
83	if e.key {
84		key = "key for "
85	}
86
87	return fmt.Sprintf(
88		"invalid %sMigrateAnnotation.%s: %s%s",
89		key,
90		e.field,
91		e.reason,
92		cause)
93}
94
95var _ error = MigrateAnnotationValidationError{}
96
97var _ interface {
98	Field() string
99	Reason() string
100	Key() bool
101	Cause() error
102	ErrorName() string
103} = MigrateAnnotationValidationError{}
104
105// Validate checks the field values on FieldMigrateAnnotation with the rules
106// defined in the proto definition for this message. If any rules are
107// violated, an error is returned.
108func (m *FieldMigrateAnnotation) Validate() error {
109	if m == nil {
110		return nil
111	}
112
113	// no validation rules for Rename
114
115	// no validation rules for OneofPromotion
116
117	return nil
118}
119
120// FieldMigrateAnnotationValidationError is the validation error returned by
121// FieldMigrateAnnotation.Validate if the designated constraints aren't met.
122type FieldMigrateAnnotationValidationError struct {
123	field  string
124	reason string
125	cause  error
126	key    bool
127}
128
129// Field function returns field value.
130func (e FieldMigrateAnnotationValidationError) Field() string { return e.field }
131
132// Reason function returns reason value.
133func (e FieldMigrateAnnotationValidationError) Reason() string { return e.reason }
134
135// Cause function returns cause value.
136func (e FieldMigrateAnnotationValidationError) Cause() error { return e.cause }
137
138// Key function returns key value.
139func (e FieldMigrateAnnotationValidationError) Key() bool { return e.key }
140
141// ErrorName returns error name.
142func (e FieldMigrateAnnotationValidationError) ErrorName() string {
143	return "FieldMigrateAnnotationValidationError"
144}
145
146// Error satisfies the builtin error interface
147func (e FieldMigrateAnnotationValidationError) Error() string {
148	cause := ""
149	if e.cause != nil {
150		cause = fmt.Sprintf(" | caused by: %v", e.cause)
151	}
152
153	key := ""
154	if e.key {
155		key = "key for "
156	}
157
158	return fmt.Sprintf(
159		"invalid %sFieldMigrateAnnotation.%s: %s%s",
160		key,
161		e.field,
162		e.reason,
163		cause)
164}
165
166var _ error = FieldMigrateAnnotationValidationError{}
167
168var _ interface {
169	Field() string
170	Reason() string
171	Key() bool
172	Cause() error
173	ErrorName() string
174} = FieldMigrateAnnotationValidationError{}
175
176// Validate checks the field values on FileMigrateAnnotation with the rules
177// defined in the proto definition for this message. If any rules are
178// violated, an error is returned.
179func (m *FileMigrateAnnotation) Validate() error {
180	if m == nil {
181		return nil
182	}
183
184	// no validation rules for MoveToPackage
185
186	return nil
187}
188
189// FileMigrateAnnotationValidationError is the validation error returned by
190// FileMigrateAnnotation.Validate if the designated constraints aren't met.
191type FileMigrateAnnotationValidationError struct {
192	field  string
193	reason string
194	cause  error
195	key    bool
196}
197
198// Field function returns field value.
199func (e FileMigrateAnnotationValidationError) Field() string { return e.field }
200
201// Reason function returns reason value.
202func (e FileMigrateAnnotationValidationError) Reason() string { return e.reason }
203
204// Cause function returns cause value.
205func (e FileMigrateAnnotationValidationError) Cause() error { return e.cause }
206
207// Key function returns key value.
208func (e FileMigrateAnnotationValidationError) Key() bool { return e.key }
209
210// ErrorName returns error name.
211func (e FileMigrateAnnotationValidationError) ErrorName() string {
212	return "FileMigrateAnnotationValidationError"
213}
214
215// Error satisfies the builtin error interface
216func (e FileMigrateAnnotationValidationError) Error() string {
217	cause := ""
218	if e.cause != nil {
219		cause = fmt.Sprintf(" | caused by: %v", e.cause)
220	}
221
222	key := ""
223	if e.key {
224		key = "key for "
225	}
226
227	return fmt.Sprintf(
228		"invalid %sFileMigrateAnnotation.%s: %s%s",
229		key,
230		e.field,
231		e.reason,
232		cause)
233}
234
235var _ error = FileMigrateAnnotationValidationError{}
236
237var _ interface {
238	Field() string
239	Reason() string
240	Key() bool
241	Cause() error
242	ErrorName() string
243} = FileMigrateAnnotationValidationError{}
244