1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 |
|
3 + | /* ServerOperationErrorGenerator.kt:63 */
|
3 4 | /// Error type for the `ComplexStructOperation` operation.
|
5 + | /* ServerOperationErrorGenerator.kt:64 */
|
4 6 | /// Each variant represents an error that can occur for the `ComplexStructOperation` operation.
|
7 + | /* RustType.kt:516 */
|
5 8 | #[derive(::std::fmt::Debug)]
|
6 - | pub enum ComplexStructOperationError {
|
7 - | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
9 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum ComplexStructOperationError {
|
10 + | /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
11 + | /* ServerOperationErrorGenerator.kt:71 */
|
8 12 | ValidationException(crate::error::ValidationException),
|
13 + | /* ServerOperationErrorGenerator.kt:66 */
|
9 14 | }
|
15 + | /* ServerOperationErrorGenerator.kt:75 */
|
10 16 | impl ::std::fmt::Display for ComplexStructOperationError {
|
17 + | /* ServerOperationErrorGenerator.kt:76 */
|
11 18 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
19 + | /* ServerOperationErrorGenerator.kt:139 */
|
12 20 | match &self {
|
13 - | ComplexStructOperationError::ValidationException(_inner) => _inner.fmt(f),
|
21 + | /* ServerOperationErrorGenerator.kt:142 */
|
22 + | ComplexStructOperationError::ValidationException(_inner) =>
|
23 + | /* ServerOperationErrorGenerator.kt:78 */
|
24 + | {
|
25 + | _inner.fmt(f)
|
26 + | }
|
27 + | /* ServerOperationErrorGenerator.kt:139 */
|
14 28 | }
|
29 + | /* ServerOperationErrorGenerator.kt:76 */
|
15 30 | }
|
31 + | /* ServerOperationErrorGenerator.kt:75 */
|
16 32 | }
|
33 + | /* ServerOperationErrorGenerator.kt:83 */
|
17 34 | impl ComplexStructOperationError {
|
35 + | /* ServerOperationErrorGenerator.kt:87 */
|
18 36 | /// Returns `true` if the error kind is `ComplexStructOperationError::ValidationException`.
|
37 + | /* ServerOperationErrorGenerator.kt:88 */
|
19 38 | pub fn is_validation_exception(&self) -> bool {
|
39 + | /* ServerOperationErrorGenerator.kt:89 */
|
20 40 | matches!(&self, ComplexStructOperationError::ValidationException(_))
|
41 + | /* ServerOperationErrorGenerator.kt:88 */
|
21 42 | }
|
43 + | /* ServerOperationErrorGenerator.kt:92 */
|
22 44 | /// Returns the error name string by matching the correct variant.
|
45 + | /* ServerOperationErrorGenerator.kt:93 */
|
23 46 | pub fn name(&self) -> &'static str {
|
47 + | /* ServerOperationErrorGenerator.kt:139 */
|
24 48 | match &self {
|
25 - | ComplexStructOperationError::ValidationException(_inner) => _inner.name(),
|
49 + | /* ServerOperationErrorGenerator.kt:142 */
|
50 + | ComplexStructOperationError::ValidationException(_inner) =>
|
51 + | /* ServerOperationErrorGenerator.kt:95 */
|
52 + | {
|
53 + | _inner.name()
|
26 54 | }
|
55 + | /* ServerOperationErrorGenerator.kt:139 */
|
27 56 | }
|
57 + | /* ServerOperationErrorGenerator.kt:93 */
|
58 + | }
|
59 + | /* ServerOperationErrorGenerator.kt:83 */
|
28 60 | }
|
61 + | /* ServerOperationErrorGenerator.kt:100 */
|
29 62 | impl ::std::error::Error for ComplexStructOperationError {
|
63 + | /* ServerOperationErrorGenerator.kt:101 */
|
30 64 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
65 + | /* ServerOperationErrorGenerator.kt:139 */
|
31 66 | match &self {
|
32 - | ComplexStructOperationError::ValidationException(_inner) => Some(_inner),
|
67 + | /* ServerOperationErrorGenerator.kt:142 */
|
68 + | ComplexStructOperationError::ValidationException(_inner) =>
|
69 + | /* ServerOperationErrorGenerator.kt:103 */
|
70 + | {
|
71 + | Some(_inner)
|
72 + | }
|
73 + | /* ServerOperationErrorGenerator.kt:139 */
|
33 74 | }
|
75 + | /* ServerOperationErrorGenerator.kt:101 */
|
34 76 | }
|
77 + | /* ServerOperationErrorGenerator.kt:100 */
|
35 78 | }
|
79 + | /* ServerOperationErrorGenerator.kt:110 */
|
36 80 | impl ::std::convert::From<crate::error::ValidationException>
|
37 81 | for crate::error::ComplexStructOperationError
|
38 82 | {
|
83 + | /* ServerOperationErrorGenerator.kt:111 */
|
39 84 | fn from(
|
40 85 | variant: crate::error::ValidationException,
|
41 86 | ) -> crate::error::ComplexStructOperationError {
|
87 + | /* ServerOperationErrorGenerator.kt:112 */
|
42 88 | Self::ValidationException(variant)
|
89 + | /* ServerOperationErrorGenerator.kt:111 */
|
43 90 | }
|
91 + | /* ServerOperationErrorGenerator.kt:110 */
|
44 92 | }
|
45 93 |
|
46 - | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
94 + | /// /* StructureGenerator.kt:197 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
95 + | /* RustType.kt:516 */
|
47 96 | #[derive(
|
48 97 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
49 98 | )]
|
50 - | pub struct ValidationException {
|
51 - | /// A summary of the validation failure.
|
99 + | pub /* StructureGenerator.kt:201 */ struct ValidationException {
|
100 + | /// /* StructureGenerator.kt:231 */A summary of the validation failure.
|
52 101 | pub message: ::std::string::String,
|
53 - | /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
102 + | /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
54 103 | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
104 + | /* StructureGenerator.kt:201 */
|
55 105 | }
|
106 + | /* StructureGenerator.kt:135 */
|
56 107 | impl ValidationException {
|
57 - | /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
108 + | /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
109 + | /* StructureGenerator.kt:166 */
|
58 110 | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
111 + | /* StructureGenerator.kt:169 */
|
59 112 | self.field_list.as_deref()
|
113 + | /* StructureGenerator.kt:166 */
|
60 114 | }
|
115 + | /* StructureGenerator.kt:135 */
|
61 116 | }
|
117 + | /* ErrorImplGenerator.kt:99 */
|
62 118 | impl ValidationException {
|
119 + | /* ErrorImplGenerator.kt:128 */
|
63 120 | /// Returns the error message.
|
64 121 | pub fn message(&self) -> &str {
|
65 122 | &self.message
|
66 123 | }
|
124 + | /* ErrorImplGenerator.kt:141 */
|
67 125 | #[doc(hidden)]
|
68 126 | /// Returns the error name.
|
69 127 | pub fn name(&self) -> &'static str {
|
70 128 | "ValidationException"
|
71 129 | }
|
130 + | /* ErrorImplGenerator.kt:99 */
|
72 131 | }
|
132 + | /* ErrorImplGenerator.kt:153 */
|
73 133 | impl ::std::fmt::Display for ValidationException {
|
134 + | /* ErrorImplGenerator.kt:154 */
|
74 135 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
136 + | /* ErrorImplGenerator.kt:161 */
|
75 137 | ::std::write!(f, "ValidationException")?;
|
138 + | /* ErrorImplGenerator.kt:166 */
|
76 139 | {
|
140 + | /* ErrorImplGenerator.kt:167 */
|
77 141 | ::std::write!(f, ": {}", &self.message)?;
|
142 + | /* ErrorImplGenerator.kt:166 */
|
78 143 | }
|
144 + | /* ErrorImplGenerator.kt:171 */
|
79 145 | Ok(())
|
146 + | /* ErrorImplGenerator.kt:154 */
|
80 147 | }
|
148 + | /* ErrorImplGenerator.kt:153 */
|
81 149 | }
|
150 + | /* ErrorImplGenerator.kt:175 */
|
82 151 | impl ::std::error::Error for ValidationException {}
|
152 + | /* ServerCodegenVisitor.kt:345 */
|
83 153 | impl ValidationException {
|
84 - | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
154 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
155 + | /* ServerBuilderGenerator.kt:295 */
|
85 156 | pub fn builder() -> crate::error::validation_exception::Builder {
|
157 + | /* ServerBuilderGenerator.kt:296 */
|
86 158 | crate::error::validation_exception::Builder::default()
|
159 + | /* ServerBuilderGenerator.kt:295 */
|
87 160 | }
|
161 + | /* ServerCodegenVisitor.kt:345 */
|
88 162 | }
|
89 163 |
|
164 + | /* ServerOperationErrorGenerator.kt:63 */
|
90 165 | /// Error type for the `ErrorSerializationOperation` operation.
|
166 + | /* ServerOperationErrorGenerator.kt:64 */
|
91 167 | /// Each variant represents an error that can occur for the `ErrorSerializationOperation` operation.
|
168 + | /* RustType.kt:516 */
|
92 169 | #[derive(::std::fmt::Debug)]
|
93 - | pub enum ErrorSerializationOperationError {
|
94 - | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
170 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum ErrorSerializationOperationError {
|
171 + | /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
172 + | /* ServerOperationErrorGenerator.kt:71 */
|
95 173 | ValidationException(crate::error::ValidationException),
|
174 + | /* ServerOperationErrorGenerator.kt:66 */
|
96 175 | }
|
176 + | /* ServerOperationErrorGenerator.kt:75 */
|
97 177 | impl ::std::fmt::Display for ErrorSerializationOperationError {
|
178 + | /* ServerOperationErrorGenerator.kt:76 */
|
98 179 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
180 + | /* ServerOperationErrorGenerator.kt:139 */
|
99 181 | match &self {
|
100 - | ErrorSerializationOperationError::ValidationException(_inner) => _inner.fmt(f),
|
182 + | /* ServerOperationErrorGenerator.kt:142 */
|
183 + | ErrorSerializationOperationError::ValidationException(_inner) =>
|
184 + | /* ServerOperationErrorGenerator.kt:78 */
|
185 + | {
|
186 + | _inner.fmt(f)
|
187 + | }
|
188 + | /* ServerOperationErrorGenerator.kt:139 */
|
101 189 | }
|
190 + | /* ServerOperationErrorGenerator.kt:76 */
|
102 191 | }
|
192 + | /* ServerOperationErrorGenerator.kt:75 */
|
103 193 | }
|
194 + | /* ServerOperationErrorGenerator.kt:83 */
|
104 195 | impl ErrorSerializationOperationError {
|
196 + | /* ServerOperationErrorGenerator.kt:87 */
|
105 197 | /// Returns `true` if the error kind is `ErrorSerializationOperationError::ValidationException`.
|
198 + | /* ServerOperationErrorGenerator.kt:88 */
|
106 199 | pub fn is_validation_exception(&self) -> bool {
|
200 + | /* ServerOperationErrorGenerator.kt:89 */
|
107 201 | matches!(
|
108 202 | &self,
|
109 203 | ErrorSerializationOperationError::ValidationException(_)
|
110 204 | )
|
205 + | /* ServerOperationErrorGenerator.kt:88 */
|
111 206 | }
|
207 + | /* ServerOperationErrorGenerator.kt:92 */
|
112 208 | /// Returns the error name string by matching the correct variant.
|
209 + | /* ServerOperationErrorGenerator.kt:93 */
|
113 210 | pub fn name(&self) -> &'static str {
|
211 + | /* ServerOperationErrorGenerator.kt:139 */
|
114 212 | match &self {
|
115 - | ErrorSerializationOperationError::ValidationException(_inner) => _inner.name(),
|
213 + | /* ServerOperationErrorGenerator.kt:142 */
|
214 + | ErrorSerializationOperationError::ValidationException(_inner) =>
|
215 + | /* ServerOperationErrorGenerator.kt:95 */
|
216 + | {
|
217 + | _inner.name()
|
116 218 | }
|
219 + | /* ServerOperationErrorGenerator.kt:139 */
|
117 220 | }
|
221 + | /* ServerOperationErrorGenerator.kt:93 */
|
222 + | }
|
223 + | /* ServerOperationErrorGenerator.kt:83 */
|
118 224 | }
|
225 + | /* ServerOperationErrorGenerator.kt:100 */
|
119 226 | impl ::std::error::Error for ErrorSerializationOperationError {
|
227 + | /* ServerOperationErrorGenerator.kt:101 */
|
120 228 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
229 + | /* ServerOperationErrorGenerator.kt:139 */
|
121 230 | match &self {
|
122 - | ErrorSerializationOperationError::ValidationException(_inner) => Some(_inner),
|
231 + | /* ServerOperationErrorGenerator.kt:142 */
|
232 + | ErrorSerializationOperationError::ValidationException(_inner) =>
|
233 + | /* ServerOperationErrorGenerator.kt:103 */
|
234 + | {
|
235 + | Some(_inner)
|
123 236 | }
|
237 + | /* ServerOperationErrorGenerator.kt:139 */
|
124 238 | }
|
239 + | /* ServerOperationErrorGenerator.kt:101 */
|
240 + | }
|
241 + | /* ServerOperationErrorGenerator.kt:100 */
|
125 242 | }
|
243 + | /* ServerOperationErrorGenerator.kt:110 */
|
126 244 | impl ::std::convert::From<crate::error::ValidationException>
|
127 245 | for crate::error::ErrorSerializationOperationError
|
128 246 | {
|
247 + | /* ServerOperationErrorGenerator.kt:111 */
|
129 248 | fn from(
|
130 249 | variant: crate::error::ValidationException,
|
131 250 | ) -> crate::error::ErrorSerializationOperationError {
|
251 + | /* ServerOperationErrorGenerator.kt:112 */
|
132 252 | Self::ValidationException(variant)
|
253 + | /* ServerOperationErrorGenerator.kt:111 */
|
133 254 | }
|
255 + | /* ServerOperationErrorGenerator.kt:110 */
|
134 256 | }
|
135 257 |
|
258 + | /* ServerOperationErrorGenerator.kt:63 */
|
136 259 | /// Error type for the `SimpleStructOperation` operation.
|
260 + | /* ServerOperationErrorGenerator.kt:64 */
|
137 261 | /// Each variant represents an error that can occur for the `SimpleStructOperation` operation.
|
262 + | /* RustType.kt:516 */
|
138 263 | #[derive(::std::fmt::Debug)]
|
139 - | pub enum SimpleStructOperationError {
|
140 - | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
264 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum SimpleStructOperationError {
|
265 + | /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
266 + | /* ServerOperationErrorGenerator.kt:71 */
|
141 267 | ValidationException(crate::error::ValidationException),
|
268 + | /* ServerOperationErrorGenerator.kt:66 */
|
142 269 | }
|
270 + | /* ServerOperationErrorGenerator.kt:75 */
|
143 271 | impl ::std::fmt::Display for SimpleStructOperationError {
|
272 + | /* ServerOperationErrorGenerator.kt:76 */
|
144 273 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
274 + | /* ServerOperationErrorGenerator.kt:139 */
|
145 275 | match &self {
|
146 - | SimpleStructOperationError::ValidationException(_inner) => _inner.fmt(f),
|
276 + | /* ServerOperationErrorGenerator.kt:142 */
|
277 + | SimpleStructOperationError::ValidationException(_inner) =>
|
278 + | /* ServerOperationErrorGenerator.kt:78 */
|
279 + | {
|
280 + | _inner.fmt(f)
|
281 + | }
|
282 + | /* ServerOperationErrorGenerator.kt:139 */
|
147 283 | }
|
284 + | /* ServerOperationErrorGenerator.kt:76 */
|
148 285 | }
|
286 + | /* ServerOperationErrorGenerator.kt:75 */
|
149 287 | }
|
288 + | /* ServerOperationErrorGenerator.kt:83 */
|
150 289 | impl SimpleStructOperationError {
|
290 + | /* ServerOperationErrorGenerator.kt:87 */
|
151 291 | /// Returns `true` if the error kind is `SimpleStructOperationError::ValidationException`.
|
292 + | /* ServerOperationErrorGenerator.kt:88 */
|
152 293 | pub fn is_validation_exception(&self) -> bool {
|
294 + | /* ServerOperationErrorGenerator.kt:89 */
|
153 295 | matches!(&self, SimpleStructOperationError::ValidationException(_))
|
296 + | /* ServerOperationErrorGenerator.kt:88 */
|
154 297 | }
|
298 + | /* ServerOperationErrorGenerator.kt:92 */
|
155 299 | /// Returns the error name string by matching the correct variant.
|
300 + | /* ServerOperationErrorGenerator.kt:93 */
|
156 301 | pub fn name(&self) -> &'static str {
|
302 + | /* ServerOperationErrorGenerator.kt:139 */
|
157 303 | match &self {
|
158 - | SimpleStructOperationError::ValidationException(_inner) => _inner.name(),
|
304 + | /* ServerOperationErrorGenerator.kt:142 */
|
305 + | SimpleStructOperationError::ValidationException(_inner) =>
|
306 + | /* ServerOperationErrorGenerator.kt:95 */
|
307 + | {
|
308 + | _inner.name()
|
309 + | }
|
310 + | /* ServerOperationErrorGenerator.kt:139 */
|
159 311 | }
|
312 + | /* ServerOperationErrorGenerator.kt:93 */
|
160 313 | }
|
314 + | /* ServerOperationErrorGenerator.kt:83 */
|
161 315 | }
|
316 + | /* ServerOperationErrorGenerator.kt:100 */
|
162 317 | impl ::std::error::Error for SimpleStructOperationError {
|
318 + | /* ServerOperationErrorGenerator.kt:101 */
|
163 319 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
320 + | /* ServerOperationErrorGenerator.kt:139 */
|
164 321 | match &self {
|
165 - | SimpleStructOperationError::ValidationException(_inner) => Some(_inner),
|
322 + | /* ServerOperationErrorGenerator.kt:142 */
|
323 + | SimpleStructOperationError::ValidationException(_inner) =>
|
324 + | /* ServerOperationErrorGenerator.kt:103 */
|
325 + | {
|
326 + | Some(_inner)
|
166 327 | }
|
328 + | /* ServerOperationErrorGenerator.kt:139 */
|
167 329 | }
|
330 + | /* ServerOperationErrorGenerator.kt:101 */
|
331 + | }
|
332 + | /* ServerOperationErrorGenerator.kt:100 */
|
168 333 | }
|
334 + | /* ServerOperationErrorGenerator.kt:110 */
|
169 335 | impl ::std::convert::From<crate::error::ValidationException>
|
170 336 | for crate::error::SimpleStructOperationError
|
171 337 | {
|
338 + | /* ServerOperationErrorGenerator.kt:111 */
|
172 339 | fn from(
|
173 340 | variant: crate::error::ValidationException,
|
174 341 | ) -> crate::error::SimpleStructOperationError {
|
342 + | /* ServerOperationErrorGenerator.kt:112 */
|
175 343 | Self::ValidationException(variant)
|
344 + | /* ServerOperationErrorGenerator.kt:111 */
|
176 345 | }
|
346 + | /* ServerOperationErrorGenerator.kt:110 */
|
177 347 | }
|
178 - | /// See [`ValidationException`](crate::error::ValidationException).
|
348 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationException`](crate::error::ValidationException).
|
179 349 | pub mod validation_exception {
|
180 350 |
|
351 + | /* RustType.kt:516 */
|
181 352 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
182 - | /// Holds one variant for each of the ways the builder can fail.
|
353 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
354 + | /* RustType.kt:516 */
|
183 355 | #[non_exhaustive]
|
356 + | /* ServerBuilderConstraintViolations.kt:75 */
|
184 357 | #[allow(clippy::enum_variant_names)]
|
185 358 | pub enum ConstraintViolation {
|
186 - | /// `message` was not provided but it is required when building `ValidationException`.
|
359 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
|
360 + | /* ServerBuilderConstraintViolations.kt:143 */
|
187 361 | MissingMessage,
|
362 + | /* ServerBuilderConstraintViolations.kt:75 */
|
188 363 | }
|
364 + | /* ServerBuilderConstraintViolations.kt:117 */
|
189 365 | impl ::std::fmt::Display for ConstraintViolation {
|
366 + | /* ServerBuilderConstraintViolations.kt:118 */
|
190 367 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
368 + | /* ServerBuilderConstraintViolations.kt:119 */
|
191 369 | match self {
|
192 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
193 - | }
|
370 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
371 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
372 + | /* ServerBuilderConstraintViolations.kt:118 */
|
194 373 | }
|
374 + | /* ServerBuilderConstraintViolations.kt:117 */
|
195 375 | }
|
376 + | /* ServerBuilderConstraintViolations.kt:84 */
|
196 377 | impl ::std::error::Error for ConstraintViolation {}
|
378 + | /* ServerBuilderGenerator.kt:446 */
|
197 379 | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
198 380 | type Error = ConstraintViolation;
|
199 381 |
|
200 382 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
201 383 | builder.build()
|
202 384 | }
|
203 385 | }
|
204 - | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
386 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationException`](crate::error::ValidationException).
|
387 + | /* RustType.kt:516 */
|
205 388 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
389 + | /* ServerBuilderGenerator.kt:211 */
|
206 390 | pub struct Builder {
|
391 + | /* ServerBuilderGenerator.kt:308 */
|
207 392 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
393 + | /* ServerBuilderGenerator.kt:308 */
|
208 394 | pub(crate) field_list:
|
209 395 | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
396 + | /* ServerBuilderGenerator.kt:211 */
|
210 397 | }
|
398 + | /* ServerBuilderGenerator.kt:215 */
|
211 399 | impl Builder {
|
212 - | /// A summary of the validation failure.
|
400 + | /// /* ServerBuilderGenerator.kt:331 */A summary of the validation failure.
|
401 + | /* ServerBuilderGenerator.kt:343 */
|
213 402 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
214 - | self.message = Some(input);
|
403 + | /* ServerBuilderGenerator.kt:344 */
|
404 + | self.message =
|
405 + | /* ServerBuilderGenerator.kt:345 */Some(
|
406 + | /* ServerBuilderGenerator.kt:376 */input
|
407 + | /* ServerBuilderGenerator.kt:345 */)
|
408 + | /* ServerBuilderGenerator.kt:344 */;
|
215 409 | self
|
410 + | /* ServerBuilderGenerator.kt:343 */
|
216 411 | }
|
217 - | /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
412 + | /// /* ServerBuilderGenerator.kt:331 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
413 + | /* ServerBuilderGenerator.kt:343 */
|
218 414 | pub fn field_list(
|
219 415 | mut self,
|
220 416 | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
221 417 | ) -> Self {
|
222 - | self.field_list = input;
|
418 + | /* ServerBuilderGenerator.kt:344 */
|
419 + | self.field_list =
|
420 + | /* ServerBuilderGenerator.kt:376 */input
|
421 + | /* ServerBuilderGenerator.kt:344 */;
|
223 422 | self
|
423 + | /* ServerBuilderGenerator.kt:343 */
|
224 424 | }
|
225 - | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
226 - | ///
|
425 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
426 + | /// /* ServerBuilderGenerator.kt:260 */
|
227 427 | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
|
228 428 | ///
|
429 + | /* ServerBuilderGenerator.kt:271 */
|
229 430 | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
230 431 | self.build_enforcing_all_constraints()
|
231 432 | }
|
433 + | /* ServerBuilderGenerator.kt:283 */
|
232 434 | fn build_enforcing_all_constraints(
|
233 435 | self,
|
234 436 | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
235 - | Ok(crate::error::ValidationException {
|
236 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
437 + | /* ServerBuilderGenerator.kt:287 */
|
438 + | Ok(
|
439 + | /* ServerBuilderGenerator.kt:542 */
|
440 + | crate::error::ValidationException {
|
441 + | /* ServerBuilderGenerator.kt:546 */
|
442 + | message: self
|
443 + | .message
|
444 + | /* ServerBuilderGenerator.kt:569 */
|
445 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
446 + | /* ServerBuilderGenerator.kt:546 */
|
237 447 | field_list: self.field_list,
|
238 - | })
|
448 + | /* ServerBuilderGenerator.kt:542 */
|
449 + | }, /* ServerBuilderGenerator.kt:287 */
|
450 + | )
|
451 + | /* ServerBuilderGenerator.kt:283 */
|
239 452 | }
|
453 + | /* ServerBuilderGenerator.kt:215 */
|
240 454 | }
|
455 + |
|
456 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
241 457 | }
|