...
1
2
3
4 package envoy_service_tap_v2alpha
5
6 import (
7 "bytes"
8 "errors"
9 "fmt"
10 "net"
11 "net/mail"
12 "net/url"
13 "regexp"
14 "strings"
15 "time"
16 "unicode/utf8"
17
18 "github.com/golang/protobuf/ptypes"
19 )
20
21
22 var (
23 _ = bytes.MinRead
24 _ = errors.New("")
25 _ = fmt.Print
26 _ = utf8.UTFMax
27 _ = (*regexp.Regexp)(nil)
28 _ = (*strings.Reader)(nil)
29 _ = net.IPv4len
30 _ = time.Duration(0)
31 _ = (*url.URL)(nil)
32 _ = (*mail.Address)(nil)
33 _ = ptypes.DynamicAny{}
34 )
35
36
37
38
39 func (m *StreamTapsRequest) Validate() error {
40 if m == nil {
41 return nil
42 }
43
44 if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok {
45 if err := v.Validate(); err != nil {
46 return StreamTapsRequestValidationError{
47 field: "Identifier",
48 reason: "embedded message failed validation",
49 cause: err,
50 }
51 }
52 }
53
54
55
56 if v, ok := interface{}(m.GetTrace()).(interface{ Validate() error }); ok {
57 if err := v.Validate(); err != nil {
58 return StreamTapsRequestValidationError{
59 field: "Trace",
60 reason: "embedded message failed validation",
61 cause: err,
62 }
63 }
64 }
65
66 return nil
67 }
68
69
70
71 type StreamTapsRequestValidationError struct {
72 field string
73 reason string
74 cause error
75 key bool
76 }
77
78
79 func (e StreamTapsRequestValidationError) Field() string { return e.field }
80
81
82 func (e StreamTapsRequestValidationError) Reason() string { return e.reason }
83
84
85 func (e StreamTapsRequestValidationError) Cause() error { return e.cause }
86
87
88 func (e StreamTapsRequestValidationError) Key() bool { return e.key }
89
90
91 func (e StreamTapsRequestValidationError) ErrorName() string {
92 return "StreamTapsRequestValidationError"
93 }
94
95
96 func (e StreamTapsRequestValidationError) Error() string {
97 cause := ""
98 if e.cause != nil {
99 cause = fmt.Sprintf(" | caused by: %v", e.cause)
100 }
101
102 key := ""
103 if e.key {
104 key = "key for "
105 }
106
107 return fmt.Sprintf(
108 "invalid %sStreamTapsRequest.%s: %s%s",
109 key,
110 e.field,
111 e.reason,
112 cause)
113 }
114
115 var _ error = StreamTapsRequestValidationError{}
116
117 var _ interface {
118 Field() string
119 Reason() string
120 Key() bool
121 Cause() error
122 ErrorName() string
123 } = StreamTapsRequestValidationError{}
124
125
126
127
128 func (m *StreamTapsResponse) Validate() error {
129 if m == nil {
130 return nil
131 }
132
133 return nil
134 }
135
136
137
138 type StreamTapsResponseValidationError struct {
139 field string
140 reason string
141 cause error
142 key bool
143 }
144
145
146 func (e StreamTapsResponseValidationError) Field() string { return e.field }
147
148
149 func (e StreamTapsResponseValidationError) Reason() string { return e.reason }
150
151
152 func (e StreamTapsResponseValidationError) Cause() error { return e.cause }
153
154
155 func (e StreamTapsResponseValidationError) Key() bool { return e.key }
156
157
158 func (e StreamTapsResponseValidationError) ErrorName() string {
159 return "StreamTapsResponseValidationError"
160 }
161
162
163 func (e StreamTapsResponseValidationError) Error() string {
164 cause := ""
165 if e.cause != nil {
166 cause = fmt.Sprintf(" | caused by: %v", e.cause)
167 }
168
169 key := ""
170 if e.key {
171 key = "key for "
172 }
173
174 return fmt.Sprintf(
175 "invalid %sStreamTapsResponse.%s: %s%s",
176 key,
177 e.field,
178 e.reason,
179 cause)
180 }
181
182 var _ error = StreamTapsResponseValidationError{}
183
184 var _ interface {
185 Field() string
186 Reason() string
187 Key() bool
188 Cause() error
189 ErrorName() string
190 } = StreamTapsResponseValidationError{}
191
192
193
194
195 func (m *StreamTapsRequest_Identifier) Validate() error {
196 if m == nil {
197 return nil
198 }
199
200 if m.GetNode() == nil {
201 return StreamTapsRequest_IdentifierValidationError{
202 field: "Node",
203 reason: "value is required",
204 }
205 }
206
207 if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
208 if err := v.Validate(); err != nil {
209 return StreamTapsRequest_IdentifierValidationError{
210 field: "Node",
211 reason: "embedded message failed validation",
212 cause: err,
213 }
214 }
215 }
216
217
218
219 return nil
220 }
221
222
223
224
225 type StreamTapsRequest_IdentifierValidationError struct {
226 field string
227 reason string
228 cause error
229 key bool
230 }
231
232
233 func (e StreamTapsRequest_IdentifierValidationError) Field() string { return e.field }
234
235
236 func (e StreamTapsRequest_IdentifierValidationError) Reason() string { return e.reason }
237
238
239 func (e StreamTapsRequest_IdentifierValidationError) Cause() error { return e.cause }
240
241
242 func (e StreamTapsRequest_IdentifierValidationError) Key() bool { return e.key }
243
244
245 func (e StreamTapsRequest_IdentifierValidationError) ErrorName() string {
246 return "StreamTapsRequest_IdentifierValidationError"
247 }
248
249
250 func (e StreamTapsRequest_IdentifierValidationError) Error() string {
251 cause := ""
252 if e.cause != nil {
253 cause = fmt.Sprintf(" | caused by: %v", e.cause)
254 }
255
256 key := ""
257 if e.key {
258 key = "key for "
259 }
260
261 return fmt.Sprintf(
262 "invalid %sStreamTapsRequest_Identifier.%s: %s%s",
263 key,
264 e.field,
265 e.reason,
266 cause)
267 }
268
269 var _ error = StreamTapsRequest_IdentifierValidationError{}
270
271 var _ interface {
272 Field() string
273 Reason() string
274 Key() bool
275 Cause() error
276 ErrorName() string
277 } = StreamTapsRequest_IdentifierValidationError{}
278
View as plain text