1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* ServerOperationErrorGenerator.kt:63 */
|
2 3 | /// Error type for the `OperationWithNestedStructure` operation.
|
4 + | /* ServerOperationErrorGenerator.kt:64 */
|
3 5 | /// Each variant represents an error that can occur for the `OperationWithNestedStructure` operation.
|
6 + | /* RustType.kt:516 */
|
4 7 | #[derive(::std::fmt::Debug)]
|
5 - | pub enum OperationWithNestedStructureError {
|
6 - | /// 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.
|
8 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum OperationWithNestedStructureError {
|
9 + | /// /* 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.
|
10 + | /* ServerOperationErrorGenerator.kt:71 */
|
7 11 | ValidationException(crate::error::ValidationException),
|
12 + | /* ServerOperationErrorGenerator.kt:68 */
|
8 13 | #[allow(missing_docs)] // documentation missing in model
|
14 + | /* ServerOperationErrorGenerator.kt:71 */
|
9 15 | InternalServerError(crate::error::InternalServerError),
|
16 + | /* ServerOperationErrorGenerator.kt:66 */
|
10 17 | }
|
18 + | /* ServerOperationErrorGenerator.kt:75 */
|
11 19 | impl ::std::fmt::Display for OperationWithNestedStructureError {
|
20 + | /* ServerOperationErrorGenerator.kt:76 */
|
12 21 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
22 + | /* ServerOperationErrorGenerator.kt:139 */
|
13 23 | match &self {
|
14 - | OperationWithNestedStructureError::ValidationException(_inner) => _inner.fmt(f),
|
15 - | OperationWithNestedStructureError::InternalServerError(_inner) => _inner.fmt(f),
|
24 + | /* ServerOperationErrorGenerator.kt:142 */
|
25 + | OperationWithNestedStructureError::ValidationException(_inner) =>
|
26 + | /* ServerOperationErrorGenerator.kt:78 */
|
27 + | {
|
28 + | _inner.fmt(f)
|
29 + | }
|
30 + | ,
|
31 + | /* ServerOperationErrorGenerator.kt:142 */
|
32 + | OperationWithNestedStructureError::InternalServerError(_inner) =>
|
33 + | /* ServerOperationErrorGenerator.kt:78 */
|
34 + | {
|
35 + | _inner.fmt(f)
|
16 36 | }
|
37 + | /* ServerOperationErrorGenerator.kt:139 */
|
17 38 | }
|
39 + | /* ServerOperationErrorGenerator.kt:76 */
|
40 + | }
|
41 + | /* ServerOperationErrorGenerator.kt:75 */
|
18 42 | }
|
43 + | /* ServerOperationErrorGenerator.kt:83 */
|
19 44 | impl OperationWithNestedStructureError {
|
45 + | /* ServerOperationErrorGenerator.kt:87 */
|
20 46 | /// Returns `true` if the error kind is `OperationWithNestedStructureError::ValidationException`.
|
47 + | /* ServerOperationErrorGenerator.kt:88 */
|
21 48 | pub fn is_validation_exception(&self) -> bool {
|
49 + | /* ServerOperationErrorGenerator.kt:89 */
|
22 50 | matches!(
|
23 51 | &self,
|
24 52 | OperationWithNestedStructureError::ValidationException(_)
|
25 53 | )
|
54 + | /* ServerOperationErrorGenerator.kt:88 */
|
26 55 | }
|
56 + | /* ServerOperationErrorGenerator.kt:87 */
|
27 57 | /// Returns `true` if the error kind is `OperationWithNestedStructureError::InternalServerError`.
|
58 + | /* ServerOperationErrorGenerator.kt:88 */
|
28 59 | pub fn is_internal_server_error(&self) -> bool {
|
60 + | /* ServerOperationErrorGenerator.kt:89 */
|
29 61 | matches!(
|
30 62 | &self,
|
31 63 | OperationWithNestedStructureError::InternalServerError(_)
|
32 64 | )
|
65 + | /* ServerOperationErrorGenerator.kt:88 */
|
33 66 | }
|
67 + | /* ServerOperationErrorGenerator.kt:92 */
|
34 68 | /// Returns the error name string by matching the correct variant.
|
69 + | /* ServerOperationErrorGenerator.kt:93 */
|
35 70 | pub fn name(&self) -> &'static str {
|
71 + | /* ServerOperationErrorGenerator.kt:139 */
|
36 72 | match &self {
|
37 - | OperationWithNestedStructureError::ValidationException(_inner) => _inner.name(),
|
38 - | OperationWithNestedStructureError::InternalServerError(_inner) => _inner.name(),
|
73 + | /* ServerOperationErrorGenerator.kt:142 */
|
74 + | OperationWithNestedStructureError::ValidationException(_inner) =>
|
75 + | /* ServerOperationErrorGenerator.kt:95 */
|
76 + | {
|
77 + | _inner.name()
|
39 78 | }
|
79 + | ,
|
80 + | /* ServerOperationErrorGenerator.kt:142 */
|
81 + | OperationWithNestedStructureError::InternalServerError(_inner) =>
|
82 + | /* ServerOperationErrorGenerator.kt:95 */
|
83 + | {
|
84 + | _inner.name()
|
85 + | }
|
86 + | /* ServerOperationErrorGenerator.kt:139 */
|
40 87 | }
|
88 + | /* ServerOperationErrorGenerator.kt:93 */
|
89 + | }
|
90 + | /* ServerOperationErrorGenerator.kt:83 */
|
41 91 | }
|
92 + | /* ServerOperationErrorGenerator.kt:100 */
|
42 93 | impl ::std::error::Error for OperationWithNestedStructureError {
|
94 + | /* ServerOperationErrorGenerator.kt:101 */
|
43 95 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
96 + | /* ServerOperationErrorGenerator.kt:139 */
|
44 97 | match &self {
|
45 - | OperationWithNestedStructureError::ValidationException(_inner) => Some(_inner),
|
46 - | OperationWithNestedStructureError::InternalServerError(_inner) => Some(_inner),
|
98 + | /* ServerOperationErrorGenerator.kt:142 */
|
99 + | OperationWithNestedStructureError::ValidationException(_inner) =>
|
100 + | /* ServerOperationErrorGenerator.kt:103 */
|
101 + | {
|
102 + | Some(_inner)
|
47 103 | }
|
104 + | ,
|
105 + | /* ServerOperationErrorGenerator.kt:142 */
|
106 + | OperationWithNestedStructureError::InternalServerError(_inner) =>
|
107 + | /* ServerOperationErrorGenerator.kt:103 */
|
108 + | {
|
109 + | Some(_inner)
|
110 + | }
|
111 + | /* ServerOperationErrorGenerator.kt:139 */
|
112 + | }
|
113 + | /* ServerOperationErrorGenerator.kt:101 */
|
48 114 | }
|
115 + | /* ServerOperationErrorGenerator.kt:100 */
|
49 116 | }
|
117 + | /* ServerOperationErrorGenerator.kt:110 */
|
50 118 | impl ::std::convert::From<crate::error::ValidationException>
|
51 119 | for crate::error::OperationWithNestedStructureError
|
52 120 | {
|
121 + | /* ServerOperationErrorGenerator.kt:111 */
|
53 122 | fn from(
|
54 123 | variant: crate::error::ValidationException,
|
55 124 | ) -> crate::error::OperationWithNestedStructureError {
|
125 + | /* ServerOperationErrorGenerator.kt:112 */
|
56 126 | Self::ValidationException(variant)
|
127 + | /* ServerOperationErrorGenerator.kt:111 */
|
57 128 | }
|
129 + | /* ServerOperationErrorGenerator.kt:110 */
|
58 130 | }
|
131 + | /* ServerOperationErrorGenerator.kt:110 */
|
59 132 | impl ::std::convert::From<crate::error::InternalServerError>
|
60 133 | for crate::error::OperationWithNestedStructureError
|
61 134 | {
|
135 + | /* ServerOperationErrorGenerator.kt:111 */
|
62 136 | fn from(
|
63 137 | variant: crate::error::InternalServerError,
|
64 138 | ) -> crate::error::OperationWithNestedStructureError {
|
139 + | /* ServerOperationErrorGenerator.kt:112 */
|
65 140 | Self::InternalServerError(variant)
|
141 + | /* ServerOperationErrorGenerator.kt:111 */
|
66 142 | }
|
143 + | /* ServerOperationErrorGenerator.kt:110 */
|
67 144 | }
|
68 145 |
|
146 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
69 147 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithNestedStructureError {
|
70 148 | fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithNestedStructureError {
|
71 149 | ::pyo3::Python::with_gil(|py| {
|
72 150 | let error = variant.value(py);
|
73 151 | if let Ok(error) = error.extract::<crate::error::ValidationException>() {
|
74 152 | return error.into();
|
75 153 | }
|
76 154 | crate::error::InternalServerError {
|
77 155 | message: error.to_string(),
|
78 156 | }
|
79 157 | .into()
|
80 158 | })
|
81 159 | }
|
82 160 | }
|
83 161 |
|
162 + | /* RustType.kt:516 */
|
84 163 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
164 + | /* PythonServerStructureGenerator.kt:63 */
|
85 165 | /// :param message str:
|
86 166 | /// :rtype None:
|
167 + | /* StructureGenerator.kt:197 */
|
87 168 | #[allow(missing_docs)] // documentation missing in model
|
169 + | /* RustType.kt:516 */
|
88 170 | #[derive(
|
89 171 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
90 172 | )]
|
91 - | pub struct InternalServerError {
|
173 + | pub /* StructureGenerator.kt:201 */ struct InternalServerError {
|
174 + | /* RustType.kt:516 */
|
92 175 | #[pyo3(get, set)]
|
176 + | /* PythonServerStructureGenerator.kt:80 */
|
93 177 | /// :type str:
|
178 + | /* StructureGenerator.kt:231 */
|
94 179 | #[allow(missing_docs)] // documentation missing in model
|
95 180 | pub message: ::std::string::String,
|
181 + | /* StructureGenerator.kt:201 */
|
96 182 | }
|
183 + | /* RustType.kt:516 */
|
97 184 | #[allow(clippy::new_without_default)]
|
185 + | /* RustType.kt:516 */
|
98 186 | #[allow(clippy::too_many_arguments)]
|
187 + | /* RustType.kt:516 */
|
99 188 | #[::pyo3::pymethods]
|
189 + | /* PythonServerStructureGenerator.kt:88 */
|
100 190 | impl InternalServerError {
|
101 191 | #[new]
|
102 192 | pub fn new(message: ::std::string::String) -> Self {
|
103 193 | Self { message }
|
104 194 | }
|
105 195 | fn __repr__(&self) -> String {
|
106 196 | format!("{self:?}")
|
107 197 | }
|
108 198 | fn __str__(&self) -> String {
|
109 199 | format!("{self:?}")
|
110 200 | }
|
111 201 | }
|
202 + | /* ErrorImplGenerator.kt:99 */
|
112 203 | impl InternalServerError {
|
204 + | /* ErrorImplGenerator.kt:128 */
|
113 205 | /// Returns the error message.
|
114 206 | pub fn message(&self) -> &str {
|
115 207 | &self.message
|
116 208 | }
|
209 + | /* ErrorImplGenerator.kt:141 */
|
117 210 | #[doc(hidden)]
|
118 211 | /// Returns the error name.
|
119 212 | pub fn name(&self) -> &'static str {
|
120 213 | "InternalServerError"
|
121 214 | }
|
215 + | /* ErrorImplGenerator.kt:99 */
|
122 216 | }
|
217 + | /* ErrorImplGenerator.kt:153 */
|
123 218 | impl ::std::fmt::Display for InternalServerError {
|
219 + | /* ErrorImplGenerator.kt:154 */
|
124 220 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
221 + | /* ErrorImplGenerator.kt:161 */
|
125 222 | ::std::write!(f, "InternalServerError")?;
|
223 + | /* ErrorImplGenerator.kt:166 */
|
126 224 | {
|
225 + | /* ErrorImplGenerator.kt:167 */
|
127 226 | ::std::write!(f, ": {}", &self.message)?;
|
227 + | /* ErrorImplGenerator.kt:166 */
|
128 228 | }
|
229 + | /* ErrorImplGenerator.kt:171 */
|
129 230 | Ok(())
|
231 + | /* ErrorImplGenerator.kt:154 */
|
130 232 | }
|
233 + | /* ErrorImplGenerator.kt:153 */
|
131 234 | }
|
235 + | /* ErrorImplGenerator.kt:175 */
|
132 236 | impl ::std::error::Error for InternalServerError {}
|
237 + | /* ServerCodegenVisitor.kt:370 */
|
133 238 | impl InternalServerError {
|
134 - | /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
239 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
240 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
135 241 | pub fn builder() -> crate::error::internal_server_error::Builder {
|
242 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
136 243 | crate::error::internal_server_error::Builder::default()
|
244 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
137 245 | }
|
246 + | /* ServerCodegenVisitor.kt:370 */
|
138 247 | }
|
139 248 |
|
249 + | /* RustType.kt:516 */
|
140 250 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
251 + | /* PythonServerStructureGenerator.kt:63 */
|
141 252 | /// :param message str:
|
142 253 | /// :param field_list typing.Optional\[typing.List\[json_rpc10.model.ValidationExceptionField\]\]:
|
143 254 | /// :rtype None:
|
144 - | /// 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.
|
255 + | /// /* 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.
|
256 + | /* RustType.kt:516 */
|
145 257 | #[derive(
|
146 258 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
147 259 | )]
|
148 - | pub struct ValidationException {
|
260 + | pub /* StructureGenerator.kt:201 */ struct ValidationException {
|
261 + | /* RustType.kt:516 */
|
149 262 | #[pyo3(get, set)]
|
263 + | /* PythonServerStructureGenerator.kt:80 */
|
150 264 | /// :type str:
|
151 - | /// A summary of the validation failure.
|
265 + | /// /* StructureGenerator.kt:231 */A summary of the validation failure.
|
152 266 | pub message: ::std::string::String,
|
267 + | /* RustType.kt:516 */
|
153 268 | #[pyo3(get, set)]
|
269 + | /* PythonServerStructureGenerator.kt:80 */
|
154 270 | /// :type typing.Optional\[typing.List\[json_rpc10.model.ValidationExceptionField\]\]:
|
155 - | /// 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.
|
271 + | /// /* 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.
|
156 272 | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
273 + | /* StructureGenerator.kt:201 */
|
157 274 | }
|
275 + | /* StructureGenerator.kt:135 */
|
158 276 | impl ValidationException {
|
159 - | /// 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.
|
277 + | /// /* 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.
|
278 + | /* StructureGenerator.kt:166 */
|
160 279 | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
280 + | /* StructureGenerator.kt:169 */
|
161 281 | self.field_list.as_deref()
|
282 + | /* StructureGenerator.kt:166 */
|
162 283 | }
|
284 + | /* StructureGenerator.kt:135 */
|
163 285 | }
|
286 + | /* RustType.kt:516 */
|
164 287 | #[allow(clippy::new_without_default)]
|
288 + | /* RustType.kt:516 */
|
165 289 | #[allow(clippy::too_many_arguments)]
|
290 + | /* RustType.kt:516 */
|
166 291 | #[::pyo3::pymethods]
|
292 + | /* PythonServerStructureGenerator.kt:88 */
|
167 293 | impl ValidationException {
|
168 294 | #[new]
|
169 295 | pub fn new(
|
170 296 | message: ::std::string::String,
|
171 297 | field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
172 298 | ) -> Self {
|
173 299 | Self {
|
174 300 | message,
|
175 301 | field_list,
|
176 302 | }
|
177 303 | }
|
178 304 | fn __repr__(&self) -> String {
|
179 305 | format!("{self:?}")
|
180 306 | }
|
181 307 | fn __str__(&self) -> String {
|
182 308 | format!("{self:?}")
|
183 309 | }
|
184 310 | }
|
311 + | /* ErrorImplGenerator.kt:99 */
|
185 312 | impl ValidationException {
|
313 + | /* ErrorImplGenerator.kt:128 */
|
186 314 | /// Returns the error message.
|
187 315 | pub fn message(&self) -> &str {
|
188 316 | &self.message
|
189 317 | }
|
318 + | /* ErrorImplGenerator.kt:141 */
|
190 319 | #[doc(hidden)]
|
191 320 | /// Returns the error name.
|
192 321 | pub fn name(&self) -> &'static str {
|
193 322 | "ValidationException"
|
194 323 | }
|
324 + | /* ErrorImplGenerator.kt:99 */
|
195 325 | }
|
326 + | /* ErrorImplGenerator.kt:153 */
|
196 327 | impl ::std::fmt::Display for ValidationException {
|
328 + | /* ErrorImplGenerator.kt:154 */
|
197 329 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
330 + | /* ErrorImplGenerator.kt:161 */
|
198 331 | ::std::write!(f, "ValidationException")?;
|
332 + | /* ErrorImplGenerator.kt:166 */
|
199 333 | {
|
334 + | /* ErrorImplGenerator.kt:167 */
|
200 335 | ::std::write!(f, ": {}", &self.message)?;
|
336 + | /* ErrorImplGenerator.kt:166 */
|
201 337 | }
|
338 + | /* ErrorImplGenerator.kt:171 */
|
202 339 | Ok(())
|
340 + | /* ErrorImplGenerator.kt:154 */
|
203 341 | }
|
342 + | /* ErrorImplGenerator.kt:153 */
|
204 343 | }
|
344 + | /* ErrorImplGenerator.kt:175 */
|
205 345 | impl ::std::error::Error for ValidationException {}
|
346 + | /* ServerCodegenVisitor.kt:370 */
|
206 347 | impl ValidationException {
|
207 - | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
348 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
349 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
208 350 | pub fn builder() -> crate::error::validation_exception::Builder {
|
351 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
209 352 | crate::error::validation_exception::Builder::default()
|
353 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
210 354 | }
|
355 + | /* ServerCodegenVisitor.kt:370 */
|
211 356 | }
|
212 357 |
|
358 + | /* ServerOperationErrorGenerator.kt:63 */
|
213 359 | /// Error type for the `OperationWithRequiredMembers` operation.
|
360 + | /* ServerOperationErrorGenerator.kt:64 */
|
214 361 | /// Each variant represents an error that can occur for the `OperationWithRequiredMembers` operation.
|
362 + | /* RustType.kt:516 */
|
215 363 | #[derive(::std::fmt::Debug)]
|
216 - | pub enum OperationWithRequiredMembersError {
|
364 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum OperationWithRequiredMembersError {
|
365 + | /* ServerOperationErrorGenerator.kt:68 */
|
217 366 | #[allow(missing_docs)] // documentation missing in model
|
367 + | /* ServerOperationErrorGenerator.kt:71 */
|
218 368 | InternalServerError(crate::error::InternalServerError),
|
369 + | /* ServerOperationErrorGenerator.kt:66 */
|
219 370 | }
|
371 + | /* ServerOperationErrorGenerator.kt:75 */
|
220 372 | impl ::std::fmt::Display for OperationWithRequiredMembersError {
|
373 + | /* ServerOperationErrorGenerator.kt:76 */
|
221 374 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
375 + | /* ServerOperationErrorGenerator.kt:139 */
|
222 376 | match &self {
|
223 - | OperationWithRequiredMembersError::InternalServerError(_inner) => _inner.fmt(f),
|
377 + | /* ServerOperationErrorGenerator.kt:142 */
|
378 + | OperationWithRequiredMembersError::InternalServerError(_inner) =>
|
379 + | /* ServerOperationErrorGenerator.kt:78 */
|
380 + | {
|
381 + | _inner.fmt(f)
|
382 + | }
|
383 + | /* ServerOperationErrorGenerator.kt:139 */
|
224 384 | }
|
385 + | /* ServerOperationErrorGenerator.kt:76 */
|
225 386 | }
|
387 + | /* ServerOperationErrorGenerator.kt:75 */
|
226 388 | }
|
389 + | /* ServerOperationErrorGenerator.kt:83 */
|
227 390 | impl OperationWithRequiredMembersError {
|
391 + | /* ServerOperationErrorGenerator.kt:87 */
|
228 392 | /// Returns `true` if the error kind is `OperationWithRequiredMembersError::InternalServerError`.
|
393 + | /* ServerOperationErrorGenerator.kt:88 */
|
229 394 | pub fn is_internal_server_error(&self) -> bool {
|
395 + | /* ServerOperationErrorGenerator.kt:89 */
|
230 396 | matches!(
|
231 397 | &self,
|
232 398 | OperationWithRequiredMembersError::InternalServerError(_)
|
233 399 | )
|
400 + | /* ServerOperationErrorGenerator.kt:88 */
|
234 401 | }
|
402 + | /* ServerOperationErrorGenerator.kt:92 */
|
235 403 | /// Returns the error name string by matching the correct variant.
|
404 + | /* ServerOperationErrorGenerator.kt:93 */
|
236 405 | pub fn name(&self) -> &'static str {
|
406 + | /* ServerOperationErrorGenerator.kt:139 */
|
237 407 | match &self {
|
238 - | OperationWithRequiredMembersError::InternalServerError(_inner) => _inner.name(),
|
408 + | /* ServerOperationErrorGenerator.kt:142 */
|
409 + | OperationWithRequiredMembersError::InternalServerError(_inner) =>
|
410 + | /* ServerOperationErrorGenerator.kt:95 */
|
411 + | {
|
412 + | _inner.name()
|
413 + | }
|
414 + | /* ServerOperationErrorGenerator.kt:139 */
|
239 415 | }
|
416 + | /* ServerOperationErrorGenerator.kt:93 */
|
240 417 | }
|
418 + | /* ServerOperationErrorGenerator.kt:83 */
|
241 419 | }
|
420 + | /* ServerOperationErrorGenerator.kt:100 */
|
242 421 | impl ::std::error::Error for OperationWithRequiredMembersError {
|
422 + | /* ServerOperationErrorGenerator.kt:101 */
|
243 423 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
424 + | /* ServerOperationErrorGenerator.kt:139 */
|
244 425 | match &self {
|
245 - | OperationWithRequiredMembersError::InternalServerError(_inner) => Some(_inner),
|
426 + | /* ServerOperationErrorGenerator.kt:142 */
|
427 + | OperationWithRequiredMembersError::InternalServerError(_inner) =>
|
428 + | /* ServerOperationErrorGenerator.kt:103 */
|
429 + | {
|
430 + | Some(_inner)
|
431 + | }
|
432 + | /* ServerOperationErrorGenerator.kt:139 */
|
246 433 | }
|
434 + | /* ServerOperationErrorGenerator.kt:101 */
|
247 435 | }
|
436 + | /* ServerOperationErrorGenerator.kt:100 */
|
248 437 | }
|
438 + | /* ServerOperationErrorGenerator.kt:110 */
|
249 439 | impl ::std::convert::From<crate::error::InternalServerError>
|
250 440 | for crate::error::OperationWithRequiredMembersError
|
251 441 | {
|
442 + | /* ServerOperationErrorGenerator.kt:111 */
|
252 443 | fn from(
|
253 444 | variant: crate::error::InternalServerError,
|
254 445 | ) -> crate::error::OperationWithRequiredMembersError {
|
446 + | /* ServerOperationErrorGenerator.kt:112 */
|
255 447 | Self::InternalServerError(variant)
|
448 + | /* ServerOperationErrorGenerator.kt:111 */
|
256 449 | }
|
450 + | /* ServerOperationErrorGenerator.kt:110 */
|
257 451 | }
|
258 452 |
|
453 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
259 454 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithRequiredMembersError {
|
260 455 | fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithRequiredMembersError {
|
261 456 | ::pyo3::Python::with_gil(|py| {
|
262 457 | let error = variant.value(py);
|
263 458 |
|
264 459 | crate::error::InternalServerError {
|
265 460 | message: error.to_string(),
|
266 461 | }
|
267 462 | .into()
|
268 463 | })
|
269 464 | }
|
270 465 | }
|
271 466 |
|
467 + | /* ServerOperationErrorGenerator.kt:63 */
|
272 468 | /// Error type for the `OperationWithDefaults` operation.
|
469 + | /* ServerOperationErrorGenerator.kt:64 */
|
273 470 | /// Each variant represents an error that can occur for the `OperationWithDefaults` operation.
|
471 + | /* RustType.kt:516 */
|
274 472 | #[derive(::std::fmt::Debug)]
|
275 - | pub enum OperationWithDefaultsError {
|
276 - | /// 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.
|
473 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum OperationWithDefaultsError {
|
474 + | /// /* 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.
|
475 + | /* ServerOperationErrorGenerator.kt:71 */
|
277 476 | ValidationException(crate::error::ValidationException),
|
477 + | /* ServerOperationErrorGenerator.kt:68 */
|
278 478 | #[allow(missing_docs)] // documentation missing in model
|
479 + | /* ServerOperationErrorGenerator.kt:71 */
|
279 480 | InternalServerError(crate::error::InternalServerError),
|
481 + | /* ServerOperationErrorGenerator.kt:66 */
|
280 482 | }
|
483 + | /* ServerOperationErrorGenerator.kt:75 */
|
281 484 | impl ::std::fmt::Display for OperationWithDefaultsError {
|
485 + | /* ServerOperationErrorGenerator.kt:76 */
|
282 486 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
487 + | /* ServerOperationErrorGenerator.kt:139 */
|
283 488 | match &self {
|
284 - | OperationWithDefaultsError::ValidationException(_inner) => _inner.fmt(f),
|
285 - | OperationWithDefaultsError::InternalServerError(_inner) => _inner.fmt(f),
|
489 + | /* ServerOperationErrorGenerator.kt:142 */
|
490 + | OperationWithDefaultsError::ValidationException(_inner) =>
|
491 + | /* ServerOperationErrorGenerator.kt:78 */
|
492 + | {
|
493 + | _inner.fmt(f)
|
494 + | }
|
495 + | ,
|
496 + | /* ServerOperationErrorGenerator.kt:142 */
|
497 + | OperationWithDefaultsError::InternalServerError(_inner) =>
|
498 + | /* ServerOperationErrorGenerator.kt:78 */
|
499 + | {
|
500 + | _inner.fmt(f)
|
286 501 | }
|
502 + | /* ServerOperationErrorGenerator.kt:139 */
|
287 503 | }
|
504 + | /* ServerOperationErrorGenerator.kt:76 */
|
505 + | }
|
506 + | /* ServerOperationErrorGenerator.kt:75 */
|
288 507 | }
|
508 + | /* ServerOperationErrorGenerator.kt:83 */
|
289 509 | impl OperationWithDefaultsError {
|
510 + | /* ServerOperationErrorGenerator.kt:87 */
|
290 511 | /// Returns `true` if the error kind is `OperationWithDefaultsError::ValidationException`.
|
512 + | /* ServerOperationErrorGenerator.kt:88 */
|
291 513 | pub fn is_validation_exception(&self) -> bool {
|
514 + | /* ServerOperationErrorGenerator.kt:89 */
|
292 515 | matches!(&self, OperationWithDefaultsError::ValidationException(_))
|
516 + | /* ServerOperationErrorGenerator.kt:88 */
|
293 517 | }
|
518 + | /* ServerOperationErrorGenerator.kt:87 */
|
294 519 | /// Returns `true` if the error kind is `OperationWithDefaultsError::InternalServerError`.
|
520 + | /* ServerOperationErrorGenerator.kt:88 */
|
295 521 | pub fn is_internal_server_error(&self) -> bool {
|
522 + | /* ServerOperationErrorGenerator.kt:89 */
|
296 523 | matches!(&self, OperationWithDefaultsError::InternalServerError(_))
|
524 + | /* ServerOperationErrorGenerator.kt:88 */
|
297 525 | }
|
526 + | /* ServerOperationErrorGenerator.kt:92 */
|
298 527 | /// Returns the error name string by matching the correct variant.
|
528 + | /* ServerOperationErrorGenerator.kt:93 */
|
299 529 | pub fn name(&self) -> &'static str {
|
530 + | /* ServerOperationErrorGenerator.kt:139 */
|
300 531 | match &self {
|
301 - | OperationWithDefaultsError::ValidationException(_inner) => _inner.name(),
|
302 - | OperationWithDefaultsError::InternalServerError(_inner) => _inner.name(),
|
532 + | /* ServerOperationErrorGenerator.kt:142 */
|
533 + | OperationWithDefaultsError::ValidationException(_inner) =>
|
534 + | /* ServerOperationErrorGenerator.kt:95 */
|
535 + | {
|
536 + | _inner.name()
|
303 537 | }
|
538 + | ,
|
539 + | /* ServerOperationErrorGenerator.kt:142 */
|
540 + | OperationWithDefaultsError::InternalServerError(_inner) =>
|
541 + | /* ServerOperationErrorGenerator.kt:95 */
|
542 + | {
|
543 + | _inner.name()
|
544 + | }
|
545 + | /* ServerOperationErrorGenerator.kt:139 */
|
304 546 | }
|
547 + | /* ServerOperationErrorGenerator.kt:93 */
|
548 + | }
|
549 + | /* ServerOperationErrorGenerator.kt:83 */
|
305 550 | }
|
551 + | /* ServerOperationErrorGenerator.kt:100 */
|
306 552 | impl ::std::error::Error for OperationWithDefaultsError {
|
553 + | /* ServerOperationErrorGenerator.kt:101 */
|
307 554 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
555 + | /* ServerOperationErrorGenerator.kt:139 */
|
308 556 | match &self {
|
309 - | OperationWithDefaultsError::ValidationException(_inner) => Some(_inner),
|
310 - | OperationWithDefaultsError::InternalServerError(_inner) => Some(_inner),
|
557 + | /* ServerOperationErrorGenerator.kt:142 */
|
558 + | OperationWithDefaultsError::ValidationException(_inner) =>
|
559 + | /* ServerOperationErrorGenerator.kt:103 */
|
560 + | {
|
561 + | Some(_inner)
|
311 562 | }
|
563 + | ,
|
564 + | /* ServerOperationErrorGenerator.kt:142 */
|
565 + | OperationWithDefaultsError::InternalServerError(_inner) =>
|
566 + | /* ServerOperationErrorGenerator.kt:103 */
|
567 + | {
|
568 + | Some(_inner)
|
569 + | }
|
570 + | /* ServerOperationErrorGenerator.kt:139 */
|
571 + | }
|
572 + | /* ServerOperationErrorGenerator.kt:101 */
|
312 573 | }
|
574 + | /* ServerOperationErrorGenerator.kt:100 */
|
313 575 | }
|
576 + | /* ServerOperationErrorGenerator.kt:110 */
|
314 577 | impl ::std::convert::From<crate::error::ValidationException>
|
315 578 | for crate::error::OperationWithDefaultsError
|
316 579 | {
|
580 + | /* ServerOperationErrorGenerator.kt:111 */
|
317 581 | fn from(
|
318 582 | variant: crate::error::ValidationException,
|
319 583 | ) -> crate::error::OperationWithDefaultsError {
|
584 + | /* ServerOperationErrorGenerator.kt:112 */
|
320 585 | Self::ValidationException(variant)
|
586 + | /* ServerOperationErrorGenerator.kt:111 */
|
321 587 | }
|
588 + | /* ServerOperationErrorGenerator.kt:110 */
|
322 589 | }
|
590 + | /* ServerOperationErrorGenerator.kt:110 */
|
323 591 | impl ::std::convert::From<crate::error::InternalServerError>
|
324 592 | for crate::error::OperationWithDefaultsError
|
325 593 | {
|
594 + | /* ServerOperationErrorGenerator.kt:111 */
|
326 595 | fn from(
|
327 596 | variant: crate::error::InternalServerError,
|
328 597 | ) -> crate::error::OperationWithDefaultsError {
|
598 + | /* ServerOperationErrorGenerator.kt:112 */
|
329 599 | Self::InternalServerError(variant)
|
600 + | /* ServerOperationErrorGenerator.kt:111 */
|
330 601 | }
|
602 + | /* ServerOperationErrorGenerator.kt:110 */
|
331 603 | }
|
332 604 |
|
605 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
333 606 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithDefaultsError {
|
334 607 | fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithDefaultsError {
|
335 608 | ::pyo3::Python::with_gil(|py| {
|
336 609 | let error = variant.value(py);
|
337 610 | if let Ok(error) = error.extract::<crate::error::ValidationException>() {
|
338 611 | return error.into();
|
339 612 | }
|
340 613 | crate::error::InternalServerError {
|
341 614 | message: error.to_string(),
|
342 615 | }
|
343 616 | .into()
|
344 617 | })
|
345 618 | }
|
346 619 | }
|
347 620 |
|
621 + | /* ServerOperationErrorGenerator.kt:63 */
|
348 622 | /// Error type for the `ContentTypeParameters` operation.
|
623 + | /* ServerOperationErrorGenerator.kt:64 */
|
349 624 | /// Each variant represents an error that can occur for the `ContentTypeParameters` operation.
|
625 + | /* RustType.kt:516 */
|
350 626 | #[derive(::std::fmt::Debug)]
|
351 - | pub enum ContentTypeParametersError {
|
627 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum ContentTypeParametersError {
|
628 + | /* ServerOperationErrorGenerator.kt:68 */
|
352 629 | #[allow(missing_docs)] // documentation missing in model
|
630 + | /* ServerOperationErrorGenerator.kt:71 */
|
353 631 | InternalServerError(crate::error::InternalServerError),
|
632 + | /* ServerOperationErrorGenerator.kt:66 */
|
354 633 | }
|
634 + | /* ServerOperationErrorGenerator.kt:75 */
|
355 635 | impl ::std::fmt::Display for ContentTypeParametersError {
|
636 + | /* ServerOperationErrorGenerator.kt:76 */
|
356 637 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
638 + | /* ServerOperationErrorGenerator.kt:139 */
|
357 639 | match &self {
|
358 - | ContentTypeParametersError::InternalServerError(_inner) => _inner.fmt(f),
|
640 + | /* ServerOperationErrorGenerator.kt:142 */
|
641 + | ContentTypeParametersError::InternalServerError(_inner) =>
|
642 + | /* ServerOperationErrorGenerator.kt:78 */
|
643 + | {
|
644 + | _inner.fmt(f)
|
645 + | }
|
646 + | /* ServerOperationErrorGenerator.kt:139 */
|
359 647 | }
|
648 + | /* ServerOperationErrorGenerator.kt:76 */
|
360 649 | }
|
650 + | /* ServerOperationErrorGenerator.kt:75 */
|
361 651 | }
|
652 + | /* ServerOperationErrorGenerator.kt:83 */
|
362 653 | impl ContentTypeParametersError {
|
654 + | /* ServerOperationErrorGenerator.kt:87 */
|
363 655 | /// Returns `true` if the error kind is `ContentTypeParametersError::InternalServerError`.
|
656 + | /* ServerOperationErrorGenerator.kt:88 */
|
364 657 | pub fn is_internal_server_error(&self) -> bool {
|
658 + | /* ServerOperationErrorGenerator.kt:89 */
|
365 659 | matches!(&self, ContentTypeParametersError::InternalServerError(_))
|
660 + | /* ServerOperationErrorGenerator.kt:88 */
|
366 661 | }
|
662 + | /* ServerOperationErrorGenerator.kt:92 */
|
367 663 | /// Returns the error name string by matching the correct variant.
|
664 + | /* ServerOperationErrorGenerator.kt:93 */
|
368 665 | pub fn name(&self) -> &'static str {
|
666 + | /* ServerOperationErrorGenerator.kt:139 */
|
369 667 | match &self {
|
370 - | ContentTypeParametersError::InternalServerError(_inner) => _inner.name(),
|
668 + | /* ServerOperationErrorGenerator.kt:142 */
|
669 + | ContentTypeParametersError::InternalServerError(_inner) =>
|
670 + | /* ServerOperationErrorGenerator.kt:95 */
|
671 + | {
|
672 + | _inner.name()
|
673 + | }
|
674 + | /* ServerOperationErrorGenerator.kt:139 */
|
371 675 | }
|
676 + | /* ServerOperationErrorGenerator.kt:93 */
|
372 677 | }
|
678 + | /* ServerOperationErrorGenerator.kt:83 */
|
373 679 | }
|
680 + | /* ServerOperationErrorGenerator.kt:100 */
|
374 681 | impl ::std::error::Error for ContentTypeParametersError {
|
682 + | /* ServerOperationErrorGenerator.kt:101 */
|
375 683 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
684 + | /* ServerOperationErrorGenerator.kt:139 */
|
376 685 | match &self {
|
377 - | ContentTypeParametersError::InternalServerError(_inner) => Some(_inner),
|
686 + | /* ServerOperationErrorGenerator.kt:142 */
|
687 + | ContentTypeParametersError::InternalServerError(_inner) =>
|
688 + | /* ServerOperationErrorGenerator.kt:103 */
|
689 + | {
|
690 + | Some(_inner)
|
691 + | }
|
692 + | /* ServerOperationErrorGenerator.kt:139 */
|
378 693 | }
|
694 + | /* ServerOperationErrorGenerator.kt:101 */
|
379 695 | }
|
696 + | /* ServerOperationErrorGenerator.kt:100 */
|
380 697 | }
|
698 + | /* ServerOperationErrorGenerator.kt:110 */
|
381 699 | impl ::std::convert::From<crate::error::InternalServerError>
|
382 700 | for crate::error::ContentTypeParametersError
|
383 701 | {
|
702 + | /* ServerOperationErrorGenerator.kt:111 */
|
384 703 | fn from(
|
385 704 | variant: crate::error::InternalServerError,
|
386 705 | ) -> crate::error::ContentTypeParametersError {
|
706 + | /* ServerOperationErrorGenerator.kt:112 */
|
387 707 | Self::InternalServerError(variant)
|
708 + | /* ServerOperationErrorGenerator.kt:111 */
|
388 709 | }
|
710 + | /* ServerOperationErrorGenerator.kt:110 */
|
389 711 | }
|
390 712 |
|
713 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
391 714 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::ContentTypeParametersError {
|
392 715 | fn from(variant: ::pyo3::PyErr) -> crate::error::ContentTypeParametersError {
|
393 716 | ::pyo3::Python::with_gil(|py| {
|
394 717 | let error = variant.value(py);
|
395 718 |
|
396 719 | crate::error::InternalServerError {
|
397 720 | message: error.to_string(),
|
398 721 | }
|
399 722 | .into()
|
400 723 | })
|
401 724 | }
|
402 725 | }
|
403 726 |
|
727 + | /* ServerOperationErrorGenerator.kt:63 */
|
404 728 | /// Error type for the `PutWithContentEncoding` operation.
|
729 + | /* ServerOperationErrorGenerator.kt:64 */
|
405 730 | /// Each variant represents an error that can occur for the `PutWithContentEncoding` operation.
|
731 + | /* RustType.kt:516 */
|
406 732 | #[derive(::std::fmt::Debug)]
|
407 - | pub enum PutWithContentEncodingError {
|
733 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum PutWithContentEncodingError {
|
734 + | /* ServerOperationErrorGenerator.kt:68 */
|
408 735 | #[allow(missing_docs)] // documentation missing in model
|
736 + | /* ServerOperationErrorGenerator.kt:71 */
|
409 737 | InternalServerError(crate::error::InternalServerError),
|
738 + | /* ServerOperationErrorGenerator.kt:66 */
|
410 739 | }
|
740 + | /* ServerOperationErrorGenerator.kt:75 */
|
411 741 | impl ::std::fmt::Display for PutWithContentEncodingError {
|
742 + | /* ServerOperationErrorGenerator.kt:76 */
|
412 743 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
744 + | /* ServerOperationErrorGenerator.kt:139 */
|
413 745 | match &self {
|
414 - | PutWithContentEncodingError::InternalServerError(_inner) => _inner.fmt(f),
|
746 + | /* ServerOperationErrorGenerator.kt:142 */
|
747 + | PutWithContentEncodingError::InternalServerError(_inner) =>
|
748 + | /* ServerOperationErrorGenerator.kt:78 */
|
749 + | {
|
750 + | _inner.fmt(f)
|
751 + | }
|
752 + | /* ServerOperationErrorGenerator.kt:139 */
|
415 753 | }
|
754 + | /* ServerOperationErrorGenerator.kt:76 */
|
416 755 | }
|
756 + | /* ServerOperationErrorGenerator.kt:75 */
|
417 757 | }
|
758 + | /* ServerOperationErrorGenerator.kt:83 */
|
418 759 | impl PutWithContentEncodingError {
|
760 + | /* ServerOperationErrorGenerator.kt:87 */
|
419 761 | /// Returns `true` if the error kind is `PutWithContentEncodingError::InternalServerError`.
|
762 + | /* ServerOperationErrorGenerator.kt:88 */
|
420 763 | pub fn is_internal_server_error(&self) -> bool {
|
764 + | /* ServerOperationErrorGenerator.kt:89 */
|
421 765 | matches!(&self, PutWithContentEncodingError::InternalServerError(_))
|
766 + | /* ServerOperationErrorGenerator.kt:88 */
|
422 767 | }
|
768 + | /* ServerOperationErrorGenerator.kt:92 */
|
423 769 | /// Returns the error name string by matching the correct variant.
|
770 + | /* ServerOperationErrorGenerator.kt:93 */
|
424 771 | pub fn name(&self) -> &'static str {
|
772 + | /* ServerOperationErrorGenerator.kt:139 */
|
425 773 | match &self {
|
426 - | PutWithContentEncodingError::InternalServerError(_inner) => _inner.name(),
|
774 + | /* ServerOperationErrorGenerator.kt:142 */
|
775 + | PutWithContentEncodingError::InternalServerError(_inner) =>
|
776 + | /* ServerOperationErrorGenerator.kt:95 */
|
777 + | {
|
778 + | _inner.name()
|
427 779 | }
|
780 + | /* ServerOperationErrorGenerator.kt:139 */
|
428 781 | }
|
782 + | /* ServerOperationErrorGenerator.kt:93 */
|
783 + | }
|
784 + | /* ServerOperationErrorGenerator.kt:83 */
|
429 785 | }
|
786 + | /* ServerOperationErrorGenerator.kt:100 */
|
430 787 | impl ::std::error::Error for PutWithContentEncodingError {
|
788 + | /* ServerOperationErrorGenerator.kt:101 */
|
431 789 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
790 + | /* ServerOperationErrorGenerator.kt:139 */
|
432 791 | match &self {
|
433 - | PutWithContentEncodingError::InternalServerError(_inner) => Some(_inner),
|
792 + | /* ServerOperationErrorGenerator.kt:142 */
|
793 + | PutWithContentEncodingError::InternalServerError(_inner) =>
|
794 + | /* ServerOperationErrorGenerator.kt:103 */
|
795 + | {
|
796 + | Some(_inner)
|
434 797 | }
|
798 + | /* ServerOperationErrorGenerator.kt:139 */
|
435 799 | }
|
800 + | /* ServerOperationErrorGenerator.kt:101 */
|
801 + | }
|
802 + | /* ServerOperationErrorGenerator.kt:100 */
|
436 803 | }
|
804 + | /* ServerOperationErrorGenerator.kt:110 */
|
437 805 | impl ::std::convert::From<crate::error::InternalServerError>
|
438 806 | for crate::error::PutWithContentEncodingError
|
439 807 | {
|
808 + | /* ServerOperationErrorGenerator.kt:111 */
|
440 809 | fn from(
|
441 810 | variant: crate::error::InternalServerError,
|
442 811 | ) -> crate::error::PutWithContentEncodingError {
|
812 + | /* ServerOperationErrorGenerator.kt:112 */
|
443 813 | Self::InternalServerError(variant)
|
814 + | /* ServerOperationErrorGenerator.kt:111 */
|
444 815 | }
|
816 + | /* ServerOperationErrorGenerator.kt:110 */
|
445 817 | }
|
446 818 |
|
819 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
447 820 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::PutWithContentEncodingError {
|
448 821 | fn from(variant: ::pyo3::PyErr) -> crate::error::PutWithContentEncodingError {
|
449 822 | ::pyo3::Python::with_gil(|py| {
|
450 823 | let error = variant.value(py);
|
451 824 |
|
452 825 | crate::error::InternalServerError {
|
453 826 | message: error.to_string(),
|
454 827 | }
|
455 828 | .into()
|
456 829 | })
|
457 830 | }
|
458 831 | }
|
459 832 |
|
833 + | /* ServerOperationErrorGenerator.kt:63 */
|
460 834 | /// Error type for the `HostWithPathOperation` operation.
|
835 + | /* ServerOperationErrorGenerator.kt:64 */
|
461 836 | /// Each variant represents an error that can occur for the `HostWithPathOperation` operation.
|
837 + | /* RustType.kt:516 */
|
462 838 | #[derive(::std::fmt::Debug)]
|
463 - | pub enum HostWithPathOperationError {
|
839 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum HostWithPathOperationError {
|
840 + | /* ServerOperationErrorGenerator.kt:68 */
|
464 841 | #[allow(missing_docs)] // documentation missing in model
|
842 + | /* ServerOperationErrorGenerator.kt:71 */
|
465 843 | InternalServerError(crate::error::InternalServerError),
|
844 + | /* ServerOperationErrorGenerator.kt:66 */
|
466 845 | }
|
846 + | /* ServerOperationErrorGenerator.kt:75 */
|
467 847 | impl ::std::fmt::Display for HostWithPathOperationError {
|
848 + | /* ServerOperationErrorGenerator.kt:76 */
|
468 849 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
850 + | /* ServerOperationErrorGenerator.kt:139 */
|
469 851 | match &self {
|
470 - | HostWithPathOperationError::InternalServerError(_inner) => _inner.fmt(f),
|
852 + | /* ServerOperationErrorGenerator.kt:142 */
|
853 + | HostWithPathOperationError::InternalServerError(_inner) =>
|
854 + | /* ServerOperationErrorGenerator.kt:78 */
|
855 + | {
|
856 + | _inner.fmt(f)
|
471 857 | }
|
858 + | /* ServerOperationErrorGenerator.kt:139 */
|
472 859 | }
|
860 + | /* ServerOperationErrorGenerator.kt:76 */
|
861 + | }
|
862 + | /* ServerOperationErrorGenerator.kt:75 */
|
473 863 | }
|
864 + | /* ServerOperationErrorGenerator.kt:83 */
|
474 865 | impl HostWithPathOperationError {
|
866 + | /* ServerOperationErrorGenerator.kt:87 */
|
475 867 | /// Returns `true` if the error kind is `HostWithPathOperationError::InternalServerError`.
|
868 + | /* ServerOperationErrorGenerator.kt:88 */
|
476 869 | pub fn is_internal_server_error(&self) -> bool {
|
870 + | /* ServerOperationErrorGenerator.kt:89 */
|
477 871 | matches!(&self, HostWithPathOperationError::InternalServerError(_))
|
872 + | /* ServerOperationErrorGenerator.kt:88 */
|
478 873 | }
|
874 + | /* ServerOperationErrorGenerator.kt:92 */
|
479 875 | /// Returns the error name string by matching the correct variant.
|
876 + | /* ServerOperationErrorGenerator.kt:93 */
|
480 877 | pub fn name(&self) -> &'static str {
|
878 + | /* ServerOperationErrorGenerator.kt:139 */
|
481 879 | match &self {
|
482 - | HostWithPathOperationError::InternalServerError(_inner) => _inner.name(),
|
880 + | /* ServerOperationErrorGenerator.kt:142 */
|
881 + | HostWithPathOperationError::InternalServerError(_inner) =>
|
882 + | /* ServerOperationErrorGenerator.kt:95 */
|
883 + | {
|
884 + | _inner.name()
|
483 885 | }
|
886 + | /* ServerOperationErrorGenerator.kt:139 */
|
484 887 | }
|
888 + | /* ServerOperationErrorGenerator.kt:93 */
|
889 + | }
|
890 + | /* ServerOperationErrorGenerator.kt:83 */
|
485 891 | }
|
892 + | /* ServerOperationErrorGenerator.kt:100 */
|
486 893 | impl ::std::error::Error for HostWithPathOperationError {
|
894 + | /* ServerOperationErrorGenerator.kt:101 */
|
487 895 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
896 + | /* ServerOperationErrorGenerator.kt:139 */
|
488 897 | match &self {
|
489 - | HostWithPathOperationError::InternalServerError(_inner) => Some(_inner),
|
898 + | /* ServerOperationErrorGenerator.kt:142 */
|
899 + | HostWithPathOperationError::InternalServerError(_inner) =>
|
900 + | /* ServerOperationErrorGenerator.kt:103 */
|
901 + | {
|
902 + | Some(_inner)
|
903 + | }
|
904 + | /* ServerOperationErrorGenerator.kt:139 */
|
490 905 | }
|
906 + | /* ServerOperationErrorGenerator.kt:101 */
|
491 907 | }
|
908 + | /* ServerOperationErrorGenerator.kt:100 */
|
492 909 | }
|
910 + | /* ServerOperationErrorGenerator.kt:110 */
|
493 911 | impl ::std::convert::From<crate::error::InternalServerError>
|
494 912 | for crate::error::HostWithPathOperationError
|
495 913 | {
|
914 + | /* ServerOperationErrorGenerator.kt:111 */
|
496 915 | fn from(
|
497 916 | variant: crate::error::InternalServerError,
|
498 917 | ) -> crate::error::HostWithPathOperationError {
|
918 + | /* ServerOperationErrorGenerator.kt:112 */
|
499 919 | Self::InternalServerError(variant)
|
920 + | /* ServerOperationErrorGenerator.kt:111 */
|
500 921 | }
|
922 + | /* ServerOperationErrorGenerator.kt:110 */
|
501 923 | }
|
502 924 |
|
925 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
503 926 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::HostWithPathOperationError {
|
504 927 | fn from(variant: ::pyo3::PyErr) -> crate::error::HostWithPathOperationError {
|
505 928 | ::pyo3::Python::with_gil(|py| {
|
506 929 | let error = variant.value(py);
|
507 930 |
|
508 931 | crate::error::InternalServerError {
|
509 932 | message: error.to_string(),
|
510 933 | }
|
511 934 | .into()
|
512 935 | })
|
513 936 | }
|
514 937 | }
|
515 938 |
|
939 + | /* ServerOperationErrorGenerator.kt:63 */
|
516 940 | /// Error type for the `EndpointWithHostLabelOperation` operation.
|
941 + | /* ServerOperationErrorGenerator.kt:64 */
|
517 942 | /// Each variant represents an error that can occur for the `EndpointWithHostLabelOperation` operation.
|
943 + | /* RustType.kt:516 */
|
518 944 | #[derive(::std::fmt::Debug)]
|
519 - | pub enum EndpointWithHostLabelOperationError {
|
520 - | /// 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.
|
945 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum EndpointWithHostLabelOperationError {
|
946 + | /// /* 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.
|
947 + | /* ServerOperationErrorGenerator.kt:71 */
|
521 948 | ValidationException(crate::error::ValidationException),
|
949 + | /* ServerOperationErrorGenerator.kt:68 */
|
522 950 | #[allow(missing_docs)] // documentation missing in model
|
951 + | /* ServerOperationErrorGenerator.kt:71 */
|
523 952 | InternalServerError(crate::error::InternalServerError),
|
953 + | /* ServerOperationErrorGenerator.kt:66 */
|
524 954 | }
|
955 + | /* ServerOperationErrorGenerator.kt:75 */
|
525 956 | impl ::std::fmt::Display for EndpointWithHostLabelOperationError {
|
957 + | /* ServerOperationErrorGenerator.kt:76 */
|
526 958 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
959 + | /* ServerOperationErrorGenerator.kt:139 */
|
527 960 | match &self {
|
528 - | EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.fmt(f),
|
529 - | EndpointWithHostLabelOperationError::InternalServerError(_inner) => _inner.fmt(f),
|
961 + | /* ServerOperationErrorGenerator.kt:142 */
|
962 + | EndpointWithHostLabelOperationError::ValidationException(_inner) =>
|
963 + | /* ServerOperationErrorGenerator.kt:78 */
|
964 + | {
|
965 + | _inner.fmt(f)
|
530 966 | }
|
967 + | ,
|
968 + | /* ServerOperationErrorGenerator.kt:142 */
|
969 + | EndpointWithHostLabelOperationError::InternalServerError(_inner) =>
|
970 + | /* ServerOperationErrorGenerator.kt:78 */
|
971 + | {
|
972 + | _inner.fmt(f)
|
531 973 | }
|
974 + | /* ServerOperationErrorGenerator.kt:139 */
|
975 + | }
|
976 + | /* ServerOperationErrorGenerator.kt:76 */
|
977 + | }
|
978 + | /* ServerOperationErrorGenerator.kt:75 */
|
532 979 | }
|
980 + | /* ServerOperationErrorGenerator.kt:83 */
|
533 981 | impl EndpointWithHostLabelOperationError {
|
982 + | /* ServerOperationErrorGenerator.kt:87 */
|
534 983 | /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::ValidationException`.
|
984 + | /* ServerOperationErrorGenerator.kt:88 */
|
535 985 | pub fn is_validation_exception(&self) -> bool {
|
986 + | /* ServerOperationErrorGenerator.kt:89 */
|
536 987 | matches!(
|
537 988 | &self,
|
538 989 | EndpointWithHostLabelOperationError::ValidationException(_)
|
539 990 | )
|
991 + | /* ServerOperationErrorGenerator.kt:88 */
|
540 992 | }
|
993 + | /* ServerOperationErrorGenerator.kt:87 */
|
541 994 | /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::InternalServerError`.
|
995 + | /* ServerOperationErrorGenerator.kt:88 */
|
542 996 | pub fn is_internal_server_error(&self) -> bool {
|
997 + | /* ServerOperationErrorGenerator.kt:89 */
|
543 998 | matches!(
|
544 999 | &self,
|
545 1000 | EndpointWithHostLabelOperationError::InternalServerError(_)
|
546 1001 | )
|
1002 + | /* ServerOperationErrorGenerator.kt:88 */
|
547 1003 | }
|
1004 + | /* ServerOperationErrorGenerator.kt:92 */
|
548 1005 | /// Returns the error name string by matching the correct variant.
|
1006 + | /* ServerOperationErrorGenerator.kt:93 */
|
549 1007 | pub fn name(&self) -> &'static str {
|
1008 + | /* ServerOperationErrorGenerator.kt:139 */
|
550 1009 | match &self {
|
551 - | EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.name(),
|
552 - | EndpointWithHostLabelOperationError::InternalServerError(_inner) => _inner.name(),
|
1010 + | /* ServerOperationErrorGenerator.kt:142 */
|
1011 + | EndpointWithHostLabelOperationError::ValidationException(_inner) =>
|
1012 + | /* ServerOperationErrorGenerator.kt:95 */
|
1013 + | {
|
1014 + | _inner.name()
|
553 1015 | }
|
1016 + | ,
|
1017 + | /* ServerOperationErrorGenerator.kt:142 */
|
1018 + | EndpointWithHostLabelOperationError::InternalServerError(_inner) =>
|
1019 + | /* ServerOperationErrorGenerator.kt:95 */
|
1020 + | {
|
1021 + | _inner.name()
|
554 1022 | }
|
1023 + | /* ServerOperationErrorGenerator.kt:139 */
|
1024 + | }
|
1025 + | /* ServerOperationErrorGenerator.kt:93 */
|
1026 + | }
|
1027 + | /* ServerOperationErrorGenerator.kt:83 */
|
555 1028 | }
|
1029 + | /* ServerOperationErrorGenerator.kt:100 */
|
556 1030 | impl ::std::error::Error for EndpointWithHostLabelOperationError {
|
1031 + | /* ServerOperationErrorGenerator.kt:101 */
|
557 1032 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1033 + | /* ServerOperationErrorGenerator.kt:139 */
|
558 1034 | match &self {
|
559 - | EndpointWithHostLabelOperationError::ValidationException(_inner) => Some(_inner),
|
560 - | EndpointWithHostLabelOperationError::InternalServerError(_inner) => Some(_inner),
|
1035 + | /* ServerOperationErrorGenerator.kt:142 */
|
1036 + | EndpointWithHostLabelOperationError::ValidationException(_inner) =>
|
1037 + | /* ServerOperationErrorGenerator.kt:103 */
|
1038 + | {
|
1039 + | Some(_inner)
|
1040 + | }
|
1041 + | ,
|
1042 + | /* ServerOperationErrorGenerator.kt:142 */
|
1043 + | EndpointWithHostLabelOperationError::InternalServerError(_inner) =>
|
1044 + | /* ServerOperationErrorGenerator.kt:103 */
|
1045 + | {
|
1046 + | Some(_inner)
|
561 1047 | }
|
1048 + | /* ServerOperationErrorGenerator.kt:139 */
|
562 1049 | }
|
1050 + | /* ServerOperationErrorGenerator.kt:101 */
|
1051 + | }
|
1052 + | /* ServerOperationErrorGenerator.kt:100 */
|
563 1053 | }
|
1054 + | /* ServerOperationErrorGenerator.kt:110 */
|
564 1055 | impl ::std::convert::From<crate::error::ValidationException>
|
565 1056 | for crate::error::EndpointWithHostLabelOperationError
|
566 1057 | {
|
1058 + | /* ServerOperationErrorGenerator.kt:111 */
|
567 1059 | fn from(
|
568 1060 | variant: crate::error::ValidationException,
|
569 1061 | ) -> crate::error::EndpointWithHostLabelOperationError {
|
1062 + | /* ServerOperationErrorGenerator.kt:112 */
|
570 1063 | Self::ValidationException(variant)
|
1064 + | /* ServerOperationErrorGenerator.kt:111 */
|
571 1065 | }
|
1066 + | /* ServerOperationErrorGenerator.kt:110 */
|
572 1067 | }
|
1068 + | /* ServerOperationErrorGenerator.kt:110 */
|
573 1069 | impl ::std::convert::From<crate::error::InternalServerError>
|
574 1070 | for crate::error::EndpointWithHostLabelOperationError
|
575 1071 | {
|
1072 + | /* ServerOperationErrorGenerator.kt:111 */
|
576 1073 | fn from(
|
577 1074 | variant: crate::error::InternalServerError,
|
578 1075 | ) -> crate::error::EndpointWithHostLabelOperationError {
|
1076 + | /* ServerOperationErrorGenerator.kt:112 */
|
579 1077 | Self::InternalServerError(variant)
|
1078 + | /* ServerOperationErrorGenerator.kt:111 */
|
580 1079 | }
|
1080 + | /* ServerOperationErrorGenerator.kt:110 */
|
581 1081 | }
|
582 1082 |
|
1083 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
583 1084 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::EndpointWithHostLabelOperationError {
|
584 1085 | fn from(variant: ::pyo3::PyErr) -> crate::error::EndpointWithHostLabelOperationError {
|
585 1086 | ::pyo3::Python::with_gil(|py| {
|
586 1087 | let error = variant.value(py);
|
587 1088 | if let Ok(error) = error.extract::<crate::error::ValidationException>() {
|
588 1089 | return error.into();
|
589 1090 | }
|
590 1091 | crate::error::InternalServerError {
|
591 1092 | message: error.to_string(),
|
592 1093 | }
|
593 1094 | .into()
|
594 1095 | })
|
595 1096 | }
|
596 1097 | }
|
597 1098 |
|
1099 + | /* ServerOperationErrorGenerator.kt:63 */
|
598 1100 | /// Error type for the `EndpointOperation` operation.
|
1101 + | /* ServerOperationErrorGenerator.kt:64 */
|
599 1102 | /// Each variant represents an error that can occur for the `EndpointOperation` operation.
|
1103 + | /* RustType.kt:516 */
|
600 1104 | #[derive(::std::fmt::Debug)]
|
601 - | pub enum EndpointOperationError {
|
1105 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum EndpointOperationError {
|
1106 + | /* ServerOperationErrorGenerator.kt:68 */
|
602 1107 | #[allow(missing_docs)] // documentation missing in model
|
1108 + | /* ServerOperationErrorGenerator.kt:71 */
|
603 1109 | InternalServerError(crate::error::InternalServerError),
|
1110 + | /* ServerOperationErrorGenerator.kt:66 */
|
604 1111 | }
|
1112 + | /* ServerOperationErrorGenerator.kt:75 */
|
605 1113 | impl ::std::fmt::Display for EndpointOperationError {
|
1114 + | /* ServerOperationErrorGenerator.kt:76 */
|
606 1115 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1116 + | /* ServerOperationErrorGenerator.kt:139 */
|
607 1117 | match &self {
|
608 - | EndpointOperationError::InternalServerError(_inner) => _inner.fmt(f),
|
1118 + | /* ServerOperationErrorGenerator.kt:142 */
|
1119 + | EndpointOperationError::InternalServerError(_inner) =>
|
1120 + | /* ServerOperationErrorGenerator.kt:78 */
|
1121 + | {
|
1122 + | _inner.fmt(f)
|
609 1123 | }
|
1124 + | /* ServerOperationErrorGenerator.kt:139 */
|
610 1125 | }
|
1126 + | /* ServerOperationErrorGenerator.kt:76 */
|
1127 + | }
|
1128 + | /* ServerOperationErrorGenerator.kt:75 */
|
611 1129 | }
|
1130 + | /* ServerOperationErrorGenerator.kt:83 */
|
612 1131 | impl EndpointOperationError {
|
1132 + | /* ServerOperationErrorGenerator.kt:87 */
|
613 1133 | /// Returns `true` if the error kind is `EndpointOperationError::InternalServerError`.
|
1134 + | /* ServerOperationErrorGenerator.kt:88 */
|
614 1135 | pub fn is_internal_server_error(&self) -> bool {
|
1136 + | /* ServerOperationErrorGenerator.kt:89 */
|
615 1137 | matches!(&self, EndpointOperationError::InternalServerError(_))
|
1138 + | /* ServerOperationErrorGenerator.kt:88 */
|
616 1139 | }
|
1140 + | /* ServerOperationErrorGenerator.kt:92 */
|
617 1141 | /// Returns the error name string by matching the correct variant.
|
1142 + | /* ServerOperationErrorGenerator.kt:93 */
|
618 1143 | pub fn name(&self) -> &'static str {
|
1144 + | /* ServerOperationErrorGenerator.kt:139 */
|
619 1145 | match &self {
|
620 - | EndpointOperationError::InternalServerError(_inner) => _inner.name(),
|
1146 + | /* ServerOperationErrorGenerator.kt:142 */
|
1147 + | EndpointOperationError::InternalServerError(_inner) =>
|
1148 + | /* ServerOperationErrorGenerator.kt:95 */
|
1149 + | {
|
1150 + | _inner.name()
|
621 1151 | }
|
1152 + | /* ServerOperationErrorGenerator.kt:139 */
|
622 1153 | }
|
1154 + | /* ServerOperationErrorGenerator.kt:93 */
|
1155 + | }
|
1156 + | /* ServerOperationErrorGenerator.kt:83 */
|
623 1157 | }
|
1158 + | /* ServerOperationErrorGenerator.kt:100 */
|
624 1159 | impl ::std::error::Error for EndpointOperationError {
|
1160 + | /* ServerOperationErrorGenerator.kt:101 */
|
625 1161 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1162 + | /* ServerOperationErrorGenerator.kt:139 */
|
626 1163 | match &self {
|
627 - | EndpointOperationError::InternalServerError(_inner) => Some(_inner),
|
1164 + | /* ServerOperationErrorGenerator.kt:142 */
|
1165 + | EndpointOperationError::InternalServerError(_inner) =>
|
1166 + | /* ServerOperationErrorGenerator.kt:103 */
|
1167 + | {
|
1168 + | Some(_inner)
|
628 1169 | }
|
1170 + | /* ServerOperationErrorGenerator.kt:139 */
|
629 1171 | }
|
1172 + | /* ServerOperationErrorGenerator.kt:101 */
|
1173 + | }
|
1174 + | /* ServerOperationErrorGenerator.kt:100 */
|
630 1175 | }
|
1176 + | /* ServerOperationErrorGenerator.kt:110 */
|
631 1177 | impl ::std::convert::From<crate::error::InternalServerError>
|
632 1178 | for crate::error::EndpointOperationError
|
633 1179 | {
|
1180 + | /* ServerOperationErrorGenerator.kt:111 */
|
634 1181 | fn from(variant: crate::error::InternalServerError) -> crate::error::EndpointOperationError {
|
1182 + | /* ServerOperationErrorGenerator.kt:112 */
|
635 1183 | Self::InternalServerError(variant)
|
1184 + | /* ServerOperationErrorGenerator.kt:111 */
|
636 1185 | }
|
1186 + | /* ServerOperationErrorGenerator.kt:110 */
|
637 1187 | }
|
638 1188 |
|
1189 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
639 1190 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::EndpointOperationError {
|
640 1191 | fn from(variant: ::pyo3::PyErr) -> crate::error::EndpointOperationError {
|
641 1192 | ::pyo3::Python::with_gil(|py| {
|
642 1193 | let error = variant.value(py);
|
643 1194 |
|
644 1195 | crate::error::InternalServerError {
|
645 1196 | message: error.to_string(),
|
646 1197 | }
|
647 1198 | .into()
|
648 1199 | })
|
649 1200 | }
|
650 1201 | }
|
651 1202 |
|
1203 + | /* ServerOperationErrorGenerator.kt:63 */
|
652 1204 | /// Error type for the `JsonUnions` operation.
|
1205 + | /* ServerOperationErrorGenerator.kt:64 */
|
653 1206 | /// Each variant represents an error that can occur for the `JsonUnions` operation.
|
1207 + | /* RustType.kt:516 */
|
654 1208 | #[derive(::std::fmt::Debug)]
|
655 - | pub enum JsonUnionsError {
|
656 - | /// 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.
|
1209 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum JsonUnionsError {
|
1210 + | /// /* 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.
|
1211 + | /* ServerOperationErrorGenerator.kt:71 */
|
657 1212 | ValidationException(crate::error::ValidationException),
|
1213 + | /* ServerOperationErrorGenerator.kt:68 */
|
658 1214 | #[allow(missing_docs)] // documentation missing in model
|
1215 + | /* ServerOperationErrorGenerator.kt:71 */
|
659 1216 | InternalServerError(crate::error::InternalServerError),
|
1217 + | /* ServerOperationErrorGenerator.kt:66 */
|
660 1218 | }
|
1219 + | /* ServerOperationErrorGenerator.kt:75 */
|
661 1220 | impl ::std::fmt::Display for JsonUnionsError {
|
1221 + | /* ServerOperationErrorGenerator.kt:76 */
|
662 1222 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1223 + | /* ServerOperationErrorGenerator.kt:139 */
|
663 1224 | match &self {
|
664 - | JsonUnionsError::ValidationException(_inner) => _inner.fmt(f),
|
665 - | JsonUnionsError::InternalServerError(_inner) => _inner.fmt(f),
|
1225 + | /* ServerOperationErrorGenerator.kt:142 */
|
1226 + | JsonUnionsError::ValidationException(_inner) =>
|
1227 + | /* ServerOperationErrorGenerator.kt:78 */
|
1228 + | {
|
1229 + | _inner.fmt(f)
|
666 1230 | }
|
1231 + | ,
|
1232 + | /* ServerOperationErrorGenerator.kt:142 */
|
1233 + | JsonUnionsError::InternalServerError(_inner) =>
|
1234 + | /* ServerOperationErrorGenerator.kt:78 */
|
1235 + | {
|
1236 + | _inner.fmt(f)
|
1237 + | }
|
1238 + | /* ServerOperationErrorGenerator.kt:139 */
|
667 1239 | }
|
1240 + | /* ServerOperationErrorGenerator.kt:76 */
|
1241 + | }
|
1242 + | /* ServerOperationErrorGenerator.kt:75 */
|
668 1243 | }
|
1244 + | /* ServerOperationErrorGenerator.kt:83 */
|
669 1245 | impl JsonUnionsError {
|
1246 + | /* ServerOperationErrorGenerator.kt:87 */
|
670 1247 | /// Returns `true` if the error kind is `JsonUnionsError::ValidationException`.
|
1248 + | /* ServerOperationErrorGenerator.kt:88 */
|
671 1249 | pub fn is_validation_exception(&self) -> bool {
|
1250 + | /* ServerOperationErrorGenerator.kt:89 */
|
672 1251 | matches!(&self, JsonUnionsError::ValidationException(_))
|
1252 + | /* ServerOperationErrorGenerator.kt:88 */
|
673 1253 | }
|
1254 + | /* ServerOperationErrorGenerator.kt:87 */
|
674 1255 | /// Returns `true` if the error kind is `JsonUnionsError::InternalServerError`.
|
1256 + | /* ServerOperationErrorGenerator.kt:88 */
|
675 1257 | pub fn is_internal_server_error(&self) -> bool {
|
1258 + | /* ServerOperationErrorGenerator.kt:89 */
|
676 1259 | matches!(&self, JsonUnionsError::InternalServerError(_))
|
1260 + | /* ServerOperationErrorGenerator.kt:88 */
|
677 1261 | }
|
1262 + | /* ServerOperationErrorGenerator.kt:92 */
|
678 1263 | /// Returns the error name string by matching the correct variant.
|
1264 + | /* ServerOperationErrorGenerator.kt:93 */
|
679 1265 | pub fn name(&self) -> &'static str {
|
1266 + | /* ServerOperationErrorGenerator.kt:139 */
|
680 1267 | match &self {
|
681 - | JsonUnionsError::ValidationException(_inner) => _inner.name(),
|
682 - | JsonUnionsError::InternalServerError(_inner) => _inner.name(),
|
1268 + | /* ServerOperationErrorGenerator.kt:142 */
|
1269 + | JsonUnionsError::ValidationException(_inner) =>
|
1270 + | /* ServerOperationErrorGenerator.kt:95 */
|
1271 + | {
|
1272 + | _inner.name()
|
683 1273 | }
|
1274 + | ,
|
1275 + | /* ServerOperationErrorGenerator.kt:142 */
|
1276 + | JsonUnionsError::InternalServerError(_inner) =>
|
1277 + | /* ServerOperationErrorGenerator.kt:95 */
|
1278 + | {
|
1279 + | _inner.name()
|
1280 + | }
|
1281 + | /* ServerOperationErrorGenerator.kt:139 */
|
1282 + | }
|
1283 + | /* ServerOperationErrorGenerator.kt:93 */
|
684 1284 | }
|
1285 + | /* ServerOperationErrorGenerator.kt:83 */
|
685 1286 | }
|
1287 + | /* ServerOperationErrorGenerator.kt:100 */
|
686 1288 | impl ::std::error::Error for JsonUnionsError {
|
1289 + | /* ServerOperationErrorGenerator.kt:101 */
|
687 1290 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1291 + | /* ServerOperationErrorGenerator.kt:139 */
|
688 1292 | match &self {
|
689 - | JsonUnionsError::ValidationException(_inner) => Some(_inner),
|
690 - | JsonUnionsError::InternalServerError(_inner) => Some(_inner),
|
1293 + | /* ServerOperationErrorGenerator.kt:142 */
|
1294 + | JsonUnionsError::ValidationException(_inner) =>
|
1295 + | /* ServerOperationErrorGenerator.kt:103 */
|
1296 + | {
|
1297 + | Some(_inner)
|
691 1298 | }
|
1299 + | ,
|
1300 + | /* ServerOperationErrorGenerator.kt:142 */
|
1301 + | JsonUnionsError::InternalServerError(_inner) =>
|
1302 + | /* ServerOperationErrorGenerator.kt:103 */
|
1303 + | {
|
1304 + | Some(_inner)
|
692 1305 | }
|
1306 + | /* ServerOperationErrorGenerator.kt:139 */
|
1307 + | }
|
1308 + | /* ServerOperationErrorGenerator.kt:101 */
|
1309 + | }
|
1310 + | /* ServerOperationErrorGenerator.kt:100 */
|
693 1311 | }
|
1312 + | /* ServerOperationErrorGenerator.kt:110 */
|
694 1313 | impl ::std::convert::From<crate::error::ValidationException> for crate::error::JsonUnionsError {
|
1314 + | /* ServerOperationErrorGenerator.kt:111 */
|
695 1315 | fn from(variant: crate::error::ValidationException) -> crate::error::JsonUnionsError {
|
1316 + | /* ServerOperationErrorGenerator.kt:112 */
|
696 1317 | Self::ValidationException(variant)
|
1318 + | /* ServerOperationErrorGenerator.kt:111 */
|
697 1319 | }
|
1320 + | /* ServerOperationErrorGenerator.kt:110 */
|
698 1321 | }
|
1322 + | /* ServerOperationErrorGenerator.kt:110 */
|
699 1323 | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::JsonUnionsError {
|
1324 + | /* ServerOperationErrorGenerator.kt:111 */
|
700 1325 | fn from(variant: crate::error::InternalServerError) -> crate::error::JsonUnionsError {
|
1326 + | /* ServerOperationErrorGenerator.kt:112 */
|
701 1327 | Self::InternalServerError(variant)
|
1328 + | /* ServerOperationErrorGenerator.kt:111 */
|
702 1329 | }
|
1330 + | /* ServerOperationErrorGenerator.kt:110 */
|
703 1331 | }
|
704 1332 |
|
1333 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
705 1334 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::JsonUnionsError {
|
706 1335 | fn from(variant: ::pyo3::PyErr) -> crate::error::JsonUnionsError {
|
707 1336 | ::pyo3::Python::with_gil(|py| {
|
708 1337 | let error = variant.value(py);
|
709 1338 | if let Ok(error) = error.extract::<crate::error::ValidationException>() {
|
710 1339 | return error.into();
|
711 1340 | }
|
712 1341 | crate::error::InternalServerError {
|
713 1342 | message: error.to_string(),
|
714 1343 | }
|
715 1344 | .into()
|
716 1345 | })
|
717 1346 | }
|
718 1347 | }
|
719 1348 |
|
1349 + | /* ServerOperationErrorGenerator.kt:63 */
|
720 1350 | /// Error type for the `GreetingWithErrors` operation.
|
1351 + | /* ServerOperationErrorGenerator.kt:64 */
|
721 1352 | /// Each variant represents an error that can occur for the `GreetingWithErrors` operation.
|
1353 + | /* RustType.kt:516 */
|
722 1354 | #[derive(::std::fmt::Debug)]
|
723 - | pub enum GreetingWithErrorsError {
|
724 - | /// This error is thrown when an invalid greeting value is provided.
|
1355 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GreetingWithErrorsError {
|
1356 + | /// /* ServerOperationErrorGenerator.kt:68 */This error is thrown when an invalid greeting value is provided.
|
1357 + | /* ServerOperationErrorGenerator.kt:71 */
|
725 1358 | InvalidGreeting(crate::error::InvalidGreeting),
|
726 - | /// This error is thrown when a request is invalid.
|
1359 + | /// /* ServerOperationErrorGenerator.kt:68 */This error is thrown when a request is invalid.
|
1360 + | /* ServerOperationErrorGenerator.kt:71 */
|
727 1361 | ComplexError(crate::error::ComplexError),
|
728 - | /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
|
1362 + | /// /* 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.
|
1363 + | /* ServerOperationErrorGenerator.kt:71 */
|
729 1364 | FooError(crate::error::FooError),
|
1365 + | /* ServerOperationErrorGenerator.kt:68 */
|
730 1366 | #[allow(missing_docs)] // documentation missing in model
|
1367 + | /* ServerOperationErrorGenerator.kt:71 */
|
731 1368 | InternalServerError(crate::error::InternalServerError),
|
1369 + | /* ServerOperationErrorGenerator.kt:66 */
|
732 1370 | }
|
1371 + | /* ServerOperationErrorGenerator.kt:75 */
|
733 1372 | impl ::std::fmt::Display for GreetingWithErrorsError {
|
1373 + | /* ServerOperationErrorGenerator.kt:76 */
|
734 1374 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1375 + | /* ServerOperationErrorGenerator.kt:139 */
|
735 1376 | match &self {
|
736 - | GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.fmt(f),
|
737 - | GreetingWithErrorsError::ComplexError(_inner) => _inner.fmt(f),
|
738 - | GreetingWithErrorsError::FooError(_inner) => _inner.fmt(f),
|
739 - | GreetingWithErrorsError::InternalServerError(_inner) => _inner.fmt(f),
|
1377 + | /* ServerOperationErrorGenerator.kt:142 */
|
1378 + | GreetingWithErrorsError::InvalidGreeting(_inner) =>
|
1379 + | /* ServerOperationErrorGenerator.kt:78 */
|
1380 + | {
|
1381 + | _inner.fmt(f)
|
1382 + | }
|
1383 + | ,
|
1384 + | /* ServerOperationErrorGenerator.kt:142 */
|
1385 + | GreetingWithErrorsError::ComplexError(_inner) =>
|
1386 + | /* ServerOperationErrorGenerator.kt:78 */
|
1387 + | {
|
1388 + | _inner.fmt(f)
|
1389 + | }
|
1390 + | ,
|
1391 + | /* ServerOperationErrorGenerator.kt:142 */
|
1392 + | GreetingWithErrorsError::FooError(_inner) =>
|
1393 + | /* ServerOperationErrorGenerator.kt:78 */
|
1394 + | {
|
1395 + | _inner.fmt(f)
|
1396 + | }
|
1397 + | ,
|
1398 + | /* ServerOperationErrorGenerator.kt:142 */
|
1399 + | GreetingWithErrorsError::InternalServerError(_inner) =>
|
1400 + | /* ServerOperationErrorGenerator.kt:78 */
|
1401 + | {
|
1402 + | _inner.fmt(f)
|
740 1403 | }
|
1404 + | /* ServerOperationErrorGenerator.kt:139 */
|
741 1405 | }
|
1406 + | /* ServerOperationErrorGenerator.kt:76 */
|
1407 + | }
|
1408 + | /* ServerOperationErrorGenerator.kt:75 */
|
742 1409 | }
|
1410 + | /* ServerOperationErrorGenerator.kt:83 */
|
743 1411 | impl GreetingWithErrorsError {
|
1412 + | /* ServerOperationErrorGenerator.kt:87 */
|
744 1413 | /// Returns `true` if the error kind is `GreetingWithErrorsError::InvalidGreeting`.
|
1414 + | /* ServerOperationErrorGenerator.kt:88 */
|
745 1415 | pub fn is_invalid_greeting(&self) -> bool {
|
1416 + | /* ServerOperationErrorGenerator.kt:89 */
|
746 1417 | matches!(&self, GreetingWithErrorsError::InvalidGreeting(_))
|
1418 + | /* ServerOperationErrorGenerator.kt:88 */
|
747 1419 | }
|
1420 + | /* ServerOperationErrorGenerator.kt:87 */
|
748 1421 | /// Returns `true` if the error kind is `GreetingWithErrorsError::ComplexError`.
|
1422 + | /* ServerOperationErrorGenerator.kt:88 */
|
749 1423 | pub fn is_complex_error(&self) -> bool {
|
1424 + | /* ServerOperationErrorGenerator.kt:89 */
|
750 1425 | matches!(&self, GreetingWithErrorsError::ComplexError(_))
|
1426 + | /* ServerOperationErrorGenerator.kt:88 */
|
751 1427 | }
|
1428 + | /* ServerOperationErrorGenerator.kt:87 */
|
752 1429 | /// Returns `true` if the error kind is `GreetingWithErrorsError::FooError`.
|
1430 + | /* ServerOperationErrorGenerator.kt:88 */
|
753 1431 | pub fn is_foo_error(&self) -> bool {
|
1432 + | /* ServerOperationErrorGenerator.kt:89 */
|
754 1433 | matches!(&self, GreetingWithErrorsError::FooError(_))
|
1434 + | /* ServerOperationErrorGenerator.kt:88 */
|
755 1435 | }
|
1436 + | /* ServerOperationErrorGenerator.kt:87 */
|
756 1437 | /// Returns `true` if the error kind is `GreetingWithErrorsError::InternalServerError`.
|
1438 + | /* ServerOperationErrorGenerator.kt:88 */
|
757 1439 | pub fn is_internal_server_error(&self) -> bool {
|
1440 + | /* ServerOperationErrorGenerator.kt:89 */
|
758 1441 | matches!(&self, GreetingWithErrorsError::InternalServerError(_))
|
1442 + | /* ServerOperationErrorGenerator.kt:88 */
|
759 1443 | }
|
1444 + | /* ServerOperationErrorGenerator.kt:92 */
|
760 1445 | /// Returns the error name string by matching the correct variant.
|
1446 + | /* ServerOperationErrorGenerator.kt:93 */
|
761 1447 | pub fn name(&self) -> &'static str {
|
1448 + | /* ServerOperationErrorGenerator.kt:139 */
|
762 1449 | match &self {
|
763 - | GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.name(),
|
764 - | GreetingWithErrorsError::ComplexError(_inner) => _inner.name(),
|
765 - | GreetingWithErrorsError::FooError(_inner) => _inner.name(),
|
766 - | GreetingWithErrorsError::InternalServerError(_inner) => _inner.name(),
|
1450 + | /* ServerOperationErrorGenerator.kt:142 */
|
1451 + | GreetingWithErrorsError::InvalidGreeting(_inner) =>
|
1452 + | /* ServerOperationErrorGenerator.kt:95 */
|
1453 + | {
|
1454 + | _inner.name()
|
1455 + | }
|
1456 + | ,
|
1457 + | /* ServerOperationErrorGenerator.kt:142 */
|
1458 + | GreetingWithErrorsError::ComplexError(_inner) =>
|
1459 + | /* ServerOperationErrorGenerator.kt:95 */
|
1460 + | {
|
1461 + | _inner.name()
|
767 1462 | }
|
1463 + | ,
|
1464 + | /* ServerOperationErrorGenerator.kt:142 */
|
1465 + | GreetingWithErrorsError::FooError(_inner) =>
|
1466 + | /* ServerOperationErrorGenerator.kt:95 */
|
1467 + | {
|
1468 + | _inner.name()
|
1469 + | }
|
1470 + | ,
|
1471 + | /* ServerOperationErrorGenerator.kt:142 */
|
1472 + | GreetingWithErrorsError::InternalServerError(_inner) =>
|
1473 + | /* ServerOperationErrorGenerator.kt:95 */
|
1474 + | {
|
1475 + | _inner.name()
|
1476 + | }
|
1477 + | /* ServerOperationErrorGenerator.kt:139 */
|
1478 + | }
|
1479 + | /* ServerOperationErrorGenerator.kt:93 */
|
768 1480 | }
|
1481 + | /* ServerOperationErrorGenerator.kt:83 */
|
769 1482 | }
|
1483 + | /* ServerOperationErrorGenerator.kt:100 */
|
770 1484 | impl ::std::error::Error for GreetingWithErrorsError {
|
1485 + | /* ServerOperationErrorGenerator.kt:101 */
|
771 1486 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1487 + | /* ServerOperationErrorGenerator.kt:139 */
|
772 1488 | match &self {
|
773 - | GreetingWithErrorsError::InvalidGreeting(_inner) => Some(_inner),
|
774 - | GreetingWithErrorsError::ComplexError(_inner) => Some(_inner),
|
775 - | GreetingWithErrorsError::FooError(_inner) => Some(_inner),
|
776 - | GreetingWithErrorsError::InternalServerError(_inner) => Some(_inner),
|
1489 + | /* ServerOperationErrorGenerator.kt:142 */
|
1490 + | GreetingWithErrorsError::InvalidGreeting(_inner) =>
|
1491 + | /* ServerOperationErrorGenerator.kt:103 */
|
1492 + | {
|
1493 + | Some(_inner)
|
1494 + | }
|
1495 + | ,
|
1496 + | /* ServerOperationErrorGenerator.kt:142 */
|
1497 + | GreetingWithErrorsError::ComplexError(_inner) =>
|
1498 + | /* ServerOperationErrorGenerator.kt:103 */
|
1499 + | {
|
1500 + | Some(_inner)
|
1501 + | }
|
1502 + | ,
|
1503 + | /* ServerOperationErrorGenerator.kt:142 */
|
1504 + | GreetingWithErrorsError::FooError(_inner) =>
|
1505 + | /* ServerOperationErrorGenerator.kt:103 */
|
1506 + | {
|
1507 + | Some(_inner)
|
1508 + | }
|
1509 + | ,
|
1510 + | /* ServerOperationErrorGenerator.kt:142 */
|
1511 + | GreetingWithErrorsError::InternalServerError(_inner) =>
|
1512 + | /* ServerOperationErrorGenerator.kt:103 */
|
1513 + | {
|
1514 + | Some(_inner)
|
777 1515 | }
|
1516 + | /* ServerOperationErrorGenerator.kt:139 */
|
778 1517 | }
|
1518 + | /* ServerOperationErrorGenerator.kt:101 */
|
1519 + | }
|
1520 + | /* ServerOperationErrorGenerator.kt:100 */
|
779 1521 | }
|
1522 + | /* ServerOperationErrorGenerator.kt:110 */
|
780 1523 | impl ::std::convert::From<crate::error::InvalidGreeting> for crate::error::GreetingWithErrorsError {
|
1524 + | /* ServerOperationErrorGenerator.kt:111 */
|
781 1525 | fn from(variant: crate::error::InvalidGreeting) -> crate::error::GreetingWithErrorsError {
|
1526 + | /* ServerOperationErrorGenerator.kt:112 */
|
782 1527 | Self::InvalidGreeting(variant)
|
1528 + | /* ServerOperationErrorGenerator.kt:111 */
|
783 1529 | }
|
1530 + | /* ServerOperationErrorGenerator.kt:110 */
|
784 1531 | }
|
1532 + | /* ServerOperationErrorGenerator.kt:110 */
|
785 1533 | impl ::std::convert::From<crate::error::ComplexError> for crate::error::GreetingWithErrorsError {
|
1534 + | /* ServerOperationErrorGenerator.kt:111 */
|
786 1535 | fn from(variant: crate::error::ComplexError) -> crate::error::GreetingWithErrorsError {
|
1536 + | /* ServerOperationErrorGenerator.kt:112 */
|
787 1537 | Self::ComplexError(variant)
|
1538 + | /* ServerOperationErrorGenerator.kt:111 */
|
788 1539 | }
|
1540 + | /* ServerOperationErrorGenerator.kt:110 */
|
789 1541 | }
|
1542 + | /* ServerOperationErrorGenerator.kt:110 */
|
790 1543 | impl ::std::convert::From<crate::error::FooError> for crate::error::GreetingWithErrorsError {
|
1544 + | /* ServerOperationErrorGenerator.kt:111 */
|
791 1545 | fn from(variant: crate::error::FooError) -> crate::error::GreetingWithErrorsError {
|
1546 + | /* ServerOperationErrorGenerator.kt:112 */
|
792 1547 | Self::FooError(variant)
|
1548 + | /* ServerOperationErrorGenerator.kt:111 */
|
793 1549 | }
|
1550 + | /* ServerOperationErrorGenerator.kt:110 */
|
794 1551 | }
|
1552 + | /* ServerOperationErrorGenerator.kt:110 */
|
795 1553 | impl ::std::convert::From<crate::error::InternalServerError>
|
796 1554 | for crate::error::GreetingWithErrorsError
|
797 1555 | {
|
1556 + | /* ServerOperationErrorGenerator.kt:111 */
|
798 1557 | fn from(variant: crate::error::InternalServerError) -> crate::error::GreetingWithErrorsError {
|
1558 + | /* ServerOperationErrorGenerator.kt:112 */
|
799 1559 | Self::InternalServerError(variant)
|
1560 + | /* ServerOperationErrorGenerator.kt:111 */
|
800 1561 | }
|
1562 + | /* ServerOperationErrorGenerator.kt:110 */
|
801 1563 | }
|
802 1564 |
|
1565 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
803 1566 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::GreetingWithErrorsError {
|
804 1567 | fn from(variant: ::pyo3::PyErr) -> crate::error::GreetingWithErrorsError {
|
805 1568 | ::pyo3::Python::with_gil(|py| {
|
806 1569 | let error = variant.value(py);
|
807 1570 | if let Ok(error) = error.extract::<crate::error::InvalidGreeting>() {
|
808 1571 | return error.into();
|
809 1572 | }
|
810 1573 | if let Ok(error) = error.extract::<crate::error::ComplexError>() {
|
811 1574 | return error.into();
|
812 1575 | }
|
813 1576 | if let Ok(error) = error.extract::<crate::error::FooError>() {
|
814 1577 | return error.into();
|
815 1578 | }
|
816 1579 | crate::error::InternalServerError {
|
817 1580 | message: error.to_string(),
|
818 1581 | }
|
819 1582 | .into()
|
820 1583 | })
|
821 1584 | }
|
822 1585 | }
|
823 1586 |
|
1587 + | /* RustType.kt:516 */
|
824 1588 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
1589 + | /* PythonServerStructureGenerator.kt:63 */
|
825 1590 | /// :rtype None:
|
826 - | /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
|
1591 + | /// /* 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.
|
1592 + | /* RustType.kt:516 */
|
827 1593 | #[derive(
|
828 1594 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
829 1595 | )]
|
830 - | pub struct FooError {}
|
1596 + | pub /* StructureGenerator.kt:201 */ struct FooError {/* StructureGenerator.kt:201 */}
|
1597 + | /* RustType.kt:516 */
|
831 1598 | #[allow(clippy::new_without_default)]
|
1599 + | /* RustType.kt:516 */
|
832 1600 | #[allow(clippy::too_many_arguments)]
|
1601 + | /* RustType.kt:516 */
|
833 1602 | #[::pyo3::pymethods]
|
1603 + | /* PythonServerStructureGenerator.kt:88 */
|
834 1604 | impl FooError {
|
835 1605 | #[new]
|
836 1606 | pub fn new() -> Self {
|
837 1607 | Self {}
|
838 1608 | }
|
839 1609 | fn __repr__(&self) -> String {
|
840 1610 | format!("{self:?}")
|
841 1611 | }
|
842 1612 | fn __str__(&self) -> String {
|
843 1613 | format!("{self:?}")
|
844 1614 | }
|
845 1615 | }
|
1616 + | /* ErrorImplGenerator.kt:99 */
|
846 1617 | impl FooError {
|
1618 + | /* ErrorImplGenerator.kt:141 */
|
847 1619 | #[doc(hidden)]
|
848 1620 | /// Returns the error name.
|
849 1621 | pub fn name(&self) -> &'static str {
|
850 1622 | "FooError"
|
851 1623 | }
|
1624 + | /* ErrorImplGenerator.kt:99 */
|
852 1625 | }
|
1626 + | /* ErrorImplGenerator.kt:153 */
|
853 1627 | impl ::std::fmt::Display for FooError {
|
1628 + | /* ErrorImplGenerator.kt:154 */
|
854 1629 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1630 + | /* ErrorImplGenerator.kt:161 */
|
855 1631 | ::std::write!(f, "FooError")?;
|
1632 + | /* ErrorImplGenerator.kt:171 */
|
856 1633 | Ok(())
|
1634 + | /* ErrorImplGenerator.kt:154 */
|
857 1635 | }
|
1636 + | /* ErrorImplGenerator.kt:153 */
|
858 1637 | }
|
1638 + | /* ErrorImplGenerator.kt:175 */
|
859 1639 | impl ::std::error::Error for FooError {}
|
1640 + | /* ServerCodegenVisitor.kt:370 */
|
860 1641 | impl FooError {
|
861 - | /// Creates a new builder-style object to manufacture [`FooError`](crate::error::FooError).
|
1642 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`FooError`](crate::error::FooError).
|
1643 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
862 1644 | pub fn builder() -> crate::error::foo_error::Builder {
|
1645 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
863 1646 | crate::error::foo_error::Builder::default()
|
1647 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
864 1648 | }
|
1649 + | /* ServerCodegenVisitor.kt:370 */
|
865 1650 | }
|
866 1651 |
|
1652 + | /* RustType.kt:516 */
|
867 1653 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
1654 + | /* PythonServerStructureGenerator.kt:63 */
|
868 1655 | /// :param top_level typing.Optional\[str\]:
|
869 1656 | /// :param nested typing.Optional\[json_rpc10.model.ComplexNestedErrorData\]:
|
870 1657 | /// :rtype None:
|
871 - | /// This error is thrown when a request is invalid.
|
1658 + | /// /* StructureGenerator.kt:197 */This error is thrown when a request is invalid.
|
1659 + | /* RustType.kt:516 */
|
872 1660 | #[derive(
|
873 1661 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
874 1662 | )]
|
875 - | pub struct ComplexError {
|
1663 + | pub /* StructureGenerator.kt:201 */ struct ComplexError {
|
1664 + | /* RustType.kt:516 */
|
876 1665 | #[pyo3(get, set)]
|
1666 + | /* PythonServerStructureGenerator.kt:80 */
|
877 1667 | /// :type typing.Optional\[str\]:
|
1668 + | /* StructureGenerator.kt:231 */
|
878 1669 | #[allow(missing_docs)] // documentation missing in model
|
879 1670 | pub top_level: ::std::option::Option<::std::string::String>,
|
1671 + | /* RustType.kt:516 */
|
880 1672 | #[pyo3(get, set)]
|
1673 + | /* PythonServerStructureGenerator.kt:80 */
|
881 1674 | /// :type typing.Optional\[json_rpc10.model.ComplexNestedErrorData\]:
|
1675 + | /* StructureGenerator.kt:231 */
|
882 1676 | #[allow(missing_docs)] // documentation missing in model
|
883 1677 | pub nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
|
1678 + | /* StructureGenerator.kt:201 */
|
884 1679 | }
|
1680 + | /* StructureGenerator.kt:135 */
|
885 1681 | impl ComplexError {
|
1682 + | /* StructureGenerator.kt:231 */
|
886 1683 | #[allow(missing_docs)] // documentation missing in model
|
1684 + | /* StructureGenerator.kt:166 */
|
887 1685 | pub fn top_level(&self) -> ::std::option::Option<&str> {
|
1686 + | /* StructureGenerator.kt:169 */
|
888 1687 | self.top_level.as_deref()
|
1688 + | /* StructureGenerator.kt:166 */
|
889 1689 | }
|
1690 + | /* StructureGenerator.kt:231 */
|
890 1691 | #[allow(missing_docs)] // documentation missing in model
|
1692 + | /* StructureGenerator.kt:166 */
|
891 1693 | pub fn nested(&self) -> ::std::option::Option<&crate::model::ComplexNestedErrorData> {
|
1694 + | /* StructureGenerator.kt:170 */
|
892 1695 | self.nested.as_ref()
|
1696 + | /* StructureGenerator.kt:166 */
|
893 1697 | }
|
1698 + | /* StructureGenerator.kt:135 */
|
894 1699 | }
|
1700 + | /* RustType.kt:516 */
|
895 1701 | #[allow(clippy::new_without_default)]
|
1702 + | /* RustType.kt:516 */
|
896 1703 | #[allow(clippy::too_many_arguments)]
|
1704 + | /* RustType.kt:516 */
|
897 1705 | #[::pyo3::pymethods]
|
1706 + | /* PythonServerStructureGenerator.kt:88 */
|
898 1707 | impl ComplexError {
|
899 1708 | #[new]
|
900 1709 | pub fn new(
|
901 1710 | top_level: ::std::option::Option<::std::string::String>,
|
902 1711 | nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
|
903 1712 | ) -> Self {
|
904 1713 | Self { top_level, nested }
|
905 1714 | }
|
906 1715 | fn __repr__(&self) -> String {
|
907 1716 | format!("{self:?}")
|
908 1717 | }
|
909 1718 | fn __str__(&self) -> String {
|
910 1719 | format!("{self:?}")
|
911 1720 | }
|
912 1721 | }
|
1722 + | /* ErrorImplGenerator.kt:99 */
|
913 1723 | impl ComplexError {
|
1724 + | /* ErrorImplGenerator.kt:141 */
|
914 1725 | #[doc(hidden)]
|
915 1726 | /// Returns the error name.
|
916 1727 | pub fn name(&self) -> &'static str {
|
917 1728 | "ComplexError"
|
918 1729 | }
|
1730 + | /* ErrorImplGenerator.kt:99 */
|
919 1731 | }
|
1732 + | /* ErrorImplGenerator.kt:153 */
|
920 1733 | impl ::std::fmt::Display for ComplexError {
|
1734 + | /* ErrorImplGenerator.kt:154 */
|
921 1735 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1736 + | /* ErrorImplGenerator.kt:161 */
|
922 1737 | ::std::write!(f, "ComplexError")?;
|
1738 + | /* ErrorImplGenerator.kt:171 */
|
923 1739 | Ok(())
|
1740 + | /* ErrorImplGenerator.kt:154 */
|
924 1741 | }
|
1742 + | /* ErrorImplGenerator.kt:153 */
|
925 1743 | }
|
1744 + | /* ErrorImplGenerator.kt:175 */
|
926 1745 | impl ::std::error::Error for ComplexError {}
|
1746 + | /* ServerCodegenVisitor.kt:370 */
|
927 1747 | impl ComplexError {
|
928 - | /// Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
|
1748 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
|
1749 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
929 1750 | pub fn builder() -> crate::error::complex_error::Builder {
|
1751 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
930 1752 | crate::error::complex_error::Builder::default()
|
1753 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
931 1754 | }
|
1755 + | /* ServerCodegenVisitor.kt:370 */
|
932 1756 | }
|
933 1757 |
|
1758 + | /* RustType.kt:516 */
|
934 1759 | #[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
|
1760 + | /* PythonServerStructureGenerator.kt:63 */
|
935 1761 | /// :param message typing.Optional\[str\]:
|
936 1762 | /// :rtype None:
|
937 - | /// This error is thrown when an invalid greeting value is provided.
|
1763 + | /// /* StructureGenerator.kt:197 */This error is thrown when an invalid greeting value is provided.
|
1764 + | /* RustType.kt:516 */
|
938 1765 | #[derive(
|
939 1766 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
940 1767 | )]
|
941 - | pub struct InvalidGreeting {
|
1768 + | pub /* StructureGenerator.kt:201 */ struct InvalidGreeting {
|
1769 + | /* RustType.kt:516 */
|
942 1770 | #[pyo3(get, set)]
|
1771 + | /* PythonServerStructureGenerator.kt:80 */
|
943 1772 | /// :type typing.Optional\[str\]:
|
1773 + | /* StructureGenerator.kt:231 */
|
944 1774 | #[allow(missing_docs)] // documentation missing in model
|
945 1775 | pub message: ::std::option::Option<::std::string::String>,
|
1776 + | /* StructureGenerator.kt:201 */
|
946 1777 | }
|
1778 + | /* RustType.kt:516 */
|
947 1779 | #[allow(clippy::new_without_default)]
|
1780 + | /* RustType.kt:516 */
|
948 1781 | #[allow(clippy::too_many_arguments)]
|
1782 + | /* RustType.kt:516 */
|
949 1783 | #[::pyo3::pymethods]
|
1784 + | /* PythonServerStructureGenerator.kt:88 */
|
950 1785 | impl InvalidGreeting {
|
951 1786 | #[new]
|
952 1787 | pub fn new(message: ::std::option::Option<::std::string::String>) -> Self {
|
953 1788 | Self { message }
|
954 1789 | }
|
955 1790 | fn __repr__(&self) -> String {
|
956 1791 | format!("{self:?}")
|
957 1792 | }
|
958 1793 | fn __str__(&self) -> String {
|
959 1794 | format!("{self:?}")
|
960 1795 | }
|
961 1796 | }
|
1797 + | /* ErrorImplGenerator.kt:99 */
|
962 1798 | impl InvalidGreeting {
|
1799 + | /* ErrorImplGenerator.kt:128 */
|
963 1800 | /// Returns the error message.
|
964 1801 | pub fn message(&self) -> ::std::option::Option<&str> {
|
965 1802 | self.message.as_deref()
|
966 1803 | }
|
1804 + | /* ErrorImplGenerator.kt:141 */
|
967 1805 | #[doc(hidden)]
|
968 1806 | /// Returns the error name.
|
969 1807 | pub fn name(&self) -> &'static str {
|
970 1808 | "InvalidGreeting"
|
971 1809 | }
|
1810 + | /* ErrorImplGenerator.kt:99 */
|
972 1811 | }
|
1812 + | /* ErrorImplGenerator.kt:153 */
|
973 1813 | impl ::std::fmt::Display for InvalidGreeting {
|
1814 + | /* ErrorImplGenerator.kt:154 */
|
974 1815 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1816 + | /* ErrorImplGenerator.kt:161 */
|
975 1817 | ::std::write!(f, "InvalidGreeting")?;
|
1818 + | /* ErrorImplGenerator.kt:166 */
|
976 1819 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
1820 + | /* ErrorImplGenerator.kt:166 */
|
977 1821 | {
|
1822 + | /* ErrorImplGenerator.kt:167 */
|
978 1823 | ::std::write!(f, ": {}", inner_1)?;
|
1824 + | /* ErrorImplGenerator.kt:166 */
|
979 1825 | }
|
1826 + | /* ErrorImplGenerator.kt:166 */
|
980 1827 | }
|
1828 + | /* ErrorImplGenerator.kt:171 */
|
981 1829 | Ok(())
|
1830 + | /* ErrorImplGenerator.kt:154 */
|
982 1831 | }
|
1832 + | /* ErrorImplGenerator.kt:153 */
|
983 1833 | }
|
1834 + | /* ErrorImplGenerator.kt:175 */
|
984 1835 | impl ::std::error::Error for InvalidGreeting {}
|
1836 + | /* ServerCodegenVisitor.kt:370 */
|
985 1837 | impl InvalidGreeting {
|
986 - | /// Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::error::InvalidGreeting).
|
1838 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::error::InvalidGreeting).
|
1839 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
987 1840 | pub fn builder() -> crate::error::invalid_greeting::Builder {
|
1841 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
988 1842 | crate::error::invalid_greeting::Builder::default()
|
1843 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
989 1844 | }
|
1845 + | /* ServerCodegenVisitor.kt:370 */
|
990 1846 | }
|
991 1847 |
|
1848 + | /* ServerOperationErrorGenerator.kt:63 */
|
992 1849 | /// Error type for the `SimpleScalarProperties` operation.
|
1850 + | /* ServerOperationErrorGenerator.kt:64 */
|
993 1851 | /// Each variant represents an error that can occur for the `SimpleScalarProperties` operation.
|
1852 + | /* RustType.kt:516 */
|
994 1853 | #[derive(::std::fmt::Debug)]
|
995 - | pub enum SimpleScalarPropertiesError {
|
1854 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum SimpleScalarPropertiesError {
|
1855 + | /* ServerOperationErrorGenerator.kt:68 */
|
996 1856 | #[allow(missing_docs)] // documentation missing in model
|
1857 + | /* ServerOperationErrorGenerator.kt:71 */
|
997 1858 | InternalServerError(crate::error::InternalServerError),
|
1859 + | /* ServerOperationErrorGenerator.kt:66 */
|
998 1860 | }
|
1861 + | /* ServerOperationErrorGenerator.kt:75 */
|
999 1862 | impl ::std::fmt::Display for SimpleScalarPropertiesError {
|
1863 + | /* ServerOperationErrorGenerator.kt:76 */
|
1000 1864 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1865 + | /* ServerOperationErrorGenerator.kt:139 */
|
1001 1866 | match &self {
|
1002 - | SimpleScalarPropertiesError::InternalServerError(_inner) => _inner.fmt(f),
|
1867 + | /* ServerOperationErrorGenerator.kt:142 */
|
1868 + | SimpleScalarPropertiesError::InternalServerError(_inner) =>
|
1869 + | /* ServerOperationErrorGenerator.kt:78 */
|
1870 + | {
|
1871 + | _inner.fmt(f)
|
1003 1872 | }
|
1873 + | /* ServerOperationErrorGenerator.kt:139 */
|
1004 1874 | }
|
1875 + | /* ServerOperationErrorGenerator.kt:76 */
|
1876 + | }
|
1877 + | /* ServerOperationErrorGenerator.kt:75 */
|
1005 1878 | }
|
1879 + | /* ServerOperationErrorGenerator.kt:83 */
|
1006 1880 | impl SimpleScalarPropertiesError {
|
1881 + | /* ServerOperationErrorGenerator.kt:87 */
|
1007 1882 | /// Returns `true` if the error kind is `SimpleScalarPropertiesError::InternalServerError`.
|
1883 + | /* ServerOperationErrorGenerator.kt:88 */
|
1008 1884 | pub fn is_internal_server_error(&self) -> bool {
|
1885 + | /* ServerOperationErrorGenerator.kt:89 */
|
1009 1886 | matches!(&self, SimpleScalarPropertiesError::InternalServerError(_))
|
1887 + | /* ServerOperationErrorGenerator.kt:88 */
|
1010 1888 | }
|
1889 + | /* ServerOperationErrorGenerator.kt:92 */
|
1011 1890 | /// Returns the error name string by matching the correct variant.
|
1891 + | /* ServerOperationErrorGenerator.kt:93 */
|
1012 1892 | pub fn name(&self) -> &'static str {
|
1893 + | /* ServerOperationErrorGenerator.kt:139 */
|
1013 1894 | match &self {
|
1014 - | SimpleScalarPropertiesError::InternalServerError(_inner) => _inner.name(),
|
1895 + | /* ServerOperationErrorGenerator.kt:142 */
|
1896 + | SimpleScalarPropertiesError::InternalServerError(_inner) =>
|
1897 + | /* ServerOperationErrorGenerator.kt:95 */
|
1898 + | {
|
1899 + | _inner.name()
|
1015 1900 | }
|
1901 + | /* ServerOperationErrorGenerator.kt:139 */
|
1016 1902 | }
|
1903 + | /* ServerOperationErrorGenerator.kt:93 */
|
1904 + | }
|
1905 + | /* ServerOperationErrorGenerator.kt:83 */
|
1017 1906 | }
|
1907 + | /* ServerOperationErrorGenerator.kt:100 */
|
1018 1908 | impl ::std::error::Error for SimpleScalarPropertiesError {
|
1909 + | /* ServerOperationErrorGenerator.kt:101 */
|
1019 1910 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
1911 + | /* ServerOperationErrorGenerator.kt:139 */
|
1020 1912 | match &self {
|
1021 - | SimpleScalarPropertiesError::InternalServerError(_inner) => Some(_inner),
|
1913 + | /* ServerOperationErrorGenerator.kt:142 */
|
1914 + | SimpleScalarPropertiesError::InternalServerError(_inner) =>
|
1915 + | /* ServerOperationErrorGenerator.kt:103 */
|
1916 + | {
|
1917 + | Some(_inner)
|
1022 1918 | }
|
1919 + | /* ServerOperationErrorGenerator.kt:139 */
|
1023 1920 | }
|
1921 + | /* ServerOperationErrorGenerator.kt:101 */
|
1922 + | }
|
1923 + | /* ServerOperationErrorGenerator.kt:100 */
|
1024 1924 | }
|
1925 + | /* ServerOperationErrorGenerator.kt:110 */
|
1025 1926 | impl ::std::convert::From<crate::error::InternalServerError>
|
1026 1927 | for crate::error::SimpleScalarPropertiesError
|
1027 1928 | {
|
1929 + | /* ServerOperationErrorGenerator.kt:111 */
|
1028 1930 | fn from(
|
1029 1931 | variant: crate::error::InternalServerError,
|
1030 1932 | ) -> crate::error::SimpleScalarPropertiesError {
|
1933 + | /* ServerOperationErrorGenerator.kt:112 */
|
1031 1934 | Self::InternalServerError(variant)
|
1935 + | /* ServerOperationErrorGenerator.kt:111 */
|
1032 1936 | }
|
1937 + | /* ServerOperationErrorGenerator.kt:110 */
|
1033 1938 | }
|
1034 1939 |
|
1940 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
1035 1941 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::SimpleScalarPropertiesError {
|
1036 1942 | fn from(variant: ::pyo3::PyErr) -> crate::error::SimpleScalarPropertiesError {
|
1037 1943 | ::pyo3::Python::with_gil(|py| {
|
1038 1944 | let error = variant.value(py);
|
1039 1945 |
|
1040 1946 | crate::error::InternalServerError {
|
1041 1947 | message: error.to_string(),
|
1042 1948 | }
|
1043 1949 | .into()
|
1044 1950 | })
|
1045 1951 | }
|
1046 1952 | }
|
1047 1953 |
|
1954 + | /* ServerOperationErrorGenerator.kt:63 */
|
1048 1955 | /// Error type for the `EmptyInputAndEmptyOutput` operation.
|
1956 + | /* ServerOperationErrorGenerator.kt:64 */
|
1049 1957 | /// Each variant represents an error that can occur for the `EmptyInputAndEmptyOutput` operation.
|
1958 + | /* RustType.kt:516 */
|
1050 1959 | #[derive(::std::fmt::Debug)]
|
1051 - | pub enum EmptyInputAndEmptyOutputError {
|
1960 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum EmptyInputAndEmptyOutputError {
|
1961 + | /* ServerOperationErrorGenerator.kt:68 */
|
1052 1962 | #[allow(missing_docs)] // documentation missing in model
|
1963 + | /* ServerOperationErrorGenerator.kt:71 */
|
1053 1964 | InternalServerError(crate::error::InternalServerError),
|
1965 + | /* ServerOperationErrorGenerator.kt:66 */
|
1054 1966 | }
|
1967 + | /* ServerOperationErrorGenerator.kt:75 */
|
1055 1968 | impl ::std::fmt::Display for EmptyInputAndEmptyOutputError {
|
1969 + | /* ServerOperationErrorGenerator.kt:76 */
|
1056 1970 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1971 + | /* ServerOperationErrorGenerator.kt:139 */
|
1057 1972 | match &self {
|
1058 - | EmptyInputAndEmptyOutputError::InternalServerError(_inner) => _inner.fmt(f),
|
1973 + | /* ServerOperationErrorGenerator.kt:142 */
|
1974 + | EmptyInputAndEmptyOutputError::InternalServerError(_inner) =>
|
1975 + | /* ServerOperationErrorGenerator.kt:78 */
|
1976 + | {
|
1977 + | _inner.fmt(f)
|
1978 + | }
|
1979 + | /* ServerOperationErrorGenerator.kt:139 */
|
1059 1980 | }
|
1981 + | /* ServerOperationErrorGenerator.kt:76 */
|
1060 1982 | }
|
1983 + | /* ServerOperationErrorGenerator.kt:75 */
|
1061 1984 | }
|
1985 + | /* ServerOperationErrorGenerator.kt:83 */
|
1062 1986 | impl EmptyInputAndEmptyOutputError {
|
1987 + | /* ServerOperationErrorGenerator.kt:87 */
|
1063 1988 | /// Returns `true` if the error kind is `EmptyInputAndEmptyOutputError::InternalServerError`.
|
1989 + | /* ServerOperationErrorGenerator.kt:88 */
|
1064 1990 | pub fn is_internal_server_error(&self) -> bool {
|
1991 + | /* ServerOperationErrorGenerator.kt:89 */
|
1065 1992 | matches!(&self, EmptyInputAndEmptyOutputError::InternalServerError(_))
|
1993 + | /* ServerOperationErrorGenerator.kt:88 */
|
1066 1994 | }
|
1995 + | /* ServerOperationErrorGenerator.kt:92 */
|
1067 1996 | /// Returns the error name string by matching the correct variant.
|
1997 + | /* ServerOperationErrorGenerator.kt:93 */
|
1068 1998 | pub fn name(&self) -> &'static str {
|
1999 + | /* ServerOperationErrorGenerator.kt:139 */
|
1069 2000 | match &self {
|
1070 - | EmptyInputAndEmptyOutputError::InternalServerError(_inner) => _inner.name(),
|
2001 + | /* ServerOperationErrorGenerator.kt:142 */
|
2002 + | EmptyInputAndEmptyOutputError::InternalServerError(_inner) =>
|
2003 + | /* ServerOperationErrorGenerator.kt:95 */
|
2004 + | {
|
2005 + | _inner.name()
|
2006 + | }
|
2007 + | /* ServerOperationErrorGenerator.kt:139 */
|
1071 2008 | }
|
2009 + | /* ServerOperationErrorGenerator.kt:93 */
|
1072 2010 | }
|
2011 + | /* ServerOperationErrorGenerator.kt:83 */
|
1073 2012 | }
|
2013 + | /* ServerOperationErrorGenerator.kt:100 */
|
1074 2014 | impl ::std::error::Error for EmptyInputAndEmptyOutputError {
|
2015 + | /* ServerOperationErrorGenerator.kt:101 */
|
1075 2016 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
2017 + | /* ServerOperationErrorGenerator.kt:139 */
|
1076 2018 | match &self {
|
1077 - | EmptyInputAndEmptyOutputError::InternalServerError(_inner) => Some(_inner),
|
2019 + | /* ServerOperationErrorGenerator.kt:142 */
|
2020 + | EmptyInputAndEmptyOutputError::InternalServerError(_inner) =>
|
2021 + | /* ServerOperationErrorGenerator.kt:103 */
|
2022 + | {
|
2023 + | Some(_inner)
|
2024 + | }
|
2025 + | /* ServerOperationErrorGenerator.kt:139 */
|
1078 2026 | }
|
2027 + | /* ServerOperationErrorGenerator.kt:101 */
|
1079 2028 | }
|
2029 + | /* ServerOperationErrorGenerator.kt:100 */
|
1080 2030 | }
|
2031 + | /* ServerOperationErrorGenerator.kt:110 */
|
1081 2032 | impl ::std::convert::From<crate::error::InternalServerError>
|
1082 2033 | for crate::error::EmptyInputAndEmptyOutputError
|
1083 2034 | {
|
2035 + | /* ServerOperationErrorGenerator.kt:111 */
|
1084 2036 | fn from(
|
1085 2037 | variant: crate::error::InternalServerError,
|
1086 2038 | ) -> crate::error::EmptyInputAndEmptyOutputError {
|
2039 + | /* ServerOperationErrorGenerator.kt:112 */
|
1087 2040 | Self::InternalServerError(variant)
|
2041 + | /* ServerOperationErrorGenerator.kt:111 */
|
1088 2042 | }
|
2043 + | /* ServerOperationErrorGenerator.kt:110 */
|
1089 2044 | }
|
1090 2045 |
|
2046 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
1091 2047 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::EmptyInputAndEmptyOutputError {
|
1092 2048 | fn from(variant: ::pyo3::PyErr) -> crate::error::EmptyInputAndEmptyOutputError {
|
1093 2049 | ::pyo3::Python::with_gil(|py| {
|
1094 2050 | let error = variant.value(py);
|
1095 2051 |
|
1096 2052 | crate::error::InternalServerError {
|
1097 2053 | message: error.to_string(),
|
1098 2054 | }
|
1099 2055 | .into()
|
1100 2056 | })
|
1101 2057 | }
|
1102 2058 | }
|
1103 2059 |
|
2060 + | /* ServerOperationErrorGenerator.kt:63 */
|
1104 2061 | /// Error type for the `NoInputAndOutput` operation.
|
2062 + | /* ServerOperationErrorGenerator.kt:64 */
|
1105 2063 | /// Each variant represents an error that can occur for the `NoInputAndOutput` operation.
|
2064 + | /* RustType.kt:516 */
|
1106 2065 | #[derive(::std::fmt::Debug)]
|
1107 - | pub enum NoInputAndOutputError {
|
2066 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum NoInputAndOutputError {
|
2067 + | /* ServerOperationErrorGenerator.kt:68 */
|
1108 2068 | #[allow(missing_docs)] // documentation missing in model
|
2069 + | /* ServerOperationErrorGenerator.kt:71 */
|
1109 2070 | InternalServerError(crate::error::InternalServerError),
|
2071 + | /* ServerOperationErrorGenerator.kt:66 */
|
1110 2072 | }
|
2073 + | /* ServerOperationErrorGenerator.kt:75 */
|
1111 2074 | impl ::std::fmt::Display for NoInputAndOutputError {
|
2075 + | /* ServerOperationErrorGenerator.kt:76 */
|
1112 2076 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2077 + | /* ServerOperationErrorGenerator.kt:139 */
|
1113 2078 | match &self {
|
1114 - | NoInputAndOutputError::InternalServerError(_inner) => _inner.fmt(f),
|
2079 + | /* ServerOperationErrorGenerator.kt:142 */
|
2080 + | NoInputAndOutputError::InternalServerError(_inner) =>
|
2081 + | /* ServerOperationErrorGenerator.kt:78 */
|
2082 + | {
|
2083 + | _inner.fmt(f)
|
2084 + | }
|
2085 + | /* ServerOperationErrorGenerator.kt:139 */
|
1115 2086 | }
|
2087 + | /* ServerOperationErrorGenerator.kt:76 */
|
1116 2088 | }
|
2089 + | /* ServerOperationErrorGenerator.kt:75 */
|
1117 2090 | }
|
2091 + | /* ServerOperationErrorGenerator.kt:83 */
|
1118 2092 | impl NoInputAndOutputError {
|
2093 + | /* ServerOperationErrorGenerator.kt:87 */
|
1119 2094 | /// Returns `true` if the error kind is `NoInputAndOutputError::InternalServerError`.
|
2095 + | /* ServerOperationErrorGenerator.kt:88 */
|
1120 2096 | pub fn is_internal_server_error(&self) -> bool {
|
2097 + | /* ServerOperationErrorGenerator.kt:89 */
|
1121 2098 | matches!(&self, NoInputAndOutputError::InternalServerError(_))
|
2099 + | /* ServerOperationErrorGenerator.kt:88 */
|
1122 2100 | }
|
2101 + | /* ServerOperationErrorGenerator.kt:92 */
|
1123 2102 | /// Returns the error name string by matching the correct variant.
|
2103 + | /* ServerOperationErrorGenerator.kt:93 */
|
1124 2104 | pub fn name(&self) -> &'static str {
|
2105 + | /* ServerOperationErrorGenerator.kt:139 */
|
1125 2106 | match &self {
|
1126 - | NoInputAndOutputError::InternalServerError(_inner) => _inner.name(),
|
2107 + | /* ServerOperationErrorGenerator.kt:142 */
|
2108 + | NoInputAndOutputError::InternalServerError(_inner) =>
|
2109 + | /* ServerOperationErrorGenerator.kt:95 */
|
2110 + | {
|
2111 + | _inner.name()
|
2112 + | }
|
2113 + | /* ServerOperationErrorGenerator.kt:139 */
|
1127 2114 | }
|
2115 + | /* ServerOperationErrorGenerator.kt:93 */
|
1128 2116 | }
|
2117 + | /* ServerOperationErrorGenerator.kt:83 */
|
1129 2118 | }
|
2119 + | /* ServerOperationErrorGenerator.kt:100 */
|
1130 2120 | impl ::std::error::Error for NoInputAndOutputError {
|
2121 + | /* ServerOperationErrorGenerator.kt:101 */
|
1131 2122 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
2123 + | /* ServerOperationErrorGenerator.kt:139 */
|
1132 2124 | match &self {
|
1133 - | NoInputAndOutputError::InternalServerError(_inner) => Some(_inner),
|
2125 + | /* ServerOperationErrorGenerator.kt:142 */
|
2126 + | NoInputAndOutputError::InternalServerError(_inner) =>
|
2127 + | /* ServerOperationErrorGenerator.kt:103 */
|
2128 + | {
|
2129 + | Some(_inner)
|
1134 2130 | }
|
2131 + | /* ServerOperationErrorGenerator.kt:139 */
|
1135 2132 | }
|
2133 + | /* ServerOperationErrorGenerator.kt:101 */
|
2134 + | }
|
2135 + | /* ServerOperationErrorGenerator.kt:100 */
|
1136 2136 | }
|
2137 + | /* ServerOperationErrorGenerator.kt:110 */
|
1137 2138 | impl ::std::convert::From<crate::error::InternalServerError>
|
1138 2139 | for crate::error::NoInputAndOutputError
|
1139 2140 | {
|
2141 + | /* ServerOperationErrorGenerator.kt:111 */
|
1140 2142 | fn from(variant: crate::error::InternalServerError) -> crate::error::NoInputAndOutputError {
|
2143 + | /* ServerOperationErrorGenerator.kt:112 */
|
1141 2144 | Self::InternalServerError(variant)
|
2145 + | /* ServerOperationErrorGenerator.kt:111 */
|
1142 2146 | }
|
2147 + | /* ServerOperationErrorGenerator.kt:110 */
|
1143 2148 | }
|
1144 2149 |
|
2150 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
1145 2151 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::NoInputAndOutputError {
|
1146 2152 | fn from(variant: ::pyo3::PyErr) -> crate::error::NoInputAndOutputError {
|
1147 2153 | ::pyo3::Python::with_gil(|py| {
|
1148 2154 | let error = variant.value(py);
|
1149 2155 |
|
1150 2156 | crate::error::InternalServerError {
|
1151 2157 | message: error.to_string(),
|
1152 2158 | }
|
1153 2159 | .into()
|
1154 2160 | })
|
1155 2161 | }
|
1156 2162 | }
|
1157 2163 |
|
2164 + | /* ServerOperationErrorGenerator.kt:63 */
|
1158 2165 | /// Error type for the `NoInputAndNoOutput` operation.
|
2166 + | /* ServerOperationErrorGenerator.kt:64 */
|
1159 2167 | /// Each variant represents an error that can occur for the `NoInputAndNoOutput` operation.
|
2168 + | /* RustType.kt:516 */
|
1160 2169 | #[derive(::std::fmt::Debug)]
|
1161 - | pub enum NoInputAndNoOutputError {
|
2170 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum NoInputAndNoOutputError {
|
2171 + | /* ServerOperationErrorGenerator.kt:68 */
|
1162 2172 | #[allow(missing_docs)] // documentation missing in model
|
2173 + | /* ServerOperationErrorGenerator.kt:71 */
|
1163 2174 | InternalServerError(crate::error::InternalServerError),
|
2175 + | /* ServerOperationErrorGenerator.kt:66 */
|
1164 2176 | }
|
2177 + | /* ServerOperationErrorGenerator.kt:75 */
|
1165 2178 | impl ::std::fmt::Display for NoInputAndNoOutputError {
|
2179 + | /* ServerOperationErrorGenerator.kt:76 */
|
1166 2180 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2181 + | /* ServerOperationErrorGenerator.kt:139 */
|
1167 2182 | match &self {
|
1168 - | NoInputAndNoOutputError::InternalServerError(_inner) => _inner.fmt(f),
|
2183 + | /* ServerOperationErrorGenerator.kt:142 */
|
2184 + | NoInputAndNoOutputError::InternalServerError(_inner) =>
|
2185 + | /* ServerOperationErrorGenerator.kt:78 */
|
2186 + | {
|
2187 + | _inner.fmt(f)
|
1169 2188 | }
|
2189 + | /* ServerOperationErrorGenerator.kt:139 */
|
1170 2190 | }
|
2191 + | /* ServerOperationErrorGenerator.kt:76 */
|
2192 + | }
|
2193 + | /* ServerOperationErrorGenerator.kt:75 */
|
1171 2194 | }
|
2195 + | /* ServerOperationErrorGenerator.kt:83 */
|
1172 2196 | impl NoInputAndNoOutputError {
|
2197 + | /* ServerOperationErrorGenerator.kt:87 */
|
1173 2198 | /// Returns `true` if the error kind is `NoInputAndNoOutputError::InternalServerError`.
|
2199 + | /* ServerOperationErrorGenerator.kt:88 */
|
1174 2200 | pub fn is_internal_server_error(&self) -> bool {
|
2201 + | /* ServerOperationErrorGenerator.kt:89 */
|
1175 2202 | matches!(&self, NoInputAndNoOutputError::InternalServerError(_))
|
2203 + | /* ServerOperationErrorGenerator.kt:88 */
|
1176 2204 | }
|
2205 + | /* ServerOperationErrorGenerator.kt:92 */
|
1177 2206 | /// Returns the error name string by matching the correct variant.
|
2207 + | /* ServerOperationErrorGenerator.kt:93 */
|
1178 2208 | pub fn name(&self) -> &'static str {
|
2209 + | /* ServerOperationErrorGenerator.kt:139 */
|
1179 2210 | match &self {
|
1180 - | NoInputAndNoOutputError::InternalServerError(_inner) => _inner.name(),
|
2211 + | /* ServerOperationErrorGenerator.kt:142 */
|
2212 + | NoInputAndNoOutputError::InternalServerError(_inner) =>
|
2213 + | /* ServerOperationErrorGenerator.kt:95 */
|
2214 + | {
|
2215 + | _inner.name()
|
1181 2216 | }
|
2217 + | /* ServerOperationErrorGenerator.kt:139 */
|
1182 2218 | }
|
2219 + | /* ServerOperationErrorGenerator.kt:93 */
|
2220 + | }
|
2221 + | /* ServerOperationErrorGenerator.kt:83 */
|
1183 2222 | }
|
2223 + | /* ServerOperationErrorGenerator.kt:100 */
|
1184 2224 | impl ::std::error::Error for NoInputAndNoOutputError {
|
2225 + | /* ServerOperationErrorGenerator.kt:101 */
|
1185 2226 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
2227 + | /* ServerOperationErrorGenerator.kt:139 */
|
1186 2228 | match &self {
|
1187 - | NoInputAndNoOutputError::InternalServerError(_inner) => Some(_inner),
|
2229 + | /* ServerOperationErrorGenerator.kt:142 */
|
2230 + | NoInputAndNoOutputError::InternalServerError(_inner) =>
|
2231 + | /* ServerOperationErrorGenerator.kt:103 */
|
2232 + | {
|
2233 + | Some(_inner)
|
1188 2234 | }
|
2235 + | /* ServerOperationErrorGenerator.kt:139 */
|
1189 2236 | }
|
2237 + | /* ServerOperationErrorGenerator.kt:101 */
|
2238 + | }
|
2239 + | /* ServerOperationErrorGenerator.kt:100 */
|
1190 2240 | }
|
2241 + | /* ServerOperationErrorGenerator.kt:110 */
|
1191 2242 | impl ::std::convert::From<crate::error::InternalServerError>
|
1192 2243 | for crate::error::NoInputAndNoOutputError
|
1193 2244 | {
|
2245 + | /* ServerOperationErrorGenerator.kt:111 */
|
1194 2246 | fn from(variant: crate::error::InternalServerError) -> crate::error::NoInputAndNoOutputError {
|
2247 + | /* ServerOperationErrorGenerator.kt:112 */
|
1195 2248 | Self::InternalServerError(variant)
|
2249 + | /* ServerOperationErrorGenerator.kt:111 */
|
1196 2250 | }
|
2251 + | /* ServerOperationErrorGenerator.kt:110 */
|
1197 2252 | }
|
1198 2253 |
|
2254 + | /* PythonServerOperationErrorGenerator.kt:38 */
|
1199 2255 | impl ::std::convert::From<::pyo3::PyErr> for crate::error::NoInputAndNoOutputError {
|
1200 2256 | fn from(variant: ::pyo3::PyErr) -> crate::error::NoInputAndNoOutputError {
|
1201 2257 | ::pyo3::Python::with_gil(|py| {
|
1202 2258 | let error = variant.value(py);
|
1203 2259 |
|
1204 2260 | crate::error::InternalServerError {
|
1205 2261 | message: error.to_string(),
|
1206 2262 | }
|
1207 2263 | .into()
|
1208 2264 | })
|
1209 2265 | }
|
1210 2266 | }
|
1211 - | /// See [`InternalServerError`](crate::error::InternalServerError).
|
2267 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`InternalServerError`](crate::error::InternalServerError).
|
1212 2268 | pub mod internal_server_error {
|
1213 2269 |
|
2270 + | /* RustType.kt:516 */
|
1214 2271 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1215 - | /// Holds one variant for each of the ways the builder can fail.
|
1216 - |
|
2272 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2273 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1217 2274 | #[allow(clippy::enum_variant_names)]
|
1218 2275 | pub enum ConstraintViolation {
|
1219 - | /// `message` was not provided but it is required when building `InternalServerError`.
|
2276 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `InternalServerError`.
|
2277 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1220 2278 | MissingMessage,
|
2279 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1221 2280 | }
|
2281 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1222 2282 | impl ::std::fmt::Display for ConstraintViolation {
|
2283 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1223 2284 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2285 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1224 2286 | match self {
|
1225 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
|
1226 - | }
|
2287 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
|
2288 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2289 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1227 2290 | }
|
2291 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1228 2292 | }
|
2293 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1229 2294 | impl ::std::error::Error for ConstraintViolation {}
|
2295 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1230 2296 | impl ::std::convert::TryFrom<Builder> for crate::error::InternalServerError {
|
1231 2297 | type Error = ConstraintViolation;
|
1232 2298 |
|
1233 2299 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1234 2300 | builder.build()
|
1235 2301 | }
|
1236 2302 | }
|
1237 - | /// A builder for [`InternalServerError`](crate::error::InternalServerError).
|
2303 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`InternalServerError`](crate::error::InternalServerError).
|
2304 + | /* RustType.kt:516 */
|
1238 2305 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2306 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1239 2307 | pub struct Builder {
|
2308 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1240 2309 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2310 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1241 2311 | }
|
2312 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1242 2313 | impl Builder {
|
2314 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1243 2315 | #[allow(missing_docs)] // documentation missing in model
|
2316 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1244 2317 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1245 - | self.message = Some(input);
|
2318 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2319 + | self.message =
|
2320 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2321 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2322 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2323 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1246 2324 | self
|
2325 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1247 2326 | }
|
1248 - | /// Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
|
1249 - | ///
|
2327 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
|
2328 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1250 2329 | /// The builder fails to construct a [`InternalServerError`](crate::error::InternalServerError) if you do not provide a value for all non-`Option`al members.
|
1251 2330 | ///
|
2331 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1252 2332 | pub fn build(self) -> Result<crate::error::InternalServerError, ConstraintViolation> {
|
1253 2333 | self.build_enforcing_required_and_enum_traits()
|
1254 2334 | }
|
2335 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1255 2336 | fn build_enforcing_required_and_enum_traits(
|
1256 2337 | self,
|
1257 2338 | ) -> Result<crate::error::InternalServerError, ConstraintViolation> {
|
1258 - | Ok(crate::error::InternalServerError {
|
1259 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
1260 - | })
|
2339 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2340 + | Ok(
|
2341 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2342 + | crate::error::InternalServerError {
|
2343 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2344 + | message: self
|
2345 + | .message
|
2346 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2347 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
2348 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2349 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2350 + | )
|
2351 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1261 2352 | }
|
2353 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1262 2354 | }
|
2355 + |
|
2356 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1263 2357 | }
|
1264 - | /// See [`ValidationException`](crate::error::ValidationException).
|
2358 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ValidationException`](crate::error::ValidationException).
|
1265 2359 | pub mod validation_exception {
|
1266 2360 |
|
2361 + | /* RustType.kt:516 */
|
1267 2362 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1268 - | /// Holds one variant for each of the ways the builder can fail.
|
1269 - |
|
2363 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2364 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1270 2365 | #[allow(clippy::enum_variant_names)]
|
1271 2366 | pub enum ConstraintViolation {
|
1272 - | /// `message` was not provided but it is required when building `ValidationException`.
|
2367 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
|
2368 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1273 2369 | MissingMessage,
|
2370 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1274 2371 | }
|
2372 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1275 2373 | impl ::std::fmt::Display for ConstraintViolation {
|
2374 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1276 2375 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2376 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1277 2377 | match self {
|
1278 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
1279 - | }
|
2378 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
2379 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2380 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1280 2381 | }
|
2382 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1281 2383 | }
|
2384 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1282 2385 | impl ::std::error::Error for ConstraintViolation {}
|
2386 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1283 2387 | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
1284 2388 | type Error = ConstraintViolation;
|
1285 2389 |
|
1286 2390 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1287 2391 | builder.build()
|
1288 2392 | }
|
1289 2393 | }
|
1290 - | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
2394 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ValidationException`](crate::error::ValidationException).
|
2395 + | /* RustType.kt:516 */
|
1291 2396 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2397 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1292 2398 | pub struct Builder {
|
2399 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1293 2400 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2401 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1294 2402 | pub(crate) field_list:
|
1295 2403 | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
2404 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1296 2405 | }
|
2406 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1297 2407 | impl Builder {
|
1298 - | /// A summary of the validation failure.
|
2408 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A summary of the validation failure.
|
2409 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1299 2410 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1300 - | self.message = Some(input);
|
2411 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2412 + | self.message =
|
2413 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2414 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2415 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2416 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1301 2417 | self
|
2418 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1302 2419 | }
|
1303 - | /// 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.
|
2420 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */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.
|
2421 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1304 2422 | pub fn field_list(
|
1305 2423 | mut self,
|
1306 2424 | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
1307 2425 | ) -> Self {
|
1308 - | self.field_list = input;
|
2426 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2427 + | self.field_list =
|
2428 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2429 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1309 2430 | self
|
2431 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1310 2432 | }
|
1311 - | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
1312 - | ///
|
2433 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
2434 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1313 2435 | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
|
1314 2436 | ///
|
2437 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1315 2438 | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
1316 2439 | self.build_enforcing_required_and_enum_traits()
|
1317 2440 | }
|
2441 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1318 2442 | fn build_enforcing_required_and_enum_traits(
|
1319 2443 | self,
|
1320 2444 | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
1321 - | Ok(crate::error::ValidationException {
|
1322 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
2445 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2446 + | Ok(
|
2447 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2448 + | crate::error::ValidationException {
|
2449 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2450 + | message: self
|
2451 + | .message
|
2452 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2453 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
2454 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
1323 2455 | field_list: self.field_list,
|
1324 - | })
|
2456 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2457 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2458 + | )
|
2459 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1325 2460 | }
|
2461 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1326 2462 | }
|
2463 + |
|
2464 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1327 2465 | }
|
1328 - | /// See [`FooError`](crate::error::FooError).
|
2466 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`FooError`](crate::error::FooError).
|
1329 2467 | pub mod foo_error {
|
1330 2468 |
|
2469 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1331 2470 | impl ::std::convert::From<Builder> for crate::error::FooError {
|
1332 2471 | fn from(builder: Builder) -> Self {
|
1333 2472 | builder.build()
|
1334 2473 | }
|
1335 2474 | }
|
1336 - | /// A builder for [`FooError`](crate::error::FooError).
|
2475 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`FooError`](crate::error::FooError).
|
2476 + | /* RustType.kt:516 */
|
1337 2477 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1338 - | pub struct Builder {}
|
2478 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2479 + | pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
|
2480 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1339 2481 | impl Builder {
|
1340 - | /// Consumes the builder and constructs a [`FooError`](crate::error::FooError).
|
2482 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`FooError`](crate::error::FooError).
|
2483 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1341 2484 | pub fn build(self) -> crate::error::FooError {
|
1342 2485 | self.build_enforcing_required_and_enum_traits()
|
1343 2486 | }
|
2487 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1344 2488 | fn build_enforcing_required_and_enum_traits(self) -> crate::error::FooError {
|
1345 - | crate::error::FooError {}
|
2489 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2490 + | crate::error::FooError {
|
2491 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
|
2492 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1346 2493 | }
|
2494 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1347 2495 | }
|
2496 + |
|
2497 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1348 2498 | }
|
1349 - | /// See [`ComplexError`](crate::error::ComplexError).
|
2499 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ComplexError`](crate::error::ComplexError).
|
1350 2500 | pub mod complex_error {
|
1351 2501 |
|
2502 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1352 2503 | impl ::std::convert::From<Builder> for crate::error::ComplexError {
|
1353 2504 | fn from(builder: Builder) -> Self {
|
1354 2505 | builder.build()
|
1355 2506 | }
|
1356 2507 | }
|
1357 - | /// A builder for [`ComplexError`](crate::error::ComplexError).
|
2508 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ComplexError`](crate::error::ComplexError).
|
2509 + | /* RustType.kt:516 */
|
1358 2510 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2511 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1359 2512 | pub struct Builder {
|
2513 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1360 2514 | pub(crate) top_level: ::std::option::Option<::std::string::String>,
|
2515 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1361 2516 | pub(crate) nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
|
2517 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1362 2518 | }
|
2519 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1363 2520 | impl Builder {
|
2521 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1364 2522 | #[allow(missing_docs)] // documentation missing in model
|
2523 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1365 2524 | pub fn top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1366 - | self.top_level = input;
|
2525 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2526 + | self.top_level =
|
2527 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2528 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1367 2529 | self
|
2530 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1368 2531 | }
|
2532 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1369 2533 | #[allow(missing_docs)] // documentation missing in model
|
2534 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1370 2535 | pub fn nested(
|
1371 2536 | mut self,
|
1372 2537 | input: ::std::option::Option<crate::model::ComplexNestedErrorData>,
|
1373 2538 | ) -> Self {
|
1374 - | self.nested = input;
|
2539 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2540 + | self.nested =
|
2541 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2542 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1375 2543 | self
|
2544 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1376 2545 | }
|
1377 - | /// Consumes the builder and constructs a [`ComplexError`](crate::error::ComplexError).
|
2546 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ComplexError`](crate::error::ComplexError).
|
2547 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1378 2548 | pub fn build(self) -> crate::error::ComplexError {
|
1379 2549 | self.build_enforcing_required_and_enum_traits()
|
1380 2550 | }
|
2551 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1381 2552 | fn build_enforcing_required_and_enum_traits(self) -> crate::error::ComplexError {
|
2553 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1382 2554 | crate::error::ComplexError {
|
2555 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
1383 2556 | top_level: self.top_level,
|
2557 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
1384 2558 | nested: self.nested,
|
2559 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1385 2560 | }
|
2561 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1386 2562 | }
|
2563 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1387 2564 | }
|
2565 + |
|
2566 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1388 2567 | }
|
1389 - | /// See [`InvalidGreeting`](crate::error::InvalidGreeting).
|
2568 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`InvalidGreeting`](crate::error::InvalidGreeting).
|
1390 2569 | pub mod invalid_greeting {
|
1391 2570 |
|
2571 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1392 2572 | impl ::std::convert::From<Builder> for crate::error::InvalidGreeting {
|
1393 2573 | fn from(builder: Builder) -> Self {
|
1394 2574 | builder.build()
|
1395 2575 | }
|
1396 2576 | }
|
1397 - | /// A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
|
2577 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
|
2578 + | /* RustType.kt:516 */
|
1398 2579 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2580 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1399 2581 | pub struct Builder {
|
2582 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1400 2583 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2584 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1401 2585 | }
|
2586 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1402 2587 | impl Builder {
|
2588 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1403 2589 | #[allow(missing_docs)] // documentation missing in model
|
2590 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1404 2591 | pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1405 - | self.message = input;
|
2592 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2593 + | self.message =
|
2594 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2595 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1406 2596 | self
|
2597 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1407 2598 | }
|
1408 - | /// Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
|
2599 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
|
2600 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1409 2601 | pub fn build(self) -> crate::error::InvalidGreeting {
|
1410 2602 | self.build_enforcing_required_and_enum_traits()
|
1411 2603 | }
|
2604 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1412 2605 | fn build_enforcing_required_and_enum_traits(self) -> crate::error::InvalidGreeting {
|
2606 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1413 2607 | crate::error::InvalidGreeting {
|
2608 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
1414 2609 | message: self.message,
|
2610 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1415 2611 | }
|
2612 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1416 2613 | }
|
2614 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1417 2615 | }
|
2616 + |
|
2617 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1418 2618 | }
|