1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// Describes one specific validation failure for an input member.
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
|
4 + | /* RustType.kt:516 */
|
4 5 | #[derive(
|
5 6 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
6 7 | )]
|
7 - | pub struct ValidationExceptionField {
|
8 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
8 + | pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
|
9 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
9 10 | pub path: ::std::string::String,
|
10 - | /// A detailed description of the validation failure.
|
11 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
11 12 | pub message: ::std::string::String,
|
13 + | /* StructureGenerator.kt:201 */
|
12 14 | }
|
15 + | /* StructureGenerator.kt:135 */
|
13 16 | impl ValidationExceptionField {
|
14 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
17 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
18 + | /* StructureGenerator.kt:166 */
|
15 19 | pub fn path(&self) -> &str {
|
20 + | /* StructureGenerator.kt:171 */
|
16 21 | use std::ops::Deref;
|
17 22 | self.path.deref()
|
23 + | /* StructureGenerator.kt:166 */
|
18 24 | }
|
19 - | /// A detailed description of the validation failure.
|
25 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
26 + | /* StructureGenerator.kt:166 */
|
20 27 | pub fn message(&self) -> &str {
|
28 + | /* StructureGenerator.kt:171 */
|
21 29 | use std::ops::Deref;
|
22 30 | self.message.deref()
|
31 + | /* StructureGenerator.kt:166 */
|
23 32 | }
|
33 + | /* StructureGenerator.kt:135 */
|
24 34 | }
|
35 + | /* ServerCodegenVisitor.kt:345 */
|
25 36 | impl ValidationExceptionField {
|
26 - | /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
37 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
38 + | /* ServerBuilderGenerator.kt:295 */
|
27 39 | pub fn builder() -> crate::model::validation_exception_field::Builder {
|
40 + | /* ServerBuilderGenerator.kt:296 */
|
28 41 | crate::model::validation_exception_field::Builder::default()
|
42 + | /* ServerBuilderGenerator.kt:295 */
|
29 43 | }
|
44 + | /* ServerCodegenVisitor.kt:345 */
|
30 45 | }
|
31 46 |
|
47 + | /* UnionGenerator.kt:67 */
|
32 48 | #[allow(missing_docs)] // documentation missing in model
|
49 + | /* RustType.kt:516 */
|
33 50 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
34 - | pub enum CapturePokemonEvents {
|
51 + | pub /* UnionGenerator.kt:85 */ enum CapturePokemonEvents {
|
52 + | /* UnionGenerator.kt:90 */
|
35 53 | #[allow(missing_docs)] // documentation missing in model
|
54 + | /* UnionGenerator.kt:190 */
|
36 55 | Event(crate::model::CaptureEvent),
|
56 + | /* UnionGenerator.kt:85 */
|
37 57 | }
|
58 + | /* UnionGenerator.kt:111 */
|
38 59 | impl CapturePokemonEvents {
|
60 + | /* RustType.kt:516 */
|
39 61 | #[allow(irrefutable_let_patterns)]
|
62 + | /* UnionGenerator.kt:217 */
|
40 63 | /// Tries to convert the enum instance into [`Event`](crate::model::CapturePokemonEvents::Event), extracting the inner [`CaptureEvent`](crate::model::CaptureEvent).
|
64 + | /* UnionGenerator.kt:222 */
|
41 65 | /// Returns `Err(&Self)` if it can't be converted.
|
66 + | /* UnionGenerator.kt:223 */
|
42 67 | pub fn as_event(&self) -> ::std::result::Result<&crate::model::CaptureEvent, &Self> {
|
68 + | /* UnionGenerator.kt:227 */
|
43 69 | if let CapturePokemonEvents::Event(val) = &self {
|
44 70 | ::std::result::Result::Ok(val)
|
45 71 | } else {
|
46 72 | ::std::result::Result::Err(self)
|
47 73 | }
|
74 + | /* UnionGenerator.kt:223 */
|
48 75 | }
|
76 + | /* UnionGenerator.kt:121 */
|
49 77 | /// Returns true if this is a [`Event`](crate::model::CapturePokemonEvents::Event).
|
78 + | /* UnionGenerator.kt:122 */
|
50 79 | pub fn is_event(&self) -> bool {
|
80 + | /* UnionGenerator.kt:123 */
|
51 81 | self.as_event().is_ok()
|
82 + | /* UnionGenerator.kt:122 */
|
52 83 | }
|
84 + | /* UnionGenerator.kt:111 */
|
53 85 | }
|
54 86 |
|
87 + | /* StructureGenerator.kt:197 */
|
55 88 | #[allow(missing_docs)] // documentation missing in model
|
89 + | /* RustType.kt:516 */
|
56 90 | #[derive(
|
57 91 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
58 92 | )]
|
59 - | pub struct CaptureEvent {
|
93 + | pub /* StructureGenerator.kt:201 */ struct CaptureEvent {
|
94 + | /* StructureGenerator.kt:231 */
|
60 95 | #[allow(missing_docs)] // documentation missing in model
|
61 96 | pub name: ::std::option::Option<::std::string::String>,
|
97 + | /* StructureGenerator.kt:231 */
|
62 98 | #[allow(missing_docs)] // documentation missing in model
|
63 99 | pub captured: ::std::option::Option<bool>,
|
100 + | /* StructureGenerator.kt:231 */
|
64 101 | #[allow(missing_docs)] // documentation missing in model
|
65 102 | pub shiny: ::std::option::Option<bool>,
|
103 + | /* StructureGenerator.kt:231 */
|
66 104 | #[allow(missing_docs)] // documentation missing in model
|
67 105 | pub pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
|
106 + | /* StructureGenerator.kt:201 */
|
68 107 | }
|
108 + | /* StructureGenerator.kt:135 */
|
69 109 | impl CaptureEvent {
|
110 + | /* StructureGenerator.kt:231 */
|
70 111 | #[allow(missing_docs)] // documentation missing in model
|
112 + | /* StructureGenerator.kt:166 */
|
71 113 | pub fn name(&self) -> ::std::option::Option<&str> {
|
114 + | /* StructureGenerator.kt:169 */
|
72 115 | self.name.as_deref()
|
116 + | /* StructureGenerator.kt:166 */
|
73 117 | }
|
118 + | /* StructureGenerator.kt:231 */
|
74 119 | #[allow(missing_docs)] // documentation missing in model
|
120 + | /* StructureGenerator.kt:166 */
|
75 121 | pub fn captured(&self) -> ::std::option::Option<bool> {
|
122 + | /* StructureGenerator.kt:168 */
|
76 123 | self.captured
|
124 + | /* StructureGenerator.kt:166 */
|
77 125 | }
|
126 + | /* StructureGenerator.kt:231 */
|
78 127 | #[allow(missing_docs)] // documentation missing in model
|
128 + | /* StructureGenerator.kt:166 */
|
79 129 | pub fn shiny(&self) -> ::std::option::Option<bool> {
|
130 + | /* StructureGenerator.kt:168 */
|
80 131 | self.shiny
|
132 + | /* StructureGenerator.kt:166 */
|
81 133 | }
|
134 + | /* StructureGenerator.kt:231 */
|
82 135 | #[allow(missing_docs)] // documentation missing in model
|
136 + | /* StructureGenerator.kt:166 */
|
83 137 | pub fn pokedex_update(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
|
138 + | /* StructureGenerator.kt:170 */
|
84 139 | self.pokedex_update.as_ref()
|
140 + | /* StructureGenerator.kt:166 */
|
85 141 | }
|
142 + | /* StructureGenerator.kt:135 */
|
86 143 | }
|
144 + | /* ServerCodegenVisitor.kt:345 */
|
87 145 | impl CaptureEvent {
|
88 - | /// Creates a new builder-style object to manufacture [`CaptureEvent`](crate::model::CaptureEvent).
|
146 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CaptureEvent`](crate::model::CaptureEvent).
|
147 + | /* ServerBuilderGenerator.kt:295 */
|
89 148 | pub fn builder() -> crate::model::capture_event::Builder {
|
149 + | /* ServerBuilderGenerator.kt:296 */
|
90 150 | crate::model::capture_event::Builder::default()
|
151 + | /* ServerBuilderGenerator.kt:295 */
|
91 152 | }
|
153 + | /* ServerCodegenVisitor.kt:345 */
|
92 154 | }
|
93 155 |
|
156 + | /* UnionGenerator.kt:67 */
|
94 157 | #[allow(missing_docs)] // documentation missing in model
|
158 + | /* RustType.kt:516 */
|
95 159 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
96 - | pub enum AttemptCapturingPokemonEvent {
|
160 + | pub /* UnionGenerator.kt:85 */ enum AttemptCapturingPokemonEvent {
|
161 + | /* UnionGenerator.kt:90 */
|
97 162 | #[allow(missing_docs)] // documentation missing in model
|
163 + | /* UnionGenerator.kt:190 */
|
98 164 | Event(crate::model::CapturingEvent),
|
165 + | /* UnionGenerator.kt:85 */
|
99 166 | }
|
167 + | /* UnionGenerator.kt:111 */
|
100 168 | impl AttemptCapturingPokemonEvent {
|
169 + | /* RustType.kt:516 */
|
101 170 | #[allow(irrefutable_let_patterns)]
|
171 + | /* UnionGenerator.kt:217 */
|
102 172 | /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
|
173 + | /* UnionGenerator.kt:222 */
|
103 174 | /// Returns `Err(&Self)` if it can't be converted.
|
175 + | /* UnionGenerator.kt:223 */
|
104 176 | pub fn as_event(&self) -> ::std::result::Result<&crate::model::CapturingEvent, &Self> {
|
177 + | /* UnionGenerator.kt:227 */
|
105 178 | if let AttemptCapturingPokemonEvent::Event(val) = &self {
|
106 179 | ::std::result::Result::Ok(val)
|
107 180 | } else {
|
108 181 | ::std::result::Result::Err(self)
|
109 182 | }
|
183 + | /* UnionGenerator.kt:223 */
|
110 184 | }
|
185 + | /* UnionGenerator.kt:121 */
|
111 186 | /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
|
187 + | /* UnionGenerator.kt:122 */
|
112 188 | pub fn is_event(&self) -> bool {
|
189 + | /* UnionGenerator.kt:123 */
|
113 190 | self.as_event().is_ok()
|
191 + | /* UnionGenerator.kt:122 */
|
114 192 | }
|
193 + | /* UnionGenerator.kt:111 */
|
115 194 | }
|
116 195 |
|
196 + | /* StructureGenerator.kt:197 */
|
117 197 | #[allow(missing_docs)] // documentation missing in model
|
198 + | /* RustType.kt:516 */
|
118 199 | #[derive(
|
119 200 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
120 201 | )]
|
121 - | pub struct CapturingEvent {
|
202 + | pub /* StructureGenerator.kt:201 */ struct CapturingEvent {
|
203 + | /* StructureGenerator.kt:231 */
|
122 204 | #[allow(missing_docs)] // documentation missing in model
|
123 205 | pub payload: ::std::option::Option<crate::model::CapturingPayload>,
|
206 + | /* StructureGenerator.kt:201 */
|
124 207 | }
|
208 + | /* StructureGenerator.kt:135 */
|
125 209 | impl CapturingEvent {
|
210 + | /* StructureGenerator.kt:231 */
|
126 211 | #[allow(missing_docs)] // documentation missing in model
|
212 + | /* StructureGenerator.kt:166 */
|
127 213 | pub fn payload(&self) -> ::std::option::Option<&crate::model::CapturingPayload> {
|
214 + | /* StructureGenerator.kt:170 */
|
128 215 | self.payload.as_ref()
|
216 + | /* StructureGenerator.kt:166 */
|
129 217 | }
|
218 + | /* StructureGenerator.kt:135 */
|
130 219 | }
|
220 + | /* ServerCodegenVisitor.kt:345 */
|
131 221 | impl CapturingEvent {
|
132 - | /// Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
|
222 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
|
223 + | /* ServerBuilderGenerator.kt:295 */
|
133 224 | pub fn builder() -> crate::model::capturing_event::Builder {
|
225 + | /* ServerBuilderGenerator.kt:296 */
|
134 226 | crate::model::capturing_event::Builder::default()
|
227 + | /* ServerBuilderGenerator.kt:295 */
|
135 228 | }
|
229 + | /* ServerCodegenVisitor.kt:345 */
|
136 230 | }
|
231 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
137 232 | impl crate::constrained::Constrained for crate::model::CapturingEvent {
|
138 233 | type Unconstrained = crate::model::capturing_event::Builder;
|
139 234 | }
|
140 235 |
|
236 + | /* StructureGenerator.kt:197 */
|
141 237 | #[allow(missing_docs)] // documentation missing in model
|
238 + | /* RustType.kt:516 */
|
142 239 | #[derive(
|
143 240 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
144 241 | )]
|
145 - | pub struct CapturingPayload {
|
242 + | pub /* StructureGenerator.kt:201 */ struct CapturingPayload {
|
243 + | /* StructureGenerator.kt:231 */
|
146 244 | #[allow(missing_docs)] // documentation missing in model
|
147 245 | pub name: ::std::option::Option<::std::string::String>,
|
246 + | /* StructureGenerator.kt:231 */
|
148 247 | #[allow(missing_docs)] // documentation missing in model
|
149 248 | pub pokeball: ::std::option::Option<::std::string::String>,
|
249 + | /* StructureGenerator.kt:201 */
|
150 250 | }
|
251 + | /* StructureGenerator.kt:135 */
|
151 252 | impl CapturingPayload {
|
253 + | /* StructureGenerator.kt:231 */
|
152 254 | #[allow(missing_docs)] // documentation missing in model
|
255 + | /* StructureGenerator.kt:166 */
|
153 256 | pub fn name(&self) -> ::std::option::Option<&str> {
|
257 + | /* StructureGenerator.kt:169 */
|
154 258 | self.name.as_deref()
|
259 + | /* StructureGenerator.kt:166 */
|
155 260 | }
|
261 + | /* StructureGenerator.kt:231 */
|
156 262 | #[allow(missing_docs)] // documentation missing in model
|
263 + | /* StructureGenerator.kt:166 */
|
157 264 | pub fn pokeball(&self) -> ::std::option::Option<&str> {
|
265 + | /* StructureGenerator.kt:169 */
|
158 266 | self.pokeball.as_deref()
|
267 + | /* StructureGenerator.kt:166 */
|
159 268 | }
|
269 + | /* StructureGenerator.kt:135 */
|
160 270 | }
|
271 + | /* ServerCodegenVisitor.kt:345 */
|
161 272 | impl CapturingPayload {
|
162 - | /// Creates a new builder-style object to manufacture [`CapturingPayload`](crate::model::CapturingPayload).
|
273 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturingPayload`](crate::model::CapturingPayload).
|
274 + | /* ServerBuilderGenerator.kt:295 */
|
163 275 | pub fn builder() -> crate::model::capturing_payload::Builder {
|
276 + | /* ServerBuilderGenerator.kt:296 */
|
164 277 | crate::model::capturing_payload::Builder::default()
|
278 + | /* ServerBuilderGenerator.kt:295 */
|
165 279 | }
|
280 + | /* ServerCodegenVisitor.kt:345 */
|
166 281 | }
|
282 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
167 283 | impl crate::constrained::Constrained for crate::model::CapturingPayload {
|
168 284 | type Unconstrained = crate::model::capturing_payload::Builder;
|
169 285 | }
|
170 - | /// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
286 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
171 287 | pub mod validation_exception_field {
|
172 288 |
|
289 + | /* RustType.kt:516 */
|
173 290 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
174 - | /// Holds one variant for each of the ways the builder can fail.
|
291 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
292 + | /* RustType.kt:516 */
|
175 293 | #[non_exhaustive]
|
294 + | /* ServerBuilderConstraintViolations.kt:75 */
|
176 295 | #[allow(clippy::enum_variant_names)]
|
177 296 | pub enum ConstraintViolation {
|
178 - | /// `path` was not provided but it is required when building `ValidationExceptionField`.
|
297 + | /// /* ServerBuilderConstraintViolations.kt:138 */`path` was not provided but it is required when building `ValidationExceptionField`.
|
298 + | /* ServerBuilderConstraintViolations.kt:143 */
|
179 299 | MissingPath,
|
180 - | /// `message` was not provided but it is required when building `ValidationExceptionField`.
|
300 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationExceptionField`.
|
301 + | /* ServerBuilderConstraintViolations.kt:143 */
|
181 302 | MissingMessage,
|
303 + | /* ServerBuilderConstraintViolations.kt:75 */
|
182 304 | }
|
305 + | /* ServerBuilderConstraintViolations.kt:117 */
|
183 306 | impl ::std::fmt::Display for ConstraintViolation {
|
307 + | /* ServerBuilderConstraintViolations.kt:118 */
|
184 308 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
309 + | /* ServerBuilderConstraintViolations.kt:119 */
|
185 310 | match self {
|
186 - | ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
187 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
188 - | }
|
311 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
312 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
313 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
314 + | /* ServerBuilderConstraintViolations.kt:118 */
|
189 315 | }
|
316 + | /* ServerBuilderConstraintViolations.kt:117 */
|
190 317 | }
|
318 + | /* ServerBuilderConstraintViolations.kt:84 */
|
191 319 | impl ::std::error::Error for ConstraintViolation {}
|
320 + | /* ServerBuilderGenerator.kt:446 */
|
192 321 | impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
|
193 322 | type Error = ConstraintViolation;
|
194 323 |
|
195 324 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
196 325 | builder.build()
|
197 326 | }
|
198 327 | }
|
199 - | /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
328 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
329 + | /* RustType.kt:516 */
|
200 330 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
331 + | /* ServerBuilderGenerator.kt:211 */
|
201 332 | pub struct Builder {
|
333 + | /* ServerBuilderGenerator.kt:308 */
|
202 334 | pub(crate) path: ::std::option::Option<::std::string::String>,
|
335 + | /* ServerBuilderGenerator.kt:308 */
|
203 336 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
337 + | /* ServerBuilderGenerator.kt:211 */
|
204 338 | }
|
339 + | /* ServerBuilderGenerator.kt:215 */
|
205 340 | impl Builder {
|
206 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
341 + | /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
342 + | /* ServerBuilderGenerator.kt:343 */
|
207 343 | pub fn path(mut self, input: ::std::string::String) -> Self {
|
208 - | self.path = Some(input);
|
344 + | /* ServerBuilderGenerator.kt:344 */
|
345 + | self.path =
|
346 + | /* ServerBuilderGenerator.kt:345 */Some(
|
347 + | /* ServerBuilderGenerator.kt:376 */input
|
348 + | /* ServerBuilderGenerator.kt:345 */)
|
349 + | /* ServerBuilderGenerator.kt:344 */;
|
209 350 | self
|
351 + | /* ServerBuilderGenerator.kt:343 */
|
210 352 | }
|
211 - | /// A detailed description of the validation failure.
|
353 + | /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
|
354 + | /* ServerBuilderGenerator.kt:343 */
|
212 355 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
213 - | self.message = Some(input);
|
356 + | /* ServerBuilderGenerator.kt:344 */
|
357 + | self.message =
|
358 + | /* ServerBuilderGenerator.kt:345 */Some(
|
359 + | /* ServerBuilderGenerator.kt:376 */input
|
360 + | /* ServerBuilderGenerator.kt:345 */)
|
361 + | /* ServerBuilderGenerator.kt:344 */;
|
214 362 | self
|
363 + | /* ServerBuilderGenerator.kt:343 */
|
215 364 | }
|
216 - | /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
217 - | ///
|
365 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
366 + | /// /* ServerBuilderGenerator.kt:260 */
|
218 367 | /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
|
219 368 | ///
|
220 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
369 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
370 + | /* ServerBuilderGenerator.kt:271 */
|
221 371 | pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
222 372 | self.build_enforcing_all_constraints()
|
223 373 | }
|
374 + | /* ServerBuilderGenerator.kt:283 */
|
224 375 | fn build_enforcing_all_constraints(
|
225 376 | self,
|
226 377 | ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
227 - | Ok(crate::model::ValidationExceptionField {
|
228 - | path: self.path.ok_or(ConstraintViolation::MissingPath)?,
|
229 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
230 - | })
|
231 - | }
|
378 + | /* ServerBuilderGenerator.kt:287 */
|
379 + | Ok(
|
380 + | /* ServerBuilderGenerator.kt:542 */
|
381 + | crate::model::ValidationExceptionField {
|
382 + | /* ServerBuilderGenerator.kt:546 */
|
383 + | path: self
|
384 + | .path
|
385 + | /* ServerBuilderGenerator.kt:569 */
|
386 + | .ok_or(ConstraintViolation::MissingPath)?,
|
387 + | /* ServerBuilderGenerator.kt:546 */
|
388 + | message: self
|
389 + | .message
|
390 + | /* ServerBuilderGenerator.kt:569 */
|
391 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
392 + | /* ServerBuilderGenerator.kt:542 */
|
393 + | }, /* ServerBuilderGenerator.kt:287 */
|
394 + | )
|
395 + | /* ServerBuilderGenerator.kt:283 */
|
396 + | }
|
397 + | /* ServerBuilderGenerator.kt:215 */
|
232 398 | }
|
399 + |
|
400 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
233 401 | }
|
234 - | /// See [`CaptureEvent`](crate::model::CaptureEvent).
|
402 + | /// /* ServerBuilderGenerator.kt:171 */See [`CaptureEvent`](crate::model::CaptureEvent).
|
235 403 | pub mod capture_event {
|
236 404 |
|
405 + | /* ServerBuilderGenerator.kt:461 */
|
237 406 | impl ::std::convert::From<Builder> for crate::model::CaptureEvent {
|
238 407 | fn from(builder: Builder) -> Self {
|
239 408 | builder.build()
|
240 409 | }
|
241 410 | }
|
242 - | /// A builder for [`CaptureEvent`](crate::model::CaptureEvent).
|
411 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`CaptureEvent`](crate::model::CaptureEvent).
|
412 + | /* RustType.kt:516 */
|
243 413 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
414 + | /* ServerBuilderGenerator.kt:211 */
|
244 415 | pub struct Builder {
|
416 + | /* ServerBuilderGenerator.kt:308 */
|
245 417 | pub(crate) name: ::std::option::Option<::std::string::String>,
|
246 - | pub(crate) captured: ::std::option::Option<bool>,
|
247 - | pub(crate) shiny: ::std::option::Option<bool>,
|
418 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) captured: ::std::option::Option<bool>,
|
419 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) shiny: ::std::option::Option<bool>,
|
420 + | /* ServerBuilderGenerator.kt:308 */
|
248 421 | pub(crate) pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
|
422 + | /* ServerBuilderGenerator.kt:211 */
|
249 423 | }
|
424 + | /* ServerBuilderGenerator.kt:215 */
|
250 425 | impl Builder {
|
426 + | /* ServerBuilderGenerator.kt:331 */
|
251 427 | #[allow(missing_docs)] // documentation missing in model
|
428 + | /* ServerBuilderGenerator.kt:343 */
|
252 429 | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
253 - | self.name = input;
|
430 + | /* ServerBuilderGenerator.kt:344 */
|
431 + | self.name =
|
432 + | /* ServerBuilderGenerator.kt:376 */input
|
433 + | /* ServerBuilderGenerator.kt:344 */;
|
254 434 | self
|
435 + | /* ServerBuilderGenerator.kt:343 */
|
255 436 | }
|
437 + | /* ServerBuilderGenerator.kt:331 */
|
256 438 | #[allow(missing_docs)] // documentation missing in model
|
439 + | /* ServerBuilderGenerator.kt:343 */
|
257 440 | pub fn captured(mut self, input: ::std::option::Option<bool>) -> Self {
|
258 - | self.captured = input;
|
441 + | /* ServerBuilderGenerator.kt:344 */
|
442 + | self.captured =
|
443 + | /* ServerBuilderGenerator.kt:376 */input
|
444 + | /* ServerBuilderGenerator.kt:344 */;
|
259 445 | self
|
446 + | /* ServerBuilderGenerator.kt:343 */
|
260 447 | }
|
448 + | /* ServerBuilderGenerator.kt:331 */
|
261 449 | #[allow(missing_docs)] // documentation missing in model
|
450 + | /* ServerBuilderGenerator.kt:343 */
|
262 451 | pub fn shiny(mut self, input: ::std::option::Option<bool>) -> Self {
|
263 - | self.shiny = input;
|
452 + | /* ServerBuilderGenerator.kt:344 */
|
453 + | self.shiny =
|
454 + | /* ServerBuilderGenerator.kt:376 */input
|
455 + | /* ServerBuilderGenerator.kt:344 */;
|
264 456 | self
|
457 + | /* ServerBuilderGenerator.kt:343 */
|
265 458 | }
|
459 + | /* ServerBuilderGenerator.kt:331 */
|
266 460 | #[allow(missing_docs)] // documentation missing in model
|
461 + | /* ServerBuilderGenerator.kt:343 */
|
267 462 | pub fn pokedex_update(
|
268 463 | mut self,
|
269 464 | input: ::std::option::Option<::aws_smithy_types::Blob>,
|
270 465 | ) -> Self {
|
271 - | self.pokedex_update = input;
|
466 + | /* ServerBuilderGenerator.kt:344 */
|
467 + | self.pokedex_update =
|
468 + | /* ServerBuilderGenerator.kt:376 */input
|
469 + | /* ServerBuilderGenerator.kt:344 */;
|
272 470 | self
|
471 + | /* ServerBuilderGenerator.kt:343 */
|
273 472 | }
|
274 - | /// Consumes the builder and constructs a [`CaptureEvent`](crate::model::CaptureEvent).
|
473 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CaptureEvent`](crate::model::CaptureEvent).
|
474 + | /* ServerBuilderGenerator.kt:271 */
|
275 475 | pub fn build(self) -> crate::model::CaptureEvent {
|
276 476 | self.build_enforcing_all_constraints()
|
277 477 | }
|
478 + | /* ServerBuilderGenerator.kt:283 */
|
278 479 | fn build_enforcing_all_constraints(self) -> crate::model::CaptureEvent {
|
480 + | /* ServerBuilderGenerator.kt:542 */
|
279 481 | crate::model::CaptureEvent {
|
482 + | /* ServerBuilderGenerator.kt:546 */
|
280 483 | name: self.name,
|
484 + | /* ServerBuilderGenerator.kt:546 */
|
281 485 | captured: self.captured,
|
486 + | /* ServerBuilderGenerator.kt:546 */
|
282 487 | shiny: self.shiny,
|
488 + | /* ServerBuilderGenerator.kt:546 */
|
283 489 | pokedex_update: self.pokedex_update,
|
490 + | /* ServerBuilderGenerator.kt:542 */
|
284 491 | }
|
492 + | /* ServerBuilderGenerator.kt:283 */
|
285 493 | }
|
494 + | /* ServerBuilderGenerator.kt:215 */
|
286 495 | }
|
496 + |
|
497 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
287 498 | }
|
288 - | /// See [`CapturingEvent`](crate::model::CapturingEvent).
|
499 + | /// /* ServerBuilderGenerator.kt:171 */See [`CapturingEvent`](crate::model::CapturingEvent).
|
289 500 | pub mod capturing_event {
|
290 501 |
|
502 + | /* ServerBuilderGenerator.kt:461 */
|
291 503 | impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
|
292 504 | fn from(builder: Builder) -> Self {
|
293 505 | builder.build()
|
294 506 | }
|
295 507 | }
|
296 - | /// A builder for [`CapturingEvent`](crate::model::CapturingEvent).
|
508 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`CapturingEvent`](crate::model::CapturingEvent).
|
509 + | /* RustType.kt:516 */
|
297 510 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
511 + | /* ServerBuilderGenerator.kt:211 */
|
298 512 | pub struct Builder {
|
513 + | /* ServerBuilderGenerator.kt:308 */
|
299 514 | pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
|
515 + | /* ServerBuilderGenerator.kt:211 */
|
300 516 | }
|
517 + | /* ServerBuilderGenerator.kt:215 */
|
301 518 | impl Builder {
|
519 + | /* ServerBuilderGenerator.kt:331 */
|
302 520 | #[allow(missing_docs)] // documentation missing in model
|
521 + | /* ServerBuilderGenerator.kt:343 */
|
303 522 | pub fn payload(
|
304 523 | mut self,
|
305 524 | input: ::std::option::Option<crate::model::CapturingPayload>,
|
306 525 | ) -> Self {
|
307 - | self.payload = input;
|
526 + | /* ServerBuilderGenerator.kt:344 */
|
527 + | self.payload =
|
528 + | /* ServerBuilderGenerator.kt:376 */input
|
529 + | /* ServerBuilderGenerator.kt:344 */;
|
308 530 | self
|
531 + | /* ServerBuilderGenerator.kt:343 */
|
309 532 | }
|
533 + | /* ServerBuilderGenerator.kt:426 */
|
310 534 | #[allow(missing_docs)] // documentation missing in model
|
535 + | /* ServerBuilderGenerator.kt:428 */
|
311 536 | pub(crate) fn set_payload(
|
312 537 | mut self,
|
313 538 | input: Option<impl ::std::convert::Into<crate::model::CapturingPayload>>,
|
314 539 | ) -> Self {
|
540 + | /* ServerBuilderGenerator.kt:429 */
|
315 541 | self.payload = input.map(|v| v.into());
|
316 542 | self
|
543 + | /* ServerBuilderGenerator.kt:428 */
|
317 544 | }
|
318 - | /// Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
|
545 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
|
546 + | /* ServerBuilderGenerator.kt:271 */
|
319 547 | pub fn build(self) -> crate::model::CapturingEvent {
|
320 548 | self.build_enforcing_all_constraints()
|
321 549 | }
|
550 + | /* ServerBuilderGenerator.kt:283 */
|
322 551 | fn build_enforcing_all_constraints(self) -> crate::model::CapturingEvent {
|
552 + | /* ServerBuilderGenerator.kt:542 */
|
323 553 | crate::model::CapturingEvent {
|
554 + | /* ServerBuilderGenerator.kt:546 */
|
324 555 | payload: self.payload,
|
556 + | /* ServerBuilderGenerator.kt:542 */
|
325 557 | }
|
558 + | /* ServerBuilderGenerator.kt:283 */
|
326 559 | }
|
560 + | /* ServerBuilderGenerator.kt:215 */
|
327 561 | }
|
562 + |
|
563 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
328 564 | }
|
329 - | /// See [`CapturingPayload`](crate::model::CapturingPayload).
|
565 + | /// /* ServerBuilderGenerator.kt:171 */See [`CapturingPayload`](crate::model::CapturingPayload).
|
330 566 | pub mod capturing_payload {
|
331 567 |
|
568 + | /* ServerBuilderGenerator.kt:461 */
|
332 569 | impl ::std::convert::From<Builder> for crate::model::CapturingPayload {
|
333 570 | fn from(builder: Builder) -> Self {
|
334 571 | builder.build()
|
335 572 | }
|
336 573 | }
|
337 - | /// A builder for [`CapturingPayload`](crate::model::CapturingPayload).
|
574 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`CapturingPayload`](crate::model::CapturingPayload).
|
575 + | /* RustType.kt:516 */
|
338 576 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
577 + | /* ServerBuilderGenerator.kt:211 */
|
339 578 | pub struct Builder {
|
579 + | /* ServerBuilderGenerator.kt:308 */
|
340 580 | pub(crate) name: ::std::option::Option<::std::string::String>,
|
581 + | /* ServerBuilderGenerator.kt:308 */
|
341 582 | pub(crate) pokeball: ::std::option::Option<::std::string::String>,
|
583 + | /* ServerBuilderGenerator.kt:211 */
|
342 584 | }
|
585 + | /* ServerBuilderGenerator.kt:215 */
|
343 586 | impl Builder {
|
587 + | /* ServerBuilderGenerator.kt:331 */
|
344 588 | #[allow(missing_docs)] // documentation missing in model
|
589 + | /* ServerBuilderGenerator.kt:343 */
|
345 590 | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
346 - | self.name = input;
|
591 + | /* ServerBuilderGenerator.kt:344 */
|
592 + | self.name =
|
593 + | /* ServerBuilderGenerator.kt:376 */input
|
594 + | /* ServerBuilderGenerator.kt:344 */;
|
347 595 | self
|
596 + | /* ServerBuilderGenerator.kt:343 */
|
348 597 | }
|
598 + | /* ServerBuilderGenerator.kt:426 */
|
349 599 | #[allow(missing_docs)] // documentation missing in model
|
600 + | /* ServerBuilderGenerator.kt:428 */
|
350 601 | pub(crate) fn set_name(
|
351 602 | mut self,
|
352 603 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
353 604 | ) -> Self {
|
605 + | /* ServerBuilderGenerator.kt:429 */
|
354 606 | self.name = input.map(|v| v.into());
|
355 607 | self
|
608 + | /* ServerBuilderGenerator.kt:428 */
|
356 609 | }
|
610 + | /* ServerBuilderGenerator.kt:331 */
|
357 611 | #[allow(missing_docs)] // documentation missing in model
|
612 + | /* ServerBuilderGenerator.kt:343 */
|
358 613 | pub fn pokeball(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
359 - | self.pokeball = input;
|
614 + | /* ServerBuilderGenerator.kt:344 */
|
615 + | self.pokeball =
|
616 + | /* ServerBuilderGenerator.kt:376 */input
|
617 + | /* ServerBuilderGenerator.kt:344 */;
|
360 618 | self
|
619 + | /* ServerBuilderGenerator.kt:343 */
|
361 620 | }
|
621 + | /* ServerBuilderGenerator.kt:426 */
|
362 622 | #[allow(missing_docs)] // documentation missing in model
|
623 + | /* ServerBuilderGenerator.kt:428 */
|
363 624 | pub(crate) fn set_pokeball(
|
364 625 | mut self,
|
365 626 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
366 627 | ) -> Self {
|
628 + | /* ServerBuilderGenerator.kt:429 */
|
367 629 | self.pokeball = input.map(|v| v.into());
|
368 630 | self
|
631 + | /* ServerBuilderGenerator.kt:428 */
|
369 632 | }
|
370 - | /// Consumes the builder and constructs a [`CapturingPayload`](crate::model::CapturingPayload).
|
633 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CapturingPayload`](crate::model::CapturingPayload).
|
634 + | /* ServerBuilderGenerator.kt:271 */
|
371 635 | pub fn build(self) -> crate::model::CapturingPayload {
|
372 636 | self.build_enforcing_all_constraints()
|
373 637 | }
|
638 + | /* ServerBuilderGenerator.kt:283 */
|
374 639 | fn build_enforcing_all_constraints(self) -> crate::model::CapturingPayload {
|
640 + | /* ServerBuilderGenerator.kt:542 */
|
375 641 | crate::model::CapturingPayload {
|
642 + | /* ServerBuilderGenerator.kt:546 */
|
376 643 | name: self.name,
|
644 + | /* ServerBuilderGenerator.kt:546 */
|
377 645 | pokeball: self.pokeball,
|
646 + | /* ServerBuilderGenerator.kt:542 */
|
378 647 | }
|
648 + | /* ServerBuilderGenerator.kt:283 */
|
379 649 | }
|
650 + | /* ServerBuilderGenerator.kt:215 */
|
380 651 | }
|
652 + |
|
653 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
381 654 | }
|