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 `EndpointWithHostLabelOperation` operation.
|
5 + | /* ServerOperationErrorGenerator.kt:64 */
|
4 6 | /// Each variant represents an error that can occur for the `EndpointWithHostLabelOperation` operation.
|
7 + | /* RustType.kt:516 */
|
5 8 | #[derive(::std::fmt::Debug)]
|
6 - | pub enum EndpointWithHostLabelOperationError {
|
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 EndpointWithHostLabelOperationError {
|
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 EndpointWithHostLabelOperationError {
|
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 - | EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.fmt(f),
|
21 + | /* ServerOperationErrorGenerator.kt:142 */
|
22 + | EndpointWithHostLabelOperationError::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 EndpointWithHostLabelOperationError {
|
35 + | /* ServerOperationErrorGenerator.kt:87 */
|
18 36 | /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::ValidationException`.
|
37 + | /* ServerOperationErrorGenerator.kt:88 */
|
19 38 | pub fn is_validation_exception(&self) -> bool {
|
39 + | /* ServerOperationErrorGenerator.kt:89 */
|
20 40 | matches!(
|
21 41 | &self,
|
22 42 | EndpointWithHostLabelOperationError::ValidationException(_)
|
23 43 | )
|
44 + | /* ServerOperationErrorGenerator.kt:88 */
|
24 45 | }
|
46 + | /* ServerOperationErrorGenerator.kt:92 */
|
25 47 | /// Returns the error name string by matching the correct variant.
|
48 + | /* ServerOperationErrorGenerator.kt:93 */
|
26 49 | pub fn name(&self) -> &'static str {
|
50 + | /* ServerOperationErrorGenerator.kt:139 */
|
27 51 | match &self {
|
28 - | EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.name(),
|
52 + | /* ServerOperationErrorGenerator.kt:142 */
|
53 + | EndpointWithHostLabelOperationError::ValidationException(_inner) =>
|
54 + | /* ServerOperationErrorGenerator.kt:95 */
|
55 + | {
|
56 + | _inner.name()
|
57 + | }
|
58 + | /* ServerOperationErrorGenerator.kt:139 */
|
29 59 | }
|
60 + | /* ServerOperationErrorGenerator.kt:93 */
|
30 61 | }
|
62 + | /* ServerOperationErrorGenerator.kt:83 */
|
31 63 | }
|
64 + | /* ServerOperationErrorGenerator.kt:100 */
|
32 65 | impl ::std::error::Error for EndpointWithHostLabelOperationError {
|
66 + | /* ServerOperationErrorGenerator.kt:101 */
|
33 67 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
68 + | /* ServerOperationErrorGenerator.kt:139 */
|
34 69 | match &self {
|
35 - | EndpointWithHostLabelOperationError::ValidationException(_inner) => Some(_inner),
|
70 + | /* ServerOperationErrorGenerator.kt:142 */
|
71 + | EndpointWithHostLabelOperationError::ValidationException(_inner) =>
|
72 + | /* ServerOperationErrorGenerator.kt:103 */
|
73 + | {
|
74 + | Some(_inner)
|
75 + | }
|
76 + | /* ServerOperationErrorGenerator.kt:139 */
|
36 77 | }
|
78 + | /* ServerOperationErrorGenerator.kt:101 */
|
37 79 | }
|
80 + | /* ServerOperationErrorGenerator.kt:100 */
|
38 81 | }
|
82 + | /* ServerOperationErrorGenerator.kt:110 */
|
39 83 | impl ::std::convert::From<crate::error::ValidationException>
|
40 84 | for crate::error::EndpointWithHostLabelOperationError
|
41 85 | {
|
86 + | /* ServerOperationErrorGenerator.kt:111 */
|
42 87 | fn from(
|
43 88 | variant: crate::error::ValidationException,
|
44 89 | ) -> crate::error::EndpointWithHostLabelOperationError {
|
90 + | /* ServerOperationErrorGenerator.kt:112 */
|
45 91 | Self::ValidationException(variant)
|
92 + | /* ServerOperationErrorGenerator.kt:111 */
|
46 93 | }
|
94 + | /* ServerOperationErrorGenerator.kt:110 */
|
47 95 | }
|
48 96 |
|
49 - | /// 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.
|
97 + | /// /* 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.
|
98 + | /* RustType.kt:516 */
|
50 99 | #[derive(
|
51 100 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
52 101 | )]
|
53 - | pub struct ValidationException {
|
54 - | /// A summary of the validation failure.
|
102 + | pub /* StructureGenerator.kt:201 */ struct ValidationException {
|
103 + | /// /* StructureGenerator.kt:231 */A summary of the validation failure.
|
55 104 | pub message: ::std::string::String,
|
56 - | /// 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.
|
105 + | /// /* 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.
|
57 106 | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
107 + | /* StructureGenerator.kt:201 */
|
58 108 | }
|
109 + | /* StructureGenerator.kt:135 */
|
59 110 | impl ValidationException {
|
60 - | /// 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.
|
111 + | /// /* 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.
|
112 + | /* StructureGenerator.kt:166 */
|
61 113 | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
114 + | /* StructureGenerator.kt:169 */
|
62 115 | self.field_list.as_deref()
|
116 + | /* StructureGenerator.kt:166 */
|
63 117 | }
|
118 + | /* StructureGenerator.kt:135 */
|
64 119 | }
|
120 + | /* ErrorImplGenerator.kt:99 */
|
65 121 | impl ValidationException {
|
122 + | /* ErrorImplGenerator.kt:128 */
|
66 123 | /// Returns the error message.
|
67 124 | pub fn message(&self) -> &str {
|
68 125 | &self.message
|
69 126 | }
|
127 + | /* ErrorImplGenerator.kt:141 */
|
70 128 | #[doc(hidden)]
|
71 129 | /// Returns the error name.
|
72 130 | pub fn name(&self) -> &'static str {
|
73 131 | "ValidationException"
|
74 132 | }
|
133 + | /* ErrorImplGenerator.kt:99 */
|
75 134 | }
|
135 + | /* ErrorImplGenerator.kt:153 */
|
76 136 | impl ::std::fmt::Display for ValidationException {
|
137 + | /* ErrorImplGenerator.kt:154 */
|
77 138 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
139 + | /* ErrorImplGenerator.kt:161 */
|
78 140 | ::std::write!(f, "ValidationException")?;
|
141 + | /* ErrorImplGenerator.kt:166 */
|
79 142 | {
|
143 + | /* ErrorImplGenerator.kt:167 */
|
80 144 | ::std::write!(f, ": {}", &self.message)?;
|
145 + | /* ErrorImplGenerator.kt:166 */
|
81 146 | }
|
147 + | /* ErrorImplGenerator.kt:171 */
|
82 148 | Ok(())
|
149 + | /* ErrorImplGenerator.kt:154 */
|
83 150 | }
|
151 + | /* ErrorImplGenerator.kt:153 */
|
84 152 | }
|
153 + | /* ErrorImplGenerator.kt:175 */
|
85 154 | impl ::std::error::Error for ValidationException {}
|
155 + | /* ServerCodegenVisitor.kt:345 */
|
86 156 | impl ValidationException {
|
87 - | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
157 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
158 + | /* ServerBuilderGenerator.kt:295 */
|
88 159 | pub fn builder() -> crate::error::validation_exception::Builder {
|
160 + | /* ServerBuilderGenerator.kt:296 */
|
89 161 | crate::error::validation_exception::Builder::default()
|
162 + | /* ServerBuilderGenerator.kt:295 */
|
90 163 | }
|
164 + | /* ServerCodegenVisitor.kt:345 */
|
91 165 | }
|
92 166 |
|
167 + | /* ServerOperationErrorGenerator.kt:63 */
|
93 168 | /// Error type for the `JsonUnions` operation.
|
169 + | /* ServerOperationErrorGenerator.kt:64 */
|
94 170 | /// Each variant represents an error that can occur for the `JsonUnions` operation.
|
171 + | /* RustType.kt:516 */
|
95 172 | #[derive(::std::fmt::Debug)]
|
96 - | pub enum JsonUnionsError {
|
97 - | /// 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.
|
173 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum JsonUnionsError {
|
174 + | /// /* 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.
|
175 + | /* ServerOperationErrorGenerator.kt:71 */
|
98 176 | ValidationException(crate::error::ValidationException),
|
177 + | /* ServerOperationErrorGenerator.kt:66 */
|
99 178 | }
|
179 + | /* ServerOperationErrorGenerator.kt:75 */
|
100 180 | impl ::std::fmt::Display for JsonUnionsError {
|
181 + | /* ServerOperationErrorGenerator.kt:76 */
|
101 182 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
183 + | /* ServerOperationErrorGenerator.kt:139 */
|
102 184 | match &self {
|
103 - | JsonUnionsError::ValidationException(_inner) => _inner.fmt(f),
|
185 + | /* ServerOperationErrorGenerator.kt:142 */
|
186 + | JsonUnionsError::ValidationException(_inner) =>
|
187 + | /* ServerOperationErrorGenerator.kt:78 */
|
188 + | {
|
189 + | _inner.fmt(f)
|
190 + | }
|
191 + | /* ServerOperationErrorGenerator.kt:139 */
|
104 192 | }
|
193 + | /* ServerOperationErrorGenerator.kt:76 */
|
105 194 | }
|
195 + | /* ServerOperationErrorGenerator.kt:75 */
|
106 196 | }
|
197 + | /* ServerOperationErrorGenerator.kt:83 */
|
107 198 | impl JsonUnionsError {
|
199 + | /* ServerOperationErrorGenerator.kt:87 */
|
108 200 | /// Returns `true` if the error kind is `JsonUnionsError::ValidationException`.
|
201 + | /* ServerOperationErrorGenerator.kt:88 */
|
109 202 | pub fn is_validation_exception(&self) -> bool {
|
203 + | /* ServerOperationErrorGenerator.kt:89 */
|
110 204 | matches!(&self, JsonUnionsError::ValidationException(_))
|
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 - | JsonUnionsError::ValidationException(_inner) => _inner.name(),
|
213 + | /* ServerOperationErrorGenerator.kt:142 */
|
214 + | JsonUnionsError::ValidationException(_inner) =>
|
215 + | /* ServerOperationErrorGenerator.kt:95 */
|
216 + | {
|
217 + | _inner.name()
|
218 + | }
|
219 + | /* ServerOperationErrorGenerator.kt:139 */
|
116 220 | }
|
221 + | /* ServerOperationErrorGenerator.kt:93 */
|
117 222 | }
|
223 + | /* ServerOperationErrorGenerator.kt:83 */
|
118 224 | }
|
225 + | /* ServerOperationErrorGenerator.kt:100 */
|
119 226 | impl ::std::error::Error for JsonUnionsError {
|
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 - | JsonUnionsError::ValidationException(_inner) => Some(_inner),
|
231 + | /* ServerOperationErrorGenerator.kt:142 */
|
232 + | JsonUnionsError::ValidationException(_inner) =>
|
233 + | /* ServerOperationErrorGenerator.kt:103 */
|
234 + | {
|
235 + | Some(_inner)
|
236 + | }
|
237 + | /* ServerOperationErrorGenerator.kt:139 */
|
123 238 | }
|
239 + | /* ServerOperationErrorGenerator.kt:101 */
|
124 240 | }
|
241 + | /* ServerOperationErrorGenerator.kt:100 */
|
125 242 | }
|
243 + | /* ServerOperationErrorGenerator.kt:110 */
|
126 244 | impl ::std::convert::From<crate::error::ValidationException> for crate::error::JsonUnionsError {
|
245 + | /* ServerOperationErrorGenerator.kt:111 */
|
127 246 | fn from(variant: crate::error::ValidationException) -> crate::error::JsonUnionsError {
|
247 + | /* ServerOperationErrorGenerator.kt:112 */
|
128 248 | Self::ValidationException(variant)
|
249 + | /* ServerOperationErrorGenerator.kt:111 */
|
129 250 | }
|
251 + | /* ServerOperationErrorGenerator.kt:110 */
|
130 252 | }
|
131 253 |
|
254 + | /* ServerOperationErrorGenerator.kt:63 */
|
132 255 | /// Error type for the `GreetingWithErrors` operation.
|
256 + | /* ServerOperationErrorGenerator.kt:64 */
|
133 257 | /// Each variant represents an error that can occur for the `GreetingWithErrors` operation.
|
258 + | /* RustType.kt:516 */
|
134 259 | #[derive(::std::fmt::Debug)]
|
135 - | pub enum GreetingWithErrorsError {
|
136 - | /// This error is thrown when an invalid greeting value is provided.
|
260 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GreetingWithErrorsError {
|
261 + | /// /* ServerOperationErrorGenerator.kt:68 */This error is thrown when an invalid greeting value is provided.
|
262 + | /* ServerOperationErrorGenerator.kt:71 */
|
137 263 | InvalidGreeting(crate::error::InvalidGreeting),
|
138 - | /// This error is thrown when a request is invalid.
|
264 + | /// /* ServerOperationErrorGenerator.kt:68 */This error is thrown when a request is invalid.
|
265 + | /* ServerOperationErrorGenerator.kt:71 */
|
139 266 | ComplexError(crate::error::ComplexError),
|
140 - | /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
|
267 + | /// /* ServerOperationErrorGenerator.kt:68 */This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
|
268 + | /* ServerOperationErrorGenerator.kt:71 */
|
141 269 | FooError(crate::error::FooError),
|
270 + | /* ServerOperationErrorGenerator.kt:66 */
|
142 271 | }
|
272 + | /* ServerOperationErrorGenerator.kt:75 */
|
143 273 | impl ::std::fmt::Display for GreetingWithErrorsError {
|
274 + | /* ServerOperationErrorGenerator.kt:76 */
|
144 275 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
276 + | /* ServerOperationErrorGenerator.kt:139 */
|
145 277 | match &self {
|
146 - | GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.fmt(f),
|
147 - | GreetingWithErrorsError::ComplexError(_inner) => _inner.fmt(f),
|
148 - | GreetingWithErrorsError::FooError(_inner) => _inner.fmt(f),
|
278 + | /* ServerOperationErrorGenerator.kt:142 */
|
279 + | GreetingWithErrorsError::InvalidGreeting(_inner) =>
|
280 + | /* ServerOperationErrorGenerator.kt:78 */
|
281 + | {
|
282 + | _inner.fmt(f)
|
149 283 | }
|
284 + | ,
|
285 + | /* ServerOperationErrorGenerator.kt:142 */
|
286 + | GreetingWithErrorsError::ComplexError(_inner) =>
|
287 + | /* ServerOperationErrorGenerator.kt:78 */
|
288 + | {
|
289 + | _inner.fmt(f)
|
150 290 | }
|
291 + | ,
|
292 + | /* ServerOperationErrorGenerator.kt:142 */
|
293 + | GreetingWithErrorsError::FooError(_inner) =>
|
294 + | /* ServerOperationErrorGenerator.kt:78 */
|
295 + | {
|
296 + | _inner.fmt(f)
|
297 + | }
|
298 + | /* ServerOperationErrorGenerator.kt:139 */
|
299 + | }
|
300 + | /* ServerOperationErrorGenerator.kt:76 */
|
301 + | }
|
302 + | /* ServerOperationErrorGenerator.kt:75 */
|
151 303 | }
|
304 + | /* ServerOperationErrorGenerator.kt:83 */
|
152 305 | impl GreetingWithErrorsError {
|
306 + | /* ServerOperationErrorGenerator.kt:87 */
|
153 307 | /// Returns `true` if the error kind is `GreetingWithErrorsError::InvalidGreeting`.
|
308 + | /* ServerOperationErrorGenerator.kt:88 */
|
154 309 | pub fn is_invalid_greeting(&self) -> bool {
|
310 + | /* ServerOperationErrorGenerator.kt:89 */
|
155 311 | matches!(&self, GreetingWithErrorsError::InvalidGreeting(_))
|
312 + | /* ServerOperationErrorGenerator.kt:88 */
|
156 313 | }
|
314 + | /* ServerOperationErrorGenerator.kt:87 */
|
157 315 | /// Returns `true` if the error kind is `GreetingWithErrorsError::ComplexError`.
|
316 + | /* ServerOperationErrorGenerator.kt:88 */
|
158 317 | pub fn is_complex_error(&self) -> bool {
|
318 + | /* ServerOperationErrorGenerator.kt:89 */
|
159 319 | matches!(&self, GreetingWithErrorsError::ComplexError(_))
|
320 + | /* ServerOperationErrorGenerator.kt:88 */
|
160 321 | }
|
322 + | /* ServerOperationErrorGenerator.kt:87 */
|
161 323 | /// Returns `true` if the error kind is `GreetingWithErrorsError::FooError`.
|
324 + | /* ServerOperationErrorGenerator.kt:88 */
|
162 325 | pub fn is_foo_error(&self) -> bool {
|
326 + | /* ServerOperationErrorGenerator.kt:89 */
|
163 327 | matches!(&self, GreetingWithErrorsError::FooError(_))
|
328 + | /* ServerOperationErrorGenerator.kt:88 */
|
164 329 | }
|
330 + | /* ServerOperationErrorGenerator.kt:92 */
|
165 331 | /// Returns the error name string by matching the correct variant.
|
332 + | /* ServerOperationErrorGenerator.kt:93 */
|
166 333 | pub fn name(&self) -> &'static str {
|
334 + | /* ServerOperationErrorGenerator.kt:139 */
|
167 335 | match &self {
|
168 - | GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.name(),
|
169 - | GreetingWithErrorsError::ComplexError(_inner) => _inner.name(),
|
170 - | GreetingWithErrorsError::FooError(_inner) => _inner.name(),
|
336 + | /* ServerOperationErrorGenerator.kt:142 */
|
337 + | GreetingWithErrorsError::InvalidGreeting(_inner) =>
|
338 + | /* ServerOperationErrorGenerator.kt:95 */
|
339 + | {
|
340 + | _inner.name()
|
341 + | }
|
342 + | ,
|
343 + | /* ServerOperationErrorGenerator.kt:142 */
|
344 + | GreetingWithErrorsError::ComplexError(_inner) =>
|
345 + | /* ServerOperationErrorGenerator.kt:95 */
|
346 + | {
|
347 + | _inner.name()
|
348 + | }
|
349 + | ,
|
350 + | /* ServerOperationErrorGenerator.kt:142 */
|
351 + | GreetingWithErrorsError::FooError(_inner) =>
|
352 + | /* ServerOperationErrorGenerator.kt:95 */
|
353 + | {
|
354 + | _inner.name()
|
355 + | }
|
356 + | /* ServerOperationErrorGenerator.kt:139 */
|
171 357 | }
|
358 + | /* ServerOperationErrorGenerator.kt:93 */
|
172 359 | }
|
360 + | /* ServerOperationErrorGenerator.kt:83 */
|
173 361 | }
|
362 + | /* ServerOperationErrorGenerator.kt:100 */
|
174 363 | impl ::std::error::Error for GreetingWithErrorsError {
|
364 + | /* ServerOperationErrorGenerator.kt:101 */
|
175 365 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
366 + | /* ServerOperationErrorGenerator.kt:139 */
|
176 367 | match &self {
|
177 - | GreetingWithErrorsError::InvalidGreeting(_inner) => Some(_inner),
|
178 - | GreetingWithErrorsError::ComplexError(_inner) => Some(_inner),
|
179 - | GreetingWithErrorsError::FooError(_inner) => Some(_inner),
|
368 + | /* ServerOperationErrorGenerator.kt:142 */
|
369 + | GreetingWithErrorsError::InvalidGreeting(_inner) =>
|
370 + | /* ServerOperationErrorGenerator.kt:103 */
|
371 + | {
|
372 + | Some(_inner)
|
373 + | }
|
374 + | ,
|
375 + | /* ServerOperationErrorGenerator.kt:142 */
|
376 + | GreetingWithErrorsError::ComplexError(_inner) =>
|
377 + | /* ServerOperationErrorGenerator.kt:103 */
|
378 + | {
|
379 + | Some(_inner)
|
380 + | }
|
381 + | ,
|
382 + | /* ServerOperationErrorGenerator.kt:142 */
|
383 + | GreetingWithErrorsError::FooError(_inner) =>
|
384 + | /* ServerOperationErrorGenerator.kt:103 */
|
385 + | {
|
386 + | Some(_inner)
|
180 387 | }
|
388 + | /* ServerOperationErrorGenerator.kt:139 */
|
181 389 | }
|
390 + | /* ServerOperationErrorGenerator.kt:101 */
|
391 + | }
|
392 + | /* ServerOperationErrorGenerator.kt:100 */
|
182 393 | }
|
394 + | /* ServerOperationErrorGenerator.kt:110 */
|
183 395 | impl ::std::convert::From<crate::error::InvalidGreeting> for crate::error::GreetingWithErrorsError {
|
396 + | /* ServerOperationErrorGenerator.kt:111 */
|
184 397 | fn from(variant: crate::error::InvalidGreeting) -> crate::error::GreetingWithErrorsError {
|
398 + | /* ServerOperationErrorGenerator.kt:112 */
|
185 399 | Self::InvalidGreeting(variant)
|
400 + | /* ServerOperationErrorGenerator.kt:111 */
|
186 401 | }
|
402 + | /* ServerOperationErrorGenerator.kt:110 */
|
187 403 | }
|
404 + | /* ServerOperationErrorGenerator.kt:110 */
|
188 405 | impl ::std::convert::From<crate::error::ComplexError> for crate::error::GreetingWithErrorsError {
|
406 + | /* ServerOperationErrorGenerator.kt:111 */
|
189 407 | fn from(variant: crate::error::ComplexError) -> crate::error::GreetingWithErrorsError {
|
408 + | /* ServerOperationErrorGenerator.kt:112 */
|
190 409 | Self::ComplexError(variant)
|
410 + | /* ServerOperationErrorGenerator.kt:111 */
|
191 411 | }
|
412 + | /* ServerOperationErrorGenerator.kt:110 */
|
192 413 | }
|
414 + | /* ServerOperationErrorGenerator.kt:110 */
|
193 415 | impl ::std::convert::From<crate::error::FooError> for crate::error::GreetingWithErrorsError {
|
416 + | /* ServerOperationErrorGenerator.kt:111 */
|
194 417 | fn from(variant: crate::error::FooError) -> crate::error::GreetingWithErrorsError {
|
418 + | /* ServerOperationErrorGenerator.kt:112 */
|
195 419 | Self::FooError(variant)
|
420 + | /* ServerOperationErrorGenerator.kt:111 */
|
196 421 | }
|
422 + | /* ServerOperationErrorGenerator.kt:110 */
|
197 423 | }
|
198 424 |
|
199 - | /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
|
425 + | /// /* StructureGenerator.kt:197 */This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
|
426 + | /* RustType.kt:516 */
|
200 427 | #[derive(
|
201 428 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
202 429 | )]
|
203 - | pub struct FooError {}
|
430 + | pub /* StructureGenerator.kt:201 */ struct FooError {/* StructureGenerator.kt:201 */}
|
431 + | /* ErrorImplGenerator.kt:99 */
|
204 432 | impl FooError {
|
433 + | /* ErrorImplGenerator.kt:141 */
|
205 434 | #[doc(hidden)]
|
206 435 | /// Returns the error name.
|
207 436 | pub fn name(&self) -> &'static str {
|
208 437 | "FooError"
|
209 438 | }
|
439 + | /* ErrorImplGenerator.kt:99 */
|
210 440 | }
|
441 + | /* ErrorImplGenerator.kt:153 */
|
211 442 | impl ::std::fmt::Display for FooError {
|
443 + | /* ErrorImplGenerator.kt:154 */
|
212 444 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
445 + | /* ErrorImplGenerator.kt:161 */
|
213 446 | ::std::write!(f, "FooError")?;
|
447 + | /* ErrorImplGenerator.kt:171 */
|
214 448 | Ok(())
|
449 + | /* ErrorImplGenerator.kt:154 */
|
215 450 | }
|
451 + | /* ErrorImplGenerator.kt:153 */
|
216 452 | }
|
453 + | /* ErrorImplGenerator.kt:175 */
|
217 454 | impl ::std::error::Error for FooError {}
|
455 + | /* ServerCodegenVisitor.kt:345 */
|
218 456 | impl FooError {
|
219 - | /// Creates a new builder-style object to manufacture [`FooError`](crate::error::FooError).
|
457 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`FooError`](crate::error::FooError).
|
458 + | /* ServerBuilderGenerator.kt:295 */
|
220 459 | pub fn builder() -> crate::error::foo_error::Builder {
|
460 + | /* ServerBuilderGenerator.kt:296 */
|
221 461 | crate::error::foo_error::Builder::default()
|
462 + | /* ServerBuilderGenerator.kt:295 */
|
222 463 | }
|
464 + | /* ServerCodegenVisitor.kt:345 */
|
223 465 | }
|
224 466 |
|
225 - | /// This error is thrown when a request is invalid.
|
467 + | /// /* StructureGenerator.kt:197 */This error is thrown when a request is invalid.
|
468 + | /* RustType.kt:516 */
|
226 469 | #[derive(
|
227 470 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
228 471 | )]
|
229 - | pub struct ComplexError {
|
472 + | pub /* StructureGenerator.kt:201 */ struct ComplexError {
|
473 + | /* StructureGenerator.kt:231 */
|
230 474 | #[allow(missing_docs)] // documentation missing in model
|
231 475 | pub top_level: ::std::option::Option<::std::string::String>,
|
476 + | /* StructureGenerator.kt:231 */
|
232 477 | #[allow(missing_docs)] // documentation missing in model
|
233 478 | pub nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
|
479 + | /* StructureGenerator.kt:201 */
|
234 480 | }
|
481 + | /* StructureGenerator.kt:135 */
|
235 482 | impl ComplexError {
|
483 + | /* StructureGenerator.kt:231 */
|
236 484 | #[allow(missing_docs)] // documentation missing in model
|
485 + | /* StructureGenerator.kt:166 */
|
237 486 | pub fn top_level(&self) -> ::std::option::Option<&str> {
|
487 + | /* StructureGenerator.kt:169 */
|
238 488 | self.top_level.as_deref()
|
489 + | /* StructureGenerator.kt:166 */
|
239 490 | }
|
491 + | /* StructureGenerator.kt:231 */
|
240 492 | #[allow(missing_docs)] // documentation missing in model
|
493 + | /* StructureGenerator.kt:166 */
|
241 494 | pub fn nested(&self) -> ::std::option::Option<&crate::model::ComplexNestedErrorData> {
|
495 + | /* StructureGenerator.kt:170 */
|
242 496 | self.nested.as_ref()
|
497 + | /* StructureGenerator.kt:166 */
|
243 498 | }
|
499 + | /* StructureGenerator.kt:135 */
|
244 500 | }
|
501 + | /* ErrorImplGenerator.kt:99 */
|
245 502 | impl ComplexError {
|
503 + | /* ErrorImplGenerator.kt:141 */
|
246 504 | #[doc(hidden)]
|
247 505 | /// Returns the error name.
|
248 506 | pub fn name(&self) -> &'static str {
|
249 507 | "ComplexError"
|
250 508 | }
|
509 + | /* ErrorImplGenerator.kt:99 */
|
251 510 | }
|
511 + | /* ErrorImplGenerator.kt:153 */
|
252 512 | impl ::std::fmt::Display for ComplexError {
|
513 + | /* ErrorImplGenerator.kt:154 */
|
253 514 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
515 + | /* ErrorImplGenerator.kt:161 */
|
254 516 | ::std::write!(f, "ComplexError")?;
|
517 + | /* ErrorImplGenerator.kt:171 */
|
255 518 | Ok(())
|
519 + | /* ErrorImplGenerator.kt:154 */
|
256 520 | }
|
521 + | /* ErrorImplGenerator.kt:153 */
|
257 522 | }
|
523 + | /* ErrorImplGenerator.kt:175 */
|
258 524 | impl ::std::error::Error for ComplexError {}
|
525 + | /* ServerCodegenVisitor.kt:345 */
|
259 526 | impl ComplexError {
|
260 - | /// Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
|
527 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
|
528 + | /* ServerBuilderGenerator.kt:295 */
|
261 529 | pub fn builder() -> crate::error::complex_error::Builder {
|
530 + | /* ServerBuilderGenerator.kt:296 */
|
262 531 | crate::error::complex_error::Builder::default()
|
532 + | /* ServerBuilderGenerator.kt:295 */
|
263 533 | }
|
534 + | /* ServerCodegenVisitor.kt:345 */
|
264 535 | }
|
265 536 |
|
266 - | /// This error is thrown when an invalid greeting value is provided.
|
537 + | /// /* StructureGenerator.kt:197 */This error is thrown when an invalid greeting value is provided.
|
538 + | /* RustType.kt:516 */
|
267 539 | #[derive(
|
268 540 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
269 541 | )]
|
270 - | pub struct InvalidGreeting {
|
542 + | pub /* StructureGenerator.kt:201 */ struct InvalidGreeting {
|
543 + | /* StructureGenerator.kt:231 */
|
271 544 | #[allow(missing_docs)] // documentation missing in model
|
272 545 | pub message: ::std::option::Option<::std::string::String>,
|
546 + | /* StructureGenerator.kt:201 */
|
273 547 | }
|
548 + | /* ErrorImplGenerator.kt:99 */
|
274 549 | impl InvalidGreeting {
|
550 + | /* ErrorImplGenerator.kt:128 */
|
275 551 | /// Returns the error message.
|
276 552 | pub fn message(&self) -> ::std::option::Option<&str> {
|
277 553 | self.message.as_deref()
|
278 554 | }
|
555 + | /* ErrorImplGenerator.kt:141 */
|
279 556 | #[doc(hidden)]
|
280 557 | /// Returns the error name.
|
281 558 | pub fn name(&self) -> &'static str {
|
282 559 | "InvalidGreeting"
|
283 560 | }
|
561 + | /* ErrorImplGenerator.kt:99 */
|
284 562 | }
|
563 + | /* ErrorImplGenerator.kt:153 */
|
285 564 | impl ::std::fmt::Display for InvalidGreeting {
|
565 + | /* ErrorImplGenerator.kt:154 */
|
286 566 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
567 + | /* ErrorImplGenerator.kt:161 */
|
287 568 | ::std::write!(f, "InvalidGreeting")?;
|
569 + | /* ErrorImplGenerator.kt:166 */
|
288 570 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
571 + | /* ErrorImplGenerator.kt:166 */
|
289 572 | {
|
573 + | /* ErrorImplGenerator.kt:167 */
|
290 574 | ::std::write!(f, ": {}", inner_1)?;
|
575 + | /* ErrorImplGenerator.kt:166 */
|
291 576 | }
|
577 + | /* ErrorImplGenerator.kt:166 */
|
292 578 | }
|
579 + | /* ErrorImplGenerator.kt:171 */
|
293 580 | Ok(())
|
581 + | /* ErrorImplGenerator.kt:154 */
|
294 582 | }
|
583 + | /* ErrorImplGenerator.kt:153 */
|
295 584 | }
|
585 + | /* ErrorImplGenerator.kt:175 */
|
296 586 | impl ::std::error::Error for InvalidGreeting {}
|
587 + | /* ServerCodegenVisitor.kt:345 */
|
297 588 | impl InvalidGreeting {
|
298 - | /// Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::error::InvalidGreeting).
|
589 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::error::InvalidGreeting).
|
590 + | /* ServerBuilderGenerator.kt:295 */
|
299 591 | pub fn builder() -> crate::error::invalid_greeting::Builder {
|
592 + | /* ServerBuilderGenerator.kt:296 */
|
300 593 | crate::error::invalid_greeting::Builder::default()
|
594 + | /* ServerBuilderGenerator.kt:295 */
|
301 595 | }
|
596 + | /* ServerCodegenVisitor.kt:345 */
|
302 597 | }
|
303 598 |
|
599 + | /* ServerOperationErrorGenerator.kt:63 */
|
304 600 | /// Error type for the `JsonEnums` operation.
|
601 + | /* ServerOperationErrorGenerator.kt:64 */
|
305 602 | /// Each variant represents an error that can occur for the `JsonEnums` operation.
|
603 + | /* RustType.kt:516 */
|
306 604 | #[derive(::std::fmt::Debug)]
|
307 - | pub enum JsonEnumsError {
|
308 - | /// 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.
|
605 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum JsonEnumsError {
|
606 + | /// /* 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.
|
607 + | /* ServerOperationErrorGenerator.kt:71 */
|
309 608 | ValidationException(crate::error::ValidationException),
|
609 + | /* ServerOperationErrorGenerator.kt:66 */
|
310 610 | }
|
611 + | /* ServerOperationErrorGenerator.kt:75 */
|
311 612 | impl ::std::fmt::Display for JsonEnumsError {
|
613 + | /* ServerOperationErrorGenerator.kt:76 */
|
312 614 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
615 + | /* ServerOperationErrorGenerator.kt:139 */
|
313 616 | match &self {
|
314 - | JsonEnumsError::ValidationException(_inner) => _inner.fmt(f),
|
617 + | /* ServerOperationErrorGenerator.kt:142 */
|
618 + | JsonEnumsError::ValidationException(_inner) =>
|
619 + | /* ServerOperationErrorGenerator.kt:78 */
|
620 + | {
|
621 + | _inner.fmt(f)
|
315 622 | }
|
623 + | /* ServerOperationErrorGenerator.kt:139 */
|
316 624 | }
|
625 + | /* ServerOperationErrorGenerator.kt:76 */
|
626 + | }
|
627 + | /* ServerOperationErrorGenerator.kt:75 */
|
317 628 | }
|
629 + | /* ServerOperationErrorGenerator.kt:83 */
|
318 630 | impl JsonEnumsError {
|
631 + | /* ServerOperationErrorGenerator.kt:87 */
|
319 632 | /// Returns `true` if the error kind is `JsonEnumsError::ValidationException`.
|
633 + | /* ServerOperationErrorGenerator.kt:88 */
|
320 634 | pub fn is_validation_exception(&self) -> bool {
|
635 + | /* ServerOperationErrorGenerator.kt:89 */
|
321 636 | matches!(&self, JsonEnumsError::ValidationException(_))
|
637 + | /* ServerOperationErrorGenerator.kt:88 */
|
322 638 | }
|
639 + | /* ServerOperationErrorGenerator.kt:92 */
|
323 640 | /// Returns the error name string by matching the correct variant.
|
641 + | /* ServerOperationErrorGenerator.kt:93 */
|
324 642 | pub fn name(&self) -> &'static str {
|
643 + | /* ServerOperationErrorGenerator.kt:139 */
|
325 644 | match &self {
|
326 - | JsonEnumsError::ValidationException(_inner) => _inner.name(),
|
645 + | /* ServerOperationErrorGenerator.kt:142 */
|
646 + | JsonEnumsError::ValidationException(_inner) =>
|
647 + | /* ServerOperationErrorGenerator.kt:95 */
|
648 + | {
|
649 + | _inner.name()
|
327 650 | }
|
651 + | /* ServerOperationErrorGenerator.kt:139 */
|
328 652 | }
|
653 + | /* ServerOperationErrorGenerator.kt:93 */
|
654 + | }
|
655 + | /* ServerOperationErrorGenerator.kt:83 */
|
329 656 | }
|
657 + | /* ServerOperationErrorGenerator.kt:100 */
|
330 658 | impl ::std::error::Error for JsonEnumsError {
|
659 + | /* ServerOperationErrorGenerator.kt:101 */
|
331 660 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
661 + | /* ServerOperationErrorGenerator.kt:139 */
|
332 662 | match &self {
|
333 - | JsonEnumsError::ValidationException(_inner) => Some(_inner),
|
663 + | /* ServerOperationErrorGenerator.kt:142 */
|
664 + | JsonEnumsError::ValidationException(_inner) =>
|
665 + | /* ServerOperationErrorGenerator.kt:103 */
|
666 + | {
|
667 + | Some(_inner)
|
668 + | }
|
669 + | /* ServerOperationErrorGenerator.kt:139 */
|
334 670 | }
|
671 + | /* ServerOperationErrorGenerator.kt:101 */
|
335 672 | }
|
673 + | /* ServerOperationErrorGenerator.kt:100 */
|
336 674 | }
|
675 + | /* ServerOperationErrorGenerator.kt:110 */
|
337 676 | impl ::std::convert::From<crate::error::ValidationException> for crate::error::JsonEnumsError {
|
677 + | /* ServerOperationErrorGenerator.kt:111 */
|
338 678 | fn from(variant: crate::error::ValidationException) -> crate::error::JsonEnumsError {
|
679 + | /* ServerOperationErrorGenerator.kt:112 */
|
339 680 | Self::ValidationException(variant)
|
681 + | /* ServerOperationErrorGenerator.kt:111 */
|
340 682 | }
|
683 + | /* ServerOperationErrorGenerator.kt:110 */
|
341 684 | }
|
342 685 |
|
686 + | /* ServerOperationErrorGenerator.kt:63 */
|
343 687 | /// Error type for the `KitchenSinkOperation` operation.
|
688 + | /* ServerOperationErrorGenerator.kt:64 */
|
344 689 | /// Each variant represents an error that can occur for the `KitchenSinkOperation` operation.
|
690 + | /* RustType.kt:516 */
|
345 691 | #[derive(::std::fmt::Debug)]
|
346 - | pub enum KitchenSinkOperationError {
|
692 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum KitchenSinkOperationError {
|
693 + | /* ServerOperationErrorGenerator.kt:68 */
|
347 694 | #[allow(missing_docs)] // documentation missing in model
|
695 + | /* ServerOperationErrorGenerator.kt:71 */
|
348 696 | ErrorWithMembers(crate::error::ErrorWithMembers),
|
697 + | /* ServerOperationErrorGenerator.kt:68 */
|
349 698 | #[allow(missing_docs)] // documentation missing in model
|
699 + | /* ServerOperationErrorGenerator.kt:71 */
|
350 700 | ErrorWithoutMembers(crate::error::ErrorWithoutMembers),
|
701 + | /* ServerOperationErrorGenerator.kt:66 */
|
351 702 | }
|
703 + | /* ServerOperationErrorGenerator.kt:75 */
|
352 704 | impl ::std::fmt::Display for KitchenSinkOperationError {
|
705 + | /* ServerOperationErrorGenerator.kt:76 */
|
353 706 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
707 + | /* ServerOperationErrorGenerator.kt:139 */
|
354 708 | match &self {
|
355 - | KitchenSinkOperationError::ErrorWithMembers(_inner) => _inner.fmt(f),
|
356 - | KitchenSinkOperationError::ErrorWithoutMembers(_inner) => _inner.fmt(f),
|
709 + | /* ServerOperationErrorGenerator.kt:142 */
|
710 + | KitchenSinkOperationError::ErrorWithMembers(_inner) =>
|
711 + | /* ServerOperationErrorGenerator.kt:78 */
|
712 + | {
|
713 + | _inner.fmt(f)
|
714 + | }
|
715 + | ,
|
716 + | /* ServerOperationErrorGenerator.kt:142 */
|
717 + | KitchenSinkOperationError::ErrorWithoutMembers(_inner) =>
|
718 + | /* ServerOperationErrorGenerator.kt:78 */
|
719 + | {
|
720 + | _inner.fmt(f)
|
721 + | }
|
722 + | /* ServerOperationErrorGenerator.kt:139 */
|
357 723 | }
|
724 + | /* ServerOperationErrorGenerator.kt:76 */
|
358 725 | }
|
726 + | /* ServerOperationErrorGenerator.kt:75 */
|
359 727 | }
|
728 + | /* ServerOperationErrorGenerator.kt:83 */
|
360 729 | impl KitchenSinkOperationError {
|
730 + | /* ServerOperationErrorGenerator.kt:87 */
|
361 731 | /// Returns `true` if the error kind is `KitchenSinkOperationError::ErrorWithMembers`.
|
732 + | /* ServerOperationErrorGenerator.kt:88 */
|
362 733 | pub fn is_error_with_members(&self) -> bool {
|
734 + | /* ServerOperationErrorGenerator.kt:89 */
|
363 735 | matches!(&self, KitchenSinkOperationError::ErrorWithMembers(_))
|
736 + | /* ServerOperationErrorGenerator.kt:88 */
|
364 737 | }
|
738 + | /* ServerOperationErrorGenerator.kt:87 */
|
365 739 | /// Returns `true` if the error kind is `KitchenSinkOperationError::ErrorWithoutMembers`.
|
740 + | /* ServerOperationErrorGenerator.kt:88 */
|
366 741 | pub fn is_error_without_members(&self) -> bool {
|
742 + | /* ServerOperationErrorGenerator.kt:89 */
|
367 743 | matches!(&self, KitchenSinkOperationError::ErrorWithoutMembers(_))
|
744 + | /* ServerOperationErrorGenerator.kt:88 */
|
368 745 | }
|
746 + | /* ServerOperationErrorGenerator.kt:92 */
|
369 747 | /// Returns the error name string by matching the correct variant.
|
748 + | /* ServerOperationErrorGenerator.kt:93 */
|
370 749 | pub fn name(&self) -> &'static str {
|
750 + | /* ServerOperationErrorGenerator.kt:139 */
|
371 751 | match &self {
|
372 - | KitchenSinkOperationError::ErrorWithMembers(_inner) => _inner.name(),
|
373 - | KitchenSinkOperationError::ErrorWithoutMembers(_inner) => _inner.name(),
|
752 + | /* ServerOperationErrorGenerator.kt:142 */
|
753 + | KitchenSinkOperationError::ErrorWithMembers(_inner) =>
|
754 + | /* ServerOperationErrorGenerator.kt:95 */
|
755 + | {
|
756 + | _inner.name()
|
757 + | }
|
758 + | ,
|
759 + | /* ServerOperationErrorGenerator.kt:142 */
|
760 + | KitchenSinkOperationError::ErrorWithoutMembers(_inner) =>
|
761 + | /* ServerOperationErrorGenerator.kt:95 */
|
762 + | {
|
763 + | _inner.name()
|
374 764 | }
|
765 + | /* ServerOperationErrorGenerator.kt:139 */
|
375 766 | }
|
767 + | /* ServerOperationErrorGenerator.kt:93 */
|
768 + | }
|
769 + | /* ServerOperationErrorGenerator.kt:83 */
|
376 770 | }
|
771 + | /* ServerOperationErrorGenerator.kt:100 */
|
377 772 | impl ::std::error::Error for KitchenSinkOperationError {
|
773 + | /* ServerOperationErrorGenerator.kt:101 */
|
378 774 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
775 + | /* ServerOperationErrorGenerator.kt:139 */
|
379 776 | match &self {
|
380 - | KitchenSinkOperationError::ErrorWithMembers(_inner) => Some(_inner),
|
381 - | KitchenSinkOperationError::ErrorWithoutMembers(_inner) => Some(_inner),
|
777 + | /* ServerOperationErrorGenerator.kt:142 */
|
778 + | KitchenSinkOperationError::ErrorWithMembers(_inner) =>
|
779 + | /* ServerOperationErrorGenerator.kt:103 */
|
780 + | {
|
781 + | Some(_inner)
|
782 + | }
|
783 + | ,
|
784 + | /* ServerOperationErrorGenerator.kt:142 */
|
785 + | KitchenSinkOperationError::ErrorWithoutMembers(_inner) =>
|
786 + | /* ServerOperationErrorGenerator.kt:103 */
|
787 + | {
|
788 + | Some(_inner)
|
382 789 | }
|
790 + | /* ServerOperationErrorGenerator.kt:139 */
|
383 791 | }
|
792 + | /* ServerOperationErrorGenerator.kt:101 */
|
793 + | }
|
794 + | /* ServerOperationErrorGenerator.kt:100 */
|
384 795 | }
|
796 + | /* ServerOperationErrorGenerator.kt:110 */
|
385 797 | impl ::std::convert::From<crate::error::ErrorWithMembers>
|
386 798 | for crate::error::KitchenSinkOperationError
|
387 799 | {
|
800 + | /* ServerOperationErrorGenerator.kt:111 */
|
388 801 | fn from(variant: crate::error::ErrorWithMembers) -> crate::error::KitchenSinkOperationError {
|
802 + | /* ServerOperationErrorGenerator.kt:112 */
|
389 803 | Self::ErrorWithMembers(variant)
|
804 + | /* ServerOperationErrorGenerator.kt:111 */
|
390 805 | }
|
806 + | /* ServerOperationErrorGenerator.kt:110 */
|
391 807 | }
|
808 + | /* ServerOperationErrorGenerator.kt:110 */
|
392 809 | impl ::std::convert::From<crate::error::ErrorWithoutMembers>
|
393 810 | for crate::error::KitchenSinkOperationError
|
394 811 | {
|
812 + | /* ServerOperationErrorGenerator.kt:111 */
|
395 813 | fn from(variant: crate::error::ErrorWithoutMembers) -> crate::error::KitchenSinkOperationError {
|
814 + | /* ServerOperationErrorGenerator.kt:112 */
|
396 815 | Self::ErrorWithoutMembers(variant)
|
816 + | /* ServerOperationErrorGenerator.kt:111 */
|
397 817 | }
|
818 + | /* ServerOperationErrorGenerator.kt:110 */
|
398 819 | }
|
399 820 |
|
821 + | /* StructureGenerator.kt:197 */
|
400 822 | #[allow(missing_docs)] // documentation missing in model
|
823 + | /* RustType.kt:516 */
|
401 824 | #[derive(
|
402 825 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
403 826 | )]
|
404 - | pub struct ErrorWithoutMembers {}
|
827 + | pub /* StructureGenerator.kt:201 */ struct ErrorWithoutMembers {/* StructureGenerator.kt:201 */}
|
828 + | /* ErrorImplGenerator.kt:99 */
|
405 829 | impl ErrorWithoutMembers {
|
830 + | /* ErrorImplGenerator.kt:141 */
|
406 831 | #[doc(hidden)]
|
407 832 | /// Returns the error name.
|
408 833 | pub fn name(&self) -> &'static str {
|
409 834 | "ErrorWithoutMembers"
|
410 835 | }
|
836 + | /* ErrorImplGenerator.kt:99 */
|
411 837 | }
|
838 + | /* ErrorImplGenerator.kt:153 */
|
412 839 | impl ::std::fmt::Display for ErrorWithoutMembers {
|
840 + | /* ErrorImplGenerator.kt:154 */
|
413 841 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
842 + | /* ErrorImplGenerator.kt:161 */
|
414 843 | ::std::write!(f, "ErrorWithoutMembers")?;
|
844 + | /* ErrorImplGenerator.kt:171 */
|
415 845 | Ok(())
|
846 + | /* ErrorImplGenerator.kt:154 */
|
416 847 | }
|
848 + | /* ErrorImplGenerator.kt:153 */
|
417 849 | }
|
850 + | /* ErrorImplGenerator.kt:175 */
|
418 851 | impl ::std::error::Error for ErrorWithoutMembers {}
|
852 + | /* ServerCodegenVisitor.kt:345 */
|
419 853 | impl ErrorWithoutMembers {
|
420 - | /// Creates a new builder-style object to manufacture [`ErrorWithoutMembers`](crate::error::ErrorWithoutMembers).
|
854 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ErrorWithoutMembers`](crate::error::ErrorWithoutMembers).
|
855 + | /* ServerBuilderGenerator.kt:295 */
|
421 856 | pub fn builder() -> crate::error::error_without_members::Builder {
|
857 + | /* ServerBuilderGenerator.kt:296 */
|
422 858 | crate::error::error_without_members::Builder::default()
|
859 + | /* ServerBuilderGenerator.kt:295 */
|
423 860 | }
|
861 + | /* ServerCodegenVisitor.kt:345 */
|
424 862 | }
|
425 863 |
|
864 + | /* StructureGenerator.kt:197 */
|
426 865 | #[allow(missing_docs)] // documentation missing in model
|
866 + | /* RustType.kt:516 */
|
427 867 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
428 - | pub struct ErrorWithMembers {
|
868 + | pub /* StructureGenerator.kt:201 */ struct ErrorWithMembers {
|
869 + | /* StructureGenerator.kt:231 */
|
429 870 | #[allow(missing_docs)] // documentation missing in model
|
430 871 | pub code: ::std::option::Option<::std::string::String>,
|
872 + | /* StructureGenerator.kt:231 */
|
431 873 | #[allow(missing_docs)] // documentation missing in model
|
432 874 | pub complex_data: ::std::option::Option<crate::model::KitchenSink>,
|
875 + | /* StructureGenerator.kt:231 */
|
433 876 | #[allow(missing_docs)] // documentation missing in model
|
434 877 | pub integer_field: ::std::option::Option<i32>,
|
878 + | /* StructureGenerator.kt:231 */
|
435 879 | #[allow(missing_docs)] // documentation missing in model
|
436 880 | pub list_field: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
881 + | /* StructureGenerator.kt:231 */
|
437 882 | #[allow(missing_docs)] // documentation missing in model
|
438 883 | pub map_field: ::std::option::Option<
|
439 884 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
440 885 | >,
|
886 + | /* StructureGenerator.kt:231 */
|
441 887 | #[allow(missing_docs)] // documentation missing in model
|
442 888 | pub message: ::std::option::Option<::std::string::String>,
|
443 - | /// abc
|
889 + | /// /* StructureGenerator.kt:231 */abc
|
444 890 | pub string_field: ::std::option::Option<::std::string::String>,
|
891 + | /* StructureGenerator.kt:201 */
|
445 892 | }
|
893 + | /* StructureGenerator.kt:135 */
|
446 894 | impl ErrorWithMembers {
|
895 + | /* StructureGenerator.kt:231 */
|
447 896 | #[allow(missing_docs)] // documentation missing in model
|
897 + | /* StructureGenerator.kt:166 */
|
448 898 | pub fn code(&self) -> ::std::option::Option<&str> {
|
899 + | /* StructureGenerator.kt:169 */
|
449 900 | self.code.as_deref()
|
901 + | /* StructureGenerator.kt:166 */
|
450 902 | }
|
903 + | /* StructureGenerator.kt:231 */
|
451 904 | #[allow(missing_docs)] // documentation missing in model
|
905 + | /* StructureGenerator.kt:166 */
|
452 906 | pub fn complex_data(&self) -> ::std::option::Option<&crate::model::KitchenSink> {
|
907 + | /* StructureGenerator.kt:170 */
|
453 908 | self.complex_data.as_ref()
|
909 + | /* StructureGenerator.kt:166 */
|
454 910 | }
|
911 + | /* StructureGenerator.kt:231 */
|
455 912 | #[allow(missing_docs)] // documentation missing in model
|
913 + | /* StructureGenerator.kt:166 */
|
456 914 | pub fn integer_field(&self) -> ::std::option::Option<i32> {
|
915 + | /* StructureGenerator.kt:168 */
|
457 916 | self.integer_field
|
917 + | /* StructureGenerator.kt:166 */
|
458 918 | }
|
919 + | /* StructureGenerator.kt:231 */
|
459 920 | #[allow(missing_docs)] // documentation missing in model
|
921 + | /* StructureGenerator.kt:166 */
|
460 922 | pub fn list_field(&self) -> ::std::option::Option<&[::std::string::String]> {
|
923 + | /* StructureGenerator.kt:169 */
|
461 924 | self.list_field.as_deref()
|
925 + | /* StructureGenerator.kt:166 */
|
462 926 | }
|
927 + | /* StructureGenerator.kt:231 */
|
463 928 | #[allow(missing_docs)] // documentation missing in model
|
929 + | /* StructureGenerator.kt:166 */
|
464 930 | pub fn map_field(
|
465 931 | &self,
|
466 932 | ) -> ::std::option::Option<
|
467 933 | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
468 934 | > {
|
935 + | /* StructureGenerator.kt:170 */
|
469 936 | self.map_field.as_ref()
|
937 + | /* StructureGenerator.kt:166 */
|
470 938 | }
|
471 - | /// abc
|
939 + | /// /* StructureGenerator.kt:231 */abc
|
940 + | /* StructureGenerator.kt:166 */
|
472 941 | pub fn string_field(&self) -> ::std::option::Option<&str> {
|
942 + | /* StructureGenerator.kt:169 */
|
473 943 | self.string_field.as_deref()
|
944 + | /* StructureGenerator.kt:166 */
|
474 945 | }
|
946 + | /* StructureGenerator.kt:135 */
|
475 947 | }
|
948 + | /* ErrorImplGenerator.kt:99 */
|
476 949 | impl ErrorWithMembers {
|
950 + | /* ErrorImplGenerator.kt:128 */
|
477 951 | /// Returns the error message.
|
478 952 | pub fn message(&self) -> ::std::option::Option<&str> {
|
479 953 | self.message.as_deref()
|
480 954 | }
|
955 + | /* ErrorImplGenerator.kt:141 */
|
481 956 | #[doc(hidden)]
|
482 957 | /// Returns the error name.
|
483 958 | pub fn name(&self) -> &'static str {
|
484 959 | "ErrorWithMembers"
|
485 960 | }
|
961 + | /* ErrorImplGenerator.kt:99 */
|
486 962 | }
|
963 + | /* ErrorImplGenerator.kt:153 */
|
487 964 | impl ::std::fmt::Display for ErrorWithMembers {
|
965 + | /* ErrorImplGenerator.kt:154 */
|
488 966 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
967 + | /* ErrorImplGenerator.kt:161 */
|
489 968 | ::std::write!(f, "ErrorWithMembers")?;
|
969 + | /* ErrorImplGenerator.kt:166 */
|
490 970 | if let ::std::option::Option::Some(inner_2) = &self.message {
|
971 + | /* ErrorImplGenerator.kt:166 */
|
491 972 | {
|
973 + | /* ErrorImplGenerator.kt:167 */
|
492 974 | ::std::write!(f, ": {}", inner_2)?;
|
975 + | /* ErrorImplGenerator.kt:166 */
|
493 976 | }
|
977 + | /* ErrorImplGenerator.kt:166 */
|
494 978 | }
|
979 + | /* ErrorImplGenerator.kt:171 */
|
495 980 | Ok(())
|
981 + | /* ErrorImplGenerator.kt:154 */
|
496 982 | }
|
983 + | /* ErrorImplGenerator.kt:153 */
|
497 984 | }
|
985 + | /* ErrorImplGenerator.kt:175 */
|
498 986 | impl ::std::error::Error for ErrorWithMembers {}
|
987 + | /* ServerCodegenVisitor.kt:345 */
|
499 988 | impl ErrorWithMembers {
|
500 - | /// Creates a new builder-style object to manufacture [`ErrorWithMembers`](crate::error::ErrorWithMembers).
|
989 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ErrorWithMembers`](crate::error::ErrorWithMembers).
|
990 + | /* ServerBuilderGenerator.kt:295 */
|
501 991 | pub fn builder() -> crate::error::error_with_members::Builder {
|
992 + | /* ServerBuilderGenerator.kt:296 */
|
502 993 | crate::error::error_with_members::Builder::default()
|
994 + | /* ServerBuilderGenerator.kt:295 */
|
503 995 | }
|
996 + | /* ServerCodegenVisitor.kt:345 */
|
504 997 | }
|
505 998 |
|
506 - | /// See [`ValidationException`](crate::error::ValidationException).
|
999 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationException`](crate::error::ValidationException).
|
507 1000 | pub mod validation_exception {
|
508 1001 |
|
1002 + | /* RustType.kt:516 */
|
509 1003 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
510 - | /// Holds one variant for each of the ways the builder can fail.
|
1004 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1005 + | /* RustType.kt:516 */
|
511 1006 | #[non_exhaustive]
|
1007 + | /* ServerBuilderConstraintViolations.kt:75 */
|
512 1008 | #[allow(clippy::enum_variant_names)]
|
513 1009 | pub enum ConstraintViolation {
|
514 - | /// `message` was not provided but it is required when building `ValidationException`.
|
1010 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
|
1011 + | /* ServerBuilderConstraintViolations.kt:143 */
|
515 1012 | MissingMessage,
|
1013 + | /* ServerBuilderConstraintViolations.kt:75 */
|
516 1014 | }
|
1015 + | /* ServerBuilderConstraintViolations.kt:117 */
|
517 1016 | impl ::std::fmt::Display for ConstraintViolation {
|
1017 + | /* ServerBuilderConstraintViolations.kt:118 */
|
518 1018 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1019 + | /* ServerBuilderConstraintViolations.kt:119 */
|
519 1020 | match self {
|
520 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
521 - | }
|
1021 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
1022 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
1023 + | /* ServerBuilderConstraintViolations.kt:118 */
|
522 1024 | }
|
1025 + | /* ServerBuilderConstraintViolations.kt:117 */
|
523 1026 | }
|
1027 + | /* ServerBuilderConstraintViolations.kt:84 */
|
524 1028 | impl ::std::error::Error for ConstraintViolation {}
|
1029 + | /* ServerBuilderGenerator.kt:446 */
|
525 1030 | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
526 1031 | type Error = ConstraintViolation;
|
527 1032 |
|
528 1033 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
529 1034 | builder.build()
|
530 1035 | }
|
531 1036 | }
|
532 - | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
1037 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationException`](crate::error::ValidationException).
|
1038 + | /* RustType.kt:516 */
|
533 1039 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1040 + | /* ServerBuilderGenerator.kt:211 */
|
534 1041 | pub struct Builder {
|
1042 + | /* ServerBuilderGenerator.kt:308 */
|
535 1043 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1044 + | /* ServerBuilderGenerator.kt:308 */
|
536 1045 | pub(crate) field_list:
|
537 1046 | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
1047 + | /* ServerBuilderGenerator.kt:211 */
|
538 1048 | }
|
1049 + | /* ServerBuilderGenerator.kt:215 */
|
539 1050 | impl Builder {
|
540 - | /// A summary of the validation failure.
|
1051 + | /// /* ServerBuilderGenerator.kt:331 */A summary of the validation failure.
|
1052 + | /* ServerBuilderGenerator.kt:343 */
|
541 1053 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
542 - | self.message = Some(input);
|
1054 + | /* ServerBuilderGenerator.kt:344 */
|
1055 + | self.message =
|
1056 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1057 + | /* ServerBuilderGenerator.kt:376 */input
|
1058 + | /* ServerBuilderGenerator.kt:345 */)
|
1059 + | /* ServerBuilderGenerator.kt:344 */;
|
543 1060 | self
|
1061 + | /* ServerBuilderGenerator.kt:343 */
|
544 1062 | }
|
545 - | /// 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.
|
1063 + | /// /* 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.
|
1064 + | /* ServerBuilderGenerator.kt:343 */
|
546 1065 | pub fn field_list(
|
547 1066 | mut self,
|
548 1067 | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
549 1068 | ) -> Self {
|
550 - | self.field_list = input;
|
1069 + | /* ServerBuilderGenerator.kt:344 */
|
1070 + | self.field_list =
|
1071 + | /* ServerBuilderGenerator.kt:376 */input
|
1072 + | /* ServerBuilderGenerator.kt:344 */;
|
551 1073 | self
|
1074 + | /* ServerBuilderGenerator.kt:343 */
|
552 1075 | }
|
553 - | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
554 - | ///
|
1076 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
1077 + | /// /* ServerBuilderGenerator.kt:260 */
|
555 1078 | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
|
556 1079 | ///
|
1080 + | /* ServerBuilderGenerator.kt:271 */
|
557 1081 | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
558 1082 | self.build_enforcing_all_constraints()
|
559 1083 | }
|
1084 + | /* ServerBuilderGenerator.kt:283 */
|
560 1085 | fn build_enforcing_all_constraints(
|
561 1086 | self,
|
562 1087 | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
563 - | Ok(crate::error::ValidationException {
|
564 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
1088 + | /* ServerBuilderGenerator.kt:287 */
|
1089 + | Ok(
|
1090 + | /* ServerBuilderGenerator.kt:542 */
|
1091 + | crate::error::ValidationException {
|
1092 + | /* ServerBuilderGenerator.kt:546 */
|
1093 + | message: self
|
1094 + | .message
|
1095 + | /* ServerBuilderGenerator.kt:569 */
|
1096 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
1097 + | /* ServerBuilderGenerator.kt:546 */
|
565 1098 | field_list: self.field_list,
|
566 - | })
|
1099 + | /* ServerBuilderGenerator.kt:542 */
|
1100 + | }, /* ServerBuilderGenerator.kt:287 */
|
1101 + | )
|
1102 + | /* ServerBuilderGenerator.kt:283 */
|
567 1103 | }
|
1104 + | /* ServerBuilderGenerator.kt:215 */
|
568 1105 | }
|
1106 + |
|
1107 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
569 1108 | }
|
570 - | /// See [`FooError`](crate::error::FooError).
|
1109 + | /// /* ServerBuilderGenerator.kt:171 */See [`FooError`](crate::error::FooError).
|
571 1110 | pub mod foo_error {
|
572 1111 |
|
1112 + | /* ServerBuilderGenerator.kt:461 */
|
573 1113 | impl ::std::convert::From<Builder> for crate::error::FooError {
|
574 1114 | fn from(builder: Builder) -> Self {
|
575 1115 | builder.build()
|
576 1116 | }
|
577 1117 | }
|
578 - | /// A builder for [`FooError`](crate::error::FooError).
|
1118 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`FooError`](crate::error::FooError).
|
1119 + | /* RustType.kt:516 */
|
579 1120 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
580 - | pub struct Builder {}
|
1121 + | /* ServerBuilderGenerator.kt:211 */
|
1122 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1123 + | /* ServerBuilderGenerator.kt:215 */
|
581 1124 | impl Builder {
|
582 - | /// Consumes the builder and constructs a [`FooError`](crate::error::FooError).
|
1125 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`FooError`](crate::error::FooError).
|
1126 + | /* ServerBuilderGenerator.kt:271 */
|
583 1127 | pub fn build(self) -> crate::error::FooError {
|
584 1128 | self.build_enforcing_all_constraints()
|
585 1129 | }
|
1130 + | /* ServerBuilderGenerator.kt:283 */
|
586 1131 | fn build_enforcing_all_constraints(self) -> crate::error::FooError {
|
587 - | crate::error::FooError {}
|
1132 + | /* ServerBuilderGenerator.kt:542 */
|
1133 + | crate::error::FooError {
|
1134 + | /* ServerBuilderGenerator.kt:542 */}
|
1135 + | /* ServerBuilderGenerator.kt:283 */
|
588 1136 | }
|
1137 + | /* ServerBuilderGenerator.kt:215 */
|
589 1138 | }
|
1139 + |
|
1140 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
590 1141 | }
|
591 - | /// See [`ComplexError`](crate::error::ComplexError).
|
1142 + | /// /* ServerBuilderGenerator.kt:171 */See [`ComplexError`](crate::error::ComplexError).
|
592 1143 | pub mod complex_error {
|
593 1144 |
|
1145 + | /* ServerBuilderGenerator.kt:461 */
|
594 1146 | impl ::std::convert::From<Builder> for crate::error::ComplexError {
|
595 1147 | fn from(builder: Builder) -> Self {
|
596 1148 | builder.build()
|
597 1149 | }
|
598 1150 | }
|
599 - | /// A builder for [`ComplexError`](crate::error::ComplexError).
|
1151 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ComplexError`](crate::error::ComplexError).
|
1152 + | /* RustType.kt:516 */
|
600 1153 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1154 + | /* ServerBuilderGenerator.kt:211 */
|
601 1155 | pub struct Builder {
|
1156 + | /* ServerBuilderGenerator.kt:308 */
|
602 1157 | pub(crate) top_level: ::std::option::Option<::std::string::String>,
|
1158 + | /* ServerBuilderGenerator.kt:308 */
|
603 1159 | pub(crate) nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
|
1160 + | /* ServerBuilderGenerator.kt:211 */
|
604 1161 | }
|
1162 + | /* ServerBuilderGenerator.kt:215 */
|
605 1163 | impl Builder {
|
1164 + | /* ServerBuilderGenerator.kt:331 */
|
606 1165 | #[allow(missing_docs)] // documentation missing in model
|
1166 + | /* ServerBuilderGenerator.kt:343 */
|
607 1167 | pub fn top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
608 - | self.top_level = input;
|
1168 + | /* ServerBuilderGenerator.kt:344 */
|
1169 + | self.top_level =
|
1170 + | /* ServerBuilderGenerator.kt:376 */input
|
1171 + | /* ServerBuilderGenerator.kt:344 */;
|
609 1172 | self
|
1173 + | /* ServerBuilderGenerator.kt:343 */
|
610 1174 | }
|
1175 + | /* ServerBuilderGenerator.kt:331 */
|
611 1176 | #[allow(missing_docs)] // documentation missing in model
|
1177 + | /* ServerBuilderGenerator.kt:343 */
|
612 1178 | pub fn nested(
|
613 1179 | mut self,
|
614 1180 | input: ::std::option::Option<crate::model::ComplexNestedErrorData>,
|
615 1181 | ) -> Self {
|
616 - | self.nested = input;
|
1182 + | /* ServerBuilderGenerator.kt:344 */
|
1183 + | self.nested =
|
1184 + | /* ServerBuilderGenerator.kt:376 */input
|
1185 + | /* ServerBuilderGenerator.kt:344 */;
|
617 1186 | self
|
1187 + | /* ServerBuilderGenerator.kt:343 */
|
618 1188 | }
|
619 - | /// Consumes the builder and constructs a [`ComplexError`](crate::error::ComplexError).
|
1189 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ComplexError`](crate::error::ComplexError).
|
1190 + | /* ServerBuilderGenerator.kt:271 */
|
620 1191 | pub fn build(self) -> crate::error::ComplexError {
|
621 1192 | self.build_enforcing_all_constraints()
|
622 1193 | }
|
1194 + | /* ServerBuilderGenerator.kt:283 */
|
623 1195 | fn build_enforcing_all_constraints(self) -> crate::error::ComplexError {
|
1196 + | /* ServerBuilderGenerator.kt:542 */
|
624 1197 | crate::error::ComplexError {
|
1198 + | /* ServerBuilderGenerator.kt:546 */
|
625 1199 | top_level: self.top_level,
|
1200 + | /* ServerBuilderGenerator.kt:546 */
|
626 1201 | nested: self.nested,
|
1202 + | /* ServerBuilderGenerator.kt:542 */
|
627 1203 | }
|
1204 + | /* ServerBuilderGenerator.kt:283 */
|
628 1205 | }
|
1206 + | /* ServerBuilderGenerator.kt:215 */
|
629 1207 | }
|
1208 + |
|
1209 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
630 1210 | }
|
631 - | /// See [`InvalidGreeting`](crate::error::InvalidGreeting).
|
1211 + | /// /* ServerBuilderGenerator.kt:171 */See [`InvalidGreeting`](crate::error::InvalidGreeting).
|
632 1212 | pub mod invalid_greeting {
|
633 1213 |
|
1214 + | /* ServerBuilderGenerator.kt:461 */
|
634 1215 | impl ::std::convert::From<Builder> for crate::error::InvalidGreeting {
|
635 1216 | fn from(builder: Builder) -> Self {
|
636 1217 | builder.build()
|
637 1218 | }
|
638 1219 | }
|
639 - | /// A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
|
1220 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
|
1221 + | /* RustType.kt:516 */
|
640 1222 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1223 + | /* ServerBuilderGenerator.kt:211 */
|
641 1224 | pub struct Builder {
|
1225 + | /* ServerBuilderGenerator.kt:308 */
|
642 1226 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1227 + | /* ServerBuilderGenerator.kt:211 */
|
643 1228 | }
|
1229 + | /* ServerBuilderGenerator.kt:215 */
|
644 1230 | impl Builder {
|
1231 + | /* ServerBuilderGenerator.kt:331 */
|
645 1232 | #[allow(missing_docs)] // documentation missing in model
|
1233 + | /* ServerBuilderGenerator.kt:343 */
|
646 1234 | pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
647 - | self.message = input;
|
1235 + | /* ServerBuilderGenerator.kt:344 */
|
1236 + | self.message =
|
1237 + | /* ServerBuilderGenerator.kt:376 */input
|
1238 + | /* ServerBuilderGenerator.kt:344 */;
|
648 1239 | self
|
1240 + | /* ServerBuilderGenerator.kt:343 */
|
649 1241 | }
|
650 - | /// Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
|
1242 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
|
1243 + | /* ServerBuilderGenerator.kt:271 */
|
651 1244 | pub fn build(self) -> crate::error::InvalidGreeting {
|
652 1245 | self.build_enforcing_all_constraints()
|
653 1246 | }
|
1247 + | /* ServerBuilderGenerator.kt:283 */
|
654 1248 | fn build_enforcing_all_constraints(self) -> crate::error::InvalidGreeting {
|
1249 + | /* ServerBuilderGenerator.kt:542 */
|
655 1250 | crate::error::InvalidGreeting {
|
1251 + | /* ServerBuilderGenerator.kt:546 */
|
656 1252 | message: self.message,
|
1253 + | /* ServerBuilderGenerator.kt:542 */
|
657 1254 | }
|
1255 + | /* ServerBuilderGenerator.kt:283 */
|
658 1256 | }
|
1257 + | /* ServerBuilderGenerator.kt:215 */
|
659 1258 | }
|
1259 + |
|
1260 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
660 1261 | }
|
661 - | /// See [`ErrorWithoutMembers`](crate::error::ErrorWithoutMembers).
|
1262 + | /// /* ServerBuilderGenerator.kt:171 */See [`ErrorWithoutMembers`](crate::error::ErrorWithoutMembers).
|
662 1263 | pub mod error_without_members {
|
663 1264 |
|
1265 + | /* ServerBuilderGenerator.kt:461 */
|
664 1266 | impl ::std::convert::From<Builder> for crate::error::ErrorWithoutMembers {
|
665 1267 | fn from(builder: Builder) -> Self {
|
666 1268 | builder.build()
|
667 1269 | }
|
668 1270 | }
|
669 - | /// A builder for [`ErrorWithoutMembers`](crate::error::ErrorWithoutMembers).
|
1271 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ErrorWithoutMembers`](crate::error::ErrorWithoutMembers).
|
1272 + | /* RustType.kt:516 */
|
670 1273 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
671 - | pub struct Builder {}
|
1274 + | /* ServerBuilderGenerator.kt:211 */
|
1275 + | pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
1276 + | /* ServerBuilderGenerator.kt:215 */
|
672 1277 | impl Builder {
|
673 - | /// Consumes the builder and constructs a [`ErrorWithoutMembers`](crate::error::ErrorWithoutMembers).
|
1278 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ErrorWithoutMembers`](crate::error::ErrorWithoutMembers).
|
1279 + | /* ServerBuilderGenerator.kt:271 */
|
674 1280 | pub fn build(self) -> crate::error::ErrorWithoutMembers {
|
675 1281 | self.build_enforcing_all_constraints()
|
676 1282 | }
|
1283 + | /* ServerBuilderGenerator.kt:283 */
|
677 1284 | fn build_enforcing_all_constraints(self) -> crate::error::ErrorWithoutMembers {
|
678 - | crate::error::ErrorWithoutMembers {}
|
1285 + | /* ServerBuilderGenerator.kt:542 */
|
1286 + | crate::error::ErrorWithoutMembers {
|
1287 + | /* ServerBuilderGenerator.kt:542 */}
|
1288 + | /* ServerBuilderGenerator.kt:283 */
|
679 1289 | }
|
1290 + | /* ServerBuilderGenerator.kt:215 */
|
680 1291 | }
|
1292 + |
|
1293 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
681 1294 | }
|
682 - | /// See [`ErrorWithMembers`](crate::error::ErrorWithMembers).
|
1295 + | /// /* ServerBuilderGenerator.kt:171 */See [`ErrorWithMembers`](crate::error::ErrorWithMembers).
|
683 1296 | pub mod error_with_members {
|
684 1297 |
|
1298 + | /* ServerBuilderGenerator.kt:461 */
|
685 1299 | impl ::std::convert::From<Builder> for crate::error::ErrorWithMembers {
|
686 1300 | fn from(builder: Builder) -> Self {
|
687 1301 | builder.build()
|
688 1302 | }
|
689 1303 | }
|
690 - | /// A builder for [`ErrorWithMembers`](crate::error::ErrorWithMembers).
|
1304 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ErrorWithMembers`](crate::error::ErrorWithMembers).
|
1305 + | /* RustType.kt:516 */
|
691 1306 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1307 + | /* ServerBuilderGenerator.kt:211 */
|
692 1308 | pub struct Builder {
|
1309 + | /* ServerBuilderGenerator.kt:308 */
|
693 1310 | pub(crate) code: ::std::option::Option<::std::string::String>,
|
1311 + | /* ServerBuilderGenerator.kt:308 */
|
694 1312 | pub(crate) complex_data: ::std::option::Option<crate::model::KitchenSink>,
|
1313 + | /* ServerBuilderGenerator.kt:308 */
|
695 1314 | pub(crate) integer_field: ::std::option::Option<i32>,
|
1315 + | /* ServerBuilderGenerator.kt:308 */
|
696 1316 | pub(crate) list_field: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
1317 + | /* ServerBuilderGenerator.kt:308 */
|
697 1318 | pub(crate) map_field: ::std::option::Option<
|
698 1319 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
699 1320 | >,
|
1321 + | /* ServerBuilderGenerator.kt:308 */
|
700 1322 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
1323 + | /* ServerBuilderGenerator.kt:308 */
|
701 1324 | pub(crate) string_field: ::std::option::Option<::std::string::String>,
|
1325 + | /* ServerBuilderGenerator.kt:211 */
|
702 1326 | }
|
1327 + | /* ServerBuilderGenerator.kt:215 */
|
703 1328 | impl Builder {
|
1329 + | /* ServerBuilderGenerator.kt:331 */
|
704 1330 | #[allow(missing_docs)] // documentation missing in model
|
1331 + | /* ServerBuilderGenerator.kt:343 */
|
705 1332 | pub fn code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
706 - | self.code = input;
|
1333 + | /* ServerBuilderGenerator.kt:344 */
|
1334 + | self.code =
|
1335 + | /* ServerBuilderGenerator.kt:376 */input
|
1336 + | /* ServerBuilderGenerator.kt:344 */;
|
707 1337 | self
|
1338 + | /* ServerBuilderGenerator.kt:343 */
|
708 1339 | }
|
1340 + | /* ServerBuilderGenerator.kt:331 */
|
709 1341 | #[allow(missing_docs)] // documentation missing in model
|
1342 + | /* ServerBuilderGenerator.kt:343 */
|
710 1343 | pub fn complex_data(
|
711 1344 | mut self,
|
712 1345 | input: ::std::option::Option<crate::model::KitchenSink>,
|
713 1346 | ) -> Self {
|
714 - | self.complex_data = input;
|
1347 + | /* ServerBuilderGenerator.kt:344 */
|
1348 + | self.complex_data =
|
1349 + | /* ServerBuilderGenerator.kt:376 */input
|
1350 + | /* ServerBuilderGenerator.kt:344 */;
|
715 1351 | self
|
1352 + | /* ServerBuilderGenerator.kt:343 */
|
716 1353 | }
|
1354 + | /* ServerBuilderGenerator.kt:331 */
|
717 1355 | #[allow(missing_docs)] // documentation missing in model
|
1356 + | /* ServerBuilderGenerator.kt:343 */
|
718 1357 | pub fn integer_field(mut self, input: ::std::option::Option<i32>) -> Self {
|
719 - | self.integer_field = input;
|
1358 + | /* ServerBuilderGenerator.kt:344 */
|
1359 + | self.integer_field =
|
1360 + | /* ServerBuilderGenerator.kt:376 */input
|
1361 + | /* ServerBuilderGenerator.kt:344 */;
|
720 1362 | self
|
1363 + | /* ServerBuilderGenerator.kt:343 */
|
721 1364 | }
|
1365 + | /* ServerBuilderGenerator.kt:331 */
|
722 1366 | #[allow(missing_docs)] // documentation missing in model
|
1367 + | /* ServerBuilderGenerator.kt:343 */
|
723 1368 | pub fn list_field(
|
724 1369 | mut self,
|
725 1370 | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
726 1371 | ) -> Self {
|
727 - | self.list_field = input;
|
1372 + | /* ServerBuilderGenerator.kt:344 */
|
1373 + | self.list_field =
|
1374 + | /* ServerBuilderGenerator.kt:376 */input
|
1375 + | /* ServerBuilderGenerator.kt:344 */;
|
728 1376 | self
|
1377 + | /* ServerBuilderGenerator.kt:343 */
|
729 1378 | }
|
1379 + | /* ServerBuilderGenerator.kt:331 */
|
730 1380 | #[allow(missing_docs)] // documentation missing in model
|
1381 + | /* ServerBuilderGenerator.kt:343 */
|
731 1382 | pub fn map_field(
|
732 1383 | mut self,
|
733 1384 | input: ::std::option::Option<
|
734 1385 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
735 1386 | >,
|
736 1387 | ) -> Self {
|
737 - | self.map_field = input;
|
1388 + | /* ServerBuilderGenerator.kt:344 */
|
1389 + | self.map_field =
|
1390 + | /* ServerBuilderGenerator.kt:376 */input
|
1391 + | /* ServerBuilderGenerator.kt:344 */;
|
738 1392 | self
|
1393 + | /* ServerBuilderGenerator.kt:343 */
|
739 1394 | }
|
1395 + | /* ServerBuilderGenerator.kt:331 */
|
740 1396 | #[allow(missing_docs)] // documentation missing in model
|
1397 + | /* ServerBuilderGenerator.kt:343 */
|
741 1398 | pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
742 - | self.message = input;
|
1399 + | /* ServerBuilderGenerator.kt:344 */
|
1400 + | self.message =
|
1401 + | /* ServerBuilderGenerator.kt:376 */input
|
1402 + | /* ServerBuilderGenerator.kt:344 */;
|
743 1403 | self
|
1404 + | /* ServerBuilderGenerator.kt:343 */
|
744 1405 | }
|
745 - | /// abc
|
1406 + | /// /* ServerBuilderGenerator.kt:331 */abc
|
1407 + | /* ServerBuilderGenerator.kt:343 */
|
746 1408 | pub fn string_field(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
747 - | self.string_field = input;
|
1409 + | /* ServerBuilderGenerator.kt:344 */
|
1410 + | self.string_field =
|
1411 + | /* ServerBuilderGenerator.kt:376 */input
|
1412 + | /* ServerBuilderGenerator.kt:344 */;
|
748 1413 | self
|
1414 + | /* ServerBuilderGenerator.kt:343 */
|
749 1415 | }
|
750 - | /// Consumes the builder and constructs a [`ErrorWithMembers`](crate::error::ErrorWithMembers).
|
1416 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ErrorWithMembers`](crate::error::ErrorWithMembers).
|
1417 + | /* ServerBuilderGenerator.kt:271 */
|
751 1418 | pub fn build(self) -> crate::error::ErrorWithMembers {
|
752 1419 | self.build_enforcing_all_constraints()
|
753 1420 | }
|
1421 + | /* ServerBuilderGenerator.kt:283 */
|
754 1422 | fn build_enforcing_all_constraints(self) -> crate::error::ErrorWithMembers {
|
1423 + | /* ServerBuilderGenerator.kt:542 */
|
755 1424 | crate::error::ErrorWithMembers {
|
1425 + | /* ServerBuilderGenerator.kt:546 */
|
756 1426 | code: self.code,
|
1427 + | /* ServerBuilderGenerator.kt:546 */
|
757 1428 | complex_data: self.complex_data,
|
1429 + | /* ServerBuilderGenerator.kt:546 */
|
758 1430 | integer_field: self.integer_field,
|
1431 + | /* ServerBuilderGenerator.kt:546 */
|
759 1432 | list_field: self.list_field,
|
1433 + | /* ServerBuilderGenerator.kt:546 */
|
760 1434 | map_field: self.map_field,
|
1435 + | /* ServerBuilderGenerator.kt:546 */
|
761 1436 | message: self.message,
|
1437 + | /* ServerBuilderGenerator.kt:546 */
|
762 1438 | string_field: self.string_field,
|
1439 + | /* ServerBuilderGenerator.kt:542 */
|
763 1440 | }
|
1441 + | /* ServerBuilderGenerator.kt:283 */
|
764 1442 | }
|
1443 + | /* ServerBuilderGenerator.kt:215 */
|
765 1444 | }
|
1445 + |
|
1446 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
766 1447 | }
|