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 `GetPokemonSpecies` operation.
|
4 + | /* ServerOperationErrorGenerator.kt:64 */
|
3 5 | /// Each variant represents an error that can occur for the `GetPokemonSpecies` operation.
|
6 + | /* RustType.kt:516 */
|
4 7 | #[derive(::std::fmt::Debug)]
|
5 - | pub enum GetPokemonSpeciesError {
|
8 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GetPokemonSpeciesError {
|
9 + | /* ServerOperationErrorGenerator.kt:68 */
|
6 10 | #[allow(missing_docs)] // documentation missing in model
|
11 + | /* ServerOperationErrorGenerator.kt:71 */
|
7 12 | ResourceNotFoundException(crate::error::ResourceNotFoundException),
|
8 - | /// 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.
|
13 + | /// /* 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.
|
14 + | /* ServerOperationErrorGenerator.kt:71 */
|
9 15 | ValidationException(crate::error::ValidationException),
|
16 + | /* ServerOperationErrorGenerator.kt:68 */
|
10 17 | #[allow(missing_docs)] // documentation missing in model
|
18 + | /* ServerOperationErrorGenerator.kt:71 */
|
11 19 | InternalServerError(crate::error::InternalServerError),
|
20 + | /* ServerOperationErrorGenerator.kt:66 */
|
12 21 | }
|
22 + | /* ServerOperationErrorGenerator.kt:75 */
|
13 23 | impl ::std::fmt::Display for GetPokemonSpeciesError {
|
24 + | /* ServerOperationErrorGenerator.kt:76 */
|
14 25 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
26 + | /* ServerOperationErrorGenerator.kt:139 */
|
15 27 | match &self {
|
16 - | GetPokemonSpeciesError::ResourceNotFoundException(_inner) => _inner.fmt(f),
|
17 - | GetPokemonSpeciesError::ValidationException(_inner) => _inner.fmt(f),
|
18 - | GetPokemonSpeciesError::InternalServerError(_inner) => _inner.fmt(f),
|
28 + | /* ServerOperationErrorGenerator.kt:142 */
|
29 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
30 + | /* ServerOperationErrorGenerator.kt:78 */
|
31 + | {
|
32 + | _inner.fmt(f)
|
33 + | }
|
34 + | ,
|
35 + | /* ServerOperationErrorGenerator.kt:142 */
|
36 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
37 + | /* ServerOperationErrorGenerator.kt:78 */
|
38 + | {
|
39 + | _inner.fmt(f)
|
40 + | }
|
41 + | ,
|
42 + | /* ServerOperationErrorGenerator.kt:142 */
|
43 + | GetPokemonSpeciesError::InternalServerError(_inner) =>
|
44 + | /* ServerOperationErrorGenerator.kt:78 */
|
45 + | {
|
46 + | _inner.fmt(f)
|
47 + | }
|
48 + | /* ServerOperationErrorGenerator.kt:139 */
|
19 49 | }
|
50 + | /* ServerOperationErrorGenerator.kt:76 */
|
20 51 | }
|
52 + | /* ServerOperationErrorGenerator.kt:75 */
|
21 53 | }
|
54 + | /* ServerOperationErrorGenerator.kt:83 */
|
22 55 | impl GetPokemonSpeciesError {
|
56 + | /* ServerOperationErrorGenerator.kt:87 */
|
23 57 | /// Returns `true` if the error kind is `GetPokemonSpeciesError::ResourceNotFoundException`.
|
58 + | /* ServerOperationErrorGenerator.kt:88 */
|
24 59 | pub fn is_resource_not_found_exception(&self) -> bool {
|
60 + | /* ServerOperationErrorGenerator.kt:89 */
|
25 61 | matches!(&self, GetPokemonSpeciesError::ResourceNotFoundException(_))
|
62 + | /* ServerOperationErrorGenerator.kt:88 */
|
26 63 | }
|
64 + | /* ServerOperationErrorGenerator.kt:87 */
|
27 65 | /// Returns `true` if the error kind is `GetPokemonSpeciesError::ValidationException`.
|
66 + | /* ServerOperationErrorGenerator.kt:88 */
|
28 67 | pub fn is_validation_exception(&self) -> bool {
|
68 + | /* ServerOperationErrorGenerator.kt:89 */
|
29 69 | matches!(&self, GetPokemonSpeciesError::ValidationException(_))
|
70 + | /* ServerOperationErrorGenerator.kt:88 */
|
30 71 | }
|
72 + | /* ServerOperationErrorGenerator.kt:87 */
|
31 73 | /// Returns `true` if the error kind is `GetPokemonSpeciesError::InternalServerError`.
|
74 + | /* ServerOperationErrorGenerator.kt:88 */
|
32 75 | pub fn is_internal_server_error(&self) -> bool {
|
76 + | /* ServerOperationErrorGenerator.kt:89 */
|
33 77 | matches!(&self, GetPokemonSpeciesError::InternalServerError(_))
|
78 + | /* ServerOperationErrorGenerator.kt:88 */
|
34 79 | }
|
80 + | /* ServerOperationErrorGenerator.kt:92 */
|
35 81 | /// Returns the error name string by matching the correct variant.
|
82 + | /* ServerOperationErrorGenerator.kt:93 */
|
36 83 | pub fn name(&self) -> &'static str {
|
84 + | /* ServerOperationErrorGenerator.kt:139 */
|
37 85 | match &self {
|
38 - | GetPokemonSpeciesError::ResourceNotFoundException(_inner) => _inner.name(),
|
39 - | GetPokemonSpeciesError::ValidationException(_inner) => _inner.name(),
|
40 - | GetPokemonSpeciesError::InternalServerError(_inner) => _inner.name(),
|
86 + | /* ServerOperationErrorGenerator.kt:142 */
|
87 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
88 + | /* ServerOperationErrorGenerator.kt:95 */
|
89 + | {
|
90 + | _inner.name()
|
91 + | }
|
92 + | ,
|
93 + | /* ServerOperationErrorGenerator.kt:142 */
|
94 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
95 + | /* ServerOperationErrorGenerator.kt:95 */
|
96 + | {
|
97 + | _inner.name()
|
98 + | }
|
99 + | ,
|
100 + | /* ServerOperationErrorGenerator.kt:142 */
|
101 + | GetPokemonSpeciesError::InternalServerError(_inner) =>
|
102 + | /* ServerOperationErrorGenerator.kt:95 */
|
103 + | {
|
104 + | _inner.name()
|
105 + | }
|
106 + | /* ServerOperationErrorGenerator.kt:139 */
|
41 107 | }
|
108 + | /* ServerOperationErrorGenerator.kt:93 */
|
42 109 | }
|
110 + | /* ServerOperationErrorGenerator.kt:83 */
|
43 111 | }
|
112 + | /* ServerOperationErrorGenerator.kt:100 */
|
44 113 | impl ::std::error::Error for GetPokemonSpeciesError {
|
114 + | /* ServerOperationErrorGenerator.kt:101 */
|
45 115 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
116 + | /* ServerOperationErrorGenerator.kt:139 */
|
46 117 | match &self {
|
47 - | GetPokemonSpeciesError::ResourceNotFoundException(_inner) => Some(_inner),
|
48 - | GetPokemonSpeciesError::ValidationException(_inner) => Some(_inner),
|
49 - | GetPokemonSpeciesError::InternalServerError(_inner) => Some(_inner),
|
118 + | /* ServerOperationErrorGenerator.kt:142 */
|
119 + | GetPokemonSpeciesError::ResourceNotFoundException(_inner) =>
|
120 + | /* ServerOperationErrorGenerator.kt:103 */
|
121 + | {
|
122 + | Some(_inner)
|
123 + | }
|
124 + | ,
|
125 + | /* ServerOperationErrorGenerator.kt:142 */
|
126 + | GetPokemonSpeciesError::ValidationException(_inner) =>
|
127 + | /* ServerOperationErrorGenerator.kt:103 */
|
128 + | {
|
129 + | Some(_inner)
|
130 + | }
|
131 + | ,
|
132 + | /* ServerOperationErrorGenerator.kt:142 */
|
133 + | GetPokemonSpeciesError::InternalServerError(_inner) =>
|
134 + | /* ServerOperationErrorGenerator.kt:103 */
|
135 + | {
|
136 + | Some(_inner)
|
137 + | }
|
138 + | /* ServerOperationErrorGenerator.kt:139 */
|
50 139 | }
|
140 + | /* ServerOperationErrorGenerator.kt:101 */
|
51 141 | }
|
142 + | /* ServerOperationErrorGenerator.kt:100 */
|
52 143 | }
|
144 + | /* ServerOperationErrorGenerator.kt:110 */
|
53 145 | impl ::std::convert::From<crate::error::ResourceNotFoundException>
|
54 146 | for crate::error::GetPokemonSpeciesError
|
55 147 | {
|
148 + | /* ServerOperationErrorGenerator.kt:111 */
|
56 149 | fn from(
|
57 150 | variant: crate::error::ResourceNotFoundException,
|
58 151 | ) -> crate::error::GetPokemonSpeciesError {
|
152 + | /* ServerOperationErrorGenerator.kt:112 */
|
59 153 | Self::ResourceNotFoundException(variant)
|
154 + | /* ServerOperationErrorGenerator.kt:111 */
|
60 155 | }
|
156 + | /* ServerOperationErrorGenerator.kt:110 */
|
61 157 | }
|
158 + | /* ServerOperationErrorGenerator.kt:110 */
|
62 159 | impl ::std::convert::From<crate::error::ValidationException>
|
63 160 | for crate::error::GetPokemonSpeciesError
|
64 161 | {
|
162 + | /* ServerOperationErrorGenerator.kt:111 */
|
65 163 | fn from(variant: crate::error::ValidationException) -> crate::error::GetPokemonSpeciesError {
|
164 + | /* ServerOperationErrorGenerator.kt:112 */
|
66 165 | Self::ValidationException(variant)
|
166 + | /* ServerOperationErrorGenerator.kt:111 */
|
67 167 | }
|
168 + | /* ServerOperationErrorGenerator.kt:110 */
|
68 169 | }
|
170 + | /* ServerOperationErrorGenerator.kt:110 */
|
69 171 | impl ::std::convert::From<crate::error::InternalServerError>
|
70 172 | for crate::error::GetPokemonSpeciesError
|
71 173 | {
|
174 + | /* ServerOperationErrorGenerator.kt:111 */
|
72 175 | fn from(variant: crate::error::InternalServerError) -> crate::error::GetPokemonSpeciesError {
|
176 + | /* ServerOperationErrorGenerator.kt:112 */
|
73 177 | Self::InternalServerError(variant)
|
178 + | /* ServerOperationErrorGenerator.kt:111 */
|
74 179 | }
|
180 + | /* ServerOperationErrorGenerator.kt:110 */
|
75 181 | }
|
76 182 |
|
183 + | /* TsServerOperationErrorGenerator.kt:34 */
|
77 184 | impl ::std::convert::From<::napi::Error> for crate::error::GetPokemonSpeciesError {
|
78 185 | fn from(variant: ::napi::Error) -> crate::error::GetPokemonSpeciesError {
|
79 186 | crate::error::InternalServerError {
|
80 187 | message: variant.to_string(),
|
81 188 | }
|
82 189 | .into()
|
83 190 | }
|
84 191 | }
|
85 192 |
|
193 + | /* RustType.kt:516 */
|
86 194 | #[::napi_derive::napi(constructor)]
|
195 + | /* StructureGenerator.kt:197 */
|
87 196 | #[allow(missing_docs)] // documentation missing in model
|
197 + | /* RustType.kt:516 */
|
88 198 | #[derive(
|
89 199 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
90 200 | )]
|
91 - | pub struct InternalServerError {
|
201 + | pub /* StructureGenerator.kt:201 */ struct InternalServerError {
|
202 + | /* StructureGenerator.kt:231 */
|
92 203 | #[allow(missing_docs)] // documentation missing in model
|
93 204 | pub message: ::std::string::String,
|
205 + | /* StructureGenerator.kt:201 */
|
94 206 | }
|
207 + | /* ErrorImplGenerator.kt:99 */
|
95 208 | impl InternalServerError {
|
209 + | /* ErrorImplGenerator.kt:128 */
|
96 210 | /// Returns the error message.
|
97 211 | pub fn message(&self) -> &str {
|
98 212 | &self.message
|
99 213 | }
|
214 + | /* ErrorImplGenerator.kt:141 */
|
100 215 | #[doc(hidden)]
|
101 216 | /// Returns the error name.
|
102 217 | pub fn name(&self) -> &'static str {
|
103 218 | "InternalServerError"
|
104 219 | }
|
220 + | /* ErrorImplGenerator.kt:99 */
|
105 221 | }
|
222 + | /* ErrorImplGenerator.kt:153 */
|
106 223 | impl ::std::fmt::Display for InternalServerError {
|
224 + | /* ErrorImplGenerator.kt:154 */
|
107 225 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
226 + | /* ErrorImplGenerator.kt:161 */
|
108 227 | ::std::write!(f, "InternalServerError")?;
|
228 + | /* ErrorImplGenerator.kt:166 */
|
109 229 | {
|
230 + | /* ErrorImplGenerator.kt:167 */
|
110 231 | ::std::write!(f, ": {}", &self.message)?;
|
232 + | /* ErrorImplGenerator.kt:166 */
|
111 233 | }
|
234 + | /* ErrorImplGenerator.kt:171 */
|
112 235 | Ok(())
|
236 + | /* ErrorImplGenerator.kt:154 */
|
113 237 | }
|
238 + | /* ErrorImplGenerator.kt:153 */
|
114 239 | }
|
240 + | /* ErrorImplGenerator.kt:175 */
|
115 241 | impl ::std::error::Error for InternalServerError {}
|
242 + | /* ServerCodegenVisitor.kt:370 */
|
116 243 | impl InternalServerError {
|
117 - | /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
244 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
|
245 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
118 246 | pub fn builder() -> crate::error::internal_server_error::Builder {
|
247 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
119 248 | crate::error::internal_server_error::Builder::default()
|
249 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
120 250 | }
|
251 + | /* ServerCodegenVisitor.kt:370 */
|
121 252 | }
|
122 253 |
|
254 + | /* RustType.kt:516 */
|
123 255 | #[::napi_derive::napi(constructor)]
|
124 - | /// 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 + | /// /* 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.
|
257 + | /* RustType.kt:516 */
|
125 258 | #[derive(
|
126 259 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
127 260 | )]
|
128 - | pub struct ValidationException {
|
129 - | /// A summary of the validation failure.
|
261 + | pub /* StructureGenerator.kt:201 */ struct ValidationException {
|
262 + | /// /* StructureGenerator.kt:231 */A summary of the validation failure.
|
130 263 | pub message: ::std::string::String,
|
131 - | /// 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.
|
264 + | /// /* 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.
|
132 265 | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
266 + | /* StructureGenerator.kt:201 */
|
133 267 | }
|
268 + | /* StructureGenerator.kt:135 */
|
134 269 | impl ValidationException {
|
135 - | /// 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.
|
270 + | /// /* 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.
|
271 + | /* StructureGenerator.kt:166 */
|
136 272 | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
273 + | /* StructureGenerator.kt:169 */
|
137 274 | self.field_list.as_deref()
|
275 + | /* StructureGenerator.kt:166 */
|
138 276 | }
|
277 + | /* StructureGenerator.kt:135 */
|
139 278 | }
|
279 + | /* ErrorImplGenerator.kt:99 */
|
140 280 | impl ValidationException {
|
281 + | /* ErrorImplGenerator.kt:128 */
|
141 282 | /// Returns the error message.
|
142 283 | pub fn message(&self) -> &str {
|
143 284 | &self.message
|
144 285 | }
|
286 + | /* ErrorImplGenerator.kt:141 */
|
145 287 | #[doc(hidden)]
|
146 288 | /// Returns the error name.
|
147 289 | pub fn name(&self) -> &'static str {
|
148 290 | "ValidationException"
|
149 291 | }
|
292 + | /* ErrorImplGenerator.kt:99 */
|
150 293 | }
|
294 + | /* ErrorImplGenerator.kt:153 */
|
151 295 | impl ::std::fmt::Display for ValidationException {
|
296 + | /* ErrorImplGenerator.kt:154 */
|
152 297 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
298 + | /* ErrorImplGenerator.kt:161 */
|
153 299 | ::std::write!(f, "ValidationException")?;
|
300 + | /* ErrorImplGenerator.kt:166 */
|
154 301 | {
|
302 + | /* ErrorImplGenerator.kt:167 */
|
155 303 | ::std::write!(f, ": {}", &self.message)?;
|
304 + | /* ErrorImplGenerator.kt:166 */
|
156 305 | }
|
306 + | /* ErrorImplGenerator.kt:171 */
|
157 307 | Ok(())
|
308 + | /* ErrorImplGenerator.kt:154 */
|
158 309 | }
|
310 + | /* ErrorImplGenerator.kt:153 */
|
159 311 | }
|
312 + | /* ErrorImplGenerator.kt:175 */
|
160 313 | impl ::std::error::Error for ValidationException {}
|
314 + | /* ServerCodegenVisitor.kt:370 */
|
161 315 | impl ValidationException {
|
162 - | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
316 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
317 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
163 318 | pub fn builder() -> crate::error::validation_exception::Builder {
|
319 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
164 320 | crate::error::validation_exception::Builder::default()
|
321 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
165 322 | }
|
323 + | /* ServerCodegenVisitor.kt:370 */
|
166 324 | }
|
167 325 |
|
326 + | /* RustType.kt:516 */
|
168 327 | #[::napi_derive::napi(constructor)]
|
328 + | /* StructureGenerator.kt:197 */
|
169 329 | #[allow(missing_docs)] // documentation missing in model
|
330 + | /* RustType.kt:516 */
|
170 331 | #[derive(
|
171 332 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
172 333 | )]
|
173 - | pub struct ResourceNotFoundException {
|
334 + | pub /* StructureGenerator.kt:201 */ struct ResourceNotFoundException {
|
335 + | /* StructureGenerator.kt:231 */
|
174 336 | #[allow(missing_docs)] // documentation missing in model
|
175 337 | pub message: ::std::string::String,
|
338 + | /* StructureGenerator.kt:201 */
|
176 339 | }
|
340 + | /* ErrorImplGenerator.kt:99 */
|
177 341 | impl ResourceNotFoundException {
|
342 + | /* ErrorImplGenerator.kt:128 */
|
178 343 | /// Returns the error message.
|
179 344 | pub fn message(&self) -> &str {
|
180 345 | &self.message
|
181 346 | }
|
347 + | /* ErrorImplGenerator.kt:141 */
|
182 348 | #[doc(hidden)]
|
183 349 | /// Returns the error name.
|
184 350 | pub fn name(&self) -> &'static str {
|
185 351 | "ResourceNotFoundException"
|
186 352 | }
|
353 + | /* ErrorImplGenerator.kt:99 */
|
187 354 | }
|
355 + | /* ErrorImplGenerator.kt:153 */
|
188 356 | impl ::std::fmt::Display for ResourceNotFoundException {
|
357 + | /* ErrorImplGenerator.kt:154 */
|
189 358 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
359 + | /* ErrorImplGenerator.kt:161 */
|
190 360 | ::std::write!(f, "ResourceNotFoundException")?;
|
361 + | /* ErrorImplGenerator.kt:166 */
|
191 362 | {
|
363 + | /* ErrorImplGenerator.kt:167 */
|
192 364 | ::std::write!(f, ": {}", &self.message)?;
|
365 + | /* ErrorImplGenerator.kt:166 */
|
193 366 | }
|
367 + | /* ErrorImplGenerator.kt:171 */
|
194 368 | Ok(())
|
369 + | /* ErrorImplGenerator.kt:154 */
|
195 370 | }
|
371 + | /* ErrorImplGenerator.kt:153 */
|
196 372 | }
|
373 + | /* ErrorImplGenerator.kt:175 */
|
197 374 | impl ::std::error::Error for ResourceNotFoundException {}
|
375 + | /* ServerCodegenVisitor.kt:370 */
|
198 376 | impl ResourceNotFoundException {
|
199 - | /// Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
377 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
378 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
200 379 | pub fn builder() -> crate::error::resource_not_found_exception::Builder {
|
380 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
201 381 | crate::error::resource_not_found_exception::Builder::default()
|
382 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
202 383 | }
|
384 + | /* ServerCodegenVisitor.kt:370 */
|
203 385 | }
|
204 386 |
|
387 + | /* ServerOperationErrorGenerator.kt:63 */
|
205 388 | /// Error type for the `CheckHealth` operation.
|
389 + | /* ServerOperationErrorGenerator.kt:64 */
|
206 390 | /// Each variant represents an error that can occur for the `CheckHealth` operation.
|
391 + | /* RustType.kt:516 */
|
207 392 | #[derive(::std::fmt::Debug)]
|
208 - | pub enum CheckHealthError {
|
393 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum CheckHealthError {
|
394 + | /* ServerOperationErrorGenerator.kt:68 */
|
209 395 | #[allow(missing_docs)] // documentation missing in model
|
396 + | /* ServerOperationErrorGenerator.kt:71 */
|
210 397 | InternalServerError(crate::error::InternalServerError),
|
398 + | /* ServerOperationErrorGenerator.kt:66 */
|
211 399 | }
|
400 + | /* ServerOperationErrorGenerator.kt:75 */
|
212 401 | impl ::std::fmt::Display for CheckHealthError {
|
402 + | /* ServerOperationErrorGenerator.kt:76 */
|
213 403 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
404 + | /* ServerOperationErrorGenerator.kt:139 */
|
214 405 | match &self {
|
215 - | CheckHealthError::InternalServerError(_inner) => _inner.fmt(f),
|
406 + | /* ServerOperationErrorGenerator.kt:142 */
|
407 + | CheckHealthError::InternalServerError(_inner) =>
|
408 + | /* ServerOperationErrorGenerator.kt:78 */
|
409 + | {
|
410 + | _inner.fmt(f)
|
411 + | }
|
412 + | /* ServerOperationErrorGenerator.kt:139 */
|
216 413 | }
|
414 + | /* ServerOperationErrorGenerator.kt:76 */
|
217 415 | }
|
416 + | /* ServerOperationErrorGenerator.kt:75 */
|
218 417 | }
|
418 + | /* ServerOperationErrorGenerator.kt:83 */
|
219 419 | impl CheckHealthError {
|
420 + | /* ServerOperationErrorGenerator.kt:87 */
|
220 421 | /// Returns `true` if the error kind is `CheckHealthError::InternalServerError`.
|
422 + | /* ServerOperationErrorGenerator.kt:88 */
|
221 423 | pub fn is_internal_server_error(&self) -> bool {
|
424 + | /* ServerOperationErrorGenerator.kt:89 */
|
222 425 | matches!(&self, CheckHealthError::InternalServerError(_))
|
426 + | /* ServerOperationErrorGenerator.kt:88 */
|
223 427 | }
|
428 + | /* ServerOperationErrorGenerator.kt:92 */
|
224 429 | /// Returns the error name string by matching the correct variant.
|
430 + | /* ServerOperationErrorGenerator.kt:93 */
|
225 431 | pub fn name(&self) -> &'static str {
|
432 + | /* ServerOperationErrorGenerator.kt:139 */
|
226 433 | match &self {
|
227 - | CheckHealthError::InternalServerError(_inner) => _inner.name(),
|
434 + | /* ServerOperationErrorGenerator.kt:142 */
|
435 + | CheckHealthError::InternalServerError(_inner) =>
|
436 + | /* ServerOperationErrorGenerator.kt:95 */
|
437 + | {
|
438 + | _inner.name()
|
439 + | }
|
440 + | /* ServerOperationErrorGenerator.kt:139 */
|
228 441 | }
|
442 + | /* ServerOperationErrorGenerator.kt:93 */
|
229 443 | }
|
444 + | /* ServerOperationErrorGenerator.kt:83 */
|
230 445 | }
|
446 + | /* ServerOperationErrorGenerator.kt:100 */
|
231 447 | impl ::std::error::Error for CheckHealthError {
|
448 + | /* ServerOperationErrorGenerator.kt:101 */
|
232 449 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
450 + | /* ServerOperationErrorGenerator.kt:139 */
|
233 451 | match &self {
|
234 - | CheckHealthError::InternalServerError(_inner) => Some(_inner),
|
452 + | /* ServerOperationErrorGenerator.kt:142 */
|
453 + | CheckHealthError::InternalServerError(_inner) =>
|
454 + | /* ServerOperationErrorGenerator.kt:103 */
|
455 + | {
|
456 + | Some(_inner)
|
457 + | }
|
458 + | /* ServerOperationErrorGenerator.kt:139 */
|
235 459 | }
|
460 + | /* ServerOperationErrorGenerator.kt:101 */
|
236 461 | }
|
462 + | /* ServerOperationErrorGenerator.kt:100 */
|
237 463 | }
|
464 + | /* ServerOperationErrorGenerator.kt:110 */
|
238 465 | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::CheckHealthError {
|
466 + | /* ServerOperationErrorGenerator.kt:111 */
|
239 467 | fn from(variant: crate::error::InternalServerError) -> crate::error::CheckHealthError {
|
468 + | /* ServerOperationErrorGenerator.kt:112 */
|
240 469 | Self::InternalServerError(variant)
|
470 + | /* ServerOperationErrorGenerator.kt:111 */
|
241 471 | }
|
472 + | /* ServerOperationErrorGenerator.kt:110 */
|
242 473 | }
|
243 474 |
|
475 + | /* TsServerOperationErrorGenerator.kt:34 */
|
244 476 | impl ::std::convert::From<::napi::Error> for crate::error::CheckHealthError {
|
245 477 | fn from(variant: ::napi::Error) -> crate::error::CheckHealthError {
|
246 478 | crate::error::InternalServerError {
|
247 479 | message: variant.to_string(),
|
248 480 | }
|
249 481 | .into()
|
250 482 | }
|
251 483 | }
|
252 484 |
|
485 + | /* ServerOperationErrorGenerator.kt:63 */
|
253 486 | /// Error type for the `DoNothing` operation.
|
487 + | /* ServerOperationErrorGenerator.kt:64 */
|
254 488 | /// Each variant represents an error that can occur for the `DoNothing` operation.
|
489 + | /* RustType.kt:516 */
|
255 490 | #[derive(::std::fmt::Debug)]
|
256 - | pub enum DoNothingError {
|
491 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum DoNothingError {
|
492 + | /* ServerOperationErrorGenerator.kt:68 */
|
257 493 | #[allow(missing_docs)] // documentation missing in model
|
494 + | /* ServerOperationErrorGenerator.kt:71 */
|
258 495 | InternalServerError(crate::error::InternalServerError),
|
496 + | /* ServerOperationErrorGenerator.kt:66 */
|
259 497 | }
|
498 + | /* ServerOperationErrorGenerator.kt:75 */
|
260 499 | impl ::std::fmt::Display for DoNothingError {
|
500 + | /* ServerOperationErrorGenerator.kt:76 */
|
261 501 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
502 + | /* ServerOperationErrorGenerator.kt:139 */
|
262 503 | match &self {
|
263 - | DoNothingError::InternalServerError(_inner) => _inner.fmt(f),
|
504 + | /* ServerOperationErrorGenerator.kt:142 */
|
505 + | DoNothingError::InternalServerError(_inner) =>
|
506 + | /* ServerOperationErrorGenerator.kt:78 */
|
507 + | {
|
508 + | _inner.fmt(f)
|
509 + | }
|
510 + | /* ServerOperationErrorGenerator.kt:139 */
|
264 511 | }
|
512 + | /* ServerOperationErrorGenerator.kt:76 */
|
265 513 | }
|
514 + | /* ServerOperationErrorGenerator.kt:75 */
|
266 515 | }
|
516 + | /* ServerOperationErrorGenerator.kt:83 */
|
267 517 | impl DoNothingError {
|
518 + | /* ServerOperationErrorGenerator.kt:87 */
|
268 519 | /// Returns `true` if the error kind is `DoNothingError::InternalServerError`.
|
520 + | /* ServerOperationErrorGenerator.kt:88 */
|
269 521 | pub fn is_internal_server_error(&self) -> bool {
|
522 + | /* ServerOperationErrorGenerator.kt:89 */
|
270 523 | matches!(&self, DoNothingError::InternalServerError(_))
|
524 + | /* ServerOperationErrorGenerator.kt:88 */
|
271 525 | }
|
526 + | /* ServerOperationErrorGenerator.kt:92 */
|
272 527 | /// Returns the error name string by matching the correct variant.
|
528 + | /* ServerOperationErrorGenerator.kt:93 */
|
273 529 | pub fn name(&self) -> &'static str {
|
530 + | /* ServerOperationErrorGenerator.kt:139 */
|
274 531 | match &self {
|
275 - | DoNothingError::InternalServerError(_inner) => _inner.name(),
|
532 + | /* ServerOperationErrorGenerator.kt:142 */
|
533 + | DoNothingError::InternalServerError(_inner) =>
|
534 + | /* ServerOperationErrorGenerator.kt:95 */
|
535 + | {
|
536 + | _inner.name()
|
537 + | }
|
538 + | /* ServerOperationErrorGenerator.kt:139 */
|
276 539 | }
|
540 + | /* ServerOperationErrorGenerator.kt:93 */
|
277 541 | }
|
542 + | /* ServerOperationErrorGenerator.kt:83 */
|
278 543 | }
|
544 + | /* ServerOperationErrorGenerator.kt:100 */
|
279 545 | impl ::std::error::Error for DoNothingError {
|
546 + | /* ServerOperationErrorGenerator.kt:101 */
|
280 547 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
548 + | /* ServerOperationErrorGenerator.kt:139 */
|
281 549 | match &self {
|
282 - | DoNothingError::InternalServerError(_inner) => Some(_inner),
|
550 + | /* ServerOperationErrorGenerator.kt:142 */
|
551 + | DoNothingError::InternalServerError(_inner) =>
|
552 + | /* ServerOperationErrorGenerator.kt:103 */
|
553 + | {
|
554 + | Some(_inner)
|
555 + | }
|
556 + | /* ServerOperationErrorGenerator.kt:139 */
|
283 557 | }
|
558 + | /* ServerOperationErrorGenerator.kt:101 */
|
284 559 | }
|
560 + | /* ServerOperationErrorGenerator.kt:100 */
|
285 561 | }
|
562 + | /* ServerOperationErrorGenerator.kt:110 */
|
286 563 | impl ::std::convert::From<crate::error::InternalServerError> for crate::error::DoNothingError {
|
564 + | /* ServerOperationErrorGenerator.kt:111 */
|
287 565 | fn from(variant: crate::error::InternalServerError) -> crate::error::DoNothingError {
|
566 + | /* ServerOperationErrorGenerator.kt:112 */
|
288 567 | Self::InternalServerError(variant)
|
568 + | /* ServerOperationErrorGenerator.kt:111 */
|
289 569 | }
|
570 + | /* ServerOperationErrorGenerator.kt:110 */
|
290 571 | }
|
291 572 |
|
573 + | /* TsServerOperationErrorGenerator.kt:34 */
|
292 574 | impl ::std::convert::From<::napi::Error> for crate::error::DoNothingError {
|
293 575 | fn from(variant: ::napi::Error) -> crate::error::DoNothingError {
|
294 576 | crate::error::InternalServerError {
|
295 577 | message: variant.to_string(),
|
296 578 | }
|
297 579 | .into()
|
298 580 | }
|
299 581 | }
|
300 582 |
|
583 + | /* ServerOperationErrorGenerator.kt:63 */
|
301 584 | /// Error type for the `GetServerStatistics` operation.
|
585 + | /* ServerOperationErrorGenerator.kt:64 */
|
302 586 | /// Each variant represents an error that can occur for the `GetServerStatistics` operation.
|
587 + | /* RustType.kt:516 */
|
303 588 | #[derive(::std::fmt::Debug)]
|
304 - | pub enum GetServerStatisticsError {
|
589 + | pub /* ServerOperationErrorGenerator.kt:66 */ enum GetServerStatisticsError {
|
590 + | /* ServerOperationErrorGenerator.kt:68 */
|
305 591 | #[allow(missing_docs)] // documentation missing in model
|
592 + | /* ServerOperationErrorGenerator.kt:71 */
|
306 593 | InternalServerError(crate::error::InternalServerError),
|
594 + | /* ServerOperationErrorGenerator.kt:66 */
|
307 595 | }
|
596 + | /* ServerOperationErrorGenerator.kt:75 */
|
308 597 | impl ::std::fmt::Display for GetServerStatisticsError {
|
598 + | /* ServerOperationErrorGenerator.kt:76 */
|
309 599 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
600 + | /* ServerOperationErrorGenerator.kt:139 */
|
310 601 | match &self {
|
311 - | GetServerStatisticsError::InternalServerError(_inner) => _inner.fmt(f),
|
602 + | /* ServerOperationErrorGenerator.kt:142 */
|
603 + | GetServerStatisticsError::InternalServerError(_inner) =>
|
604 + | /* ServerOperationErrorGenerator.kt:78 */
|
605 + | {
|
606 + | _inner.fmt(f)
|
607 + | }
|
608 + | /* ServerOperationErrorGenerator.kt:139 */
|
312 609 | }
|
610 + | /* ServerOperationErrorGenerator.kt:76 */
|
313 611 | }
|
612 + | /* ServerOperationErrorGenerator.kt:75 */
|
314 613 | }
|
614 + | /* ServerOperationErrorGenerator.kt:83 */
|
315 615 | impl GetServerStatisticsError {
|
616 + | /* ServerOperationErrorGenerator.kt:87 */
|
316 617 | /// Returns `true` if the error kind is `GetServerStatisticsError::InternalServerError`.
|
618 + | /* ServerOperationErrorGenerator.kt:88 */
|
317 619 | pub fn is_internal_server_error(&self) -> bool {
|
620 + | /* ServerOperationErrorGenerator.kt:89 */
|
318 621 | matches!(&self, GetServerStatisticsError::InternalServerError(_))
|
622 + | /* ServerOperationErrorGenerator.kt:88 */
|
319 623 | }
|
624 + | /* ServerOperationErrorGenerator.kt:92 */
|
320 625 | /// Returns the error name string by matching the correct variant.
|
626 + | /* ServerOperationErrorGenerator.kt:93 */
|
321 627 | pub fn name(&self) -> &'static str {
|
628 + | /* ServerOperationErrorGenerator.kt:139 */
|
322 629 | match &self {
|
323 - | GetServerStatisticsError::InternalServerError(_inner) => _inner.name(),
|
630 + | /* ServerOperationErrorGenerator.kt:142 */
|
631 + | GetServerStatisticsError::InternalServerError(_inner) =>
|
632 + | /* ServerOperationErrorGenerator.kt:95 */
|
633 + | {
|
634 + | _inner.name()
|
635 + | }
|
636 + | /* ServerOperationErrorGenerator.kt:139 */
|
324 637 | }
|
638 + | /* ServerOperationErrorGenerator.kt:93 */
|
325 639 | }
|
640 + | /* ServerOperationErrorGenerator.kt:83 */
|
326 641 | }
|
642 + | /* ServerOperationErrorGenerator.kt:100 */
|
327 643 | impl ::std::error::Error for GetServerStatisticsError {
|
644 + | /* ServerOperationErrorGenerator.kt:101 */
|
328 645 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
646 + | /* ServerOperationErrorGenerator.kt:139 */
|
329 647 | match &self {
|
330 - | GetServerStatisticsError::InternalServerError(_inner) => Some(_inner),
|
648 + | /* ServerOperationErrorGenerator.kt:142 */
|
649 + | GetServerStatisticsError::InternalServerError(_inner) =>
|
650 + | /* ServerOperationErrorGenerator.kt:103 */
|
651 + | {
|
652 + | Some(_inner)
|
653 + | }
|
654 + | /* ServerOperationErrorGenerator.kt:139 */
|
331 655 | }
|
656 + | /* ServerOperationErrorGenerator.kt:101 */
|
332 657 | }
|
658 + | /* ServerOperationErrorGenerator.kt:100 */
|
333 659 | }
|
660 + | /* ServerOperationErrorGenerator.kt:110 */
|
334 661 | impl ::std::convert::From<crate::error::InternalServerError>
|
335 662 | for crate::error::GetServerStatisticsError
|
336 663 | {
|
664 + | /* ServerOperationErrorGenerator.kt:111 */
|
337 665 | fn from(variant: crate::error::InternalServerError) -> crate::error::GetServerStatisticsError {
|
666 + | /* ServerOperationErrorGenerator.kt:112 */
|
338 667 | Self::InternalServerError(variant)
|
668 + | /* ServerOperationErrorGenerator.kt:111 */
|
339 669 | }
|
670 + | /* ServerOperationErrorGenerator.kt:110 */
|
340 671 | }
|
341 672 |
|
673 + | /* TsServerOperationErrorGenerator.kt:34 */
|
342 674 | impl ::std::convert::From<::napi::Error> for crate::error::GetServerStatisticsError {
|
343 675 | fn from(variant: ::napi::Error) -> crate::error::GetServerStatisticsError {
|
344 676 | crate::error::InternalServerError {
|
345 677 | message: variant.to_string(),
|
346 678 | }
|
347 679 | .into()
|
348 680 | }
|
349 681 | }
|
350 - | /// See [`InternalServerError`](crate::error::InternalServerError).
|
682 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`InternalServerError`](crate::error::InternalServerError).
|
351 683 | pub mod internal_server_error {
|
352 684 |
|
685 + | /* RustType.kt:516 */
|
353 686 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
354 - | /// Holds one variant for each of the ways the builder can fail.
|
355 - |
|
687 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
688 + | /* ServerBuilderConstraintViolations.kt:75 */
|
356 689 | #[allow(clippy::enum_variant_names)]
|
357 690 | pub enum ConstraintViolation {
|
358 - | /// `message` was not provided but it is required when building `InternalServerError`.
|
691 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `InternalServerError`.
|
692 + | /* ServerBuilderConstraintViolations.kt:143 */
|
359 693 | MissingMessage,
|
694 + | /* ServerBuilderConstraintViolations.kt:75 */
|
360 695 | }
|
696 + | /* ServerBuilderConstraintViolations.kt:117 */
|
361 697 | impl ::std::fmt::Display for ConstraintViolation {
|
698 + | /* ServerBuilderConstraintViolations.kt:118 */
|
362 699 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
700 + | /* ServerBuilderConstraintViolations.kt:119 */
|
363 701 | match self {
|
364 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
|
365 - | }
|
702 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
|
703 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
704 + | /* ServerBuilderConstraintViolations.kt:118 */
|
366 705 | }
|
706 + | /* ServerBuilderConstraintViolations.kt:117 */
|
367 707 | }
|
708 + | /* ServerBuilderConstraintViolations.kt:84 */
|
368 709 | impl ::std::error::Error for ConstraintViolation {}
|
710 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
369 711 | impl ::std::convert::TryFrom<Builder> for crate::error::InternalServerError {
|
370 712 | type Error = ConstraintViolation;
|
371 713 |
|
372 714 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
373 715 | builder.build()
|
374 716 | }
|
375 717 | }
|
376 - | /// A builder for [`InternalServerError`](crate::error::InternalServerError).
|
718 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`InternalServerError`](crate::error::InternalServerError).
|
719 + | /* RustType.kt:516 */
|
377 720 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
721 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
378 722 | pub struct Builder {
|
723 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
379 724 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
725 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
380 726 | }
|
727 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
381 728 | impl Builder {
|
729 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
382 730 | #[allow(missing_docs)] // documentation missing in model
|
731 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
383 732 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
384 - | self.message = Some(input);
|
733 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
734 + | self.message =
|
735 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
736 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
737 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
738 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
385 739 | self
|
740 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
386 741 | }
|
387 - | /// Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
|
388 - | ///
|
742 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
|
743 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
389 744 | /// The builder fails to construct a [`InternalServerError`](crate::error::InternalServerError) if you do not provide a value for all non-`Option`al members.
|
390 745 | ///
|
746 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
391 747 | pub fn build(self) -> Result<crate::error::InternalServerError, ConstraintViolation> {
|
392 748 | self.build_enforcing_required_and_enum_traits()
|
393 749 | }
|
750 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
394 751 | fn build_enforcing_required_and_enum_traits(
|
395 752 | self,
|
396 753 | ) -> Result<crate::error::InternalServerError, ConstraintViolation> {
|
397 - | Ok(crate::error::InternalServerError {
|
398 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
399 - | })
|
400 - | }
|
754 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
755 + | Ok(
|
756 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
757 + | crate::error::InternalServerError {
|
758 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
759 + | message: self
|
760 + | .message
|
761 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
762 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
763 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
764 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
765 + | )
|
766 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
767 + | }
|
768 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
401 769 | }
|
770 + |
|
771 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
402 772 | }
|
403 - | /// See [`ValidationException`](crate::error::ValidationException).
|
773 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ValidationException`](crate::error::ValidationException).
|
404 774 | pub mod validation_exception {
|
405 775 |
|
776 + | /* RustType.kt:516 */
|
406 777 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
407 - | /// Holds one variant for each of the ways the builder can fail.
|
408 - |
|
778 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
779 + | /* ServerBuilderConstraintViolations.kt:75 */
|
409 780 | #[allow(clippy::enum_variant_names)]
|
410 781 | pub enum ConstraintViolation {
|
411 - | /// `message` was not provided but it is required when building `ValidationException`.
|
782 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
|
783 + | /* ServerBuilderConstraintViolations.kt:143 */
|
412 784 | MissingMessage,
|
785 + | /* ServerBuilderConstraintViolations.kt:75 */
|
413 786 | }
|
787 + | /* ServerBuilderConstraintViolations.kt:117 */
|
414 788 | impl ::std::fmt::Display for ConstraintViolation {
|
789 + | /* ServerBuilderConstraintViolations.kt:118 */
|
415 790 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
791 + | /* ServerBuilderConstraintViolations.kt:119 */
|
416 792 | match self {
|
417 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
418 - | }
|
793 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
|
794 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
795 + | /* ServerBuilderConstraintViolations.kt:118 */
|
419 796 | }
|
797 + | /* ServerBuilderConstraintViolations.kt:117 */
|
420 798 | }
|
799 + | /* ServerBuilderConstraintViolations.kt:84 */
|
421 800 | impl ::std::error::Error for ConstraintViolation {}
|
801 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
422 802 | impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
|
423 803 | type Error = ConstraintViolation;
|
424 804 |
|
425 805 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
426 806 | builder.build()
|
427 807 | }
|
428 808 | }
|
429 - | /// A builder for [`ValidationException`](crate::error::ValidationException).
|
809 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ValidationException`](crate::error::ValidationException).
|
810 + | /* RustType.kt:516 */
|
430 811 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
812 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
431 813 | pub struct Builder {
|
814 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
432 815 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
816 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
433 817 | pub(crate) field_list:
|
434 818 | ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
819 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
435 820 | }
|
821 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
436 822 | impl Builder {
|
437 - | /// A summary of the validation failure.
|
823 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A summary of the validation failure.
|
824 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
438 825 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
439 - | self.message = Some(input);
|
826 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
827 + | self.message =
|
828 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
829 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
830 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
831 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
440 832 | self
|
833 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
441 834 | }
|
442 - | /// 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.
|
835 + | /// /* 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.
|
836 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
443 837 | pub fn field_list(
|
444 838 | mut self,
|
445 839 | input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
446 840 | ) -> Self {
|
447 - | self.field_list = input;
|
841 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
842 + | self.field_list =
|
843 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
844 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
448 845 | self
|
846 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
449 847 | }
|
450 - | /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
451 - | ///
|
848 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
|
849 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
452 850 | /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
|
453 851 | ///
|
852 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
454 853 | pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
455 854 | self.build_enforcing_required_and_enum_traits()
|
456 855 | }
|
856 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
457 857 | fn build_enforcing_required_and_enum_traits(
|
458 858 | self,
|
459 859 | ) -> Result<crate::error::ValidationException, ConstraintViolation> {
|
460 - | Ok(crate::error::ValidationException {
|
461 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
462 - | field_list: self.field_list,
|
463 - | })
|
464 - | }
|
860 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
861 + | Ok(
|
862 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
863 + | crate::error::ValidationException {
|
864 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
865 + | message: self
|
866 + | .message
|
867 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
868 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
869 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
870 + | field_list: self.field_list,
|
871 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
872 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
873 + | )
|
874 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
875 + | }
|
876 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
465 877 | }
|
878 + |
|
879 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
466 880 | }
|
467 - | /// See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
881 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
468 882 | pub mod resource_not_found_exception {
|
469 883 |
|
884 + | /* RustType.kt:516 */
|
470 885 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
471 - | /// Holds one variant for each of the ways the builder can fail.
|
472 - |
|
886 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
887 + | /* ServerBuilderConstraintViolations.kt:75 */
|
473 888 | #[allow(clippy::enum_variant_names)]
|
474 889 | pub enum ConstraintViolation {
|
475 - | /// `message` was not provided but it is required when building `ResourceNotFoundException`.
|
890 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ResourceNotFoundException`.
|
891 + | /* ServerBuilderConstraintViolations.kt:143 */
|
476 892 | MissingMessage,
|
893 + | /* ServerBuilderConstraintViolations.kt:75 */
|
477 894 | }
|
895 + | /* ServerBuilderConstraintViolations.kt:117 */
|
478 896 | impl ::std::fmt::Display for ConstraintViolation {
|
897 + | /* ServerBuilderConstraintViolations.kt:118 */
|
479 898 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
899 + | /* ServerBuilderConstraintViolations.kt:119 */
|
480 900 | match self {
|
481 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ResourceNotFoundException`"),
|
482 - | }
|
901 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ResourceNotFoundException`"),
|
902 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
903 + | /* ServerBuilderConstraintViolations.kt:118 */
|
483 904 | }
|
905 + | /* ServerBuilderConstraintViolations.kt:117 */
|
484 906 | }
|
907 + | /* ServerBuilderConstraintViolations.kt:84 */
|
485 908 | impl ::std::error::Error for ConstraintViolation {}
|
909 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
486 910 | impl ::std::convert::TryFrom<Builder> for crate::error::ResourceNotFoundException {
|
487 911 | type Error = ConstraintViolation;
|
488 912 |
|
489 913 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
490 914 | builder.build()
|
491 915 | }
|
492 916 | }
|
493 - | /// A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
917 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
918 + | /* RustType.kt:516 */
|
494 919 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
920 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
495 921 | pub struct Builder {
|
922 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
496 923 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
924 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
497 925 | }
|
926 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
498 927 | impl Builder {
|
928 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
499 929 | #[allow(missing_docs)] // documentation missing in model
|
930 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
500 931 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
501 - | self.message = Some(input);
|
932 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
933 + | self.message =
|
934 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
935 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
936 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
937 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
502 938 | self
|
939 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
503 940 | }
|
504 - | /// Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
505 - | ///
|
941 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
|
942 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
506 943 | /// The builder fails to construct a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException) if you do not provide a value for all non-`Option`al members.
|
507 944 | ///
|
945 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
508 946 | pub fn build(self) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
509 947 | self.build_enforcing_required_and_enum_traits()
|
510 948 | }
|
949 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
511 950 | fn build_enforcing_required_and_enum_traits(
|
512 951 | self,
|
513 952 | ) -> Result<crate::error::ResourceNotFoundException, ConstraintViolation> {
|
514 - | Ok(crate::error::ResourceNotFoundException {
|
515 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
516 - | })
|
517 - | }
|
953 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
954 + | Ok(
|
955 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
956 + | crate::error::ResourceNotFoundException {
|
957 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
958 + | message: self
|
959 + | .message
|
960 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
961 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
962 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
963 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
964 + | )
|
965 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
966 + | }
|
967 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
518 968 | }
|
969 + |
|
970 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
519 971 | }
|