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