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