1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* RustType.kt:516 */
|
2 3 | #[::pyo3::pyclass]
|
4 + | /* PythonServerStructureGenerator.kt:63 */
|
3 5 | /// :param path str:
|
4 6 | /// :param message str:
|
5 7 | /// :rtype None:
|
6 - | /// Describes one specific validation failure for an input member.
|
8 + | /// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
|
9 + | /* RustType.kt:516 */
|
7 10 | #[derive(
|
8 11 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
9 12 | )]
|
10 - | pub struct ValidationExceptionField {
|
13 + | pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
|
14 + | /* RustType.kt:516 */
|
11 15 | #[pyo3(get, set)]
|
16 + | /* PythonServerStructureGenerator.kt:80 */
|
12 17 | /// :type str:
|
13 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
18 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
14 19 | pub path: ::std::string::String,
|
20 + | /* RustType.kt:516 */
|
15 21 | #[pyo3(get, set)]
|
22 + | /* PythonServerStructureGenerator.kt:80 */
|
16 23 | /// :type str:
|
17 - | /// A detailed description of the validation failure.
|
24 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
18 25 | pub message: ::std::string::String,
|
26 + | /* StructureGenerator.kt:201 */
|
19 27 | }
|
28 + | /* StructureGenerator.kt:135 */
|
20 29 | impl ValidationExceptionField {
|
21 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
30 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
31 + | /* StructureGenerator.kt:166 */
|
22 32 | pub fn path(&self) -> &str {
|
33 + | /* StructureGenerator.kt:171 */
|
23 34 | use std::ops::Deref;
|
24 35 | self.path.deref()
|
36 + | /* StructureGenerator.kt:166 */
|
25 37 | }
|
26 - | /// A detailed description of the validation failure.
|
38 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
39 + | /* StructureGenerator.kt:166 */
|
27 40 | pub fn message(&self) -> &str {
|
41 + | /* StructureGenerator.kt:171 */
|
28 42 | use std::ops::Deref;
|
29 43 | self.message.deref()
|
44 + | /* StructureGenerator.kt:166 */
|
30 45 | }
|
46 + | /* StructureGenerator.kt:135 */
|
31 47 | }
|
48 + | /* RustType.kt:516 */
|
32 49 | #[allow(clippy::new_without_default)]
|
50 + | /* RustType.kt:516 */
|
33 51 | #[allow(clippy::too_many_arguments)]
|
52 + | /* RustType.kt:516 */
|
34 53 | #[::pyo3::pymethods]
|
54 + | /* PythonServerStructureGenerator.kt:88 */
|
35 55 | impl ValidationExceptionField {
|
36 56 | #[new]
|
37 57 | pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
|
38 58 | Self { path, message }
|
39 59 | }
|
40 60 | fn __repr__(&self) -> String {
|
41 61 | format!("{self:?}")
|
42 62 | }
|
43 63 | fn __str__(&self) -> String {
|
44 64 | format!("{self:?}")
|
45 65 | }
|
46 66 | }
|
67 + | /* PythonServerStructureGenerator.kt:111 */
|
47 68 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ValidationExceptionField> {
|
48 69 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
49 70 | ob.extract::<ValidationExceptionField>().map(Box::new)
|
50 71 | }
|
51 72 | }
|
52 73 |
|
53 74 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ValidationExceptionField> {
|
54 75 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
55 76 | (*self).into_py(py)
|
56 77 | }
|
57 78 | }
|
79 + | /* ServerCodegenVisitor.kt:370 */
|
58 80 | impl ValidationExceptionField {
|
59 - | /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
81 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
82 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
60 83 | pub fn builder() -> crate::model::validation_exception_field::Builder {
|
84 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
61 85 | crate::model::validation_exception_field::Builder::default()
|
86 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
62 87 | }
|
88 + | /* ServerCodegenVisitor.kt:370 */
|
63 89 | }
|
64 90 |
|
91 + | /* RustType.kt:516 */
|
65 92 | #[::pyo3::pyclass]
|
66 - | /// :param language typing.Optional\[str\]:
|
93 + | /* PythonServerStructureGenerator.kt:63 */
|
67 94 | /// :param greeting str:
|
95 + | /// :param language typing.Optional\[str\]:
|
68 96 | /// :param farewell typing.Optional\[rest_json.model.Farewell\]:
|
69 97 | /// :rtype None:
|
98 + | /* StructureGenerator.kt:197 */
|
70 99 | #[allow(missing_docs)] // documentation missing in model
|
100 + | /* RustType.kt:516 */
|
71 101 | #[derive(
|
72 102 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
73 103 | )]
|
74 - | pub struct Dialog {
|
104 + | pub /* StructureGenerator.kt:201 */ struct Dialog {
|
105 + | /* RustType.kt:516 */
|
75 106 | #[pyo3(get, set)]
|
107 + | /* PythonServerStructureGenerator.kt:80 */
|
76 108 | /// :type typing.Optional\[str\]:
|
109 + | /* StructureGenerator.kt:231 */
|
77 110 | #[allow(missing_docs)] // documentation missing in model
|
78 111 | pub language: ::std::option::Option<::std::string::String>,
|
112 + | /* RustType.kt:516 */
|
79 113 | #[pyo3(get, set)]
|
114 + | /* PythonServerStructureGenerator.kt:80 */
|
80 115 | /// :type str:
|
116 + | /* StructureGenerator.kt:231 */
|
81 117 | #[allow(missing_docs)] // documentation missing in model
|
82 118 | pub greeting: ::std::string::String,
|
119 + | /* RustType.kt:516 */
|
83 120 | #[pyo3(get, set)]
|
121 + | /* PythonServerStructureGenerator.kt:80 */
|
84 122 | /// :type typing.Optional\[rest_json.model.Farewell\]:
|
123 + | /* StructureGenerator.kt:231 */
|
85 124 | #[allow(missing_docs)] // documentation missing in model
|
86 125 | pub farewell: ::std::option::Option<crate::model::Farewell>,
|
126 + | /* StructureGenerator.kt:201 */
|
87 127 | }
|
128 + | /* StructureGenerator.kt:135 */
|
88 129 | impl Dialog {
|
130 + | /* StructureGenerator.kt:231 */
|
89 131 | #[allow(missing_docs)] // documentation missing in model
|
132 + | /* StructureGenerator.kt:166 */
|
90 133 | pub fn language(&self) -> ::std::option::Option<&str> {
|
134 + | /* StructureGenerator.kt:169 */
|
91 135 | self.language.as_deref()
|
136 + | /* StructureGenerator.kt:166 */
|
92 137 | }
|
138 + | /* StructureGenerator.kt:231 */
|
93 139 | #[allow(missing_docs)] // documentation missing in model
|
140 + | /* StructureGenerator.kt:166 */
|
94 141 | pub fn greeting(&self) -> &str {
|
142 + | /* StructureGenerator.kt:171 */
|
95 143 | use std::ops::Deref;
|
96 144 | self.greeting.deref()
|
145 + | /* StructureGenerator.kt:166 */
|
97 146 | }
|
147 + | /* StructureGenerator.kt:231 */
|
98 148 | #[allow(missing_docs)] // documentation missing in model
|
149 + | /* StructureGenerator.kt:166 */
|
99 150 | pub fn farewell(&self) -> ::std::option::Option<&crate::model::Farewell> {
|
151 + | /* StructureGenerator.kt:170 */
|
100 152 | self.farewell.as_ref()
|
153 + | /* StructureGenerator.kt:166 */
|
101 154 | }
|
155 + | /* StructureGenerator.kt:135 */
|
102 156 | }
|
157 + | /* RustType.kt:516 */
|
103 158 | #[allow(clippy::new_without_default)]
|
159 + | /* RustType.kt:516 */
|
104 160 | #[allow(clippy::too_many_arguments)]
|
161 + | /* RustType.kt:516 */
|
105 162 | #[::pyo3::pymethods]
|
163 + | /* PythonServerStructureGenerator.kt:88 */
|
106 164 | impl Dialog {
|
107 165 | #[new]
|
108 166 | pub fn new(
|
109 - | language: ::std::option::Option<::std::string::String>,
|
110 167 | greeting: ::std::string::String,
|
168 + | language: ::std::option::Option<::std::string::String>,
|
111 169 | farewell: ::std::option::Option<crate::model::Farewell>,
|
112 170 | ) -> Self {
|
113 171 | Self {
|
114 - | language,
|
115 172 | greeting,
|
173 + | language,
|
116 174 | farewell,
|
117 175 | }
|
118 176 | }
|
119 177 | fn __repr__(&self) -> String {
|
120 178 | format!("{self:?}")
|
121 179 | }
|
122 180 | fn __str__(&self) -> String {
|
123 181 | format!("{self:?}")
|
124 182 | }
|
125 183 | }
|
184 + | /* PythonServerStructureGenerator.kt:111 */
|
126 185 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Dialog> {
|
127 186 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
128 187 | ob.extract::<Dialog>().map(Box::new)
|
129 188 | }
|
130 189 | }
|
131 190 |
|
132 191 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Dialog> {
|
133 192 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
134 193 | (*self).into_py(py)
|
135 194 | }
|
136 195 | }
|
196 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
137 197 | impl crate::constrained::Constrained for crate::model::Dialog {
|
138 198 | type Unconstrained = crate::model::dialog_internal::Builder;
|
139 199 | }
|
200 + | /* ServerCodegenVisitor.kt:370 */
|
140 201 | impl Dialog {
|
141 - | /// Creates a new builder-style object to manufacture [`Dialog`](crate::model::Dialog).
|
202 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`Dialog`](crate::model::Dialog).
|
203 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
142 204 | pub fn builder() -> crate::model::dialog::Builder {
|
205 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
143 206 | crate::model::dialog::Builder::default()
|
207 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
144 208 | }
|
209 + | /* ServerCodegenVisitor.kt:370 */
|
145 210 | }
|
146 211 |
|
212 + | /* RustType.kt:516 */
|
147 213 | #[::pyo3::pyclass]
|
214 + | /* PythonServerStructureGenerator.kt:63 */
|
148 215 | /// :param phrase str:
|
149 216 | /// :rtype None:
|
217 + | /* StructureGenerator.kt:197 */
|
150 218 | #[allow(missing_docs)] // documentation missing in model
|
219 + | /* RustType.kt:516 */
|
151 220 | #[derive(
|
152 221 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
153 222 | )]
|
154 - | pub struct Farewell {
|
223 + | pub /* StructureGenerator.kt:201 */ struct Farewell {
|
224 + | /* RustType.kt:516 */
|
155 225 | #[pyo3(get, set)]
|
226 + | /* PythonServerStructureGenerator.kt:80 */
|
156 227 | /// :type str:
|
228 + | /* StructureGenerator.kt:231 */
|
157 229 | #[allow(missing_docs)] // documentation missing in model
|
158 230 | pub phrase: ::std::string::String,
|
231 + | /* StructureGenerator.kt:201 */
|
159 232 | }
|
233 + | /* StructureGenerator.kt:135 */
|
160 234 | impl Farewell {
|
235 + | /* StructureGenerator.kt:231 */
|
161 236 | #[allow(missing_docs)] // documentation missing in model
|
237 + | /* StructureGenerator.kt:166 */
|
162 238 | pub fn phrase(&self) -> &str {
|
239 + | /* StructureGenerator.kt:171 */
|
163 240 | use std::ops::Deref;
|
164 241 | self.phrase.deref()
|
242 + | /* StructureGenerator.kt:166 */
|
165 243 | }
|
244 + | /* StructureGenerator.kt:135 */
|
166 245 | }
|
246 + | /* RustType.kt:516 */
|
167 247 | #[allow(clippy::new_without_default)]
|
248 + | /* RustType.kt:516 */
|
168 249 | #[allow(clippy::too_many_arguments)]
|
250 + | /* RustType.kt:516 */
|
169 251 | #[::pyo3::pymethods]
|
252 + | /* PythonServerStructureGenerator.kt:88 */
|
170 253 | impl Farewell {
|
171 254 | #[new]
|
172 255 | pub fn new(phrase: ::std::string::String) -> Self {
|
173 256 | Self { phrase }
|
174 257 | }
|
175 258 | fn __repr__(&self) -> String {
|
176 259 | format!("{self:?}")
|
177 260 | }
|
178 261 | fn __str__(&self) -> String {
|
179 262 | format!("{self:?}")
|
180 263 | }
|
181 264 | }
|
265 + | /* PythonServerStructureGenerator.kt:111 */
|
182 266 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Farewell> {
|
183 267 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
184 268 | ob.extract::<Farewell>().map(Box::new)
|
185 269 | }
|
186 270 | }
|
187 271 |
|
188 272 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Farewell> {
|
189 273 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
190 274 | (*self).into_py(py)
|
191 275 | }
|
192 276 | }
|
277 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
193 278 | impl crate::constrained::Constrained for crate::model::Farewell {
|
194 279 | type Unconstrained = crate::model::farewell_internal::Builder;
|
195 280 | }
|
281 + | /* ServerCodegenVisitor.kt:370 */
|
196 282 | impl Farewell {
|
197 - | /// Creates a new builder-style object to manufacture [`Farewell`](crate::model::Farewell).
|
283 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`Farewell`](crate::model::Farewell).
|
284 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
198 285 | pub fn builder() -> crate::model::farewell::Builder {
|
286 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
199 287 | crate::model::farewell::Builder::default()
|
288 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
200 289 | }
|
290 + | /* ServerCodegenVisitor.kt:370 */
|
201 291 | }
|
202 292 |
|
293 + | /* RustType.kt:516 */
|
203 294 | #[::pyo3::pyclass]
|
295 + | /* PythonServerStructureGenerator.kt:63 */
|
204 296 | /// :param dialog rest_json.model.Dialog:
|
205 297 | /// :param dialog_list typing.List\[rest_json.model.Dialog\]:
|
206 298 | /// :param dialog_map typing.Dict\[str, rest_json.model.Dialog\]:
|
207 299 | /// :rtype None:
|
300 + | /* StructureGenerator.kt:197 */
|
208 301 | #[allow(missing_docs)] // documentation missing in model
|
302 + | /* RustType.kt:516 */
|
209 303 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
210 - | pub struct TopLevel {
|
304 + | pub /* StructureGenerator.kt:201 */ struct TopLevel {
|
305 + | /* RustType.kt:516 */
|
211 306 | #[pyo3(get, set)]
|
307 + | /* PythonServerStructureGenerator.kt:80 */
|
212 308 | /// :type rest_json.model.Dialog:
|
309 + | /* StructureGenerator.kt:231 */
|
213 310 | #[allow(missing_docs)] // documentation missing in model
|
214 311 | pub dialog: crate::model::Dialog,
|
312 + | /* RustType.kt:516 */
|
215 313 | #[pyo3(get, set)]
|
314 + | /* PythonServerStructureGenerator.kt:80 */
|
216 315 | /// :type typing.List\[rest_json.model.Dialog\]:
|
316 + | /* StructureGenerator.kt:231 */
|
217 317 | #[allow(missing_docs)] // documentation missing in model
|
218 318 | pub dialog_list: ::std::vec::Vec<crate::model::Dialog>,
|
319 + | /* RustType.kt:516 */
|
219 320 | #[pyo3(get, set)]
|
321 + | /* PythonServerStructureGenerator.kt:80 */
|
220 322 | /// :type typing.Dict\[str, rest_json.model.Dialog\]:
|
323 + | /* StructureGenerator.kt:231 */
|
221 324 | #[allow(missing_docs)] // documentation missing in model
|
222 325 | pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
326 + | /* StructureGenerator.kt:201 */
|
223 327 | }
|
328 + | /* StructureGenerator.kt:135 */
|
224 329 | impl TopLevel {
|
330 + | /* StructureGenerator.kt:231 */
|
225 331 | #[allow(missing_docs)] // documentation missing in model
|
332 + | /* StructureGenerator.kt:166 */
|
226 333 | pub fn dialog(&self) -> &crate::model::Dialog {
|
334 + | /* StructureGenerator.kt:172 */
|
227 335 | &self.dialog
|
336 + | /* StructureGenerator.kt:166 */
|
228 337 | }
|
338 + | /* StructureGenerator.kt:231 */
|
229 339 | #[allow(missing_docs)] // documentation missing in model
|
340 + | /* StructureGenerator.kt:166 */
|
230 341 | pub fn dialog_list(&self) -> &[crate::model::Dialog] {
|
342 + | /* StructureGenerator.kt:171 */
|
231 343 | use std::ops::Deref;
|
232 344 | self.dialog_list.deref()
|
345 + | /* StructureGenerator.kt:166 */
|
233 346 | }
|
347 + | /* StructureGenerator.kt:231 */
|
234 348 | #[allow(missing_docs)] // documentation missing in model
|
349 + | /* StructureGenerator.kt:166 */
|
235 350 | pub fn dialog_map(
|
236 351 | &self,
|
237 352 | ) -> &::std::collections::HashMap<::std::string::String, crate::model::Dialog> {
|
353 + | /* StructureGenerator.kt:172 */
|
238 354 | &self.dialog_map
|
355 + | /* StructureGenerator.kt:166 */
|
239 356 | }
|
357 + | /* StructureGenerator.kt:135 */
|
240 358 | }
|
359 + | /* RustType.kt:516 */
|
241 360 | #[allow(clippy::new_without_default)]
|
361 + | /* RustType.kt:516 */
|
242 362 | #[allow(clippy::too_many_arguments)]
|
363 + | /* RustType.kt:516 */
|
243 364 | #[::pyo3::pymethods]
|
365 + | /* PythonServerStructureGenerator.kt:88 */
|
244 366 | impl TopLevel {
|
245 367 | #[new]
|
246 368 | pub fn new(
|
247 369 | dialog: crate::model::Dialog,
|
248 370 | dialog_list: ::std::vec::Vec<crate::model::Dialog>,
|
249 371 | dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
250 372 | ) -> Self {
|
251 373 | Self {
|
252 374 | dialog,
|
253 375 | dialog_list,
|
254 376 | dialog_map,
|
255 377 | }
|
256 378 | }
|
257 379 | fn __repr__(&self) -> String {
|
258 380 | format!("{self:?}")
|
259 381 | }
|
260 382 | fn __str__(&self) -> String {
|
261 383 | format!("{self:?}")
|
262 384 | }
|
263 385 | }
|
386 + | /* PythonServerStructureGenerator.kt:111 */
|
264 387 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TopLevel> {
|
265 388 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
266 389 | ob.extract::<TopLevel>().map(Box::new)
|
267 390 | }
|
268 391 | }
|
269 392 |
|
270 393 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TopLevel> {
|
271 394 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
272 395 | (*self).into_py(py)
|
273 396 | }
|
274 397 | }
|
398 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
275 399 | impl crate::constrained::Constrained for crate::model::TopLevel {
|
276 400 | type Unconstrained = crate::model::top_level_internal::Builder;
|
277 401 | }
|
402 + | /* ServerCodegenVisitor.kt:370 */
|
278 403 | impl TopLevel {
|
279 - | /// Creates a new builder-style object to manufacture [`TopLevel`](crate::model::TopLevel).
|
404 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`TopLevel`](crate::model::TopLevel).
|
405 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
280 406 | pub fn builder() -> crate::model::top_level::Builder {
|
407 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
281 408 | crate::model::top_level::Builder::default()
|
409 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
282 410 | }
|
411 + | /* ServerCodegenVisitor.kt:370 */
|
283 412 | }
|
284 413 |
|
414 + | /* RustType.kt:516 */
|
285 415 | #[::pyo3::pyclass]
|
416 + | /* EnumGenerator.kt:154 */
|
286 417 | #[allow(missing_docs)] // documentation missing in model
|
418 + | /* RustType.kt:516 */
|
287 419 | #[derive(
|
288 420 | ::std::clone::Clone,
|
289 421 | ::std::cmp::Eq,
|
290 422 | ::std::cmp::Ord,
|
291 423 | ::std::cmp::PartialEq,
|
292 424 | ::std::cmp::PartialOrd,
|
293 425 | ::std::fmt::Debug,
|
294 426 | ::std::hash::Hash,
|
295 427 | )]
|
296 - | pub enum TestEnum {
|
428 + | pub /* EnumGenerator.kt:267 */ enum TestEnum {
|
429 + | /* EnumGenerator.kt:154 */
|
297 430 | #[allow(missing_docs)] // documentation missing in model
|
431 + | /* EnumGenerator.kt:143 */
|
298 432 | Bar,
|
433 + | /* EnumGenerator.kt:154 */
|
299 434 | #[allow(missing_docs)] // documentation missing in model
|
435 + | /* EnumGenerator.kt:143 */
|
300 436 | Baz,
|
437 + | /* EnumGenerator.kt:154 */
|
301 438 | #[allow(missing_docs)] // documentation missing in model
|
439 + | /* EnumGenerator.kt:143 */
|
302 440 | Foo,
|
441 + | /* EnumGenerator.kt:267 */
|
303 442 | }
|
304 443 | pub(crate) mod test_enum_internal {
|
305 444 | #[derive(Debug, PartialEq)]
|
306 445 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
307 446 |
|
308 447 | impl ::std::fmt::Display for ConstraintViolation {
|
309 448 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
310 449 | write!(
|
311 450 | f,
|
312 451 | r#"Value provided for 'aws.protocoltests.restjson#TestEnum' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#
|
313 452 | )
|
314 453 | }
|
315 454 | }
|
316 455 |
|
317 456 | impl ::std::error::Error for ConstraintViolation {}
|
318 457 | impl ConstraintViolation {
|
319 458 | pub(crate) fn as_validation_exception_field(
|
320 459 | self,
|
321 460 | path: ::std::string::String,
|
322 461 | ) -> crate::model::ValidationExceptionField {
|
323 462 | crate::model::ValidationExceptionField {
|
324 463 | message: format!(
|
325 464 | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#,
|
326 465 | &path
|
327 466 | ),
|
328 467 | path,
|
329 468 | }
|
330 469 | }
|
331 470 | }
|
471 + |
|
472 + | /* ServerEnumGenerator.kt:46 */
|
332 473 | }
|
474 + | /* ServerEnumGenerator.kt:85 */
|
333 475 | impl ::std::convert::TryFrom<&str> for TestEnum {
|
334 476 | type Error = crate::model::test_enum_internal::ConstraintViolation;
|
335 477 | fn try_from(
|
336 478 | s: &str,
|
337 479 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
338 480 | match s {
|
339 481 | "BAR" => Ok(TestEnum::Bar),
|
340 482 | "BAZ" => Ok(TestEnum::Baz),
|
341 483 | "FOO" => Ok(TestEnum::Foo),
|
342 484 | _ => Err(crate::model::test_enum_internal::ConstraintViolation(
|
343 485 | s.to_owned(),
|
344 486 | )),
|
345 487 | }
|
346 488 | }
|
347 489 | }
|
348 490 | impl ::std::convert::TryFrom<::std::string::String> for TestEnum {
|
349 491 | type Error = crate::model::test_enum_internal::ConstraintViolation;
|
350 492 | fn try_from(
|
351 493 | s: ::std::string::String,
|
352 494 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
353 495 | {
|
354 496 | s.as_str().try_into()
|
355 497 | }
|
356 498 | }
|
499 + | /* ServerEnumGenerator.kt:145 */
|
357 500 | impl std::str::FromStr for TestEnum {
|
358 501 | type Err = crate::model::test_enum_internal::ConstraintViolation;
|
359 502 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
360 503 | Self::try_from(s)
|
361 504 | }
|
362 505 | }
|
506 + | /* EnumGenerator.kt:274 */
|
363 507 | impl TestEnum {
|
364 508 | /// Returns the `&str` value of the enum member.
|
365 509 | pub fn as_str(&self) -> &str {
|
366 510 | match self {
|
367 511 | TestEnum::Bar => "BAR",
|
368 512 | TestEnum::Baz => "BAZ",
|
369 513 | TestEnum::Foo => "FOO",
|
370 514 | }
|
371 515 | }
|
372 516 | /// Returns all the `&str` representations of the enum members.
|
373 517 | pub const fn values() -> &'static [&'static str] {
|
374 518 | &["BAR", "BAZ", "FOO"]
|
375 519 | }
|
376 520 | }
|
521 + | /* EnumGenerator.kt:223 */
|
377 522 | impl ::std::convert::AsRef<str> for TestEnum {
|
378 523 | fn as_ref(&self) -> &str {
|
379 524 | self.as_str()
|
380 525 | }
|
381 526 | }
|
527 + | /* RustType.kt:516 */
|
382 528 | #[::pyo3::pymethods]
|
529 + | /* PythonServerEnumGenerator.kt:41 */
|
383 530 | impl TestEnum {
|
384 531 | #[getter]
|
385 532 | pub fn name(&self) -> &str {
|
386 533 | match self {
|
387 534 | TestEnum::Bar => "Bar",
|
388 535 | TestEnum::Baz => "Baz",
|
389 536 | TestEnum::Foo => "Foo",
|
390 537 | }
|
391 538 | }
|
392 539 | #[getter]
|
393 540 | pub fn value(&self) -> &str {
|
394 541 | self.as_str()
|
395 542 | }
|
396 543 | fn __repr__(&self) -> String {
|
397 544 | self.as_str().to_owned()
|
398 545 | }
|
399 546 | fn __str__(&self) -> String {
|
400 547 | self.as_str().to_owned()
|
401 548 | }
|
402 549 | }
|
550 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
403 551 | impl crate::constrained::Constrained for TestEnum {
|
404 552 | type Unconstrained = ::std::string::String;
|
405 553 | }
|
406 554 |
|
407 555 | impl ::std::convert::From<::std::string::String>
|
408 556 | for crate::constrained::MaybeConstrained<crate::model::TestEnum>
|
409 557 | {
|
410 558 | fn from(value: ::std::string::String) -> Self {
|
411 559 | Self::Unconstrained(value)
|
412 560 | }
|
413 561 | }
|
414 562 |
|
563 + | /* RustType.kt:516 */
|
415 564 | #[::pyo3::pyclass]
|
565 + | /* PythonServerStructureGenerator.kt:63 */
|
416 566 | /// :param member int:
|
417 567 | /// :rtype None:
|
568 + | /* StructureGenerator.kt:197 */
|
418 569 | #[allow(missing_docs)] // documentation missing in model
|
570 + | /* RustType.kt:516 */
|
419 571 | #[derive(
|
420 572 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
421 573 | )]
|
422 - | pub struct ClientOptionalDefaults {
|
574 + | pub /* StructureGenerator.kt:201 */ struct ClientOptionalDefaults {
|
575 + | /* RustType.kt:516 */
|
423 576 | #[pyo3(get, set)]
|
577 + | /* PythonServerStructureGenerator.kt:80 */
|
424 578 | /// :type int:
|
579 + | /* StructureGenerator.kt:231 */
|
425 580 | #[allow(missing_docs)] // documentation missing in model
|
426 581 | pub member: i32,
|
582 + | /* StructureGenerator.kt:201 */
|
427 583 | }
|
584 + | /* StructureGenerator.kt:135 */
|
428 585 | impl ClientOptionalDefaults {
|
586 + | /* StructureGenerator.kt:231 */
|
429 587 | #[allow(missing_docs)] // documentation missing in model
|
588 + | /* StructureGenerator.kt:166 */
|
430 589 | pub fn member(&self) -> i32 {
|
590 + | /* StructureGenerator.kt:168 */
|
431 591 | self.member
|
592 + | /* StructureGenerator.kt:166 */
|
432 593 | }
|
594 + | /* StructureGenerator.kt:135 */
|
433 595 | }
|
596 + | /* RustType.kt:516 */
|
434 597 | #[allow(clippy::new_without_default)]
|
598 + | /* RustType.kt:516 */
|
435 599 | #[allow(clippy::too_many_arguments)]
|
600 + | /* RustType.kt:516 */
|
436 601 | #[::pyo3::pymethods]
|
602 + | /* PythonServerStructureGenerator.kt:88 */
|
437 603 | impl ClientOptionalDefaults {
|
438 604 | #[new]
|
439 605 | pub fn new(member: i32) -> Self {
|
440 606 | Self { member }
|
441 607 | }
|
442 608 | fn __repr__(&self) -> String {
|
443 609 | format!("{self:?}")
|
444 610 | }
|
445 611 | fn __str__(&self) -> String {
|
446 612 | format!("{self:?}")
|
447 613 | }
|
448 614 | }
|
615 + | /* PythonServerStructureGenerator.kt:111 */
|
449 616 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ClientOptionalDefaults> {
|
450 617 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
451 618 | ob.extract::<ClientOptionalDefaults>().map(Box::new)
|
452 619 | }
|
453 620 | }
|
454 621 |
|
455 622 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ClientOptionalDefaults> {
|
456 623 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
457 624 | (*self).into_py(py)
|
458 625 | }
|
459 626 | }
|
627 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
460 628 | impl crate::constrained::Constrained for crate::model::ClientOptionalDefaults {
|
461 629 | type Unconstrained = crate::model::client_optional_defaults_internal::Builder;
|
462 630 | }
|
631 + | /* ServerCodegenVisitor.kt:370 */
|
463 632 | impl ClientOptionalDefaults {
|
464 - | /// Creates a new builder-style object to manufacture [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
633 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
634 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
465 635 | pub fn builder() -> crate::model::client_optional_defaults::Builder {
|
636 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
466 637 | crate::model::client_optional_defaults::Builder::default()
|
638 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
467 639 | }
|
640 + | /* ServerCodegenVisitor.kt:370 */
|
468 641 | }
|
469 642 |
|
643 + | /* RustType.kt:516 */
|
470 644 | #[::pyo3::pyclass]
|
645 + | /* PythonServerStructureGenerator.kt:63 */
|
471 646 | /// :param default_string str:
|
472 647 | /// :param default_boolean bool:
|
473 648 | /// :param default_list typing.List\[str\]:
|
474 649 | /// :param default_document_map rest_json.types.Document:
|
475 650 | /// :param default_document_string rest_json.types.Document:
|
476 651 | /// :param default_document_boolean rest_json.types.Document:
|
477 652 | /// :param default_document_list rest_json.types.Document:
|
478 - | /// :param default_null_document typing.Optional\[rest_json.types.Document\]:
|
479 653 | /// :param default_timestamp rest_json.types.DateTime:
|
480 654 | /// :param default_blob rest_json.types.Blob:
|
481 655 | /// :param default_byte int:
|
482 656 | /// :param default_short int:
|
483 657 | /// :param default_integer int:
|
484 658 | /// :param default_long int:
|
485 659 | /// :param default_float float:
|
486 660 | /// :param default_double float:
|
487 661 | /// :param default_map typing.Dict\[str, str\]:
|
488 662 | /// :param default_enum rest_json.model.TestEnum:
|
489 663 | /// :param default_int_enum int:
|
490 664 | /// :param empty_string str:
|
491 665 | /// :param false_boolean bool:
|
492 666 | /// :param empty_blob rest_json.types.Blob:
|
493 667 | /// :param zero_byte int:
|
494 668 | /// :param zero_short int:
|
495 669 | /// :param zero_integer int:
|
496 670 | /// :param zero_long int:
|
497 671 | /// :param zero_float float:
|
498 672 | /// :param zero_double float:
|
673 + | /// :param default_null_document typing.Optional\[rest_json.types.Document\]:
|
499 674 | /// :rtype None:
|
675 + | /* StructureGenerator.kt:197 */
|
500 676 | #[allow(missing_docs)] // documentation missing in model
|
677 + | /* RustType.kt:516 */
|
501 678 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
502 - | pub struct Defaults {
|
679 + | pub /* StructureGenerator.kt:201 */ struct Defaults {
|
680 + | /* RustType.kt:516 */
|
503 681 | #[pyo3(get, set)]
|
682 + | /* PythonServerStructureGenerator.kt:80 */
|
504 683 | /// :type str:
|
684 + | /* StructureGenerator.kt:231 */
|
505 685 | #[allow(missing_docs)] // documentation missing in model
|
506 686 | pub default_string: ::std::string::String,
|
687 + | /* RustType.kt:516 */
|
507 688 | #[pyo3(get, set)]
|
689 + | /* PythonServerStructureGenerator.kt:80 */
|
508 690 | /// :type bool:
|
691 + | /* StructureGenerator.kt:231 */
|
509 692 | #[allow(missing_docs)] // documentation missing in model
|
510 693 | pub default_boolean: bool,
|
694 + | /* RustType.kt:516 */
|
511 695 | #[pyo3(get, set)]
|
696 + | /* PythonServerStructureGenerator.kt:80 */
|
512 697 | /// :type typing.List\[str\]:
|
698 + | /* StructureGenerator.kt:231 */
|
513 699 | #[allow(missing_docs)] // documentation missing in model
|
514 700 | pub default_list: ::std::vec::Vec<::std::string::String>,
|
701 + | /* RustType.kt:516 */
|
515 702 | #[pyo3(get, set)]
|
703 + | /* PythonServerStructureGenerator.kt:80 */
|
516 704 | /// :type rest_json.types.Document:
|
705 + | /* StructureGenerator.kt:231 */
|
517 706 | #[allow(missing_docs)] // documentation missing in model
|
518 707 | pub default_document_map: ::aws_smithy_http_server_python::types::Document,
|
708 + | /* RustType.kt:516 */
|
519 709 | #[pyo3(get, set)]
|
710 + | /* PythonServerStructureGenerator.kt:80 */
|
520 711 | /// :type rest_json.types.Document:
|
712 + | /* StructureGenerator.kt:231 */
|
521 713 | #[allow(missing_docs)] // documentation missing in model
|
522 714 | pub default_document_string: ::aws_smithy_http_server_python::types::Document,
|
715 + | /* RustType.kt:516 */
|
523 716 | #[pyo3(get, set)]
|
717 + | /* PythonServerStructureGenerator.kt:80 */
|
524 718 | /// :type rest_json.types.Document:
|
719 + | /* StructureGenerator.kt:231 */
|
525 720 | #[allow(missing_docs)] // documentation missing in model
|
526 721 | pub default_document_boolean: ::aws_smithy_http_server_python::types::Document,
|
722 + | /* RustType.kt:516 */
|
527 723 | #[pyo3(get, set)]
|
724 + | /* PythonServerStructureGenerator.kt:80 */
|
528 725 | /// :type rest_json.types.Document:
|
726 + | /* StructureGenerator.kt:231 */
|
529 727 | #[allow(missing_docs)] // documentation missing in model
|
530 728 | pub default_document_list: ::aws_smithy_http_server_python::types::Document,
|
729 + | /* RustType.kt:516 */
|
531 730 | #[pyo3(get, set)]
|
731 + | /* PythonServerStructureGenerator.kt:80 */
|
532 732 | /// :type typing.Optional\[rest_json.types.Document\]:
|
733 + | /* StructureGenerator.kt:231 */
|
533 734 | #[allow(missing_docs)] // documentation missing in model
|
534 735 | pub default_null_document:
|
535 736 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
737 + | /* RustType.kt:516 */
|
536 738 | #[pyo3(get, set)]
|
739 + | /* PythonServerStructureGenerator.kt:80 */
|
537 740 | /// :type rest_json.types.DateTime:
|
741 + | /* StructureGenerator.kt:231 */
|
538 742 | #[allow(missing_docs)] // documentation missing in model
|
539 743 | pub default_timestamp: ::aws_smithy_http_server_python::types::DateTime,
|
744 + | /* RustType.kt:516 */
|
540 745 | #[pyo3(get, set)]
|
746 + | /* PythonServerStructureGenerator.kt:80 */
|
541 747 | /// :type rest_json.types.Blob:
|
748 + | /* StructureGenerator.kt:231 */
|
542 749 | #[allow(missing_docs)] // documentation missing in model
|
543 750 | pub default_blob: ::aws_smithy_http_server_python::types::Blob,
|
751 + | /* RustType.kt:516 */
|
544 752 | #[pyo3(get, set)]
|
753 + | /* PythonServerStructureGenerator.kt:80 */
|
545 754 | /// :type int:
|
755 + | /* StructureGenerator.kt:231 */
|
546 756 | #[allow(missing_docs)] // documentation missing in model
|
547 757 | pub default_byte: i8,
|
758 + | /* RustType.kt:516 */
|
548 759 | #[pyo3(get, set)]
|
760 + | /* PythonServerStructureGenerator.kt:80 */
|
549 761 | /// :type int:
|
762 + | /* StructureGenerator.kt:231 */
|
550 763 | #[allow(missing_docs)] // documentation missing in model
|
551 764 | pub default_short: i16,
|
765 + | /* RustType.kt:516 */
|
552 766 | #[pyo3(get, set)]
|
767 + | /* PythonServerStructureGenerator.kt:80 */
|
553 768 | /// :type int:
|
769 + | /* StructureGenerator.kt:231 */
|
554 770 | #[allow(missing_docs)] // documentation missing in model
|
555 771 | pub default_integer: i32,
|
772 + | /* RustType.kt:516 */
|
556 773 | #[pyo3(get, set)]
|
774 + | /* PythonServerStructureGenerator.kt:80 */
|
557 775 | /// :type int:
|
776 + | /* StructureGenerator.kt:231 */
|
558 777 | #[allow(missing_docs)] // documentation missing in model
|
559 778 | pub default_long: i64,
|
779 + | /* RustType.kt:516 */
|
560 780 | #[pyo3(get, set)]
|
781 + | /* PythonServerStructureGenerator.kt:80 */
|
561 782 | /// :type float:
|
783 + | /* StructureGenerator.kt:231 */
|
562 784 | #[allow(missing_docs)] // documentation missing in model
|
563 785 | pub default_float: f32,
|
786 + | /* RustType.kt:516 */
|
564 787 | #[pyo3(get, set)]
|
788 + | /* PythonServerStructureGenerator.kt:80 */
|
565 789 | /// :type float:
|
790 + | /* StructureGenerator.kt:231 */
|
566 791 | #[allow(missing_docs)] // documentation missing in model
|
567 792 | pub default_double: f64,
|
793 + | /* RustType.kt:516 */
|
568 794 | #[pyo3(get, set)]
|
795 + | /* PythonServerStructureGenerator.kt:80 */
|
569 796 | /// :type typing.Dict\[str, str\]:
|
797 + | /* StructureGenerator.kt:231 */
|
570 798 | #[allow(missing_docs)] // documentation missing in model
|
571 799 | pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
800 + | /* RustType.kt:516 */
|
572 801 | #[pyo3(get, set)]
|
802 + | /* PythonServerStructureGenerator.kt:80 */
|
573 803 | /// :type rest_json.model.TestEnum:
|
804 + | /* StructureGenerator.kt:231 */
|
574 805 | #[allow(missing_docs)] // documentation missing in model
|
575 806 | pub default_enum: crate::model::TestEnum,
|
807 + | /* RustType.kt:516 */
|
576 808 | #[pyo3(get, set)]
|
809 + | /* PythonServerStructureGenerator.kt:80 */
|
577 810 | /// :type int:
|
811 + | /* StructureGenerator.kt:231 */
|
578 812 | #[allow(missing_docs)] // documentation missing in model
|
579 813 | pub default_int_enum: i32,
|
814 + | /* RustType.kt:516 */
|
580 815 | #[pyo3(get, set)]
|
816 + | /* PythonServerStructureGenerator.kt:80 */
|
581 817 | /// :type str:
|
818 + | /* StructureGenerator.kt:231 */
|
582 819 | #[allow(missing_docs)] // documentation missing in model
|
583 820 | pub empty_string: ::std::string::String,
|
821 + | /* RustType.kt:516 */
|
584 822 | #[pyo3(get, set)]
|
823 + | /* PythonServerStructureGenerator.kt:80 */
|
585 824 | /// :type bool:
|
825 + | /* StructureGenerator.kt:231 */
|
586 826 | #[allow(missing_docs)] // documentation missing in model
|
587 827 | pub false_boolean: bool,
|
828 + | /* RustType.kt:516 */
|
588 829 | #[pyo3(get, set)]
|
830 + | /* PythonServerStructureGenerator.kt:80 */
|
589 831 | /// :type rest_json.types.Blob:
|
832 + | /* StructureGenerator.kt:231 */
|
590 833 | #[allow(missing_docs)] // documentation missing in model
|
591 834 | pub empty_blob: ::aws_smithy_http_server_python::types::Blob,
|
835 + | /* RustType.kt:516 */
|
592 836 | #[pyo3(get, set)]
|
837 + | /* PythonServerStructureGenerator.kt:80 */
|
593 838 | /// :type int:
|
839 + | /* StructureGenerator.kt:231 */
|
594 840 | #[allow(missing_docs)] // documentation missing in model
|
595 841 | pub zero_byte: i8,
|
842 + | /* RustType.kt:516 */
|
596 843 | #[pyo3(get, set)]
|
844 + | /* PythonServerStructureGenerator.kt:80 */
|
597 845 | /// :type int:
|
846 + | /* StructureGenerator.kt:231 */
|
598 847 | #[allow(missing_docs)] // documentation missing in model
|
599 848 | pub zero_short: i16,
|
849 + | /* RustType.kt:516 */
|
600 850 | #[pyo3(get, set)]
|
851 + | /* PythonServerStructureGenerator.kt:80 */
|
601 852 | /// :type int:
|
853 + | /* StructureGenerator.kt:231 */
|
602 854 | #[allow(missing_docs)] // documentation missing in model
|
603 855 | pub zero_integer: i32,
|
856 + | /* RustType.kt:516 */
|
604 857 | #[pyo3(get, set)]
|
858 + | /* PythonServerStructureGenerator.kt:80 */
|
605 859 | /// :type int:
|
860 + | /* StructureGenerator.kt:231 */
|
606 861 | #[allow(missing_docs)] // documentation missing in model
|
607 862 | pub zero_long: i64,
|
863 + | /* RustType.kt:516 */
|
608 864 | #[pyo3(get, set)]
|
865 + | /* PythonServerStructureGenerator.kt:80 */
|
609 866 | /// :type float:
|
867 + | /* StructureGenerator.kt:231 */
|
610 868 | #[allow(missing_docs)] // documentation missing in model
|
611 869 | pub zero_float: f32,
|
870 + | /* RustType.kt:516 */
|
612 871 | #[pyo3(get, set)]
|
872 + | /* PythonServerStructureGenerator.kt:80 */
|
613 873 | /// :type float:
|
874 + | /* StructureGenerator.kt:231 */
|
614 875 | #[allow(missing_docs)] // documentation missing in model
|
615 876 | pub zero_double: f64,
|
877 + | /* StructureGenerator.kt:201 */
|
616 878 | }
|
879 + | /* StructureGenerator.kt:135 */
|
617 880 | impl Defaults {
|
881 + | /* StructureGenerator.kt:231 */
|
618 882 | #[allow(missing_docs)] // documentation missing in model
|
883 + | /* StructureGenerator.kt:166 */
|
619 884 | pub fn default_string(&self) -> &str {
|
885 + | /* StructureGenerator.kt:171 */
|
620 886 | use std::ops::Deref;
|
621 887 | self.default_string.deref()
|
888 + | /* StructureGenerator.kt:166 */
|
622 889 | }
|
890 + | /* StructureGenerator.kt:231 */
|
623 891 | #[allow(missing_docs)] // documentation missing in model
|
892 + | /* StructureGenerator.kt:166 */
|
624 893 | pub fn default_boolean(&self) -> bool {
|
894 + | /* StructureGenerator.kt:168 */
|
625 895 | self.default_boolean
|
896 + | /* StructureGenerator.kt:166 */
|
626 897 | }
|
898 + | /* StructureGenerator.kt:231 */
|
627 899 | #[allow(missing_docs)] // documentation missing in model
|
900 + | /* StructureGenerator.kt:166 */
|
628 901 | pub fn default_list(&self) -> &[::std::string::String] {
|
902 + | /* StructureGenerator.kt:171 */
|
629 903 | use std::ops::Deref;
|
630 904 | self.default_list.deref()
|
905 + | /* StructureGenerator.kt:166 */
|
631 906 | }
|
907 + | /* StructureGenerator.kt:231 */
|
632 908 | #[allow(missing_docs)] // documentation missing in model
|
909 + | /* StructureGenerator.kt:166 */
|
633 910 | pub fn default_document_map(&self) -> &::aws_smithy_http_server_python::types::Document {
|
911 + | /* StructureGenerator.kt:172 */
|
634 912 | &self.default_document_map
|
913 + | /* StructureGenerator.kt:166 */
|
635 914 | }
|
915 + | /* StructureGenerator.kt:231 */
|
636 916 | #[allow(missing_docs)] // documentation missing in model
|
917 + | /* StructureGenerator.kt:166 */
|
637 918 | pub fn default_document_string(&self) -> &::aws_smithy_http_server_python::types::Document {
|
919 + | /* StructureGenerator.kt:172 */
|
638 920 | &self.default_document_string
|
921 + | /* StructureGenerator.kt:166 */
|
639 922 | }
|
923 + | /* StructureGenerator.kt:231 */
|
640 924 | #[allow(missing_docs)] // documentation missing in model
|
925 + | /* StructureGenerator.kt:166 */
|
641 926 | pub fn default_document_boolean(&self) -> &::aws_smithy_http_server_python::types::Document {
|
927 + | /* StructureGenerator.kt:172 */
|
642 928 | &self.default_document_boolean
|
929 + | /* StructureGenerator.kt:166 */
|
643 930 | }
|
931 + | /* StructureGenerator.kt:231 */
|
644 932 | #[allow(missing_docs)] // documentation missing in model
|
933 + | /* StructureGenerator.kt:166 */
|
645 934 | pub fn default_document_list(&self) -> &::aws_smithy_http_server_python::types::Document {
|
935 + | /* StructureGenerator.kt:172 */
|
646 936 | &self.default_document_list
|
937 + | /* StructureGenerator.kt:166 */
|
647 938 | }
|
939 + | /* StructureGenerator.kt:231 */
|
648 940 | #[allow(missing_docs)] // documentation missing in model
|
941 + | /* StructureGenerator.kt:166 */
|
649 942 | pub fn default_null_document(
|
650 943 | &self,
|
651 944 | ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Document> {
|
945 + | /* StructureGenerator.kt:170 */
|
652 946 | self.default_null_document.as_ref()
|
947 + | /* StructureGenerator.kt:166 */
|
653 948 | }
|
949 + | /* StructureGenerator.kt:231 */
|
654 950 | #[allow(missing_docs)] // documentation missing in model
|
951 + | /* StructureGenerator.kt:166 */
|
655 952 | pub fn default_timestamp(&self) -> &::aws_smithy_http_server_python::types::DateTime {
|
953 + | /* StructureGenerator.kt:172 */
|
656 954 | &self.default_timestamp
|
955 + | /* StructureGenerator.kt:166 */
|
657 956 | }
|
957 + | /* StructureGenerator.kt:231 */
|
658 958 | #[allow(missing_docs)] // documentation missing in model
|
959 + | /* StructureGenerator.kt:166 */
|
659 960 | pub fn default_blob(&self) -> &::aws_smithy_http_server_python::types::Blob {
|
961 + | /* StructureGenerator.kt:172 */
|
660 962 | &self.default_blob
|
963 + | /* StructureGenerator.kt:166 */
|
661 964 | }
|
965 + | /* StructureGenerator.kt:231 */
|
662 966 | #[allow(missing_docs)] // documentation missing in model
|
967 + | /* StructureGenerator.kt:166 */
|
663 968 | pub fn default_byte(&self) -> i8 {
|
969 + | /* StructureGenerator.kt:168 */
|
664 970 | self.default_byte
|
971 + | /* StructureGenerator.kt:166 */
|
665 972 | }
|
973 + | /* StructureGenerator.kt:231 */
|
666 974 | #[allow(missing_docs)] // documentation missing in model
|
975 + | /* StructureGenerator.kt:166 */
|
667 976 | pub fn default_short(&self) -> i16 {
|
977 + | /* StructureGenerator.kt:168 */
|
668 978 | self.default_short
|
979 + | /* StructureGenerator.kt:166 */
|
669 980 | }
|
981 + | /* StructureGenerator.kt:231 */
|
670 982 | #[allow(missing_docs)] // documentation missing in model
|
983 + | /* StructureGenerator.kt:166 */
|
671 984 | pub fn default_integer(&self) -> i32 {
|
985 + | /* StructureGenerator.kt:168 */
|
672 986 | self.default_integer
|
987 + | /* StructureGenerator.kt:166 */
|
673 988 | }
|
989 + | /* StructureGenerator.kt:231 */
|
674 990 | #[allow(missing_docs)] // documentation missing in model
|
991 + | /* StructureGenerator.kt:166 */
|
675 992 | pub fn default_long(&self) -> i64 {
|
993 + | /* StructureGenerator.kt:168 */
|
676 994 | self.default_long
|
995 + | /* StructureGenerator.kt:166 */
|
677 996 | }
|
997 + | /* StructureGenerator.kt:231 */
|
678 998 | #[allow(missing_docs)] // documentation missing in model
|
999 + | /* StructureGenerator.kt:166 */
|
679 1000 | pub fn default_float(&self) -> f32 {
|
1001 + | /* StructureGenerator.kt:168 */
|
680 1002 | self.default_float
|
1003 + | /* StructureGenerator.kt:166 */
|
681 1004 | }
|
1005 + | /* StructureGenerator.kt:231 */
|
682 1006 | #[allow(missing_docs)] // documentation missing in model
|
1007 + | /* StructureGenerator.kt:166 */
|
683 1008 | pub fn default_double(&self) -> f64 {
|
1009 + | /* StructureGenerator.kt:168 */
|
684 1010 | self.default_double
|
1011 + | /* StructureGenerator.kt:166 */
|
685 1012 | }
|
1013 + | /* StructureGenerator.kt:231 */
|
686 1014 | #[allow(missing_docs)] // documentation missing in model
|
1015 + | /* StructureGenerator.kt:166 */
|
687 1016 | pub fn default_map(
|
688 1017 | &self,
|
689 1018 | ) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
1019 + | /* StructureGenerator.kt:172 */
|
690 1020 | &self.default_map
|
1021 + | /* StructureGenerator.kt:166 */
|
691 1022 | }
|
1023 + | /* StructureGenerator.kt:231 */
|
692 1024 | #[allow(missing_docs)] // documentation missing in model
|
1025 + | /* StructureGenerator.kt:166 */
|
693 1026 | pub fn default_enum(&self) -> &crate::model::TestEnum {
|
1027 + | /* StructureGenerator.kt:172 */
|
694 1028 | &self.default_enum
|
1029 + | /* StructureGenerator.kt:166 */
|
695 1030 | }
|
1031 + | /* StructureGenerator.kt:231 */
|
696 1032 | #[allow(missing_docs)] // documentation missing in model
|
1033 + | /* StructureGenerator.kt:166 */
|
697 1034 | pub fn default_int_enum(&self) -> i32 {
|
1035 + | /* StructureGenerator.kt:168 */
|
698 1036 | self.default_int_enum
|
1037 + | /* StructureGenerator.kt:166 */
|
699 1038 | }
|
1039 + | /* StructureGenerator.kt:231 */
|
700 1040 | #[allow(missing_docs)] // documentation missing in model
|
1041 + | /* StructureGenerator.kt:166 */
|
701 1042 | pub fn empty_string(&self) -> &str {
|
1043 + | /* StructureGenerator.kt:171 */
|
702 1044 | use std::ops::Deref;
|
703 1045 | self.empty_string.deref()
|
1046 + | /* StructureGenerator.kt:166 */
|
704 1047 | }
|
1048 + | /* StructureGenerator.kt:231 */
|
705 1049 | #[allow(missing_docs)] // documentation missing in model
|
1050 + | /* StructureGenerator.kt:166 */
|
706 1051 | pub fn false_boolean(&self) -> bool {
|
1052 + | /* StructureGenerator.kt:168 */
|
707 1053 | self.false_boolean
|
1054 + | /* StructureGenerator.kt:166 */
|
708 1055 | }
|
1056 + | /* StructureGenerator.kt:231 */
|
709 1057 | #[allow(missing_docs)] // documentation missing in model
|
1058 + | /* StructureGenerator.kt:166 */
|
710 1059 | pub fn empty_blob(&self) -> &::aws_smithy_http_server_python::types::Blob {
|
1060 + | /* StructureGenerator.kt:172 */
|
711 1061 | &self.empty_blob
|
1062 + | /* StructureGenerator.kt:166 */
|
712 1063 | }
|
1064 + | /* StructureGenerator.kt:231 */
|
713 1065 | #[allow(missing_docs)] // documentation missing in model
|
1066 + | /* StructureGenerator.kt:166 */
|
714 1067 | pub fn zero_byte(&self) -> i8 {
|
1068 + | /* StructureGenerator.kt:168 */
|
715 1069 | self.zero_byte
|
1070 + | /* StructureGenerator.kt:166 */
|
716 1071 | }
|
1072 + | /* StructureGenerator.kt:231 */
|
717 1073 | #[allow(missing_docs)] // documentation missing in model
|
1074 + | /* StructureGenerator.kt:166 */
|
718 1075 | pub fn zero_short(&self) -> i16 {
|
1076 + | /* StructureGenerator.kt:168 */
|
719 1077 | self.zero_short
|
1078 + | /* StructureGenerator.kt:166 */
|
720 1079 | }
|
1080 + | /* StructureGenerator.kt:231 */
|
721 1081 | #[allow(missing_docs)] // documentation missing in model
|
1082 + | /* StructureGenerator.kt:166 */
|
722 1083 | pub fn zero_integer(&self) -> i32 {
|
1084 + | /* StructureGenerator.kt:168 */
|
723 1085 | self.zero_integer
|
1086 + | /* StructureGenerator.kt:166 */
|
724 1087 | }
|
1088 + | /* StructureGenerator.kt:231 */
|
725 1089 | #[allow(missing_docs)] // documentation missing in model
|
1090 + | /* StructureGenerator.kt:166 */
|
726 1091 | pub fn zero_long(&self) -> i64 {
|
1092 + | /* StructureGenerator.kt:168 */
|
727 1093 | self.zero_long
|
1094 + | /* StructureGenerator.kt:166 */
|
728 1095 | }
|
1096 + | /* StructureGenerator.kt:231 */
|
729 1097 | #[allow(missing_docs)] // documentation missing in model
|
1098 + | /* StructureGenerator.kt:166 */
|
730 1099 | pub fn zero_float(&self) -> f32 {
|
1100 + | /* StructureGenerator.kt:168 */
|
731 1101 | self.zero_float
|
1102 + | /* StructureGenerator.kt:166 */
|
732 1103 | }
|
1104 + | /* StructureGenerator.kt:231 */
|
733 1105 | #[allow(missing_docs)] // documentation missing in model
|
1106 + | /* StructureGenerator.kt:166 */
|
734 1107 | pub fn zero_double(&self) -> f64 {
|
1108 + | /* StructureGenerator.kt:168 */
|
735 1109 | self.zero_double
|
1110 + | /* StructureGenerator.kt:166 */
|
736 1111 | }
|
1112 + | /* StructureGenerator.kt:135 */
|
737 1113 | }
|
1114 + | /* RustType.kt:516 */
|
738 1115 | #[allow(clippy::new_without_default)]
|
1116 + | /* RustType.kt:516 */
|
739 1117 | #[allow(clippy::too_many_arguments)]
|
1118 + | /* RustType.kt:516 */
|
740 1119 | #[::pyo3::pymethods]
|
1120 + | /* PythonServerStructureGenerator.kt:88 */
|
741 1121 | impl Defaults {
|
742 1122 | #[new]
|
743 1123 | pub fn new(
|
744 1124 | default_string: ::std::string::String,
|
745 1125 | default_boolean: bool,
|
746 1126 | default_list: ::std::vec::Vec<::std::string::String>,
|
747 1127 | default_document_map: ::aws_smithy_http_server_python::types::Document,
|
748 1128 | default_document_string: ::aws_smithy_http_server_python::types::Document,
|
749 1129 | default_document_boolean: ::aws_smithy_http_server_python::types::Document,
|
750 1130 | default_document_list: ::aws_smithy_http_server_python::types::Document,
|
751 - | default_null_document: ::std::option::Option<
|
752 - | ::aws_smithy_http_server_python::types::Document,
|
753 - | >,
|
754 1131 | default_timestamp: ::aws_smithy_http_server_python::types::DateTime,
|
755 1132 | default_blob: ::aws_smithy_http_server_python::types::Blob,
|
756 1133 | default_byte: i8,
|
757 1134 | default_short: i16,
|
758 1135 | default_integer: i32,
|
759 1136 | default_long: i64,
|
760 1137 | default_float: f32,
|
761 1138 | default_double: f64,
|
762 1139 | default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
763 1140 | default_enum: crate::model::TestEnum,
|
764 1141 | default_int_enum: i32,
|
765 1142 | empty_string: ::std::string::String,
|
766 1143 | false_boolean: bool,
|
767 1144 | empty_blob: ::aws_smithy_http_server_python::types::Blob,
|
768 1145 | zero_byte: i8,
|
769 1146 | zero_short: i16,
|
770 1147 | zero_integer: i32,
|
771 1148 | zero_long: i64,
|
772 1149 | zero_float: f32,
|
773 1150 | zero_double: f64,
|
1151 + | default_null_document: ::std::option::Option<
|
1152 + | ::aws_smithy_http_server_python::types::Document,
|
1153 + | >,
|
774 1154 | ) -> Self {
|
775 1155 | Self {
|
776 1156 | default_string,
|
777 1157 | default_boolean,
|
778 1158 | default_list,
|
779 1159 | default_document_map,
|
780 1160 | default_document_string,
|
781 1161 | default_document_boolean,
|
782 1162 | default_document_list,
|
783 - | default_null_document,
|
784 1163 | default_timestamp,
|
785 1164 | default_blob,
|
786 1165 | default_byte,
|
787 1166 | default_short,
|
788 1167 | default_integer,
|
789 1168 | default_long,
|
790 1169 | default_float,
|
791 1170 | default_double,
|
792 1171 | default_map,
|
793 1172 | default_enum,
|
794 1173 | default_int_enum,
|
795 1174 | empty_string,
|
796 1175 | false_boolean,
|
797 1176 | empty_blob,
|
798 1177 | zero_byte,
|
799 1178 | zero_short,
|
800 1179 | zero_integer,
|
801 1180 | zero_long,
|
802 1181 | zero_float,
|
803 1182 | zero_double,
|
1183 + | default_null_document,
|
804 1184 | }
|
805 1185 | }
|
806 1186 | fn __repr__(&self) -> String {
|
807 1187 | format!("{self:?}")
|
808 1188 | }
|
809 1189 | fn __str__(&self) -> String {
|
810 1190 | format!("{self:?}")
|
811 1191 | }
|
812 1192 | }
|
1193 + | /* PythonServerStructureGenerator.kt:111 */
|
813 1194 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Defaults> {
|
814 1195 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
815 1196 | ob.extract::<Defaults>().map(Box::new)
|
816 1197 | }
|
817 1198 | }
|
818 1199 |
|
819 1200 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Defaults> {
|
820 1201 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
821 1202 | (*self).into_py(py)
|
822 1203 | }
|
823 1204 | }
|
1205 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
824 1206 | impl crate::constrained::Constrained for crate::model::Defaults {
|
825 1207 | type Unconstrained = crate::model::defaults_internal::Builder;
|
826 1208 | }
|
1209 + | /* ServerCodegenVisitor.kt:370 */
|
827 1210 | impl Defaults {
|
828 - | /// Creates a new builder-style object to manufacture [`Defaults`](crate::model::Defaults).
|
1211 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`Defaults`](crate::model::Defaults).
|
1212 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
829 1213 | pub fn builder() -> crate::model::defaults::Builder {
|
1214 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
830 1215 | crate::model::defaults::Builder::default()
|
1216 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
831 1217 | }
|
1218 + | /* ServerCodegenVisitor.kt:370 */
|
832 1219 | }
|
833 1220 |
|
1221 + | /* RustType.kt:516 */
|
834 1222 | #[::pyo3::pyclass]
|
1223 + | /* PythonServerStructureGenerator.kt:63 */
|
835 1224 | /// :param data typing.Optional\[int\]:
|
836 1225 | /// :rtype None:
|
1226 + | /* StructureGenerator.kt:197 */
|
837 1227 | #[allow(missing_docs)] // documentation missing in model
|
1228 + | /* RustType.kt:516 */
|
838 1229 | #[derive(
|
839 1230 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
840 1231 | )]
|
841 - | pub struct PayloadConfig {
|
1232 + | pub /* StructureGenerator.kt:201 */ struct PayloadConfig {
|
1233 + | /* RustType.kt:516 */
|
842 1234 | #[pyo3(get, set)]
|
1235 + | /* PythonServerStructureGenerator.kt:80 */
|
843 1236 | /// :type typing.Optional\[int\]:
|
1237 + | /* StructureGenerator.kt:231 */
|
844 1238 | #[allow(missing_docs)] // documentation missing in model
|
845 1239 | pub data: ::std::option::Option<i32>,
|
1240 + | /* StructureGenerator.kt:201 */
|
846 1241 | }
|
1242 + | /* StructureGenerator.kt:135 */
|
847 1243 | impl PayloadConfig {
|
1244 + | /* StructureGenerator.kt:231 */
|
848 1245 | #[allow(missing_docs)] // documentation missing in model
|
1246 + | /* StructureGenerator.kt:166 */
|
849 1247 | pub fn data(&self) -> ::std::option::Option<i32> {
|
1248 + | /* StructureGenerator.kt:168 */
|
850 1249 | self.data
|
1250 + | /* StructureGenerator.kt:166 */
|
851 1251 | }
|
1252 + | /* StructureGenerator.kt:135 */
|
852 1253 | }
|
1254 + | /* RustType.kt:516 */
|
853 1255 | #[allow(clippy::new_without_default)]
|
1256 + | /* RustType.kt:516 */
|
854 1257 | #[allow(clippy::too_many_arguments)]
|
1258 + | /* RustType.kt:516 */
|
855 1259 | #[::pyo3::pymethods]
|
1260 + | /* PythonServerStructureGenerator.kt:88 */
|
856 1261 | impl PayloadConfig {
|
857 1262 | #[new]
|
858 1263 | pub fn new(data: ::std::option::Option<i32>) -> Self {
|
859 1264 | Self { data }
|
860 1265 | }
|
861 1266 | fn __repr__(&self) -> String {
|
862 1267 | format!("{self:?}")
|
863 1268 | }
|
864 1269 | fn __str__(&self) -> String {
|
865 1270 | format!("{self:?}")
|
866 1271 | }
|
867 1272 | }
|
1273 + | /* PythonServerStructureGenerator.kt:111 */
|
868 1274 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<PayloadConfig> {
|
869 1275 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
870 1276 | ob.extract::<PayloadConfig>().map(Box::new)
|
871 1277 | }
|
872 1278 | }
|
873 1279 |
|
874 1280 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<PayloadConfig> {
|
875 1281 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
876 1282 | (*self).into_py(py)
|
877 1283 | }
|
878 1284 | }
|
1285 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
879 1286 | impl crate::constrained::Constrained for crate::model::PayloadConfig {
|
880 1287 | type Unconstrained = crate::model::payload_config_internal::Builder;
|
881 1288 | }
|
1289 + | /* ServerCodegenVisitor.kt:370 */
|
882 1290 | impl PayloadConfig {
|
883 - | /// Creates a new builder-style object to manufacture [`PayloadConfig`](crate::model::PayloadConfig).
|
1291 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`PayloadConfig`](crate::model::PayloadConfig).
|
1292 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
884 1293 | pub fn builder() -> crate::model::payload_config::Builder {
|
1294 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
885 1295 | crate::model::payload_config::Builder::default()
|
1296 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
886 1297 | }
|
1298 + | /* ServerCodegenVisitor.kt:370 */
|
887 1299 | }
|
888 1300 |
|
1301 + | /* RustType.kt:516 */
|
889 1302 | #[::pyo3::pyclass]
|
1303 + | /* PythonServerStructureGenerator.kt:63 */
|
890 1304 | /// :param timeout typing.Optional\[int\]:
|
891 1305 | /// :rtype None:
|
1306 + | /* StructureGenerator.kt:197 */
|
892 1307 | #[allow(missing_docs)] // documentation missing in model
|
1308 + | /* RustType.kt:516 */
|
893 1309 | #[derive(
|
894 1310 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
895 1311 | )]
|
896 - | pub struct TestConfig {
|
1312 + | pub /* StructureGenerator.kt:201 */ struct TestConfig {
|
1313 + | /* RustType.kt:516 */
|
897 1314 | #[pyo3(get, set)]
|
1315 + | /* PythonServerStructureGenerator.kt:80 */
|
898 1316 | /// :type typing.Optional\[int\]:
|
1317 + | /* StructureGenerator.kt:231 */
|
899 1318 | #[allow(missing_docs)] // documentation missing in model
|
900 1319 | pub timeout: ::std::option::Option<i32>,
|
1320 + | /* StructureGenerator.kt:201 */
|
901 1321 | }
|
1322 + | /* StructureGenerator.kt:135 */
|
902 1323 | impl TestConfig {
|
1324 + | /* StructureGenerator.kt:231 */
|
903 1325 | #[allow(missing_docs)] // documentation missing in model
|
1326 + | /* StructureGenerator.kt:166 */
|
904 1327 | pub fn timeout(&self) -> ::std::option::Option<i32> {
|
1328 + | /* StructureGenerator.kt:168 */
|
905 1329 | self.timeout
|
1330 + | /* StructureGenerator.kt:166 */
|
906 1331 | }
|
1332 + | /* StructureGenerator.kt:135 */
|
907 1333 | }
|
1334 + | /* RustType.kt:516 */
|
908 1335 | #[allow(clippy::new_without_default)]
|
1336 + | /* RustType.kt:516 */
|
909 1337 | #[allow(clippy::too_many_arguments)]
|
1338 + | /* RustType.kt:516 */
|
910 1339 | #[::pyo3::pymethods]
|
1340 + | /* PythonServerStructureGenerator.kt:88 */
|
911 1341 | impl TestConfig {
|
912 1342 | #[new]
|
913 1343 | pub fn new(timeout: ::std::option::Option<i32>) -> Self {
|
914 1344 | Self { timeout }
|
915 1345 | }
|
916 1346 | fn __repr__(&self) -> String {
|
917 1347 | format!("{self:?}")
|
918 1348 | }
|
919 1349 | fn __str__(&self) -> String {
|
920 1350 | format!("{self:?}")
|
921 1351 | }
|
922 1352 | }
|
1353 + | /* PythonServerStructureGenerator.kt:111 */
|
923 1354 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TestConfig> {
|
924 1355 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
925 1356 | ob.extract::<TestConfig>().map(Box::new)
|
926 1357 | }
|
927 1358 | }
|
928 1359 |
|
929 1360 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TestConfig> {
|
930 1361 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
931 1362 | (*self).into_py(py)
|
932 1363 | }
|
933 1364 | }
|
1365 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
934 1366 | impl crate::constrained::Constrained for crate::model::TestConfig {
|
935 1367 | type Unconstrained = crate::model::test_config_internal::Builder;
|
936 1368 | }
|
1369 + | /* ServerCodegenVisitor.kt:370 */
|
937 1370 | impl TestConfig {
|
938 - | /// Creates a new builder-style object to manufacture [`TestConfig`](crate::model::TestConfig).
|
1371 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`TestConfig`](crate::model::TestConfig).
|
1372 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
939 1373 | pub fn builder() -> crate::model::test_config::Builder {
|
1374 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
940 1375 | crate::model::test_config::Builder::default()
|
1376 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
941 1377 | }
|
1378 + | /* ServerCodegenVisitor.kt:370 */
|
942 1379 | }
|
943 1380 |
|
1381 + | /* UnionGenerator.kt:67 */
|
944 1382 | #[allow(missing_docs)] // documentation missing in model
|
1383 + | /* RustType.kt:516 */
|
945 1384 | #[derive(
|
946 1385 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
947 1386 | )]
|
948 - | pub enum SimpleUnion {
|
1387 + | pub /* UnionGenerator.kt:85 */ enum SimpleUnion {
|
1388 + | /* UnionGenerator.kt:90 */
|
949 1389 | #[allow(missing_docs)] // documentation missing in model
|
1390 + | /* UnionGenerator.kt:190 */
|
950 1391 | Int(i32),
|
1392 + | /* UnionGenerator.kt:90 */
|
951 1393 | #[allow(missing_docs)] // documentation missing in model
|
1394 + | /* UnionGenerator.kt:190 */
|
952 1395 | String(::std::string::String),
|
1396 + | /* UnionGenerator.kt:85 */
|
953 1397 | }
|
1398 + | /* UnionGenerator.kt:111 */
|
954 1399 | impl SimpleUnion {
|
1400 + | /* UnionGenerator.kt:217 */
|
955 1401 | /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
|
1402 + | /* UnionGenerator.kt:222 */
|
956 1403 | /// Returns `Err(&Self)` if it can't be converted.
|
1404 + | /* UnionGenerator.kt:223 */
|
957 1405 | pub fn as_int(&self) -> ::std::result::Result<&i32, &Self> {
|
1406 + | /* UnionGenerator.kt:227 */
|
958 1407 | if let SimpleUnion::Int(val) = &self {
|
959 1408 | ::std::result::Result::Ok(val)
|
960 1409 | } else {
|
961 1410 | ::std::result::Result::Err(self)
|
962 1411 | }
|
1412 + | /* UnionGenerator.kt:223 */
|
963 1413 | }
|
1414 + | /* UnionGenerator.kt:121 */
|
964 1415 | /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
|
1416 + | /* UnionGenerator.kt:122 */
|
965 1417 | pub fn is_int(&self) -> bool {
|
1418 + | /* UnionGenerator.kt:123 */
|
966 1419 | self.as_int().is_ok()
|
1420 + | /* UnionGenerator.kt:122 */
|
967 1421 | }
|
1422 + | /* UnionGenerator.kt:217 */
|
968 1423 | /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
|
1424 + | /* UnionGenerator.kt:222 */
|
969 1425 | /// Returns `Err(&Self)` if it can't be converted.
|
1426 + | /* UnionGenerator.kt:223 */
|
970 1427 | pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
1428 + | /* UnionGenerator.kt:227 */
|
971 1429 | if let SimpleUnion::String(val) = &self {
|
972 1430 | ::std::result::Result::Ok(val)
|
973 1431 | } else {
|
974 1432 | ::std::result::Result::Err(self)
|
975 1433 | }
|
1434 + | /* UnionGenerator.kt:223 */
|
976 1435 | }
|
1436 + | /* UnionGenerator.kt:121 */
|
977 1437 | /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
|
1438 + | /* UnionGenerator.kt:122 */
|
978 1439 | pub fn is_string(&self) -> bool {
|
1440 + | /* UnionGenerator.kt:123 */
|
979 1441 | self.as_string().is_ok()
|
1442 + | /* UnionGenerator.kt:122 */
|
980 1443 | }
|
1444 + | /* UnionGenerator.kt:111 */
|
981 1445 | }
|
1446 + | /* PythonServerUnionGenerator.kt:58 */
|
982 1447 | #[pyo3::pyclass(name = "SimpleUnion")]
|
1448 + | /* RustType.kt:516 */
|
983 1449 | #[derive(
|
984 1450 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
985 1451 | )]
|
986 - | pub struct PyUnionMarkerSimpleUnion(pub SimpleUnion);
|
1452 + | pub /* PythonServerUnionGenerator.kt:61 */ struct PyUnionMarkerSimpleUnion(pub SimpleUnion);
|
1453 + | /* RustType.kt:516 */
|
987 1454 | #[::pyo3::pymethods]
|
1455 + | /* PythonServerUnionGenerator.kt:66 */
|
988 1456 | impl PyUnionMarkerSimpleUnion {
|
1457 + | /* RustType.kt:516 */
|
989 1458 | #[staticmethod]
|
1459 + | /* PythonServerUnionGenerator.kt:134 */
|
990 1460 | /// Creates a new union instance of [`Int`](crate::model::SimpleUnion::Int)
|
1461 + | /* PythonServerUnionGenerator.kt:138 */
|
991 1462 | /// :param data int:
|
1463 + | /* PythonServerUnionGenerator.kt:139 */
|
992 1464 | /// :rtype SimpleUnion:
|
1465 + | /* PythonServerUnionGenerator.kt:140 */
|
993 1466 | pub fn int(data: i32) -> Self {
|
1467 + | /* PythonServerUnionGenerator.kt:141 */
|
994 1468 | Self(SimpleUnion::Int(data))
|
1469 + | /* PythonServerUnionGenerator.kt:140 */
|
995 1470 | }
|
1471 + | /* PythonServerUnionGenerator.kt:176 */
|
996 1472 | /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
|
1473 + | /* PythonServerUnionGenerator.kt:181 */
|
997 1474 | /// :rtype int:
|
1475 + | /* PythonServerUnionGenerator.kt:182 */
|
998 1476 | pub fn as_int(&self) -> ::pyo3::PyResult<i32> {
|
1477 + | /* PythonServerUnionGenerator.kt:190 */
|
999 1478 | match self.0.as_int() {
|
1000 1479 | Ok(variant) => Ok(*variant),
|
1001 1480 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1002 1481 | r"SimpleUnion variant is not of type int",
|
1003 1482 | )),
|
1004 1483 | }
|
1484 + | /* PythonServerUnionGenerator.kt:182 */
|
1005 1485 | }
|
1486 + | /* PythonServerUnionGenerator.kt:76 */
|
1006 1487 | /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
|
1488 + | /* PythonServerUnionGenerator.kt:77 */
|
1007 1489 | /// :rtype bool:
|
1490 + | /* PythonServerUnionGenerator.kt:78 */
|
1008 1491 | pub fn is_int(&self) -> bool {
|
1492 + | /* PythonServerUnionGenerator.kt:79 */
|
1009 1493 | self.0.is_int()
|
1494 + | /* PythonServerUnionGenerator.kt:78 */
|
1010 1495 | }
|
1496 + | /* RustType.kt:516 */
|
1011 1497 | #[staticmethod]
|
1498 + | /* PythonServerUnionGenerator.kt:134 */
|
1012 1499 | /// Creates a new union instance of [`String`](crate::model::SimpleUnion::String)
|
1500 + | /* PythonServerUnionGenerator.kt:138 */
|
1013 1501 | /// :param data str:
|
1502 + | /* PythonServerUnionGenerator.kt:139 */
|
1014 1503 | /// :rtype SimpleUnion:
|
1504 + | /* PythonServerUnionGenerator.kt:140 */
|
1015 1505 | pub fn string(data: ::std::string::String) -> Self {
|
1506 + | /* PythonServerUnionGenerator.kt:141 */
|
1016 1507 | Self(SimpleUnion::String(data))
|
1508 + | /* PythonServerUnionGenerator.kt:140 */
|
1017 1509 | }
|
1510 + | /* PythonServerUnionGenerator.kt:176 */
|
1018 1511 | /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
|
1512 + | /* PythonServerUnionGenerator.kt:181 */
|
1019 1513 | /// :rtype str:
|
1514 + | /* PythonServerUnionGenerator.kt:182 */
|
1020 1515 | pub fn as_string(&self) -> ::pyo3::PyResult<::std::string::String> {
|
1516 + | /* PythonServerUnionGenerator.kt:190 */
|
1021 1517 | match self.0.as_string() {
|
1022 1518 | Ok(variant) => Ok(variant.clone()),
|
1023 1519 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1024 1520 | r"SimpleUnion variant is not of type str",
|
1025 1521 | )),
|
1026 1522 | }
|
1523 + | /* PythonServerUnionGenerator.kt:182 */
|
1027 1524 | }
|
1525 + | /* PythonServerUnionGenerator.kt:76 */
|
1028 1526 | /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
|
1527 + | /* PythonServerUnionGenerator.kt:77 */
|
1029 1528 | /// :rtype bool:
|
1529 + | /* PythonServerUnionGenerator.kt:78 */
|
1030 1530 | pub fn is_string(&self) -> bool {
|
1531 + | /* PythonServerUnionGenerator.kt:79 */
|
1031 1532 | self.0.is_string()
|
1533 + | /* PythonServerUnionGenerator.kt:78 */
|
1032 1534 | }
|
1535 + | /* PythonServerUnionGenerator.kt:66 */
|
1033 1536 | }
|
1537 + | /* PythonServerUnionGenerator.kt:93 */
|
1034 1538 | impl ::pyo3::IntoPy<::pyo3::PyObject> for SimpleUnion {
|
1539 + | /* PythonServerUnionGenerator.kt:94 */
|
1035 1540 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1541 + | /* PythonServerUnionGenerator.kt:95 */
|
1036 1542 | PyUnionMarkerSimpleUnion(self).into_py(py)
|
1543 + | /* PythonServerUnionGenerator.kt:94 */
|
1037 1544 | }
|
1545 + | /* PythonServerUnionGenerator.kt:93 */
|
1038 1546 | }
|
1547 + | /* PythonServerUnionGenerator.kt:98 */
|
1039 1548 | impl<'source> ::pyo3::FromPyObject<'source> for SimpleUnion {
|
1549 + | /* PythonServerUnionGenerator.kt:99 */
|
1040 1550 | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1551 + | /* PythonServerUnionGenerator.kt:100 */
|
1041 1552 | let data: PyUnionMarkerSimpleUnion = obj.extract()?;
|
1042 1553 | Ok(data.0)
|
1554 + | /* PythonServerUnionGenerator.kt:99 */
|
1043 1555 | }
|
1556 + | /* PythonServerUnionGenerator.kt:98 */
|
1044 1557 | }
|
1045 1558 |
|
1559 + | /* UnionGenerator.kt:67 */
|
1046 1560 | #[allow(missing_docs)] // documentation missing in model
|
1561 + | /* RustType.kt:516 */
|
1047 1562 | #[derive(
|
1048 1563 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1049 1564 | )]
|
1050 - | pub enum UnionWithJsonName {
|
1565 + | pub /* UnionGenerator.kt:85 */ enum UnionWithJsonName {
|
1566 + | /* UnionGenerator.kt:90 */
|
1051 1567 | #[allow(missing_docs)] // documentation missing in model
|
1568 + | /* UnionGenerator.kt:190 */
|
1052 1569 | Bar(::std::string::String),
|
1570 + | /* UnionGenerator.kt:90 */
|
1053 1571 | #[allow(missing_docs)] // documentation missing in model
|
1572 + | /* UnionGenerator.kt:190 */
|
1054 1573 | Baz(::std::string::String),
|
1574 + | /* UnionGenerator.kt:90 */
|
1055 1575 | #[allow(missing_docs)] // documentation missing in model
|
1576 + | /* UnionGenerator.kt:190 */
|
1056 1577 | Foo(::std::string::String),
|
1578 + | /* UnionGenerator.kt:85 */
|
1057 1579 | }
|
1580 + | /* UnionGenerator.kt:111 */
|
1058 1581 | impl UnionWithJsonName {
|
1582 + | /* UnionGenerator.kt:217 */
|
1059 1583 | /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
|
1584 + | /* UnionGenerator.kt:222 */
|
1060 1585 | /// Returns `Err(&Self)` if it can't be converted.
|
1586 + | /* UnionGenerator.kt:223 */
|
1061 1587 | pub fn as_bar(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
1588 + | /* UnionGenerator.kt:227 */
|
1062 1589 | if let UnionWithJsonName::Bar(val) = &self {
|
1063 1590 | ::std::result::Result::Ok(val)
|
1064 1591 | } else {
|
1065 1592 | ::std::result::Result::Err(self)
|
1066 1593 | }
|
1594 + | /* UnionGenerator.kt:223 */
|
1067 1595 | }
|
1596 + | /* UnionGenerator.kt:121 */
|
1068 1597 | /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
|
1598 + | /* UnionGenerator.kt:122 */
|
1069 1599 | pub fn is_bar(&self) -> bool {
|
1600 + | /* UnionGenerator.kt:123 */
|
1070 1601 | self.as_bar().is_ok()
|
1602 + | /* UnionGenerator.kt:122 */
|
1071 1603 | }
|
1604 + | /* UnionGenerator.kt:217 */
|
1072 1605 | /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
|
1606 + | /* UnionGenerator.kt:222 */
|
1073 1607 | /// Returns `Err(&Self)` if it can't be converted.
|
1608 + | /* UnionGenerator.kt:223 */
|
1074 1609 | pub fn as_baz(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
1610 + | /* UnionGenerator.kt:227 */
|
1075 1611 | if let UnionWithJsonName::Baz(val) = &self {
|
1076 1612 | ::std::result::Result::Ok(val)
|
1077 1613 | } else {
|
1078 1614 | ::std::result::Result::Err(self)
|
1079 1615 | }
|
1616 + | /* UnionGenerator.kt:223 */
|
1080 1617 | }
|
1618 + | /* UnionGenerator.kt:121 */
|
1081 1619 | /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
|
1620 + | /* UnionGenerator.kt:122 */
|
1082 1621 | pub fn is_baz(&self) -> bool {
|
1622 + | /* UnionGenerator.kt:123 */
|
1083 1623 | self.as_baz().is_ok()
|
1624 + | /* UnionGenerator.kt:122 */
|
1084 1625 | }
|
1626 + | /* UnionGenerator.kt:217 */
|
1085 1627 | /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
|
1628 + | /* UnionGenerator.kt:222 */
|
1086 1629 | /// Returns `Err(&Self)` if it can't be converted.
|
1630 + | /* UnionGenerator.kt:223 */
|
1087 1631 | pub fn as_foo(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
1632 + | /* UnionGenerator.kt:227 */
|
1088 1633 | if let UnionWithJsonName::Foo(val) = &self {
|
1089 1634 | ::std::result::Result::Ok(val)
|
1090 1635 | } else {
|
1091 1636 | ::std::result::Result::Err(self)
|
1092 1637 | }
|
1638 + | /* UnionGenerator.kt:223 */
|
1093 1639 | }
|
1640 + | /* UnionGenerator.kt:121 */
|
1094 1641 | /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
|
1642 + | /* UnionGenerator.kt:122 */
|
1095 1643 | pub fn is_foo(&self) -> bool {
|
1644 + | /* UnionGenerator.kt:123 */
|
1096 1645 | self.as_foo().is_ok()
|
1646 + | /* UnionGenerator.kt:122 */
|
1097 1647 | }
|
1648 + | /* UnionGenerator.kt:111 */
|
1098 1649 | }
|
1650 + | /* PythonServerUnionGenerator.kt:58 */
|
1099 1651 | #[pyo3::pyclass(name = "UnionWithJsonName")]
|
1652 + | /* RustType.kt:516 */
|
1100 1653 | #[derive(
|
1101 1654 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1102 1655 | )]
|
1103 - | pub struct PyUnionMarkerUnionWithJsonName(pub UnionWithJsonName);
|
1656 + | pub /* PythonServerUnionGenerator.kt:61 */ struct PyUnionMarkerUnionWithJsonName(
|
1657 + | pub UnionWithJsonName,
|
1658 + | );
|
1659 + | /* RustType.kt:516 */
|
1104 1660 | #[::pyo3::pymethods]
|
1661 + | /* PythonServerUnionGenerator.kt:66 */
|
1105 1662 | impl PyUnionMarkerUnionWithJsonName {
|
1663 + | /* RustType.kt:516 */
|
1106 1664 | #[staticmethod]
|
1665 + | /* PythonServerUnionGenerator.kt:134 */
|
1107 1666 | /// Creates a new union instance of [`Bar`](crate::model::UnionWithJsonName::Bar)
|
1667 + | /* PythonServerUnionGenerator.kt:138 */
|
1108 1668 | /// :param data str:
|
1669 + | /* PythonServerUnionGenerator.kt:139 */
|
1109 1670 | /// :rtype UnionWithJsonName:
|
1671 + | /* PythonServerUnionGenerator.kt:140 */
|
1110 1672 | pub fn bar(data: ::std::string::String) -> Self {
|
1673 + | /* PythonServerUnionGenerator.kt:141 */
|
1111 1674 | Self(UnionWithJsonName::Bar(data))
|
1675 + | /* PythonServerUnionGenerator.kt:140 */
|
1112 1676 | }
|
1677 + | /* PythonServerUnionGenerator.kt:176 */
|
1113 1678 | /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
|
1679 + | /* PythonServerUnionGenerator.kt:181 */
|
1114 1680 | /// :rtype str:
|
1681 + | /* PythonServerUnionGenerator.kt:182 */
|
1115 1682 | pub fn as_bar(&self) -> ::pyo3::PyResult<::std::string::String> {
|
1683 + | /* PythonServerUnionGenerator.kt:190 */
|
1116 1684 | match self.0.as_bar() {
|
1117 1685 | Ok(variant) => Ok(variant.clone()),
|
1118 1686 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1119 1687 | r"UnionWithJsonName variant is not of type str",
|
1120 1688 | )),
|
1121 1689 | }
|
1690 + | /* PythonServerUnionGenerator.kt:182 */
|
1122 1691 | }
|
1692 + | /* PythonServerUnionGenerator.kt:76 */
|
1123 1693 | /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
|
1694 + | /* PythonServerUnionGenerator.kt:77 */
|
1124 1695 | /// :rtype bool:
|
1696 + | /* PythonServerUnionGenerator.kt:78 */
|
1125 1697 | pub fn is_bar(&self) -> bool {
|
1698 + | /* PythonServerUnionGenerator.kt:79 */
|
1126 1699 | self.0.is_bar()
|
1700 + | /* PythonServerUnionGenerator.kt:78 */
|
1127 1701 | }
|
1702 + | /* RustType.kt:516 */
|
1128 1703 | #[staticmethod]
|
1704 + | /* PythonServerUnionGenerator.kt:134 */
|
1129 1705 | /// Creates a new union instance of [`Baz`](crate::model::UnionWithJsonName::Baz)
|
1706 + | /* PythonServerUnionGenerator.kt:138 */
|
1130 1707 | /// :param data str:
|
1708 + | /* PythonServerUnionGenerator.kt:139 */
|
1131 1709 | /// :rtype UnionWithJsonName:
|
1710 + | /* PythonServerUnionGenerator.kt:140 */
|
1132 1711 | pub fn baz(data: ::std::string::String) -> Self {
|
1712 + | /* PythonServerUnionGenerator.kt:141 */
|
1133 1713 | Self(UnionWithJsonName::Baz(data))
|
1714 + | /* PythonServerUnionGenerator.kt:140 */
|
1134 1715 | }
|
1716 + | /* PythonServerUnionGenerator.kt:176 */
|
1135 1717 | /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
|
1718 + | /* PythonServerUnionGenerator.kt:181 */
|
1136 1719 | /// :rtype str:
|
1720 + | /* PythonServerUnionGenerator.kt:182 */
|
1137 1721 | pub fn as_baz(&self) -> ::pyo3::PyResult<::std::string::String> {
|
1722 + | /* PythonServerUnionGenerator.kt:190 */
|
1138 1723 | match self.0.as_baz() {
|
1139 1724 | Ok(variant) => Ok(variant.clone()),
|
1140 1725 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1141 1726 | r"UnionWithJsonName variant is not of type str",
|
1142 1727 | )),
|
1143 1728 | }
|
1729 + | /* PythonServerUnionGenerator.kt:182 */
|
1144 1730 | }
|
1731 + | /* PythonServerUnionGenerator.kt:76 */
|
1145 1732 | /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
|
1733 + | /* PythonServerUnionGenerator.kt:77 */
|
1146 1734 | /// :rtype bool:
|
1735 + | /* PythonServerUnionGenerator.kt:78 */
|
1147 1736 | pub fn is_baz(&self) -> bool {
|
1737 + | /* PythonServerUnionGenerator.kt:79 */
|
1148 1738 | self.0.is_baz()
|
1739 + | /* PythonServerUnionGenerator.kt:78 */
|
1149 1740 | }
|
1741 + | /* RustType.kt:516 */
|
1150 1742 | #[staticmethod]
|
1743 + | /* PythonServerUnionGenerator.kt:134 */
|
1151 1744 | /// Creates a new union instance of [`Foo`](crate::model::UnionWithJsonName::Foo)
|
1745 + | /* PythonServerUnionGenerator.kt:138 */
|
1152 1746 | /// :param data str:
|
1747 + | /* PythonServerUnionGenerator.kt:139 */
|
1153 1748 | /// :rtype UnionWithJsonName:
|
1749 + | /* PythonServerUnionGenerator.kt:140 */
|
1154 1750 | pub fn foo(data: ::std::string::String) -> Self {
|
1751 + | /* PythonServerUnionGenerator.kt:141 */
|
1155 1752 | Self(UnionWithJsonName::Foo(data))
|
1753 + | /* PythonServerUnionGenerator.kt:140 */
|
1156 1754 | }
|
1755 + | /* PythonServerUnionGenerator.kt:176 */
|
1157 1756 | /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
|
1757 + | /* PythonServerUnionGenerator.kt:181 */
|
1158 1758 | /// :rtype str:
|
1759 + | /* PythonServerUnionGenerator.kt:182 */
|
1159 1760 | pub fn as_foo(&self) -> ::pyo3::PyResult<::std::string::String> {
|
1761 + | /* PythonServerUnionGenerator.kt:190 */
|
1160 1762 | match self.0.as_foo() {
|
1161 1763 | Ok(variant) => Ok(variant.clone()),
|
1162 1764 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1163 1765 | r"UnionWithJsonName variant is not of type str",
|
1164 1766 | )),
|
1165 1767 | }
|
1768 + | /* PythonServerUnionGenerator.kt:182 */
|
1166 1769 | }
|
1770 + | /* PythonServerUnionGenerator.kt:76 */
|
1167 1771 | /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
|
1772 + | /* PythonServerUnionGenerator.kt:77 */
|
1168 1773 | /// :rtype bool:
|
1774 + | /* PythonServerUnionGenerator.kt:78 */
|
1169 1775 | pub fn is_foo(&self) -> bool {
|
1776 + | /* PythonServerUnionGenerator.kt:79 */
|
1170 1777 | self.0.is_foo()
|
1778 + | /* PythonServerUnionGenerator.kt:78 */
|
1171 1779 | }
|
1780 + | /* PythonServerUnionGenerator.kt:66 */
|
1172 1781 | }
|
1782 + | /* PythonServerUnionGenerator.kt:93 */
|
1173 1783 | impl ::pyo3::IntoPy<::pyo3::PyObject> for UnionWithJsonName {
|
1784 + | /* PythonServerUnionGenerator.kt:94 */
|
1174 1785 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1786 + | /* PythonServerUnionGenerator.kt:95 */
|
1175 1787 | PyUnionMarkerUnionWithJsonName(self).into_py(py)
|
1788 + | /* PythonServerUnionGenerator.kt:94 */
|
1176 1789 | }
|
1790 + | /* PythonServerUnionGenerator.kt:93 */
|
1177 1791 | }
|
1792 + | /* PythonServerUnionGenerator.kt:98 */
|
1178 1793 | impl<'source> ::pyo3::FromPyObject<'source> for UnionWithJsonName {
|
1794 + | /* PythonServerUnionGenerator.kt:99 */
|
1179 1795 | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1796 + | /* PythonServerUnionGenerator.kt:100 */
|
1180 1797 | let data: PyUnionMarkerUnionWithJsonName = obj.extract()?;
|
1181 1798 | Ok(data.0)
|
1799 + | /* PythonServerUnionGenerator.kt:99 */
|
1182 1800 | }
|
1801 + | /* PythonServerUnionGenerator.kt:98 */
|
1183 1802 | }
|
1184 1803 |
|
1804 + | /* UnionGenerator.kt:67 */
|
1185 1805 | #[allow(missing_docs)] // documentation missing in model
|
1806 + | /* RustType.kt:516 */
|
1186 1807 | #[derive(
|
1187 1808 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1188 1809 | )]
|
1189 - | pub enum PlayerAction {
|
1190 - | /// Quit the game.
|
1810 + | pub /* UnionGenerator.kt:85 */ enum PlayerAction {
|
1811 + | /// /* UnionGenerator.kt:90 */Quit the game.
|
1812 + | /* UnionGenerator.kt:188 */
|
1191 1813 | Quit,
|
1814 + | /* UnionGenerator.kt:85 */
|
1192 1815 | }
|
1816 + | /* UnionGenerator.kt:111 */
|
1193 1817 | impl PlayerAction {
|
1818 + | /* RustType.kt:516 */
|
1194 1819 | #[allow(irrefutable_let_patterns)]
|
1820 + | /* UnionGenerator.kt:203 */
|
1195 1821 | /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
|
1822 + | /* UnionGenerator.kt:207 */
|
1196 1823 | /// Returns `Err(&Self)` if it can't be converted.
|
1824 + | /* UnionGenerator.kt:208 */
|
1197 1825 | pub fn as_quit(&self) -> ::std::result::Result<(), &Self> {
|
1826 + | /* UnionGenerator.kt:209 */
|
1198 1827 | if let PlayerAction::Quit = &self {
|
1199 1828 | ::std::result::Result::Ok(())
|
1200 1829 | } else {
|
1201 1830 | ::std::result::Result::Err(self)
|
1202 1831 | }
|
1832 + | /* UnionGenerator.kt:208 */
|
1203 1833 | }
|
1834 + | /* UnionGenerator.kt:121 */
|
1204 1835 | /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
|
1836 + | /* UnionGenerator.kt:122 */
|
1205 1837 | pub fn is_quit(&self) -> bool {
|
1838 + | /* UnionGenerator.kt:123 */
|
1206 1839 | self.as_quit().is_ok()
|
1840 + | /* UnionGenerator.kt:122 */
|
1207 1841 | }
|
1842 + | /* UnionGenerator.kt:111 */
|
1208 1843 | }
|
1844 + | /* PythonServerUnionGenerator.kt:58 */
|
1209 1845 | #[pyo3::pyclass(name = "PlayerAction")]
|
1846 + | /* RustType.kt:516 */
|
1210 1847 | #[derive(
|
1211 1848 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1212 1849 | )]
|
1213 - | pub struct PyUnionMarkerPlayerAction(pub PlayerAction);
|
1850 + | pub /* PythonServerUnionGenerator.kt:61 */ struct PyUnionMarkerPlayerAction(pub PlayerAction);
|
1851 + | /* RustType.kt:516 */
|
1214 1852 | #[::pyo3::pymethods]
|
1853 + | /* PythonServerUnionGenerator.kt:66 */
|
1215 1854 | impl PyUnionMarkerPlayerAction {
|
1855 + | /* RustType.kt:516 */
|
1216 1856 | #[allow(irrefutable_let_patterns)]
|
1857 + | /* RustType.kt:516 */
|
1217 1858 | #[staticmethod]
|
1859 + | /* PythonServerUnionGenerator.kt:121 */
|
1218 1860 | /// Creates a new union instance of [`Quit`](crate::model::PlayerAction::Quit)
|
1861 + | /* PythonServerUnionGenerator.kt:125 */
|
1219 1862 | /// :rtype PlayerAction:
|
1863 + | /* PythonServerUnionGenerator.kt:126 */
|
1220 1864 | pub fn quit() -> Self {
|
1865 + | /* PythonServerUnionGenerator.kt:127 */
|
1221 1866 | Self(PlayerAction::Quit)
|
1867 + | /* PythonServerUnionGenerator.kt:126 */
|
1222 1868 | }
|
1869 + | /* PythonServerUnionGenerator.kt:156 */
|
1223 1870 | /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
|
1871 + | /* PythonServerUnionGenerator.kt:160 */
|
1224 1872 | /// :rtype None:
|
1873 + | /* PythonServerUnionGenerator.kt:161 */
|
1225 1874 | pub fn as_quit(&self) -> ::pyo3::PyResult<()> {
|
1875 + | /* PythonServerUnionGenerator.kt:162 */
|
1226 1876 | self.0.as_quit().map_err(|_| {
|
1227 1877 | ::pyo3::exceptions::PyValueError::new_err("PlayerAction variant is not None")
|
1228 1878 | })
|
1879 + | /* PythonServerUnionGenerator.kt:161 */
|
1229 1880 | }
|
1881 + | /* PythonServerUnionGenerator.kt:76 */
|
1230 1882 | /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
|
1883 + | /* PythonServerUnionGenerator.kt:77 */
|
1231 1884 | /// :rtype bool:
|
1885 + | /* PythonServerUnionGenerator.kt:78 */
|
1232 1886 | pub fn is_quit(&self) -> bool {
|
1887 + | /* PythonServerUnionGenerator.kt:79 */
|
1233 1888 | self.0.is_quit()
|
1889 + | /* PythonServerUnionGenerator.kt:78 */
|
1234 1890 | }
|
1891 + | /* PythonServerUnionGenerator.kt:66 */
|
1235 1892 | }
|
1893 + | /* PythonServerUnionGenerator.kt:93 */
|
1236 1894 | impl ::pyo3::IntoPy<::pyo3::PyObject> for PlayerAction {
|
1895 + | /* PythonServerUnionGenerator.kt:94 */
|
1237 1896 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1897 + | /* PythonServerUnionGenerator.kt:95 */
|
1238 1898 | PyUnionMarkerPlayerAction(self).into_py(py)
|
1899 + | /* PythonServerUnionGenerator.kt:94 */
|
1239 1900 | }
|
1901 + | /* PythonServerUnionGenerator.kt:93 */
|
1240 1902 | }
|
1903 + | /* PythonServerUnionGenerator.kt:98 */
|
1241 1904 | impl<'source> ::pyo3::FromPyObject<'source> for PlayerAction {
|
1905 + | /* PythonServerUnionGenerator.kt:99 */
|
1242 1906 | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1907 + | /* PythonServerUnionGenerator.kt:100 */
|
1243 1908 | let data: PyUnionMarkerPlayerAction = obj.extract()?;
|
1244 1909 | Ok(data.0)
|
1910 + | /* PythonServerUnionGenerator.kt:99 */
|
1245 1911 | }
|
1912 + | /* PythonServerUnionGenerator.kt:98 */
|
1246 1913 | }
|
1247 1914 |
|
1915 + | /* RustType.kt:516 */
|
1248 1916 | #[::pyo3::pyclass]
|
1917 + | /* PythonServerStructureGenerator.kt:63 */
|
1249 1918 | /// :rtype None:
|
1919 + | /* StructureGenerator.kt:197 */
|
1250 1920 | #[allow(missing_docs)] // documentation missing in model
|
1921 + | /* RustType.kt:516 */
|
1251 1922 | #[derive(
|
1252 1923 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1253 1924 | )]
|
1254 - | pub struct Unit {}
|
1925 + | pub /* StructureGenerator.kt:201 */ struct Unit {/* StructureGenerator.kt:201 */}
|
1926 + | /* RustType.kt:516 */
|
1255 1927 | #[allow(clippy::new_without_default)]
|
1928 + | /* RustType.kt:516 */
|
1256 1929 | #[allow(clippy::too_many_arguments)]
|
1930 + | /* RustType.kt:516 */
|
1257 1931 | #[::pyo3::pymethods]
|
1932 + | /* PythonServerStructureGenerator.kt:88 */
|
1258 1933 | impl Unit {
|
1259 1934 | #[new]
|
1260 1935 | pub fn new() -> Self {
|
1261 1936 | Self {}
|
1262 1937 | }
|
1263 1938 | fn __repr__(&self) -> String {
|
1264 1939 | format!("{self:?}")
|
1265 1940 | }
|
1266 1941 | fn __str__(&self) -> String {
|
1267 1942 | format!("{self:?}")
|
1268 1943 | }
|
1269 1944 | }
|
1945 + | /* PythonServerStructureGenerator.kt:111 */
|
1270 1946 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Unit> {
|
1271 1947 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1272 1948 | ob.extract::<Unit>().map(Box::new)
|
1273 1949 | }
|
1274 1950 | }
|
1275 1951 |
|
1276 1952 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Unit> {
|
1277 1953 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1278 1954 | (*self).into_py(py)
|
1279 1955 | }
|
1280 1956 | }
|
1957 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1281 1958 | impl crate::constrained::Constrained for crate::model::Unit {
|
1282 1959 | type Unconstrained = crate::model::unit_internal::Builder;
|
1283 1960 | }
|
1961 + | /* ServerCodegenVisitor.kt:370 */
|
1284 1962 | impl Unit {
|
1285 - | /// Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit).
|
1963 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit).
|
1964 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1286 1965 | pub fn builder() -> crate::model::unit::Builder {
|
1966 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
1287 1967 | crate::model::unit::Builder::default()
|
1968 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1288 1969 | }
|
1970 + | /* ServerCodegenVisitor.kt:370 */
|
1289 1971 | }
|
1290 1972 |
|
1291 - | /// A union with a representative set of types for members.
|
1973 + | /// /* UnionGenerator.kt:67 */A union with a representative set of types for members.
|
1974 + | /* RustType.kt:516 */
|
1292 1975 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1293 - | pub enum MyUnion {
|
1976 + | pub /* UnionGenerator.kt:85 */ enum MyUnion {
|
1977 + | /* UnionGenerator.kt:90 */
|
1294 1978 | #[allow(missing_docs)] // documentation missing in model
|
1979 + | /* UnionGenerator.kt:190 */
|
1295 1980 | BlobValue(::aws_smithy_http_server_python::types::Blob),
|
1981 + | /* UnionGenerator.kt:90 */
|
1296 1982 | #[allow(missing_docs)] // documentation missing in model
|
1983 + | /* UnionGenerator.kt:190 */
|
1297 1984 | BooleanValue(bool),
|
1985 + | /* UnionGenerator.kt:90 */
|
1298 1986 | #[allow(missing_docs)] // documentation missing in model
|
1987 + | /* UnionGenerator.kt:190 */
|
1299 1988 | EnumValue(crate::model::FooEnum),
|
1989 + | /* UnionGenerator.kt:90 */
|
1300 1990 | #[allow(missing_docs)] // documentation missing in model
|
1991 + | /* UnionGenerator.kt:190 */
|
1301 1992 | ListValue(::std::vec::Vec<::std::string::String>),
|
1993 + | /* UnionGenerator.kt:90 */
|
1302 1994 | #[allow(missing_docs)] // documentation missing in model
|
1995 + | /* UnionGenerator.kt:190 */
|
1303 1996 | MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
|
1997 + | /* UnionGenerator.kt:90 */
|
1304 1998 | #[allow(missing_docs)] // documentation missing in model
|
1999 + | /* UnionGenerator.kt:190 */
|
1305 2000 | NumberValue(i32),
|
2001 + | /* UnionGenerator.kt:90 */
|
1306 2002 | #[allow(missing_docs)] // documentation missing in model
|
2003 + | /* UnionGenerator.kt:190 */
|
1307 2004 | RenamedStructureValue(crate::model::RenamedGreeting),
|
2005 + | /* UnionGenerator.kt:90 */
|
1308 2006 | #[allow(missing_docs)] // documentation missing in model
|
2007 + | /* UnionGenerator.kt:190 */
|
1309 2008 | StringValue(::std::string::String),
|
2009 + | /* UnionGenerator.kt:90 */
|
1310 2010 | #[allow(missing_docs)] // documentation missing in model
|
2011 + | /* UnionGenerator.kt:190 */
|
1311 2012 | StructureValue(crate::model::GreetingStruct),
|
2013 + | /* UnionGenerator.kt:90 */
|
1312 2014 | #[allow(missing_docs)] // documentation missing in model
|
2015 + | /* UnionGenerator.kt:190 */
|
1313 2016 | TimestampValue(::aws_smithy_http_server_python::types::DateTime),
|
2017 + | /* UnionGenerator.kt:85 */
|
1314 2018 | }
|
2019 + | /* UnionGenerator.kt:111 */
|
1315 2020 | impl MyUnion {
|
2021 + | /* UnionGenerator.kt:217 */
|
1316 2022 | /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
|
2023 + | /* UnionGenerator.kt:222 */
|
1317 2024 | /// Returns `Err(&Self)` if it can't be converted.
|
2025 + | /* UnionGenerator.kt:223 */
|
1318 2026 | pub fn as_blob_value(
|
1319 2027 | &self,
|
1320 2028 | ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::Blob, &Self> {
|
2029 + | /* UnionGenerator.kt:227 */
|
1321 2030 | if let MyUnion::BlobValue(val) = &self {
|
1322 2031 | ::std::result::Result::Ok(val)
|
1323 2032 | } else {
|
1324 2033 | ::std::result::Result::Err(self)
|
1325 2034 | }
|
2035 + | /* UnionGenerator.kt:223 */
|
1326 2036 | }
|
2037 + | /* UnionGenerator.kt:121 */
|
1327 2038 | /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
|
2039 + | /* UnionGenerator.kt:122 */
|
1328 2040 | pub fn is_blob_value(&self) -> bool {
|
2041 + | /* UnionGenerator.kt:123 */
|
1329 2042 | self.as_blob_value().is_ok()
|
2043 + | /* UnionGenerator.kt:122 */
|
1330 2044 | }
|
2045 + | /* UnionGenerator.kt:217 */
|
1331 2046 | /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
|
2047 + | /* UnionGenerator.kt:222 */
|
1332 2048 | /// Returns `Err(&Self)` if it can't be converted.
|
2049 + | /* UnionGenerator.kt:223 */
|
1333 2050 | pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
|
2051 + | /* UnionGenerator.kt:227 */
|
1334 2052 | if let MyUnion::BooleanValue(val) = &self {
|
1335 2053 | ::std::result::Result::Ok(val)
|
1336 2054 | } else {
|
1337 2055 | ::std::result::Result::Err(self)
|
1338 2056 | }
|
2057 + | /* UnionGenerator.kt:223 */
|
1339 2058 | }
|
2059 + | /* UnionGenerator.kt:121 */
|
1340 2060 | /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
|
2061 + | /* UnionGenerator.kt:122 */
|
1341 2062 | pub fn is_boolean_value(&self) -> bool {
|
2063 + | /* UnionGenerator.kt:123 */
|
1342 2064 | self.as_boolean_value().is_ok()
|
2065 + | /* UnionGenerator.kt:122 */
|
1343 2066 | }
|
2067 + | /* UnionGenerator.kt:217 */
|
1344 2068 | /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
|
2069 + | /* UnionGenerator.kt:222 */
|
1345 2070 | /// Returns `Err(&Self)` if it can't be converted.
|
2071 + | /* UnionGenerator.kt:223 */
|
1346 2072 | pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
|
2073 + | /* UnionGenerator.kt:227 */
|
1347 2074 | if let MyUnion::EnumValue(val) = &self {
|
1348 2075 | ::std::result::Result::Ok(val)
|
1349 2076 | } else {
|
1350 2077 | ::std::result::Result::Err(self)
|
1351 2078 | }
|
2079 + | /* UnionGenerator.kt:223 */
|
1352 2080 | }
|
2081 + | /* UnionGenerator.kt:121 */
|
1353 2082 | /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
|
2083 + | /* UnionGenerator.kt:122 */
|
1354 2084 | pub fn is_enum_value(&self) -> bool {
|
2085 + | /* UnionGenerator.kt:123 */
|
1355 2086 | self.as_enum_value().is_ok()
|
2087 + | /* UnionGenerator.kt:122 */
|
1356 2088 | }
|
2089 + | /* UnionGenerator.kt:217 */
|
1357 2090 | /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
|
2091 + | /* UnionGenerator.kt:222 */
|
1358 2092 | /// Returns `Err(&Self)` if it can't be converted.
|
2093 + | /* UnionGenerator.kt:223 */
|
1359 2094 | pub fn as_list_value(
|
1360 2095 | &self,
|
1361 2096 | ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
|
2097 + | /* UnionGenerator.kt:227 */
|
1362 2098 | if let MyUnion::ListValue(val) = &self {
|
1363 2099 | ::std::result::Result::Ok(val)
|
1364 2100 | } else {
|
1365 2101 | ::std::result::Result::Err(self)
|
1366 2102 | }
|
2103 + | /* UnionGenerator.kt:223 */
|
1367 2104 | }
|
2105 + | /* UnionGenerator.kt:121 */
|
1368 2106 | /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
|
2107 + | /* UnionGenerator.kt:122 */
|
1369 2108 | pub fn is_list_value(&self) -> bool {
|
2109 + | /* UnionGenerator.kt:123 */
|
1370 2110 | self.as_list_value().is_ok()
|
2111 + | /* UnionGenerator.kt:122 */
|
1371 2112 | }
|
2113 + | /* UnionGenerator.kt:217 */
|
1372 2114 | /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
|
2115 + | /* UnionGenerator.kt:222 */
|
1373 2116 | /// Returns `Err(&Self)` if it can't be converted.
|
2117 + | /* UnionGenerator.kt:223 */
|
1374 2118 | pub fn as_map_value(
|
1375 2119 | &self,
|
1376 2120 | ) -> ::std::result::Result<
|
1377 2121 | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1378 2122 | &Self,
|
1379 2123 | > {
|
2124 + | /* UnionGenerator.kt:227 */
|
1380 2125 | if let MyUnion::MapValue(val) = &self {
|
1381 2126 | ::std::result::Result::Ok(val)
|
1382 2127 | } else {
|
1383 2128 | ::std::result::Result::Err(self)
|
1384 2129 | }
|
2130 + | /* UnionGenerator.kt:223 */
|
1385 2131 | }
|
2132 + | /* UnionGenerator.kt:121 */
|
1386 2133 | /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
|
2134 + | /* UnionGenerator.kt:122 */
|
1387 2135 | pub fn is_map_value(&self) -> bool {
|
2136 + | /* UnionGenerator.kt:123 */
|
1388 2137 | self.as_map_value().is_ok()
|
2138 + | /* UnionGenerator.kt:122 */
|
1389 2139 | }
|
2140 + | /* UnionGenerator.kt:217 */
|
1390 2141 | /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
|
2142 + | /* UnionGenerator.kt:222 */
|
1391 2143 | /// Returns `Err(&Self)` if it can't be converted.
|
2144 + | /* UnionGenerator.kt:223 */
|
1392 2145 | pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
|
2146 + | /* UnionGenerator.kt:227 */
|
1393 2147 | if let MyUnion::NumberValue(val) = &self {
|
1394 2148 | ::std::result::Result::Ok(val)
|
1395 2149 | } else {
|
1396 2150 | ::std::result::Result::Err(self)
|
1397 2151 | }
|
2152 + | /* UnionGenerator.kt:223 */
|
1398 2153 | }
|
2154 + | /* UnionGenerator.kt:121 */
|
1399 2155 | /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
|
2156 + | /* UnionGenerator.kt:122 */
|
1400 2157 | pub fn is_number_value(&self) -> bool {
|
2158 + | /* UnionGenerator.kt:123 */
|
1401 2159 | self.as_number_value().is_ok()
|
2160 + | /* UnionGenerator.kt:122 */
|
1402 2161 | }
|
2162 + | /* UnionGenerator.kt:217 */
|
1403 2163 | /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
|
2164 + | /* UnionGenerator.kt:222 */
|
1404 2165 | /// Returns `Err(&Self)` if it can't be converted.
|
2166 + | /* UnionGenerator.kt:223 */
|
1405 2167 | pub fn as_renamed_structure_value(
|
1406 2168 | &self,
|
1407 2169 | ) -> ::std::result::Result<&crate::model::RenamedGreeting, &Self> {
|
2170 + | /* UnionGenerator.kt:227 */
|
1408 2171 | if let MyUnion::RenamedStructureValue(val) = &self {
|
1409 2172 | ::std::result::Result::Ok(val)
|
1410 2173 | } else {
|
1411 2174 | ::std::result::Result::Err(self)
|
1412 2175 | }
|
2176 + | /* UnionGenerator.kt:223 */
|
1413 2177 | }
|
2178 + | /* UnionGenerator.kt:121 */
|
1414 2179 | /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
|
2180 + | /* UnionGenerator.kt:122 */
|
1415 2181 | pub fn is_renamed_structure_value(&self) -> bool {
|
2182 + | /* UnionGenerator.kt:123 */
|
1416 2183 | self.as_renamed_structure_value().is_ok()
|
2184 + | /* UnionGenerator.kt:122 */
|
1417 2185 | }
|
2186 + | /* UnionGenerator.kt:217 */
|
1418 2187 | /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
|
2188 + | /* UnionGenerator.kt:222 */
|
1419 2189 | /// Returns `Err(&Self)` if it can't be converted.
|
2190 + | /* UnionGenerator.kt:223 */
|
1420 2191 | pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
2192 + | /* UnionGenerator.kt:227 */
|
1421 2193 | if let MyUnion::StringValue(val) = &self {
|
1422 2194 | ::std::result::Result::Ok(val)
|
1423 2195 | } else {
|
1424 2196 | ::std::result::Result::Err(self)
|
1425 2197 | }
|
2198 + | /* UnionGenerator.kt:223 */
|
1426 2199 | }
|
2200 + | /* UnionGenerator.kt:121 */
|
1427 2201 | /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
|
2202 + | /* UnionGenerator.kt:122 */
|
1428 2203 | pub fn is_string_value(&self) -> bool {
|
2204 + | /* UnionGenerator.kt:123 */
|
1429 2205 | self.as_string_value().is_ok()
|
2206 + | /* UnionGenerator.kt:122 */
|
1430 2207 | }
|
2208 + | /* UnionGenerator.kt:217 */
|
1431 2209 | /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
|
2210 + | /* UnionGenerator.kt:222 */
|
1432 2211 | /// Returns `Err(&Self)` if it can't be converted.
|
2212 + | /* UnionGenerator.kt:223 */
|
1433 2213 | pub fn as_structure_value(
|
1434 2214 | &self,
|
1435 2215 | ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
|
2216 + | /* UnionGenerator.kt:227 */
|
1436 2217 | if let MyUnion::StructureValue(val) = &self {
|
1437 2218 | ::std::result::Result::Ok(val)
|
1438 2219 | } else {
|
1439 2220 | ::std::result::Result::Err(self)
|
1440 2221 | }
|
2222 + | /* UnionGenerator.kt:223 */
|
1441 2223 | }
|
2224 + | /* UnionGenerator.kt:121 */
|
1442 2225 | /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
|
2226 + | /* UnionGenerator.kt:122 */
|
1443 2227 | pub fn is_structure_value(&self) -> bool {
|
2228 + | /* UnionGenerator.kt:123 */
|
1444 2229 | self.as_structure_value().is_ok()
|
2230 + | /* UnionGenerator.kt:122 */
|
1445 2231 | }
|
2232 + | /* UnionGenerator.kt:217 */
|
1446 2233 | /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
|
2234 + | /* UnionGenerator.kt:222 */
|
1447 2235 | /// Returns `Err(&Self)` if it can't be converted.
|
2236 + | /* UnionGenerator.kt:223 */
|
1448 2237 | pub fn as_timestamp_value(
|
1449 2238 | &self,
|
1450 2239 | ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::DateTime, &Self> {
|
2240 + | /* UnionGenerator.kt:227 */
|
1451 2241 | if let MyUnion::TimestampValue(val) = &self {
|
1452 2242 | ::std::result::Result::Ok(val)
|
1453 2243 | } else {
|
1454 2244 | ::std::result::Result::Err(self)
|
1455 2245 | }
|
2246 + | /* UnionGenerator.kt:223 */
|
1456 2247 | }
|
2248 + | /* UnionGenerator.kt:121 */
|
1457 2249 | /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
|
2250 + | /* UnionGenerator.kt:122 */
|
1458 2251 | pub fn is_timestamp_value(&self) -> bool {
|
2252 + | /* UnionGenerator.kt:123 */
|
1459 2253 | self.as_timestamp_value().is_ok()
|
2254 + | /* UnionGenerator.kt:122 */
|
1460 2255 | }
|
2256 + | /* UnionGenerator.kt:111 */
|
1461 2257 | }
|
2258 + | /* PythonServerUnionGenerator.kt:58 */
|
1462 2259 | #[pyo3::pyclass(name = "MyUnion")]
|
2260 + | /* RustType.kt:516 */
|
1463 2261 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1464 - | pub struct PyUnionMarkerMyUnion(pub MyUnion);
|
2262 + | pub /* PythonServerUnionGenerator.kt:61 */ struct PyUnionMarkerMyUnion(pub MyUnion);
|
2263 + | /* RustType.kt:516 */
|
1465 2264 | #[::pyo3::pymethods]
|
2265 + | /* PythonServerUnionGenerator.kt:66 */
|
1466 2266 | impl PyUnionMarkerMyUnion {
|
2267 + | /* RustType.kt:516 */
|
1467 2268 | #[staticmethod]
|
2269 + | /* PythonServerUnionGenerator.kt:134 */
|
1468 2270 | /// Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
|
2271 + | /* PythonServerUnionGenerator.kt:138 */
|
1469 2272 | /// :param data rest_json.types.Blob:
|
2273 + | /* PythonServerUnionGenerator.kt:139 */
|
1470 2274 | /// :rtype MyUnion:
|
2275 + | /* PythonServerUnionGenerator.kt:140 */
|
1471 2276 | pub fn blob_value(data: ::aws_smithy_http_server_python::types::Blob) -> Self {
|
2277 + | /* PythonServerUnionGenerator.kt:141 */
|
1472 2278 | Self(MyUnion::BlobValue(data))
|
2279 + | /* PythonServerUnionGenerator.kt:140 */
|
1473 2280 | }
|
2281 + | /* PythonServerUnionGenerator.kt:176 */
|
1474 2282 | /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
|
2283 + | /* PythonServerUnionGenerator.kt:181 */
|
1475 2284 | /// :rtype rest_json.types.Blob:
|
2285 + | /* PythonServerUnionGenerator.kt:182 */
|
1476 2286 | pub fn as_blob_value(&self) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::Blob> {
|
2287 + | /* PythonServerUnionGenerator.kt:190 */
|
1477 2288 | match self.0.as_blob_value() {
|
1478 2289 | Ok(variant) => Ok(variant.clone()),
|
1479 2290 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1480 2291 | r"MyUnion variant is not of type rest_json.types.Blob",
|
1481 2292 | )),
|
1482 2293 | }
|
2294 + | /* PythonServerUnionGenerator.kt:182 */
|
1483 2295 | }
|
2296 + | /* PythonServerUnionGenerator.kt:76 */
|
1484 2297 | /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
|
2298 + | /* PythonServerUnionGenerator.kt:77 */
|
1485 2299 | /// :rtype bool:
|
2300 + | /* PythonServerUnionGenerator.kt:78 */
|
1486 2301 | pub fn is_blob_value(&self) -> bool {
|
2302 + | /* PythonServerUnionGenerator.kt:79 */
|
1487 2303 | self.0.is_blob_value()
|
2304 + | /* PythonServerUnionGenerator.kt:78 */
|
1488 2305 | }
|
2306 + | /* RustType.kt:516 */
|
1489 2307 | #[staticmethod]
|
2308 + | /* PythonServerUnionGenerator.kt:134 */
|
1490 2309 | /// Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
|
2310 + | /* PythonServerUnionGenerator.kt:138 */
|
1491 2311 | /// :param data bool:
|
2312 + | /* PythonServerUnionGenerator.kt:139 */
|
1492 2313 | /// :rtype MyUnion:
|
2314 + | /* PythonServerUnionGenerator.kt:140 */
|
1493 2315 | pub fn boolean_value(data: bool) -> Self {
|
2316 + | /* PythonServerUnionGenerator.kt:141 */
|
1494 2317 | Self(MyUnion::BooleanValue(data))
|
2318 + | /* PythonServerUnionGenerator.kt:140 */
|
1495 2319 | }
|
2320 + | /* PythonServerUnionGenerator.kt:176 */
|
1496 2321 | /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
|
2322 + | /* PythonServerUnionGenerator.kt:181 */
|
1497 2323 | /// :rtype bool:
|
2324 + | /* PythonServerUnionGenerator.kt:182 */
|
1498 2325 | pub fn as_boolean_value(&self) -> ::pyo3::PyResult<bool> {
|
2326 + | /* PythonServerUnionGenerator.kt:190 */
|
1499 2327 | match self.0.as_boolean_value() {
|
1500 2328 | Ok(variant) => Ok(*variant),
|
1501 2329 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1502 2330 | r"MyUnion variant is not of type bool",
|
1503 2331 | )),
|
1504 2332 | }
|
2333 + | /* PythonServerUnionGenerator.kt:182 */
|
1505 2334 | }
|
2335 + | /* PythonServerUnionGenerator.kt:76 */
|
1506 2336 | /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
|
2337 + | /* PythonServerUnionGenerator.kt:77 */
|
1507 2338 | /// :rtype bool:
|
2339 + | /* PythonServerUnionGenerator.kt:78 */
|
1508 2340 | pub fn is_boolean_value(&self) -> bool {
|
2341 + | /* PythonServerUnionGenerator.kt:79 */
|
1509 2342 | self.0.is_boolean_value()
|
2343 + | /* PythonServerUnionGenerator.kt:78 */
|
1510 2344 | }
|
2345 + | /* RustType.kt:516 */
|
1511 2346 | #[staticmethod]
|
2347 + | /* PythonServerUnionGenerator.kt:134 */
|
1512 2348 | /// Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
|
2349 + | /* PythonServerUnionGenerator.kt:138 */
|
1513 2350 | /// :param data rest_json.model.FooEnum:
|
2351 + | /* PythonServerUnionGenerator.kt:139 */
|
1514 2352 | /// :rtype MyUnion:
|
2353 + | /* PythonServerUnionGenerator.kt:140 */
|
1515 2354 | pub fn enum_value(data: crate::model::FooEnum) -> Self {
|
2355 + | /* PythonServerUnionGenerator.kt:141 */
|
1516 2356 | Self(MyUnion::EnumValue(data))
|
2357 + | /* PythonServerUnionGenerator.kt:140 */
|
1517 2358 | }
|
2359 + | /* PythonServerUnionGenerator.kt:176 */
|
1518 2360 | /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
|
2361 + | /* PythonServerUnionGenerator.kt:181 */
|
1519 2362 | /// :rtype rest_json.model.FooEnum:
|
2363 + | /* PythonServerUnionGenerator.kt:182 */
|
1520 2364 | pub fn as_enum_value(&self) -> ::pyo3::PyResult<crate::model::FooEnum> {
|
2365 + | /* PythonServerUnionGenerator.kt:190 */
|
1521 2366 | match self.0.as_enum_value() {
|
1522 2367 | Ok(variant) => Ok(variant.clone()),
|
1523 2368 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1524 2369 | r"MyUnion variant is not of type rest_json.model.FooEnum",
|
1525 2370 | )),
|
1526 2371 | }
|
2372 + | /* PythonServerUnionGenerator.kt:182 */
|
1527 2373 | }
|
2374 + | /* PythonServerUnionGenerator.kt:76 */
|
1528 2375 | /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
|
2376 + | /* PythonServerUnionGenerator.kt:77 */
|
1529 2377 | /// :rtype bool:
|
2378 + | /* PythonServerUnionGenerator.kt:78 */
|
1530 2379 | pub fn is_enum_value(&self) -> bool {
|
2380 + | /* PythonServerUnionGenerator.kt:79 */
|
1531 2381 | self.0.is_enum_value()
|
2382 + | /* PythonServerUnionGenerator.kt:78 */
|
1532 2383 | }
|
2384 + | /* RustType.kt:516 */
|
1533 2385 | #[staticmethod]
|
2386 + | /* PythonServerUnionGenerator.kt:134 */
|
1534 2387 | /// Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
|
2388 + | /* PythonServerUnionGenerator.kt:138 */
|
1535 2389 | /// :param data typing.List\[str\]:
|
2390 + | /* PythonServerUnionGenerator.kt:139 */
|
1536 2391 | /// :rtype MyUnion:
|
2392 + | /* PythonServerUnionGenerator.kt:140 */
|
1537 2393 | pub fn list_value(data: ::std::vec::Vec<::std::string::String>) -> Self {
|
2394 + | /* PythonServerUnionGenerator.kt:141 */
|
1538 2395 | Self(MyUnion::ListValue(data))
|
2396 + | /* PythonServerUnionGenerator.kt:140 */
|
1539 2397 | }
|
2398 + | /* PythonServerUnionGenerator.kt:176 */
|
1540 2399 | /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
|
2400 + | /* PythonServerUnionGenerator.kt:181 */
|
1541 2401 | /// :rtype typing.List\[str\]:
|
2402 + | /* PythonServerUnionGenerator.kt:182 */
|
1542 2403 | pub fn as_list_value(&self) -> ::pyo3::PyResult<::std::vec::Vec<::std::string::String>> {
|
2404 + | /* PythonServerUnionGenerator.kt:190 */
|
1543 2405 | match self.0.as_list_value() {
|
1544 2406 | Ok(variant) => Ok(variant.clone()),
|
1545 2407 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1546 2408 | r"MyUnion variant is not of type typing.List\[str\]",
|
1547 2409 | )),
|
1548 2410 | }
|
2411 + | /* PythonServerUnionGenerator.kt:182 */
|
1549 2412 | }
|
2413 + | /* PythonServerUnionGenerator.kt:76 */
|
1550 2414 | /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
|
2415 + | /* PythonServerUnionGenerator.kt:77 */
|
1551 2416 | /// :rtype bool:
|
2417 + | /* PythonServerUnionGenerator.kt:78 */
|
1552 2418 | pub fn is_list_value(&self) -> bool {
|
2419 + | /* PythonServerUnionGenerator.kt:79 */
|
1553 2420 | self.0.is_list_value()
|
2421 + | /* PythonServerUnionGenerator.kt:78 */
|
1554 2422 | }
|
2423 + | /* RustType.kt:516 */
|
1555 2424 | #[staticmethod]
|
2425 + | /* PythonServerUnionGenerator.kt:134 */
|
1556 2426 | /// Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
|
2427 + | /* PythonServerUnionGenerator.kt:138 */
|
1557 2428 | /// :param data typing.Dict\[str, str\]:
|
2429 + | /* PythonServerUnionGenerator.kt:139 */
|
1558 2430 | /// :rtype MyUnion:
|
2431 + | /* PythonServerUnionGenerator.kt:140 */
|
1559 2432 | pub fn map_value(
|
1560 2433 | data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1561 2434 | ) -> Self {
|
2435 + | /* PythonServerUnionGenerator.kt:141 */
|
1562 2436 | Self(MyUnion::MapValue(data))
|
2437 + | /* PythonServerUnionGenerator.kt:140 */
|
1563 2438 | }
|
2439 + | /* PythonServerUnionGenerator.kt:176 */
|
1564 2440 | /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
|
2441 + | /* PythonServerUnionGenerator.kt:181 */
|
1565 2442 | /// :rtype typing.Dict\[str, str\]:
|
2443 + | /* PythonServerUnionGenerator.kt:182 */
|
1566 2444 | pub fn as_map_value(
|
1567 2445 | &self,
|
1568 2446 | ) -> ::pyo3::PyResult<::std::collections::HashMap<::std::string::String, ::std::string::String>>
|
1569 2447 | {
|
2448 + | /* PythonServerUnionGenerator.kt:190 */
|
1570 2449 | match self.0.as_map_value() {
|
1571 2450 | Ok(variant) => Ok(variant.clone()),
|
1572 2451 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1573 2452 | r"MyUnion variant is not of type typing.Dict\[str, str\]",
|
1574 2453 | )),
|
1575 2454 | }
|
2455 + | /* PythonServerUnionGenerator.kt:182 */
|
1576 2456 | }
|
2457 + | /* PythonServerUnionGenerator.kt:76 */
|
1577 2458 | /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
|
2459 + | /* PythonServerUnionGenerator.kt:77 */
|
1578 2460 | /// :rtype bool:
|
2461 + | /* PythonServerUnionGenerator.kt:78 */
|
1579 2462 | pub fn is_map_value(&self) -> bool {
|
2463 + | /* PythonServerUnionGenerator.kt:79 */
|
1580 2464 | self.0.is_map_value()
|
2465 + | /* PythonServerUnionGenerator.kt:78 */
|
1581 2466 | }
|
2467 + | /* RustType.kt:516 */
|
1582 2468 | #[staticmethod]
|
2469 + | /* PythonServerUnionGenerator.kt:134 */
|
1583 2470 | /// Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
|
2471 + | /* PythonServerUnionGenerator.kt:138 */
|
1584 2472 | /// :param data int:
|
2473 + | /* PythonServerUnionGenerator.kt:139 */
|
1585 2474 | /// :rtype MyUnion:
|
2475 + | /* PythonServerUnionGenerator.kt:140 */
|
1586 2476 | pub fn number_value(data: i32) -> Self {
|
2477 + | /* PythonServerUnionGenerator.kt:141 */
|
1587 2478 | Self(MyUnion::NumberValue(data))
|
2479 + | /* PythonServerUnionGenerator.kt:140 */
|
1588 2480 | }
|
2481 + | /* PythonServerUnionGenerator.kt:176 */
|
1589 2482 | /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
|
2483 + | /* PythonServerUnionGenerator.kt:181 */
|
1590 2484 | /// :rtype int:
|
2485 + | /* PythonServerUnionGenerator.kt:182 */
|
1591 2486 | pub fn as_number_value(&self) -> ::pyo3::PyResult<i32> {
|
2487 + | /* PythonServerUnionGenerator.kt:190 */
|
1592 2488 | match self.0.as_number_value() {
|
1593 2489 | Ok(variant) => Ok(*variant),
|
1594 2490 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1595 2491 | r"MyUnion variant is not of type int",
|
1596 2492 | )),
|
1597 2493 | }
|
2494 + | /* PythonServerUnionGenerator.kt:182 */
|
1598 2495 | }
|
2496 + | /* PythonServerUnionGenerator.kt:76 */
|
1599 2497 | /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
|
2498 + | /* PythonServerUnionGenerator.kt:77 */
|
1600 2499 | /// :rtype bool:
|
2500 + | /* PythonServerUnionGenerator.kt:78 */
|
1601 2501 | pub fn is_number_value(&self) -> bool {
|
2502 + | /* PythonServerUnionGenerator.kt:79 */
|
1602 2503 | self.0.is_number_value()
|
2504 + | /* PythonServerUnionGenerator.kt:78 */
|
1603 2505 | }
|
2506 + | /* RustType.kt:516 */
|
1604 2507 | #[staticmethod]
|
2508 + | /* PythonServerUnionGenerator.kt:134 */
|
1605 2509 | /// Creates a new union instance of [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue)
|
2510 + | /* PythonServerUnionGenerator.kt:138 */
|
1606 2511 | /// :param data rest_json.model.RenamedGreeting:
|
2512 + | /* PythonServerUnionGenerator.kt:139 */
|
1607 2513 | /// :rtype MyUnion:
|
2514 + | /* PythonServerUnionGenerator.kt:140 */
|
1608 2515 | pub fn renamed_structure_value(data: crate::model::RenamedGreeting) -> Self {
|
2516 + | /* PythonServerUnionGenerator.kt:141 */
|
1609 2517 | Self(MyUnion::RenamedStructureValue(data))
|
2518 + | /* PythonServerUnionGenerator.kt:140 */
|
1610 2519 | }
|
2520 + | /* PythonServerUnionGenerator.kt:176 */
|
1611 2521 | /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
|
2522 + | /* PythonServerUnionGenerator.kt:181 */
|
1612 2523 | /// :rtype rest_json.model.RenamedGreeting:
|
2524 + | /* PythonServerUnionGenerator.kt:182 */
|
1613 2525 | pub fn as_renamed_structure_value(&self) -> ::pyo3::PyResult<crate::model::RenamedGreeting> {
|
2526 + | /* PythonServerUnionGenerator.kt:190 */
|
1614 2527 | match self.0.as_renamed_structure_value() {
|
1615 2528 | Ok(variant) => Ok(variant.clone()),
|
1616 2529 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1617 2530 | r"MyUnion variant is not of type rest_json.model.RenamedGreeting",
|
1618 2531 | )),
|
1619 2532 | }
|
2533 + | /* PythonServerUnionGenerator.kt:182 */
|
1620 2534 | }
|
2535 + | /* PythonServerUnionGenerator.kt:76 */
|
1621 2536 | /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
|
2537 + | /* PythonServerUnionGenerator.kt:77 */
|
1622 2538 | /// :rtype bool:
|
2539 + | /* PythonServerUnionGenerator.kt:78 */
|
1623 2540 | pub fn is_renamed_structure_value(&self) -> bool {
|
2541 + | /* PythonServerUnionGenerator.kt:79 */
|
1624 2542 | self.0.is_renamed_structure_value()
|
2543 + | /* PythonServerUnionGenerator.kt:78 */
|
1625 2544 | }
|
2545 + | /* RustType.kt:516 */
|
1626 2546 | #[staticmethod]
|
2547 + | /* PythonServerUnionGenerator.kt:134 */
|
1627 2548 | /// Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
|
2549 + | /* PythonServerUnionGenerator.kt:138 */
|
1628 2550 | /// :param data str:
|
2551 + | /* PythonServerUnionGenerator.kt:139 */
|
1629 2552 | /// :rtype MyUnion:
|
2553 + | /* PythonServerUnionGenerator.kt:140 */
|
1630 2554 | pub fn string_value(data: ::std::string::String) -> Self {
|
2555 + | /* PythonServerUnionGenerator.kt:141 */
|
1631 2556 | Self(MyUnion::StringValue(data))
|
2557 + | /* PythonServerUnionGenerator.kt:140 */
|
1632 2558 | }
|
2559 + | /* PythonServerUnionGenerator.kt:176 */
|
1633 2560 | /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
|
2561 + | /* PythonServerUnionGenerator.kt:181 */
|
1634 2562 | /// :rtype str:
|
2563 + | /* PythonServerUnionGenerator.kt:182 */
|
1635 2564 | pub fn as_string_value(&self) -> ::pyo3::PyResult<::std::string::String> {
|
2565 + | /* PythonServerUnionGenerator.kt:190 */
|
1636 2566 | match self.0.as_string_value() {
|
1637 2567 | Ok(variant) => Ok(variant.clone()),
|
1638 2568 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1639 2569 | r"MyUnion variant is not of type str",
|
1640 2570 | )),
|
1641 2571 | }
|
2572 + | /* PythonServerUnionGenerator.kt:182 */
|
1642 2573 | }
|
2574 + | /* PythonServerUnionGenerator.kt:76 */
|
1643 2575 | /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
|
2576 + | /* PythonServerUnionGenerator.kt:77 */
|
1644 2577 | /// :rtype bool:
|
2578 + | /* PythonServerUnionGenerator.kt:78 */
|
1645 2579 | pub fn is_string_value(&self) -> bool {
|
2580 + | /* PythonServerUnionGenerator.kt:79 */
|
1646 2581 | self.0.is_string_value()
|
2582 + | /* PythonServerUnionGenerator.kt:78 */
|
1647 2583 | }
|
2584 + | /* RustType.kt:516 */
|
1648 2585 | #[staticmethod]
|
2586 + | /* PythonServerUnionGenerator.kt:134 */
|
1649 2587 | /// Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
|
2588 + | /* PythonServerUnionGenerator.kt:138 */
|
1650 2589 | /// :param data rest_json.model.GreetingStruct:
|
2590 + | /* PythonServerUnionGenerator.kt:139 */
|
1651 2591 | /// :rtype MyUnion:
|
2592 + | /* PythonServerUnionGenerator.kt:140 */
|
1652 2593 | pub fn structure_value(data: crate::model::GreetingStruct) -> Self {
|
2594 + | /* PythonServerUnionGenerator.kt:141 */
|
1653 2595 | Self(MyUnion::StructureValue(data))
|
2596 + | /* PythonServerUnionGenerator.kt:140 */
|
1654 2597 | }
|
2598 + | /* PythonServerUnionGenerator.kt:176 */
|
1655 2599 | /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
|
2600 + | /* PythonServerUnionGenerator.kt:181 */
|
1656 2601 | /// :rtype rest_json.model.GreetingStruct:
|
2602 + | /* PythonServerUnionGenerator.kt:182 */
|
1657 2603 | pub fn as_structure_value(&self) -> ::pyo3::PyResult<crate::model::GreetingStruct> {
|
2604 + | /* PythonServerUnionGenerator.kt:190 */
|
1658 2605 | match self.0.as_structure_value() {
|
1659 2606 | Ok(variant) => Ok(variant.clone()),
|
1660 2607 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1661 2608 | r"MyUnion variant is not of type rest_json.model.GreetingStruct",
|
1662 2609 | )),
|
1663 2610 | }
|
2611 + | /* PythonServerUnionGenerator.kt:182 */
|
1664 2612 | }
|
2613 + | /* PythonServerUnionGenerator.kt:76 */
|
1665 2614 | /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
|
2615 + | /* PythonServerUnionGenerator.kt:77 */
|
1666 2616 | /// :rtype bool:
|
2617 + | /* PythonServerUnionGenerator.kt:78 */
|
1667 2618 | pub fn is_structure_value(&self) -> bool {
|
2619 + | /* PythonServerUnionGenerator.kt:79 */
|
1668 2620 | self.0.is_structure_value()
|
2621 + | /* PythonServerUnionGenerator.kt:78 */
|
1669 2622 | }
|
2623 + | /* RustType.kt:516 */
|
1670 2624 | #[staticmethod]
|
2625 + | /* PythonServerUnionGenerator.kt:134 */
|
1671 2626 | /// Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
|
2627 + | /* PythonServerUnionGenerator.kt:138 */
|
1672 2628 | /// :param data rest_json.types.DateTime:
|
2629 + | /* PythonServerUnionGenerator.kt:139 */
|
1673 2630 | /// :rtype MyUnion:
|
2631 + | /* PythonServerUnionGenerator.kt:140 */
|
1674 2632 | pub fn timestamp_value(data: ::aws_smithy_http_server_python::types::DateTime) -> Self {
|
2633 + | /* PythonServerUnionGenerator.kt:141 */
|
1675 2634 | Self(MyUnion::TimestampValue(data))
|
2635 + | /* PythonServerUnionGenerator.kt:140 */
|
1676 2636 | }
|
2637 + | /* PythonServerUnionGenerator.kt:176 */
|
1677 2638 | /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
|
2639 + | /* PythonServerUnionGenerator.kt:181 */
|
1678 2640 | /// :rtype rest_json.types.DateTime:
|
2641 + | /* PythonServerUnionGenerator.kt:182 */
|
1679 2642 | pub fn as_timestamp_value(
|
1680 2643 | &self,
|
1681 2644 | ) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::DateTime> {
|
2645 + | /* PythonServerUnionGenerator.kt:190 */
|
1682 2646 | match self.0.as_timestamp_value() {
|
1683 2647 | Ok(variant) => Ok(variant.clone()),
|
1684 2648 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1685 2649 | r"MyUnion variant is not of type rest_json.types.DateTime",
|
1686 2650 | )),
|
1687 2651 | }
|
2652 + | /* PythonServerUnionGenerator.kt:182 */
|
1688 2653 | }
|
2654 + | /* PythonServerUnionGenerator.kt:76 */
|
1689 2655 | /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
|
2656 + | /* PythonServerUnionGenerator.kt:77 */
|
1690 2657 | /// :rtype bool:
|
2658 + | /* PythonServerUnionGenerator.kt:78 */
|
1691 2659 | pub fn is_timestamp_value(&self) -> bool {
|
2660 + | /* PythonServerUnionGenerator.kt:79 */
|
1692 2661 | self.0.is_timestamp_value()
|
2662 + | /* PythonServerUnionGenerator.kt:78 */
|
1693 2663 | }
|
2664 + | /* PythonServerUnionGenerator.kt:66 */
|
1694 2665 | }
|
2666 + | /* PythonServerUnionGenerator.kt:93 */
|
1695 2667 | impl ::pyo3::IntoPy<::pyo3::PyObject> for MyUnion {
|
2668 + | /* PythonServerUnionGenerator.kt:94 */
|
1696 2669 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
2670 + | /* PythonServerUnionGenerator.kt:95 */
|
1697 2671 | PyUnionMarkerMyUnion(self).into_py(py)
|
2672 + | /* PythonServerUnionGenerator.kt:94 */
|
1698 2673 | }
|
2674 + | /* PythonServerUnionGenerator.kt:93 */
|
1699 2675 | }
|
2676 + | /* PythonServerUnionGenerator.kt:98 */
|
1700 2677 | impl<'source> ::pyo3::FromPyObject<'source> for MyUnion {
|
2678 + | /* PythonServerUnionGenerator.kt:99 */
|
1701 2679 | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
2680 + | /* PythonServerUnionGenerator.kt:100 */
|
1702 2681 | let data: PyUnionMarkerMyUnion = obj.extract()?;
|
1703 2682 | Ok(data.0)
|
2683 + | /* PythonServerUnionGenerator.kt:99 */
|
1704 2684 | }
|
2685 + | /* PythonServerUnionGenerator.kt:98 */
|
1705 2686 | }
|
1706 2687 |
|
2688 + | /* RustType.kt:516 */
|
1707 2689 | #[::pyo3::pyclass]
|
2690 + | /* PythonServerStructureGenerator.kt:63 */
|
1708 2691 | /// :param salutation typing.Optional\[str\]:
|
1709 2692 | /// :rtype None:
|
2693 + | /* StructureGenerator.kt:197 */
|
1710 2694 | #[allow(missing_docs)] // documentation missing in model
|
2695 + | /* RustType.kt:516 */
|
1711 2696 | #[derive(
|
1712 2697 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1713 2698 | )]
|
1714 - | pub struct RenamedGreeting {
|
2699 + | pub /* StructureGenerator.kt:201 */ struct RenamedGreeting {
|
2700 + | /* RustType.kt:516 */
|
1715 2701 | #[pyo3(get, set)]
|
2702 + | /* PythonServerStructureGenerator.kt:80 */
|
1716 2703 | /// :type typing.Optional\[str\]:
|
2704 + | /* StructureGenerator.kt:231 */
|
1717 2705 | #[allow(missing_docs)] // documentation missing in model
|
1718 2706 | pub salutation: ::std::option::Option<::std::string::String>,
|
2707 + | /* StructureGenerator.kt:201 */
|
1719 2708 | }
|
2709 + | /* StructureGenerator.kt:135 */
|
1720 2710 | impl RenamedGreeting {
|
2711 + | /* StructureGenerator.kt:231 */
|
1721 2712 | #[allow(missing_docs)] // documentation missing in model
|
2713 + | /* StructureGenerator.kt:166 */
|
1722 2714 | pub fn salutation(&self) -> ::std::option::Option<&str> {
|
2715 + | /* StructureGenerator.kt:169 */
|
1723 2716 | self.salutation.as_deref()
|
2717 + | /* StructureGenerator.kt:166 */
|
1724 2718 | }
|
2719 + | /* StructureGenerator.kt:135 */
|
1725 2720 | }
|
2721 + | /* RustType.kt:516 */
|
1726 2722 | #[allow(clippy::new_without_default)]
|
2723 + | /* RustType.kt:516 */
|
1727 2724 | #[allow(clippy::too_many_arguments)]
|
2725 + | /* RustType.kt:516 */
|
1728 2726 | #[::pyo3::pymethods]
|
2727 + | /* PythonServerStructureGenerator.kt:88 */
|
1729 2728 | impl RenamedGreeting {
|
1730 2729 | #[new]
|
1731 2730 | pub fn new(salutation: ::std::option::Option<::std::string::String>) -> Self {
|
1732 2731 | Self { salutation }
|
1733 2732 | }
|
1734 2733 | fn __repr__(&self) -> String {
|
1735 2734 | format!("{self:?}")
|
1736 2735 | }
|
1737 2736 | fn __str__(&self) -> String {
|
1738 2737 | format!("{self:?}")
|
1739 2738 | }
|
1740 2739 | }
|
2740 + | /* PythonServerStructureGenerator.kt:111 */
|
1741 2741 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RenamedGreeting> {
|
1742 2742 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1743 2743 | ob.extract::<RenamedGreeting>().map(Box::new)
|
1744 2744 | }
|
1745 2745 | }
|
1746 2746 |
|
1747 2747 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RenamedGreeting> {
|
1748 2748 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1749 2749 | (*self).into_py(py)
|
1750 2750 | }
|
1751 2751 | }
|
2752 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1752 2753 | impl crate::constrained::Constrained for crate::model::RenamedGreeting {
|
1753 2754 | type Unconstrained = crate::model::renamed_greeting_internal::Builder;
|
1754 2755 | }
|
2756 + | /* ServerCodegenVisitor.kt:370 */
|
1755 2757 | impl RenamedGreeting {
|
1756 - | /// Creates a new builder-style object to manufacture [`RenamedGreeting`](crate::model::RenamedGreeting).
|
2758 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`RenamedGreeting`](crate::model::RenamedGreeting).
|
2759 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1757 2760 | pub fn builder() -> crate::model::renamed_greeting::Builder {
|
2761 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
1758 2762 | crate::model::renamed_greeting::Builder::default()
|
2763 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1759 2764 | }
|
2765 + | /* ServerCodegenVisitor.kt:370 */
|
1760 2766 | }
|
1761 2767 |
|
2768 + | /* RustType.kt:516 */
|
1762 2769 | #[::pyo3::pyclass]
|
2770 + | /* PythonServerStructureGenerator.kt:63 */
|
1763 2771 | /// :param hi typing.Optional\[str\]:
|
1764 2772 | /// :rtype None:
|
2773 + | /* StructureGenerator.kt:197 */
|
1765 2774 | #[allow(missing_docs)] // documentation missing in model
|
2775 + | /* RustType.kt:516 */
|
1766 2776 | #[derive(
|
1767 2777 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1768 2778 | )]
|
1769 - | pub struct GreetingStruct {
|
2779 + | pub /* StructureGenerator.kt:201 */ struct GreetingStruct {
|
2780 + | /* RustType.kt:516 */
|
1770 2781 | #[pyo3(get, set)]
|
2782 + | /* PythonServerStructureGenerator.kt:80 */
|
1771 2783 | /// :type typing.Optional\[str\]:
|
2784 + | /* StructureGenerator.kt:231 */
|
1772 2785 | #[allow(missing_docs)] // documentation missing in model
|
1773 2786 | pub hi: ::std::option::Option<::std::string::String>,
|
2787 + | /* StructureGenerator.kt:201 */
|
1774 2788 | }
|
2789 + | /* StructureGenerator.kt:135 */
|
1775 2790 | impl GreetingStruct {
|
2791 + | /* StructureGenerator.kt:231 */
|
1776 2792 | #[allow(missing_docs)] // documentation missing in model
|
2793 + | /* StructureGenerator.kt:166 */
|
1777 2794 | pub fn hi(&self) -> ::std::option::Option<&str> {
|
2795 + | /* StructureGenerator.kt:169 */
|
1778 2796 | self.hi.as_deref()
|
2797 + | /* StructureGenerator.kt:166 */
|
1779 2798 | }
|
2799 + | /* StructureGenerator.kt:135 */
|
1780 2800 | }
|
2801 + | /* RustType.kt:516 */
|
1781 2802 | #[allow(clippy::new_without_default)]
|
2803 + | /* RustType.kt:516 */
|
1782 2804 | #[allow(clippy::too_many_arguments)]
|
2805 + | /* RustType.kt:516 */
|
1783 2806 | #[::pyo3::pymethods]
|
2807 + | /* PythonServerStructureGenerator.kt:88 */
|
1784 2808 | impl GreetingStruct {
|
1785 2809 | #[new]
|
1786 2810 | pub fn new(hi: ::std::option::Option<::std::string::String>) -> Self {
|
1787 2811 | Self { hi }
|
1788 2812 | }
|
1789 2813 | fn __repr__(&self) -> String {
|
1790 2814 | format!("{self:?}")
|
1791 2815 | }
|
1792 2816 | fn __str__(&self) -> String {
|
1793 2817 | format!("{self:?}")
|
1794 2818 | }
|
1795 2819 | }
|
2820 + | /* PythonServerStructureGenerator.kt:111 */
|
1796 2821 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<GreetingStruct> {
|
1797 2822 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1798 2823 | ob.extract::<GreetingStruct>().map(Box::new)
|
1799 2824 | }
|
1800 2825 | }
|
1801 2826 |
|
1802 2827 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<GreetingStruct> {
|
1803 2828 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1804 2829 | (*self).into_py(py)
|
1805 2830 | }
|
1806 2831 | }
|
2832 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1807 2833 | impl crate::constrained::Constrained for crate::model::GreetingStruct {
|
1808 2834 | type Unconstrained = crate::model::greeting_struct_internal::Builder;
|
1809 2835 | }
|
2836 + | /* ServerCodegenVisitor.kt:370 */
|
1810 2837 | impl GreetingStruct {
|
1811 - | /// Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
|
2838 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
|
2839 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1812 2840 | pub fn builder() -> crate::model::greeting_struct::Builder {
|
2841 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
1813 2842 | crate::model::greeting_struct::Builder::default()
|
2843 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1814 2844 | }
|
2845 + | /* ServerCodegenVisitor.kt:370 */
|
1815 2846 | }
|
1816 2847 |
|
2848 + | /* RustType.kt:516 */
|
1817 2849 | #[::pyo3::pyclass]
|
2850 + | /* EnumGenerator.kt:154 */
|
1818 2851 | #[allow(missing_docs)] // documentation missing in model
|
2852 + | /* RustType.kt:516 */
|
1819 2853 | #[derive(
|
1820 2854 | ::std::clone::Clone,
|
1821 2855 | ::std::cmp::Eq,
|
1822 2856 | ::std::cmp::Ord,
|
1823 2857 | ::std::cmp::PartialEq,
|
1824 2858 | ::std::cmp::PartialOrd,
|
1825 2859 | ::std::fmt::Debug,
|
1826 2860 | ::std::hash::Hash,
|
1827 2861 | )]
|
1828 - | pub enum FooEnum {
|
2862 + | pub /* EnumGenerator.kt:267 */ enum FooEnum {
|
2863 + | /* EnumGenerator.kt:154 */
|
1829 2864 | #[allow(missing_docs)] // documentation missing in model
|
2865 + | /* EnumGenerator.kt:143 */
|
1830 2866 | Zero,
|
2867 + | /* EnumGenerator.kt:154 */
|
1831 2868 | #[allow(missing_docs)] // documentation missing in model
|
2869 + | /* EnumGenerator.kt:143 */
|
1832 2870 | One,
|
2871 + | /* EnumGenerator.kt:154 */
|
1833 2872 | #[allow(missing_docs)] // documentation missing in model
|
2873 + | /* EnumGenerator.kt:143 */
|
1834 2874 | Bar,
|
2875 + | /* EnumGenerator.kt:154 */
|
1835 2876 | #[allow(missing_docs)] // documentation missing in model
|
2877 + | /* EnumGenerator.kt:143 */
|
1836 2878 | Baz,
|
2879 + | /* EnumGenerator.kt:154 */
|
1837 2880 | #[allow(missing_docs)] // documentation missing in model
|
2881 + | /* EnumGenerator.kt:143 */
|
1838 2882 | Foo,
|
2883 + | /* EnumGenerator.kt:267 */
|
1839 2884 | }
|
1840 2885 | pub(crate) mod foo_enum_internal {
|
1841 2886 | #[derive(Debug, PartialEq)]
|
1842 2887 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
1843 2888 |
|
1844 2889 | impl ::std::fmt::Display for ConstraintViolation {
|
1845 2890 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1846 2891 | write!(
|
1847 2892 | f,
|
1848 2893 | r#"Value provided for 'aws.protocoltests.shared#FooEnum' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#
|
1849 2894 | )
|
1850 2895 | }
|
1851 2896 | }
|
1852 2897 |
|
1853 2898 | impl ::std::error::Error for ConstraintViolation {}
|
1854 2899 | impl ConstraintViolation {
|
1855 2900 | pub(crate) fn as_validation_exception_field(
|
1856 2901 | self,
|
1857 2902 | path: ::std::string::String,
|
1858 2903 | ) -> crate::model::ValidationExceptionField {
|
1859 2904 | crate::model::ValidationExceptionField {
|
1860 2905 | message: format!(
|
1861 2906 | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#,
|
1862 2907 | &path
|
1863 2908 | ),
|
1864 2909 | path,
|
1865 2910 | }
|
1866 2911 | }
|
1867 2912 | }
|
2913 + |
|
2914 + | /* ServerEnumGenerator.kt:46 */
|
1868 2915 | }
|
2916 + | /* ServerEnumGenerator.kt:85 */
|
1869 2917 | impl ::std::convert::TryFrom<&str> for FooEnum {
|
1870 2918 | type Error = crate::model::foo_enum_internal::ConstraintViolation;
|
1871 2919 | fn try_from(
|
1872 2920 | s: &str,
|
1873 2921 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
1874 2922 | match s {
|
1875 2923 | "0" => Ok(FooEnum::Zero),
|
1876 2924 | "1" => Ok(FooEnum::One),
|
1877 2925 | "Bar" => Ok(FooEnum::Bar),
|
1878 2926 | "Baz" => Ok(FooEnum::Baz),
|
1879 2927 | "Foo" => Ok(FooEnum::Foo),
|
1880 2928 | _ => Err(crate::model::foo_enum_internal::ConstraintViolation(
|
1881 2929 | s.to_owned(),
|
1882 2930 | )),
|
1883 2931 | }
|
1884 2932 | }
|
1885 2933 | }
|
1886 2934 | impl ::std::convert::TryFrom<::std::string::String> for FooEnum {
|
1887 2935 | type Error = crate::model::foo_enum_internal::ConstraintViolation;
|
1888 2936 | fn try_from(
|
1889 2937 | s: ::std::string::String,
|
1890 2938 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
1891 2939 | {
|
1892 2940 | s.as_str().try_into()
|
1893 2941 | }
|
1894 2942 | }
|
2943 + | /* ServerEnumGenerator.kt:145 */
|
1895 2944 | impl std::str::FromStr for FooEnum {
|
1896 2945 | type Err = crate::model::foo_enum_internal::ConstraintViolation;
|
1897 2946 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
1898 2947 | Self::try_from(s)
|
1899 2948 | }
|
1900 2949 | }
|
2950 + | /* EnumGenerator.kt:274 */
|
1901 2951 | impl FooEnum {
|
1902 2952 | /// Returns the `&str` value of the enum member.
|
1903 2953 | pub fn as_str(&self) -> &str {
|
1904 2954 | match self {
|
1905 2955 | FooEnum::Zero => "0",
|
1906 2956 | FooEnum::One => "1",
|
1907 2957 | FooEnum::Bar => "Bar",
|
1908 2958 | FooEnum::Baz => "Baz",
|
1909 2959 | FooEnum::Foo => "Foo",
|
1910 2960 | }
|
1911 2961 | }
|
1912 2962 | /// Returns all the `&str` representations of the enum members.
|
1913 2963 | pub const fn values() -> &'static [&'static str] {
|
1914 2964 | &["0", "1", "Bar", "Baz", "Foo"]
|
1915 2965 | }
|
1916 2966 | }
|
2967 + | /* EnumGenerator.kt:223 */
|
1917 2968 | impl ::std::convert::AsRef<str> for FooEnum {
|
1918 2969 | fn as_ref(&self) -> &str {
|
1919 2970 | self.as_str()
|
1920 2971 | }
|
1921 2972 | }
|
2973 + | /* RustType.kt:516 */
|
1922 2974 | #[::pyo3::pymethods]
|
2975 + | /* PythonServerEnumGenerator.kt:41 */
|
1923 2976 | impl FooEnum {
|
1924 2977 | #[getter]
|
1925 2978 | pub fn name(&self) -> &str {
|
1926 2979 | match self {
|
1927 2980 | FooEnum::Zero => "Zero",
|
1928 2981 | FooEnum::One => "One",
|
1929 2982 | FooEnum::Bar => "Bar",
|
1930 2983 | FooEnum::Baz => "Baz",
|
1931 2984 | FooEnum::Foo => "Foo",
|
1932 2985 | }
|
1933 2986 | }
|
1934 2987 | #[getter]
|
1935 2988 | pub fn value(&self) -> &str {
|
1936 2989 | self.as_str()
|
1937 2990 | }
|
1938 2991 | fn __repr__(&self) -> String {
|
1939 2992 | self.as_str().to_owned()
|
1940 2993 | }
|
1941 2994 | fn __str__(&self) -> String {
|
1942 2995 | self.as_str().to_owned()
|
1943 2996 | }
|
1944 2997 | }
|
2998 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
1945 2999 | impl crate::constrained::Constrained for FooEnum {
|
1946 3000 | type Unconstrained = ::std::string::String;
|
1947 3001 | }
|
1948 3002 |
|
1949 3003 | impl ::std::convert::From<::std::string::String>
|
1950 3004 | for crate::constrained::MaybeConstrained<crate::model::FooEnum>
|
1951 3005 | {
|
1952 3006 | fn from(value: ::std::string::String) -> Self {
|
1953 3007 | Self::Unconstrained(value)
|
1954 3008 | }
|
1955 3009 | }
|
1956 3010 |
|
3011 + | /* ConstrainedCollectionGenerator.kt:93 */
|
1957 3012 | #[allow(missing_docs)] // documentation missing in model
|
1958 - | ///
|
3013 + | /// /* ConstrainedCollectionGenerator.kt:94 */
|
1959 3014 | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
1960 3015 | /// [constraint traits]. Use [`StringSet::try_from`] to construct values of this type.
|
1961 3016 | ///
|
1962 3017 | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
1963 3018 | ///
|
3019 + | /* RustType.kt:516 */
|
1964 3020 | #[derive(
|
1965 3021 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1966 3022 | )]
|
1967 - | pub(crate) struct StringSet(pub(crate) ::std::vec::Vec<::std::string::String>);
|
3023 + | pub(crate) /* ConstrainedCollectionGenerator.kt:97 */ struct StringSet(
|
3024 + | pub(crate) ::std::vec::Vec<::std::string::String>,
|
3025 + | );
|
3026 + | /* ConstrainedCollectionGenerator.kt:104 */
|
1968 3027 | impl StringSet {
|
3028 + | /* ConstrainedCollectionGenerator.kt:116 */
|
1969 3029 | /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::string::String>`].
|
1970 3030 | pub fn into_inner(self) -> ::std::vec::Vec<::std::string::String> {
|
1971 3031 | self.0
|
1972 3032 | }
|
1973 3033 |
|
1974 3034 | fn check_unique_items(
|
1975 3035 | items: ::std::vec::Vec<::std::string::String>,
|
1976 3036 | ) -> ::std::result::Result<
|
1977 3037 | ::std::vec::Vec<::std::string::String>,
|
1978 3038 | crate::model::string_set_internal::ConstraintViolation,
|
1979 3039 | > {
|
1980 3040 | let mut seen = ::std::collections::HashMap::new();
|
1981 3041 | let mut duplicate_indices = ::std::vec::Vec::new();
|
1982 3042 | for (idx, item) in items.iter().enumerate() {
|
1983 3043 | if let Some(prev_idx) = seen.insert(item, idx) {
|
1984 3044 | duplicate_indices.push(prev_idx);
|
1985 3045 | }
|
1986 3046 | }
|
1987 3047 |
|
1988 3048 | let mut last_duplicate_indices = ::std::vec::Vec::new();
|
1989 3049 | for idx in &duplicate_indices {
|
1990 3050 | if let Some(prev_idx) = seen.remove(&items[*idx]) {
|
1991 3051 | last_duplicate_indices.push(prev_idx);
|
1992 3052 | }
|
1993 3053 | }
|
1994 3054 | duplicate_indices.extend(last_duplicate_indices);
|
1995 3055 |
|
1996 3056 | if !duplicate_indices.is_empty() {
|
1997 3057 | debug_assert!(duplicate_indices.len() >= 2);
|
1998 3058 | Err(
|
1999 3059 | crate::model::string_set_internal::ConstraintViolation::UniqueItems {
|
2000 3060 | duplicate_indices,
|
2001 3061 | original: items,
|
2002 3062 | },
|
2003 3063 | )
|
2004 3064 | } else {
|
2005 3065 | Ok(items)
|
2006 3066 | }
|
2007 3067 | }
|
3068 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2008 3069 | }
|
3070 + | /* ConstrainedCollectionGenerator.kt:133 */
|
2009 3071 | impl ::std::convert::TryFrom<::std::vec::Vec<::std::string::String>> for StringSet {
|
2010 3072 | type Error = crate::model::string_set_internal::ConstraintViolation;
|
2011 3073 |
|
2012 3074 | /// Constructs a `StringSet` from an [`::std::vec::Vec<::std::string::String>`], failing when the provided value does not satisfy the modeled constraints.
|
2013 3075 | fn try_from(
|
2014 3076 | value: ::std::vec::Vec<::std::string::String>,
|
2015 3077 | ) -> ::std::result::Result<Self, Self::Error> {
|
2016 3078 | let value = Self::check_unique_items(value)?;
|
2017 3079 |
|
2018 3080 | Ok(Self(value))
|
2019 3081 | }
|
2020 3082 | }
|
2021 3083 |
|
2022 3084 | impl ::std::convert::From<StringSet> for ::std::vec::Vec<::std::string::String> {
|
2023 3085 | fn from(value: StringSet) -> Self {
|
2024 3086 | value.into_inner()
|
2025 3087 | }
|
2026 3088 | }
|
3089 + | /* ConstrainedCollectionGenerator.kt:181 */
|
2027 3090 | impl crate::constrained::Constrained for StringSet {
|
2028 3091 | type Unconstrained = crate::unconstrained::string_set_unconstrained::StringSetUnconstrained;
|
2029 3092 | }
|
2030 3093 |
|
3094 + | /* RustType.kt:516 */
|
2031 3095 | #[::pyo3::pyclass]
|
3096 + | /* PythonServerStructureGenerator.kt:63 */
|
2032 3097 | /// :param a typing.Optional\[str\]:
|
2033 3098 | /// :param b typing.Optional\[str\]:
|
2034 3099 | /// :rtype None:
|
3100 + | /* StructureGenerator.kt:197 */
|
2035 3101 | #[allow(missing_docs)] // documentation missing in model
|
3102 + | /* RustType.kt:516 */
|
2036 3103 | #[derive(
|
2037 3104 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2038 3105 | )]
|
2039 - | pub struct StructureListMember {
|
3106 + | pub /* StructureGenerator.kt:201 */ struct StructureListMember {
|
3107 + | /* RustType.kt:516 */
|
2040 3108 | #[pyo3(get, set)]
|
3109 + | /* PythonServerStructureGenerator.kt:80 */
|
2041 3110 | /// :type typing.Optional\[str\]:
|
3111 + | /* StructureGenerator.kt:231 */
|
2042 3112 | #[allow(missing_docs)] // documentation missing in model
|
2043 3113 | pub a: ::std::option::Option<::std::string::String>,
|
3114 + | /* RustType.kt:516 */
|
2044 3115 | #[pyo3(get, set)]
|
3116 + | /* PythonServerStructureGenerator.kt:80 */
|
2045 3117 | /// :type typing.Optional\[str\]:
|
3118 + | /* StructureGenerator.kt:231 */
|
2046 3119 | #[allow(missing_docs)] // documentation missing in model
|
2047 3120 | pub b: ::std::option::Option<::std::string::String>,
|
3121 + | /* StructureGenerator.kt:201 */
|
2048 3122 | }
|
3123 + | /* StructureGenerator.kt:135 */
|
2049 3124 | impl StructureListMember {
|
3125 + | /* StructureGenerator.kt:231 */
|
2050 3126 | #[allow(missing_docs)] // documentation missing in model
|
3127 + | /* StructureGenerator.kt:166 */
|
2051 3128 | pub fn a(&self) -> ::std::option::Option<&str> {
|
3129 + | /* StructureGenerator.kt:169 */
|
2052 3130 | self.a.as_deref()
|
3131 + | /* StructureGenerator.kt:166 */
|
2053 3132 | }
|
3133 + | /* StructureGenerator.kt:231 */
|
2054 3134 | #[allow(missing_docs)] // documentation missing in model
|
3135 + | /* StructureGenerator.kt:166 */
|
2055 3136 | pub fn b(&self) -> ::std::option::Option<&str> {
|
3137 + | /* StructureGenerator.kt:169 */
|
2056 3138 | self.b.as_deref()
|
3139 + | /* StructureGenerator.kt:166 */
|
2057 3140 | }
|
3141 + | /* StructureGenerator.kt:135 */
|
2058 3142 | }
|
3143 + | /* RustType.kt:516 */
|
2059 3144 | #[allow(clippy::new_without_default)]
|
3145 + | /* RustType.kt:516 */
|
2060 3146 | #[allow(clippy::too_many_arguments)]
|
3147 + | /* RustType.kt:516 */
|
2061 3148 | #[::pyo3::pymethods]
|
3149 + | /* PythonServerStructureGenerator.kt:88 */
|
2062 3150 | impl StructureListMember {
|
2063 3151 | #[new]
|
2064 3152 | pub fn new(
|
2065 3153 | a: ::std::option::Option<::std::string::String>,
|
2066 3154 | b: ::std::option::Option<::std::string::String>,
|
2067 3155 | ) -> Self {
|
2068 3156 | Self { a, b }
|
2069 3157 | }
|
2070 3158 | fn __repr__(&self) -> String {
|
2071 3159 | format!("{self:?}")
|
2072 3160 | }
|
2073 3161 | fn __str__(&self) -> String {
|
2074 3162 | format!("{self:?}")
|
2075 3163 | }
|
2076 3164 | }
|
3165 + | /* PythonServerStructureGenerator.kt:111 */
|
2077 3166 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructureListMember> {
|
2078 3167 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
2079 3168 | ob.extract::<StructureListMember>().map(Box::new)
|
2080 3169 | }
|
2081 3170 | }
|
2082 3171 |
|
2083 3172 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructureListMember> {
|
2084 3173 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
2085 3174 | (*self).into_py(py)
|
2086 3175 | }
|
2087 3176 | }
|
3177 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
2088 3178 | impl crate::constrained::Constrained for crate::model::StructureListMember {
|
2089 3179 | type Unconstrained = crate::model::structure_list_member_internal::Builder;
|
2090 3180 | }
|
3181 + | /* ServerCodegenVisitor.kt:370 */
|
2091 3182 | impl StructureListMember {
|
2092 - | /// Creates a new builder-style object to manufacture [`StructureListMember`](crate::model::StructureListMember).
|
3183 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`StructureListMember`](crate::model::StructureListMember).
|
3184 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2093 3185 | pub fn builder() -> crate::model::structure_list_member::Builder {
|
3186 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
2094 3187 | crate::model::structure_list_member::Builder::default()
|
3188 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2095 3189 | }
|
3190 + | /* ServerCodegenVisitor.kt:370 */
|
2096 3191 | }
|
2097 3192 |
|
3193 + | /* RustType.kt:516 */
|
2098 3194 | #[::pyo3::pyclass]
|
3195 + | /* PythonServerStructureGenerator.kt:63 */
|
2099 3196 | /// :param foo typing.Optional\[str\]:
|
2100 3197 | /// :param nested typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested2\]:
|
2101 3198 | /// :rtype None:
|
3199 + | /* StructureGenerator.kt:197 */
|
2102 3200 | #[allow(missing_docs)] // documentation missing in model
|
3201 + | /* RustType.kt:516 */
|
2103 3202 | #[derive(
|
2104 3203 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2105 3204 | )]
|
2106 - | pub struct RecursiveShapesInputOutputNested1 {
|
3205 + | pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested1 {
|
3206 + | /* RustType.kt:516 */
|
2107 3207 | #[pyo3(get, set)]
|
3208 + | /* PythonServerStructureGenerator.kt:80 */
|
2108 3209 | /// :type typing.Optional\[str\]:
|
3210 + | /* StructureGenerator.kt:231 */
|
2109 3211 | #[allow(missing_docs)] // documentation missing in model
|
2110 3212 | pub foo: ::std::option::Option<::std::string::String>,
|
3213 + | /* RustType.kt:516 */
|
2111 3214 | #[pyo3(get, set)]
|
3215 + | /* PythonServerStructureGenerator.kt:80 */
|
2112 3216 | /// :type typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested2\]:
|
3217 + | /* StructureGenerator.kt:231 */
|
2113 3218 | #[allow(missing_docs)] // documentation missing in model
|
2114 3219 | pub nested:
|
2115 3220 | ::std::option::Option<::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>>,
|
3221 + | /* StructureGenerator.kt:201 */
|
2116 3222 | }
|
3223 + | /* StructureGenerator.kt:135 */
|
2117 3224 | impl RecursiveShapesInputOutputNested1 {
|
3225 + | /* StructureGenerator.kt:231 */
|
2118 3226 | #[allow(missing_docs)] // documentation missing in model
|
3227 + | /* StructureGenerator.kt:166 */
|
2119 3228 | pub fn foo(&self) -> ::std::option::Option<&str> {
|
3229 + | /* StructureGenerator.kt:169 */
|
2120 3230 | self.foo.as_deref()
|
3231 + | /* StructureGenerator.kt:166 */
|
2121 3232 | }
|
3233 + | /* StructureGenerator.kt:231 */
|
2122 3234 | #[allow(missing_docs)] // documentation missing in model
|
3235 + | /* StructureGenerator.kt:166 */
|
2123 3236 | pub fn nested(
|
2124 3237 | &self,
|
2125 3238 | ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested2> {
|
3239 + | /* StructureGenerator.kt:169 */
|
2126 3240 | self.nested.as_deref()
|
3241 + | /* StructureGenerator.kt:166 */
|
2127 3242 | }
|
3243 + | /* StructureGenerator.kt:135 */
|
2128 3244 | }
|
3245 + | /* RustType.kt:516 */
|
2129 3246 | #[allow(clippy::new_without_default)]
|
3247 + | /* RustType.kt:516 */
|
2130 3248 | #[allow(clippy::too_many_arguments)]
|
3249 + | /* RustType.kt:516 */
|
2131 3250 | #[::pyo3::pymethods]
|
3251 + | /* PythonServerStructureGenerator.kt:88 */
|
2132 3252 | impl RecursiveShapesInputOutputNested1 {
|
2133 3253 | #[new]
|
2134 3254 | pub fn new(
|
2135 3255 | foo: ::std::option::Option<::std::string::String>,
|
2136 3256 | nested: ::std::option::Option<
|
2137 3257 | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
2138 3258 | >,
|
2139 3259 | ) -> Self {
|
2140 3260 | Self { foo, nested }
|
2141 3261 | }
|
2142 3262 | fn __repr__(&self) -> String {
|
2143 3263 | format!("{self:?}")
|
2144 3264 | }
|
2145 3265 | fn __str__(&self) -> String {
|
2146 3266 | format!("{self:?}")
|
2147 3267 | }
|
2148 3268 | }
|
3269 + | /* PythonServerStructureGenerator.kt:111 */
|
2149 3270 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RecursiveShapesInputOutputNested1> {
|
2150 3271 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
2151 3272 | ob.extract::<RecursiveShapesInputOutputNested1>()
|
2152 3273 | .map(Box::new)
|
2153 3274 | }
|
2154 3275 | }
|
2155 3276 |
|
2156 3277 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RecursiveShapesInputOutputNested1> {
|
2157 3278 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
2158 3279 | (*self).into_py(py)
|
2159 3280 | }
|
2160 3281 | }
|
3282 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
2161 3283 | impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested1 {
|
2162 3284 | type Unconstrained = crate::model::recursive_shapes_input_output_nested1_internal::Builder;
|
2163 3285 | }
|
3286 + | /* ServerCodegenVisitor.kt:370 */
|
2164 3287 | impl RecursiveShapesInputOutputNested1 {
|
2165 - | /// Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
3288 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
3289 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2166 3290 | pub fn builder() -> crate::model::recursive_shapes_input_output_nested1::Builder {
|
3291 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
2167 3292 | crate::model::recursive_shapes_input_output_nested1::Builder::default()
|
3293 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2168 3294 | }
|
3295 + | /* ServerCodegenVisitor.kt:370 */
|
2169 3296 | }
|
2170 3297 |
|
3298 + | /* RustType.kt:516 */
|
2171 3299 | #[::pyo3::pyclass]
|
3300 + | /* PythonServerStructureGenerator.kt:63 */
|
2172 3301 | /// :param bar typing.Optional\[str\]:
|
2173 3302 | /// :param recursive_member typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested1\]:
|
2174 3303 | /// :rtype None:
|
3304 + | /* StructureGenerator.kt:197 */
|
2175 3305 | #[allow(missing_docs)] // documentation missing in model
|
3306 + | /* RustType.kt:516 */
|
2176 3307 | #[derive(
|
2177 3308 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2178 3309 | )]
|
2179 - | pub struct RecursiveShapesInputOutputNested2 {
|
3310 + | pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested2 {
|
3311 + | /* RustType.kt:516 */
|
2180 3312 | #[pyo3(get, set)]
|
3313 + | /* PythonServerStructureGenerator.kt:80 */
|
2181 3314 | /// :type typing.Optional\[str\]:
|
3315 + | /* StructureGenerator.kt:231 */
|
2182 3316 | #[allow(missing_docs)] // documentation missing in model
|
2183 3317 | pub bar: ::std::option::Option<::std::string::String>,
|
3318 + | /* RustType.kt:516 */
|
2184 3319 | #[pyo3(get, set)]
|
3320 + | /* PythonServerStructureGenerator.kt:80 */
|
2185 3321 | /// :type typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested1\]:
|
3322 + | /* StructureGenerator.kt:231 */
|
2186 3323 | #[allow(missing_docs)] // documentation missing in model
|
2187 3324 | pub recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
3325 + | /* StructureGenerator.kt:201 */
|
2188 3326 | }
|
3327 + | /* StructureGenerator.kt:135 */
|
2189 3328 | impl RecursiveShapesInputOutputNested2 {
|
3329 + | /* StructureGenerator.kt:231 */
|
2190 3330 | #[allow(missing_docs)] // documentation missing in model
|
3331 + | /* StructureGenerator.kt:166 */
|
2191 3332 | pub fn bar(&self) -> ::std::option::Option<&str> {
|
3333 + | /* StructureGenerator.kt:169 */
|
2192 3334 | self.bar.as_deref()
|
3335 + | /* StructureGenerator.kt:166 */
|
2193 3336 | }
|
3337 + | /* StructureGenerator.kt:231 */
|
2194 3338 | #[allow(missing_docs)] // documentation missing in model
|
3339 + | /* StructureGenerator.kt:166 */
|
2195 3340 | pub fn recursive_member(
|
2196 3341 | &self,
|
2197 3342 | ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
|
3343 + | /* StructureGenerator.kt:170 */
|
2198 3344 | self.recursive_member.as_ref()
|
3345 + | /* StructureGenerator.kt:166 */
|
2199 3346 | }
|
3347 + | /* StructureGenerator.kt:135 */
|
2200 3348 | }
|
3349 + | /* RustType.kt:516 */
|
2201 3350 | #[allow(clippy::new_without_default)]
|
3351 + | /* RustType.kt:516 */
|
2202 3352 | #[allow(clippy::too_many_arguments)]
|
3353 + | /* RustType.kt:516 */
|
2203 3354 | #[::pyo3::pymethods]
|
3355 + | /* PythonServerStructureGenerator.kt:88 */
|
2204 3356 | impl RecursiveShapesInputOutputNested2 {
|
2205 3357 | #[new]
|
2206 3358 | pub fn new(
|
2207 3359 | bar: ::std::option::Option<::std::string::String>,
|
2208 3360 | recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
2209 3361 | ) -> Self {
|
2210 3362 | Self {
|
2211 3363 | bar,
|
2212 3364 | recursive_member,
|
2213 3365 | }
|
2214 3366 | }
|
2215 3367 | fn __repr__(&self) -> String {
|
2216 3368 | format!("{self:?}")
|
2217 3369 | }
|
2218 3370 | fn __str__(&self) -> String {
|
2219 3371 | format!("{self:?}")
|
2220 3372 | }
|
2221 3373 | }
|
3374 + | /* PythonServerStructureGenerator.kt:111 */
|
2222 3375 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RecursiveShapesInputOutputNested2> {
|
2223 3376 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
2224 3377 | ob.extract::<RecursiveShapesInputOutputNested2>()
|
2225 3378 | .map(Box::new)
|
2226 3379 | }
|
2227 3380 | }
|
2228 3381 |
|
2229 3382 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RecursiveShapesInputOutputNested2> {
|
2230 3383 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
2231 3384 | (*self).into_py(py)
|
2232 3385 | }
|
2233 3386 | }
|
3387 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
2234 3388 | impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested2 {
|
2235 3389 | type Unconstrained = crate::model::recursive_shapes_input_output_nested2_internal::Builder;
|
2236 3390 | }
|
3391 + | /* ServerCodegenVisitor.kt:370 */
|
2237 3392 | impl RecursiveShapesInputOutputNested2 {
|
2238 - | /// Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
3393 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
3394 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2239 3395 | pub fn builder() -> crate::model::recursive_shapes_input_output_nested2::Builder {
|
3396 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
2240 3397 | crate::model::recursive_shapes_input_output_nested2::Builder::default()
|
3398 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2241 3399 | }
|
3400 + | /* ServerCodegenVisitor.kt:370 */
|
2242 3401 | }
|
2243 3402 |
|
3403 + | /* ConstrainedCollectionGenerator.kt:93 */
|
2244 3404 | #[allow(missing_docs)] // documentation missing in model
|
2245 - | ///
|
3405 + | /// /* ConstrainedCollectionGenerator.kt:94 */
|
2246 3406 | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
2247 3407 | /// [constraint traits]. Use [`IntegerEnumSet::try_from`] to construct values of this type.
|
2248 3408 | ///
|
2249 3409 | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
2250 3410 | ///
|
3411 + | /* RustType.kt:516 */
|
2251 3412 | #[derive(
|
2252 3413 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2253 3414 | )]
|
2254 - | pub(crate) struct IntegerEnumSet(pub(crate) ::std::vec::Vec<i32>);
|
3415 + | pub(crate) /* ConstrainedCollectionGenerator.kt:97 */ struct IntegerEnumSet(
|
3416 + | pub(crate) ::std::vec::Vec<i32>,
|
3417 + | );
|
3418 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2255 3419 | impl IntegerEnumSet {
|
3420 + | /* ConstrainedCollectionGenerator.kt:116 */
|
2256 3421 | /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
|
2257 3422 | pub fn into_inner(self) -> ::std::vec::Vec<i32> {
|
2258 3423 | self.0
|
2259 3424 | }
|
2260 3425 |
|
2261 3426 | fn check_unique_items(
|
2262 3427 | items: ::std::vec::Vec<i32>,
|
2263 3428 | ) -> ::std::result::Result<
|
2264 3429 | ::std::vec::Vec<i32>,
|
2265 3430 | crate::model::integer_enum_set_internal::ConstraintViolation,
|
2266 3431 | > {
|
2267 3432 | let mut seen = ::std::collections::HashMap::new();
|
2268 3433 | let mut duplicate_indices = ::std::vec::Vec::new();
|
2269 3434 | for (idx, item) in items.iter().enumerate() {
|
2270 3435 | if let Some(prev_idx) = seen.insert(item, idx) {
|
2271 3436 | duplicate_indices.push(prev_idx);
|
2272 3437 | }
|
2273 3438 | }
|
2274 3439 |
|
2275 3440 | let mut last_duplicate_indices = ::std::vec::Vec::new();
|
2276 3441 | for idx in &duplicate_indices {
|
2277 3442 | if let Some(prev_idx) = seen.remove(&items[*idx]) {
|
2278 3443 | last_duplicate_indices.push(prev_idx);
|
2279 3444 | }
|
2280 3445 | }
|
2281 3446 | duplicate_indices.extend(last_duplicate_indices);
|
2282 3447 |
|
2283 3448 | if !duplicate_indices.is_empty() {
|
2284 3449 | debug_assert!(duplicate_indices.len() >= 2);
|
2285 3450 | Err(
|
2286 3451 | crate::model::integer_enum_set_internal::ConstraintViolation::UniqueItems {
|
2287 3452 | duplicate_indices,
|
2288 3453 | original: items,
|
2289 3454 | },
|
2290 3455 | )
|
2291 3456 | } else {
|
2292 3457 | Ok(items)
|
2293 3458 | }
|
2294 3459 | }
|
3460 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2295 3461 | }
|
3462 + | /* ConstrainedCollectionGenerator.kt:133 */
|
2296 3463 | impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerEnumSet {
|
2297 3464 | type Error = crate::model::integer_enum_set_internal::ConstraintViolation;
|
2298 3465 |
|
2299 3466 | /// Constructs a `IntegerEnumSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
|
2300 3467 | fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
|
2301 3468 | let value = Self::check_unique_items(value)?;
|
2302 3469 |
|
2303 3470 | Ok(Self(value))
|
2304 3471 | }
|
2305 3472 | }
|
2306 3473 |
|
2307 3474 | impl ::std::convert::From<IntegerEnumSet> for ::std::vec::Vec<i32> {
|
2308 3475 | fn from(value: IntegerEnumSet) -> Self {
|
2309 3476 | value.into_inner()
|
2310 3477 | }
|
2311 3478 | }
|
3479 + | /* ConstrainedCollectionGenerator.kt:181 */
|
2312 3480 | impl crate::constrained::Constrained for IntegerEnumSet {
|
2313 3481 | type Unconstrained =
|
2314 3482 | crate::unconstrained::integer_enum_set_unconstrained::IntegerEnumSetUnconstrained;
|
2315 3483 | }
|
2316 3484 |
|
3485 + | /* ConstrainedCollectionGenerator.kt:93 */
|
2317 3486 | #[allow(missing_docs)] // documentation missing in model
|
2318 - | ///
|
3487 + | /// /* ConstrainedCollectionGenerator.kt:94 */
|
2319 3488 | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
2320 3489 | /// [constraint traits]. Use [`FooEnumSet::try_from`] to construct values of this type.
|
2321 3490 | ///
|
2322 3491 | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
2323 3492 | ///
|
3493 + | /* RustType.kt:516 */
|
2324 3494 | #[derive(
|
2325 3495 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2326 3496 | )]
|
2327 - | pub(crate) struct FooEnumSet(pub(crate) ::std::vec::Vec<crate::model::FooEnum>);
|
3497 + | pub(crate) /* ConstrainedCollectionGenerator.kt:97 */ struct FooEnumSet(
|
3498 + | pub(crate) ::std::vec::Vec<crate::model::FooEnum>,
|
3499 + | );
|
3500 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2328 3501 | impl FooEnumSet {
|
3502 + | /* ConstrainedCollectionGenerator.kt:116 */
|
2329 3503 | /// Consumes the value, returning the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
|
2330 3504 | pub fn into_inner(self) -> ::std::vec::Vec<crate::model::FooEnum> {
|
2331 3505 | self.0
|
2332 3506 | }
|
2333 3507 |
|
2334 3508 | fn check_unique_items(
|
2335 3509 | items: ::std::vec::Vec<crate::model::FooEnum>,
|
2336 3510 | ) -> ::std::result::Result<
|
2337 3511 | ::std::vec::Vec<crate::model::FooEnum>,
|
2338 3512 | crate::model::foo_enum_set_internal::ConstraintViolation,
|
2339 3513 | > {
|
2340 3514 | let mut seen = ::std::collections::HashMap::new();
|
2341 3515 | let mut duplicate_indices = ::std::vec::Vec::new();
|
2342 3516 | for (idx, item) in items.iter().enumerate() {
|
2343 3517 | if let Some(prev_idx) = seen.insert(item, idx) {
|
2344 3518 | duplicate_indices.push(prev_idx);
|
2345 3519 | }
|
2346 3520 | }
|
2347 3521 |
|
2348 3522 | let mut last_duplicate_indices = ::std::vec::Vec::new();
|
2349 3523 | for idx in &duplicate_indices {
|
2350 3524 | if let Some(prev_idx) = seen.remove(&items[*idx]) {
|
2351 3525 | last_duplicate_indices.push(prev_idx);
|
2352 3526 | }
|
2353 3527 | }
|
2354 3528 | duplicate_indices.extend(last_duplicate_indices);
|
2355 3529 |
|
2356 3530 | if !duplicate_indices.is_empty() {
|
2357 3531 | debug_assert!(duplicate_indices.len() >= 2);
|
2358 3532 | Err(
|
2359 3533 | crate::model::foo_enum_set_internal::ConstraintViolation::UniqueItems {
|
2360 3534 | duplicate_indices,
|
2361 3535 | original: items,
|
2362 3536 | },
|
2363 3537 | )
|
2364 3538 | } else {
|
2365 3539 | Ok(items)
|
2366 3540 | }
|
2367 3541 | }
|
3542 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2368 3543 | }
|
3544 + | /* ConstrainedCollectionGenerator.kt:133 */
|
2369 3545 | impl ::std::convert::TryFrom<::std::vec::Vec<crate::model::FooEnum>> for FooEnumSet {
|
2370 3546 | type Error = crate::model::foo_enum_set_internal::ConstraintViolation;
|
2371 3547 |
|
2372 3548 | /// Constructs a `FooEnumSet` from an [`::std::vec::Vec<crate::model::FooEnum>`], failing when the provided value does not satisfy the modeled constraints.
|
2373 3549 | fn try_from(
|
2374 3550 | value: ::std::vec::Vec<crate::model::FooEnum>,
|
2375 3551 | ) -> ::std::result::Result<Self, Self::Error> {
|
2376 3552 | let value = Self::check_unique_items(value)?;
|
2377 3553 |
|
2378 3554 | Ok(Self(value))
|
2379 3555 | }
|
2380 3556 | }
|
2381 3557 |
|
2382 3558 | impl ::std::convert::From<FooEnumSet> for ::std::vec::Vec<crate::model::FooEnum> {
|
2383 3559 | fn from(value: FooEnumSet) -> Self {
|
2384 3560 | value.into_inner()
|
2385 3561 | }
|
2386 3562 | }
|
3563 + | /* ConstrainedCollectionGenerator.kt:181 */
|
2387 3564 | impl crate::constrained::Constrained for FooEnumSet {
|
2388 3565 | type Unconstrained = crate::unconstrained::foo_enum_set_unconstrained::FooEnumSetUnconstrained;
|
2389 3566 | }
|
2390 3567 |
|
3568 + | /* RustType.kt:516 */
|
2391 3569 | #[::pyo3::pyclass]
|
3570 + | /* PythonServerStructureGenerator.kt:63 */
|
2392 3571 | /// :param foo typing.Optional\[str\]:
|
2393 3572 | /// :rtype None:
|
3573 + | /* StructureGenerator.kt:197 */
|
2394 3574 | #[allow(missing_docs)] // documentation missing in model
|
3575 + | /* RustType.kt:516 */
|
2395 3576 | #[derive(
|
2396 3577 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2397 3578 | )]
|
2398 - | pub struct ComplexNestedErrorData {
|
3579 + | pub /* StructureGenerator.kt:201 */ struct ComplexNestedErrorData {
|
3580 + | /* RustType.kt:516 */
|
2399 3581 | #[pyo3(get, set)]
|
3582 + | /* PythonServerStructureGenerator.kt:80 */
|
2400 3583 | /// :type typing.Optional\[str\]:
|
3584 + | /* StructureGenerator.kt:231 */
|
2401 3585 | #[allow(missing_docs)] // documentation missing in model
|
2402 3586 | pub foo: ::std::option::Option<::std::string::String>,
|
3587 + | /* StructureGenerator.kt:201 */
|
2403 3588 | }
|
3589 + | /* StructureGenerator.kt:135 */
|
2404 3590 | impl ComplexNestedErrorData {
|
3591 + | /* StructureGenerator.kt:231 */
|
2405 3592 | #[allow(missing_docs)] // documentation missing in model
|
3593 + | /* StructureGenerator.kt:166 */
|
2406 3594 | pub fn foo(&self) -> ::std::option::Option<&str> {
|
3595 + | /* StructureGenerator.kt:169 */
|
2407 3596 | self.foo.as_deref()
|
3597 + | /* StructureGenerator.kt:166 */
|
2408 3598 | }
|
3599 + | /* StructureGenerator.kt:135 */
|
2409 3600 | }
|
3601 + | /* RustType.kt:516 */
|
2410 3602 | #[allow(clippy::new_without_default)]
|
3603 + | /* RustType.kt:516 */
|
2411 3604 | #[allow(clippy::too_many_arguments)]
|
3605 + | /* RustType.kt:516 */
|
2412 3606 | #[::pyo3::pymethods]
|
3607 + | /* PythonServerStructureGenerator.kt:88 */
|
2413 3608 | impl ComplexNestedErrorData {
|
2414 3609 | #[new]
|
2415 3610 | pub fn new(foo: ::std::option::Option<::std::string::String>) -> Self {
|
2416 3611 | Self { foo }
|
2417 3612 | }
|
2418 3613 | fn __repr__(&self) -> String {
|
2419 3614 | format!("{self:?}")
|
2420 3615 | }
|
2421 3616 | fn __str__(&self) -> String {
|
2422 3617 | format!("{self:?}")
|
2423 3618 | }
|
2424 3619 | }
|
3620 + | /* PythonServerStructureGenerator.kt:111 */
|
2425 3621 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ComplexNestedErrorData> {
|
2426 3622 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
2427 3623 | ob.extract::<ComplexNestedErrorData>().map(Box::new)
|
2428 3624 | }
|
2429 3625 | }
|
2430 3626 |
|
2431 3627 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ComplexNestedErrorData> {
|
2432 3628 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
2433 3629 | (*self).into_py(py)
|
2434 3630 | }
|
2435 3631 | }
|
3632 + | /* ServerCodegenVisitor.kt:370 */
|
2436 3633 | impl ComplexNestedErrorData {
|
2437 - | /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
3634 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
3635 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2438 3636 | pub fn builder() -> crate::model::complex_nested_error_data::Builder {
|
3637 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
2439 3638 | crate::model::complex_nested_error_data::Builder::default()
|
3639 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2440 3640 | }
|
3641 + | /* ServerCodegenVisitor.kt:370 */
|
2441 3642 | }
|
2442 3643 |
|
3644 + | /* UnionGenerator.kt:67 */
|
2443 3645 | #[allow(missing_docs)] // documentation missing in model
|
3646 + | /* RustType.kt:516 */
|
2444 3647 | #[derive(
|
2445 3648 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2446 3649 | )]
|
2447 - | pub enum UnionPayload {
|
3650 + | pub /* UnionGenerator.kt:85 */ enum UnionPayload {
|
3651 + | /* UnionGenerator.kt:90 */
|
2448 3652 | #[allow(missing_docs)] // documentation missing in model
|
3653 + | /* UnionGenerator.kt:190 */
|
2449 3654 | Greeting(::std::string::String),
|
3655 + | /* UnionGenerator.kt:85 */
|
2450 3656 | }
|
3657 + | /* UnionGenerator.kt:111 */
|
2451 3658 | impl UnionPayload {
|
3659 + | /* RustType.kt:516 */
|
2452 3660 | #[allow(irrefutable_let_patterns)]
|
3661 + | /* UnionGenerator.kt:217 */
|
2453 3662 | /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
|
3663 + | /* UnionGenerator.kt:222 */
|
2454 3664 | /// Returns `Err(&Self)` if it can't be converted.
|
3665 + | /* UnionGenerator.kt:223 */
|
2455 3666 | pub fn as_greeting(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
3667 + | /* UnionGenerator.kt:227 */
|
2456 3668 | if let UnionPayload::Greeting(val) = &self {
|
2457 3669 | ::std::result::Result::Ok(val)
|
2458 3670 | } else {
|
2459 3671 | ::std::result::Result::Err(self)
|
2460 3672 | }
|
3673 + | /* UnionGenerator.kt:223 */
|
2461 3674 | }
|
3675 + | /* UnionGenerator.kt:121 */
|
2462 3676 | /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
|
3677 + | /* UnionGenerator.kt:122 */
|
2463 3678 | pub fn is_greeting(&self) -> bool {
|
3679 + | /* UnionGenerator.kt:123 */
|
2464 3680 | self.as_greeting().is_ok()
|
3681 + | /* UnionGenerator.kt:122 */
|
2465 3682 | }
|
3683 + | /* UnionGenerator.kt:111 */
|
2466 3684 | }
|
3685 + | /* PythonServerUnionGenerator.kt:58 */
|
2467 3686 | #[pyo3::pyclass(name = "UnionPayload")]
|
3687 + | /* RustType.kt:516 */
|
2468 3688 | #[derive(
|
2469 3689 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2470 3690 | )]
|
2471 - | pub struct PyUnionMarkerUnionPayload(pub UnionPayload);
|
3691 + | pub /* PythonServerUnionGenerator.kt:61 */ struct PyUnionMarkerUnionPayload(pub UnionPayload);
|
3692 + | /* RustType.kt:516 */
|
2472 3693 | #[::pyo3::pymethods]
|
3694 + | /* PythonServerUnionGenerator.kt:66 */
|
2473 3695 | impl PyUnionMarkerUnionPayload {
|
3696 + | /* RustType.kt:516 */
|
2474 3697 | #[allow(irrefutable_let_patterns)]
|
3698 + | /* RustType.kt:516 */
|
2475 3699 | #[staticmethod]
|
3700 + | /* PythonServerUnionGenerator.kt:134 */
|
2476 3701 | /// Creates a new union instance of [`Greeting`](crate::model::UnionPayload::Greeting)
|
3702 + | /* PythonServerUnionGenerator.kt:138 */
|
2477 3703 | /// :param data str:
|
3704 + | /* PythonServerUnionGenerator.kt:139 */
|
2478 3705 | /// :rtype UnionPayload:
|
3706 + | /* PythonServerUnionGenerator.kt:140 */
|
2479 3707 | pub fn greeting(data: ::std::string::String) -> Self {
|
3708 + | /* PythonServerUnionGenerator.kt:141 */
|
2480 3709 | Self(UnionPayload::Greeting(data))
|
3710 + | /* PythonServerUnionGenerator.kt:140 */
|
2481 3711 | }
|
3712 + | /* PythonServerUnionGenerator.kt:176 */
|
2482 3713 | /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
|
3714 + | /* PythonServerUnionGenerator.kt:181 */
|
2483 3715 | /// :rtype str:
|
3716 + | /* PythonServerUnionGenerator.kt:182 */
|
2484 3717 | pub fn as_greeting(&self) -> ::pyo3::PyResult<::std::string::String> {
|
3718 + | /* PythonServerUnionGenerator.kt:190 */
|
2485 3719 | match self.0.as_greeting() {
|
2486 3720 | Ok(variant) => Ok(variant.clone()),
|
2487 3721 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
2488 3722 | r"UnionPayload variant is not of type str",
|
2489 3723 | )),
|
2490 3724 | }
|
3725 + | /* PythonServerUnionGenerator.kt:182 */
|
2491 3726 | }
|
3727 + | /* PythonServerUnionGenerator.kt:76 */
|
2492 3728 | /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
|
3729 + | /* PythonServerUnionGenerator.kt:77 */
|
2493 3730 | /// :rtype bool:
|
3731 + | /* PythonServerUnionGenerator.kt:78 */
|
2494 3732 | pub fn is_greeting(&self) -> bool {
|
3733 + | /* PythonServerUnionGenerator.kt:79 */
|
2495 3734 | self.0.is_greeting()
|
3735 + | /* PythonServerUnionGenerator.kt:78 */
|
2496 3736 | }
|
3737 + | /* PythonServerUnionGenerator.kt:66 */
|
2497 3738 | }
|
3739 + | /* PythonServerUnionGenerator.kt:93 */
|
2498 3740 | impl ::pyo3::IntoPy<::pyo3::PyObject> for UnionPayload {
|
3741 + | /* PythonServerUnionGenerator.kt:94 */
|
2499 3742 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
3743 + | /* PythonServerUnionGenerator.kt:95 */
|
2500 3744 | PyUnionMarkerUnionPayload(self).into_py(py)
|
3745 + | /* PythonServerUnionGenerator.kt:94 */
|
2501 3746 | }
|
3747 + | /* PythonServerUnionGenerator.kt:93 */
|
2502 3748 | }
|
3749 + | /* PythonServerUnionGenerator.kt:98 */
|
2503 3750 | impl<'source> ::pyo3::FromPyObject<'source> for UnionPayload {
|
3751 + | /* PythonServerUnionGenerator.kt:99 */
|
2504 3752 | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
3753 + | /* PythonServerUnionGenerator.kt:100 */
|
2505 3754 | let data: PyUnionMarkerUnionPayload = obj.extract()?;
|
2506 3755 | Ok(data.0)
|
3756 + | /* PythonServerUnionGenerator.kt:99 */
|
2507 3757 | }
|
3758 + | /* PythonServerUnionGenerator.kt:98 */
|
2508 3759 | }
|
2509 3760 |
|
3761 + | /* RustType.kt:516 */
|
2510 3762 | #[::pyo3::pyclass]
|
3763 + | /* EnumGenerator.kt:154 */
|
2511 3764 | #[allow(missing_docs)] // documentation missing in model
|
3765 + | /* RustType.kt:516 */
|
2512 3766 | #[derive(
|
2513 3767 | ::std::clone::Clone,
|
2514 3768 | ::std::cmp::Eq,
|
2515 3769 | ::std::cmp::Ord,
|
2516 3770 | ::std::cmp::PartialEq,
|
2517 3771 | ::std::cmp::PartialOrd,
|
2518 3772 | ::std::fmt::Debug,
|
2519 3773 | ::std::hash::Hash,
|
2520 3774 | )]
|
2521 - | pub enum StringEnum {
|
3775 + | pub /* EnumGenerator.kt:267 */ enum StringEnum {
|
3776 + | /* EnumGenerator.kt:154 */
|
2522 3777 | #[allow(missing_docs)] // documentation missing in model
|
3778 + | /* EnumGenerator.kt:143 */
|
2523 3779 | V,
|
3780 + | /* EnumGenerator.kt:267 */
|
2524 3781 | }
|
2525 3782 | pub(crate) mod string_enum_internal {
|
2526 3783 | #[derive(Debug, PartialEq)]
|
2527 3784 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
2528 3785 |
|
2529 3786 | impl ::std::fmt::Display for ConstraintViolation {
|
2530 3787 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2531 3788 | write!(
|
2532 3789 | f,
|
2533 3790 | r#"Value provided for 'aws.protocoltests.restjson#StringEnum' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#
|
2534 3791 | )
|
2535 3792 | }
|
2536 3793 | }
|
2537 3794 |
|
2538 3795 | impl ::std::error::Error for ConstraintViolation {}
|
2539 3796 | impl ConstraintViolation {
|
2540 3797 | pub(crate) fn as_validation_exception_field(
|
2541 3798 | self,
|
2542 3799 | path: ::std::string::String,
|
2543 3800 | ) -> crate::model::ValidationExceptionField {
|
2544 3801 | crate::model::ValidationExceptionField {
|
2545 3802 | message: format!(
|
2546 3803 | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#,
|
2547 3804 | &path
|
2548 3805 | ),
|
2549 3806 | path,
|
2550 3807 | }
|
2551 3808 | }
|
2552 3809 | }
|
3810 + |
|
3811 + | /* ServerEnumGenerator.kt:46 */
|
2553 3812 | }
|
3813 + | /* ServerEnumGenerator.kt:85 */
|
2554 3814 | impl ::std::convert::TryFrom<&str> for StringEnum {
|
2555 3815 | type Error = crate::model::string_enum_internal::ConstraintViolation;
|
2556 3816 | fn try_from(
|
2557 3817 | s: &str,
|
2558 3818 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
2559 3819 | match s {
|
2560 3820 | "enumvalue" => Ok(StringEnum::V),
|
2561 3821 | _ => Err(crate::model::string_enum_internal::ConstraintViolation(
|
2562 3822 | s.to_owned(),
|
2563 3823 | )),
|
2564 3824 | }
|
2565 3825 | }
|
2566 3826 | }
|
2567 3827 | impl ::std::convert::TryFrom<::std::string::String> for StringEnum {
|
2568 3828 | type Error = crate::model::string_enum_internal::ConstraintViolation;
|
2569 3829 | fn try_from(
|
2570 3830 | s: ::std::string::String,
|
2571 3831 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
2572 3832 | {
|
2573 3833 | s.as_str().try_into()
|
2574 3834 | }
|
2575 3835 | }
|
3836 + | /* ServerEnumGenerator.kt:145 */
|
2576 3837 | impl std::str::FromStr for StringEnum {
|
2577 3838 | type Err = crate::model::string_enum_internal::ConstraintViolation;
|
2578 3839 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
2579 3840 | Self::try_from(s)
|
2580 3841 | }
|
2581 3842 | }
|
3843 + | /* EnumGenerator.kt:274 */
|
2582 3844 | impl StringEnum {
|
2583 3845 | /// Returns the `&str` value of the enum member.
|
2584 3846 | pub fn as_str(&self) -> &str {
|
2585 3847 | match self {
|
2586 3848 | StringEnum::V => "enumvalue",
|
2587 3849 | }
|
2588 3850 | }
|
2589 3851 | /// Returns all the `&str` representations of the enum members.
|
2590 3852 | pub const fn values() -> &'static [&'static str] {
|
2591 3853 | &["enumvalue"]
|
2592 3854 | }
|
2593 3855 | }
|
3856 + | /* EnumGenerator.kt:223 */
|
2594 3857 | impl ::std::convert::AsRef<str> for StringEnum {
|
2595 3858 | fn as_ref(&self) -> &str {
|
2596 3859 | self.as_str()
|
2597 3860 | }
|
2598 3861 | }
|
3862 + | /* RustType.kt:516 */
|
2599 3863 | #[::pyo3::pymethods]
|
3864 + | /* PythonServerEnumGenerator.kt:41 */
|
2600 3865 | impl StringEnum {
|
2601 3866 | #[getter]
|
2602 3867 | pub fn name(&self) -> &str {
|
2603 3868 | match self {
|
2604 3869 | StringEnum::V => "V",
|
2605 3870 | }
|
2606 3871 | }
|
2607 3872 | #[getter]
|
2608 3873 | pub fn value(&self) -> &str {
|
2609 3874 | self.as_str()
|
2610 3875 | }
|
2611 3876 | fn __repr__(&self) -> String {
|
2612 3877 | self.as_str().to_owned()
|
2613 3878 | }
|
2614 3879 | fn __str__(&self) -> String {
|
2615 3880 | self.as_str().to_owned()
|
2616 3881 | }
|
2617 3882 | }
|
3883 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
2618 3884 | impl crate::constrained::Constrained for StringEnum {
|
2619 3885 | type Unconstrained = ::std::string::String;
|
2620 3886 | }
|
2621 3887 |
|
2622 3888 | impl ::std::convert::From<::std::string::String>
|
2623 3889 | for crate::constrained::MaybeConstrained<crate::model::StringEnum>
|
2624 3890 | {
|
2625 3891 | fn from(value: ::std::string::String) -> Self {
|
2626 3892 | Self::Unconstrained(value)
|
2627 3893 | }
|
2628 3894 | }
|
2629 3895 |
|
3896 + | /* RustType.kt:516 */
|
2630 3897 | #[::pyo3::pyclass]
|
3898 + | /* PythonServerStructureGenerator.kt:63 */
|
2631 3899 | /// :param greeting typing.Optional\[str\]:
|
2632 3900 | /// :param name typing.Optional\[str\]:
|
2633 3901 | /// :rtype None:
|
3902 + | /* StructureGenerator.kt:197 */
|
2634 3903 | #[allow(missing_docs)] // documentation missing in model
|
3904 + | /* RustType.kt:516 */
|
2635 3905 | #[derive(
|
2636 3906 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2637 3907 | )]
|
2638 - | pub struct NestedPayload {
|
3908 + | pub /* StructureGenerator.kt:201 */ struct NestedPayload {
|
3909 + | /* RustType.kt:516 */
|
2639 3910 | #[pyo3(get, set)]
|
3911 + | /* PythonServerStructureGenerator.kt:80 */
|
2640 3912 | /// :type typing.Optional\[str\]:
|
3913 + | /* StructureGenerator.kt:231 */
|
2641 3914 | #[allow(missing_docs)] // documentation missing in model
|
2642 3915 | pub greeting: ::std::option::Option<::std::string::String>,
|
3916 + | /* RustType.kt:516 */
|
2643 3917 | #[pyo3(get, set)]
|
3918 + | /* PythonServerStructureGenerator.kt:80 */
|
2644 3919 | /// :type typing.Optional\[str\]:
|
3920 + | /* StructureGenerator.kt:231 */
|
2645 3921 | #[allow(missing_docs)] // documentation missing in model
|
2646 3922 | pub name: ::std::option::Option<::std::string::String>,
|
3923 + | /* StructureGenerator.kt:201 */
|
2647 3924 | }
|
3925 + | /* StructureGenerator.kt:135 */
|
2648 3926 | impl NestedPayload {
|
3927 + | /* StructureGenerator.kt:231 */
|
2649 3928 | #[allow(missing_docs)] // documentation missing in model
|
3929 + | /* StructureGenerator.kt:166 */
|
2650 3930 | pub fn greeting(&self) -> ::std::option::Option<&str> {
|
3931 + | /* StructureGenerator.kt:169 */
|
2651 3932 | self.greeting.as_deref()
|
3933 + | /* StructureGenerator.kt:166 */
|
2652 3934 | }
|
3935 + | /* StructureGenerator.kt:231 */
|
2653 3936 | #[allow(missing_docs)] // documentation missing in model
|
3937 + | /* StructureGenerator.kt:166 */
|
2654 3938 | pub fn name(&self) -> ::std::option::Option<&str> {
|
3939 + | /* StructureGenerator.kt:169 */
|
2655 3940 | self.name.as_deref()
|
3941 + | /* StructureGenerator.kt:166 */
|
2656 3942 | }
|
3943 + | /* StructureGenerator.kt:135 */
|
2657 3944 | }
|
3945 + | /* RustType.kt:516 */
|
2658 3946 | #[allow(clippy::new_without_default)]
|
3947 + | /* RustType.kt:516 */
|
2659 3948 | #[allow(clippy::too_many_arguments)]
|
3949 + | /* RustType.kt:516 */
|
2660 3950 | #[::pyo3::pymethods]
|
3951 + | /* PythonServerStructureGenerator.kt:88 */
|
2661 3952 | impl NestedPayload {
|
2662 3953 | #[new]
|
2663 3954 | pub fn new(
|
2664 3955 | greeting: ::std::option::Option<::std::string::String>,
|
2665 3956 | name: ::std::option::Option<::std::string::String>,
|
2666 3957 | ) -> Self {
|
2667 3958 | Self { greeting, name }
|
2668 3959 | }
|
2669 3960 | fn __repr__(&self) -> String {
|
2670 3961 | format!("{self:?}")
|
2671 3962 | }
|
2672 3963 | fn __str__(&self) -> String {
|
2673 3964 | format!("{self:?}")
|
2674 3965 | }
|
2675 3966 | }
|
3967 + | /* PythonServerStructureGenerator.kt:111 */
|
2676 3968 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<NestedPayload> {
|
2677 3969 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
2678 3970 | ob.extract::<NestedPayload>().map(Box::new)
|
2679 3971 | }
|
2680 3972 | }
|
2681 3973 |
|
2682 3974 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<NestedPayload> {
|
2683 3975 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
2684 3976 | (*self).into_py(py)
|
2685 3977 | }
|
2686 3978 | }
|
3979 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
2687 3980 | impl crate::constrained::Constrained for crate::model::NestedPayload {
|
2688 3981 | type Unconstrained = crate::model::nested_payload_internal::Builder;
|
2689 3982 | }
|
3983 + | /* ServerCodegenVisitor.kt:370 */
|
2690 3984 | impl NestedPayload {
|
2691 - | /// Creates a new builder-style object to manufacture [`NestedPayload`](crate::model::NestedPayload).
|
3985 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`NestedPayload`](crate::model::NestedPayload).
|
3986 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2692 3987 | pub fn builder() -> crate::model::nested_payload::Builder {
|
3988 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
2693 3989 | crate::model::nested_payload::Builder::default()
|
3990 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
2694 3991 | }
|
3992 + | /* ServerCodegenVisitor.kt:370 */
|
2695 3993 | }
|
2696 3994 |
|
3995 + | /* ConstrainedCollectionGenerator.kt:93 */
|
2697 3996 | #[allow(missing_docs)] // documentation missing in model
|
2698 - | ///
|
3997 + | /// /* ConstrainedCollectionGenerator.kt:94 */
|
2699 3998 | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
2700 3999 | /// [constraint traits]. Use [`IntegerSet::try_from`] to construct values of this type.
|
2701 4000 | ///
|
2702 4001 | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
2703 4002 | ///
|
4003 + | /* RustType.kt:516 */
|
2704 4004 | #[derive(
|
2705 4005 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
2706 4006 | )]
|
2707 - | pub(crate) struct IntegerSet(pub(crate) ::std::vec::Vec<i32>);
|
4007 + | pub(crate) /* ConstrainedCollectionGenerator.kt:97 */ struct IntegerSet(
|
4008 + | pub(crate) ::std::vec::Vec<i32>,
|
4009 + | );
|
4010 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2708 4011 | impl IntegerSet {
|
4012 + | /* ConstrainedCollectionGenerator.kt:116 */
|
2709 4013 | /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
|
2710 4014 | pub fn into_inner(self) -> ::std::vec::Vec<i32> {
|
2711 4015 | self.0
|
2712 4016 | }
|
2713 4017 |
|
2714 4018 | fn check_unique_items(
|
2715 4019 | items: ::std::vec::Vec<i32>,
|
2716 4020 | ) -> ::std::result::Result<
|
2717 4021 | ::std::vec::Vec<i32>,
|
2718 4022 | crate::model::integer_set_internal::ConstraintViolation,
|
2719 4023 | > {
|
2720 4024 | let mut seen = ::std::collections::HashMap::new();
|
2721 4025 | let mut duplicate_indices = ::std::vec::Vec::new();
|
2722 4026 | for (idx, item) in items.iter().enumerate() {
|
2723 4027 | if let Some(prev_idx) = seen.insert(item, idx) {
|
2724 4028 | duplicate_indices.push(prev_idx);
|
2725 4029 | }
|
2726 4030 | }
|
2727 4031 |
|
2728 4032 | let mut last_duplicate_indices = ::std::vec::Vec::new();
|
2729 4033 | for idx in &duplicate_indices {
|
2730 4034 | if let Some(prev_idx) = seen.remove(&items[*idx]) {
|
2731 4035 | last_duplicate_indices.push(prev_idx);
|
2732 4036 | }
|
2733 4037 | }
|
2734 4038 | duplicate_indices.extend(last_duplicate_indices);
|
2735 4039 |
|
2736 4040 | if !duplicate_indices.is_empty() {
|
2737 4041 | debug_assert!(duplicate_indices.len() >= 2);
|
2738 4042 | Err(
|
2739 4043 | crate::model::integer_set_internal::ConstraintViolation::UniqueItems {
|
2740 4044 | duplicate_indices,
|
2741 4045 | original: items,
|
2742 4046 | },
|
2743 4047 | )
|
2744 4048 | } else {
|
2745 4049 | Ok(items)
|
2746 4050 | }
|
2747 4051 | }
|
4052 + | /* ConstrainedCollectionGenerator.kt:104 */
|
2748 4053 | }
|
4054 + | /* ConstrainedCollectionGenerator.kt:133 */
|
2749 4055 | impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerSet {
|
2750 4056 | type Error = crate::model::integer_set_internal::ConstraintViolation;
|
2751 4057 |
|
2752 4058 | /// Constructs a `IntegerSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
|
2753 4059 | fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
|
2754 4060 | let value = Self::check_unique_items(value)?;
|
2755 4061 |
|
2756 4062 | Ok(Self(value))
|
2757 4063 | }
|
2758 4064 | }
|
2759 4065 |
|
2760 4066 | impl ::std::convert::From<IntegerSet> for ::std::vec::Vec<i32> {
|
2761 4067 | fn from(value: IntegerSet) -> Self {
|
2762 4068 | value.into_inner()
|
2763 4069 | }
|
2764 4070 | }
|
4071 + | /* ConstrainedCollectionGenerator.kt:181 */
|
2765 4072 | impl crate::constrained::Constrained for IntegerSet {
|
2766 4073 | type Unconstrained = crate::unconstrained::integer_set_unconstrained::IntegerSetUnconstrained;
|
2767 4074 | }
|
2768 4075 |
|
2769 - | /// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
4076 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2770 4077 | pub mod validation_exception_field {
|
2771 4078 |
|
4079 + | /* RustType.kt:516 */
|
2772 4080 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2773 - | /// Holds one variant for each of the ways the builder can fail.
|
2774 - |
|
4081 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
4082 + | /* ServerBuilderConstraintViolations.kt:75 */
|
2775 4083 | #[allow(clippy::enum_variant_names)]
|
2776 4084 | pub enum ConstraintViolation {
|
2777 - | /// `path` was not provided but it is required when building `ValidationExceptionField`.
|
4085 + | /// /* ServerBuilderConstraintViolations.kt:138 */`path` was not provided but it is required when building `ValidationExceptionField`.
|
4086 + | /* ServerBuilderConstraintViolations.kt:143 */
|
2778 4087 | MissingPath,
|
2779 - | /// `message` was not provided but it is required when building `ValidationExceptionField`.
|
4088 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationExceptionField`.
|
4089 + | /* ServerBuilderConstraintViolations.kt:143 */
|
2780 4090 | MissingMessage,
|
4091 + | /* ServerBuilderConstraintViolations.kt:75 */
|
2781 4092 | }
|
4093 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2782 4094 | impl ::std::fmt::Display for ConstraintViolation {
|
4095 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2783 4096 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4097 + | /* ServerBuilderConstraintViolations.kt:119 */
|
2784 4098 | match self {
|
2785 - | ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
2786 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
2787 - | }
|
4099 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
4100 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
4101 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
4102 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2788 4103 | }
|
4104 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2789 4105 | }
|
4106 + | /* ServerBuilderConstraintViolations.kt:84 */
|
2790 4107 | impl ::std::error::Error for ConstraintViolation {}
|
4108 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
2791 4109 | impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
|
2792 4110 | type Error = ConstraintViolation;
|
2793 4111 |
|
2794 4112 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2795 4113 | builder.build()
|
2796 4114 | }
|
2797 4115 | }
|
2798 - | /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
4116 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
4117 + | /* RustType.kt:516 */
|
2799 4118 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4119 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2800 4120 | pub struct Builder {
|
4121 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2801 4122 | pub(crate) path: ::std::option::Option<::std::string::String>,
|
4123 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2802 4124 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
4125 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2803 4126 | }
|
4127 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2804 4128 | impl Builder {
|
2805 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
4129 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
4130 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2806 4131 | pub fn path(mut self, input: ::std::string::String) -> Self {
|
2807 - | self.path = Some(input);
|
4132 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4133 + | self.path =
|
4134 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4135 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4136 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4137 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2808 4138 | self
|
4139 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2809 4140 | }
|
2810 - | /// A detailed description of the validation failure.
|
4141 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A detailed description of the validation failure.
|
4142 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2811 4143 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
2812 - | self.message = Some(input);
|
4144 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4145 + | self.message =
|
4146 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4147 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4148 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4149 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2813 4150 | self
|
4151 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2814 4152 | }
|
2815 - | /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2816 - | ///
|
4153 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
4154 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
2817 4155 | /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if you do not provide a value for all non-`Option`al members.
|
2818 4156 | ///
|
4157 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
2819 4158 | pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
2820 4159 | self.build_enforcing_required_and_enum_traits()
|
2821 4160 | }
|
4161 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2822 4162 | fn build_enforcing_required_and_enum_traits(
|
2823 4163 | self,
|
2824 4164 | ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
2825 - | Ok(crate::model::ValidationExceptionField {
|
2826 - | path: self.path.ok_or(ConstraintViolation::MissingPath)?,
|
2827 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
2828 - | })
|
4165 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
4166 + | Ok(
|
4167 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4168 + | crate::model::ValidationExceptionField {
|
4169 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4170 + | path: self
|
4171 + | .path
|
4172 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
4173 + | .ok_or(ConstraintViolation::MissingPath)?,
|
4174 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4175 + | message: self
|
4176 + | .message
|
4177 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
4178 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
4179 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4180 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
4181 + | )
|
4182 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2829 4183 | }
|
4184 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2830 4185 | }
|
4186 + |
|
4187 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2831 4188 | }
|
2832 - | /// See [`Dialog`](crate::model::Dialog).
|
4189 + | /// /* ServerBuilderGenerator.kt:171 */See [`Dialog`](crate::model::Dialog).
|
2833 4190 | pub(crate) mod dialog_internal {
|
2834 4191 |
|
4192 + | /* ServerBuilderGenerator.kt:461 */
|
2835 4193 | impl ::std::convert::From<Builder> for crate::model::Dialog {
|
2836 4194 | fn from(builder: Builder) -> Self {
|
2837 4195 | builder.build()
|
2838 4196 | }
|
2839 4197 | }
|
2840 - | /// A builder for [`Dialog`](crate::model::Dialog).
|
4198 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Dialog`](crate::model::Dialog).
|
4199 + | /* RustType.kt:516 */
|
2841 4200 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4201 + | /* ServerBuilderGenerator.kt:211 */
|
2842 4202 | pub(crate) struct Builder {
|
4203 + | /* ServerBuilderGenerator.kt:308 */
|
2843 4204 | pub(crate) language: ::std::option::Option<::std::string::String>,
|
4205 + | /* ServerBuilderGenerator.kt:308 */
|
2844 4206 | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
4207 + | /* ServerBuilderGenerator.kt:308 */
|
2845 4208 | pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
|
4209 + | /* ServerBuilderGenerator.kt:211 */
|
2846 4210 | }
|
4211 + | /* ServerBuilderGenerator.kt:215 */
|
2847 4212 | impl Builder {
|
4213 + | /* ServerBuilderGenerator.kt:426 */
|
2848 4214 | #[allow(missing_docs)] // documentation missing in model
|
4215 + | /* ServerBuilderGenerator.kt:428 */
|
2849 4216 | pub(crate) fn set_language(
|
2850 4217 | mut self,
|
2851 4218 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2852 4219 | ) -> Self {
|
4220 + | /* ServerBuilderGenerator.kt:429 */
|
2853 4221 | self.language = input.map(|v| v.into());
|
2854 4222 | self
|
4223 + | /* ServerBuilderGenerator.kt:428 */
|
2855 4224 | }
|
4225 + | /* ServerBuilderGenerator.kt:426 */
|
2856 4226 | #[allow(missing_docs)] // documentation missing in model
|
4227 + | /* ServerBuilderGenerator.kt:428 */
|
2857 4228 | pub(crate) fn set_greeting(
|
2858 4229 | mut self,
|
2859 4230 | input: impl ::std::convert::Into<::std::string::String>,
|
2860 4231 | ) -> Self {
|
4232 + | /* ServerBuilderGenerator.kt:429 */
|
2861 4233 | self.greeting = Some(input.into());
|
2862 4234 | self
|
4235 + | /* ServerBuilderGenerator.kt:428 */
|
2863 4236 | }
|
4237 + | /* ServerBuilderGenerator.kt:426 */
|
2864 4238 | #[allow(missing_docs)] // documentation missing in model
|
4239 + | /* ServerBuilderGenerator.kt:428 */
|
2865 4240 | pub(crate) fn set_farewell(
|
2866 4241 | mut self,
|
2867 4242 | input: Option<impl ::std::convert::Into<crate::model::Farewell>>,
|
2868 4243 | ) -> Self {
|
4244 + | /* ServerBuilderGenerator.kt:429 */
|
2869 4245 | self.farewell = input.map(|v| v.into());
|
2870 4246 | self
|
4247 + | /* ServerBuilderGenerator.kt:428 */
|
2871 4248 | }
|
2872 - | /// Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
4249 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
4250 + | /* ServerBuilderGenerator.kt:271 */
|
2873 4251 | pub fn build(self) -> crate::model::Dialog {
|
2874 4252 | self.build_enforcing_all_constraints()
|
2875 4253 | }
|
4254 + | /* ServerBuilderGenerator.kt:283 */
|
2876 4255 | fn build_enforcing_all_constraints(self) -> crate::model::Dialog {
|
4256 + | /* ServerBuilderGenerator.kt:542 */
|
2877 4257 | crate::model::Dialog {
|
4258 + | /* ServerBuilderGenerator.kt:546 */
|
2878 4259 | language: self.language,
|
2879 - | greeting: self.greeting.unwrap_or_else(
|
4260 + | /* ServerBuilderGenerator.kt:546 */
|
4261 + | greeting: self
|
4262 + | .greeting
|
4263 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4264 + | .unwrap_or_else(
|
2880 4265 | #[allow(clippy::redundant_closure)]
|
2881 4266 | || String::from("hi"),
|
2882 4267 | ),
|
4268 + | /* ServerBuilderGenerator.kt:546 */
|
2883 4269 | farewell: self.farewell,
|
4270 + | /* ServerBuilderGenerator.kt:542 */
|
2884 4271 | }
|
4272 + | /* ServerBuilderGenerator.kt:283 */
|
2885 4273 | }
|
4274 + | /* ServerBuilderGenerator.kt:215 */
|
2886 4275 | }
|
4276 + |
|
4277 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2887 4278 | }
|
2888 - | /// See [`Dialog`](crate::model::Dialog).
|
4279 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`Dialog`](crate::model::Dialog).
|
2889 4280 | pub mod dialog {
|
2890 4281 |
|
4282 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
2891 4283 | impl ::std::convert::From<Builder> for crate::model::Dialog {
|
2892 4284 | fn from(builder: Builder) -> Self {
|
2893 4285 | builder.build()
|
2894 4286 | }
|
2895 4287 | }
|
2896 - | /// A builder for [`Dialog`](crate::model::Dialog).
|
4288 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`Dialog`](crate::model::Dialog).
|
4289 + | /* RustType.kt:516 */
|
2897 4290 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4291 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2898 4292 | pub struct Builder {
|
4293 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2899 4294 | pub(crate) language: ::std::option::Option<::std::string::String>,
|
4295 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2900 4296 | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
4297 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2901 4298 | pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
|
4299 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2902 4300 | }
|
4301 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2903 4302 | impl Builder {
|
4303 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2904 4304 | #[allow(missing_docs)] // documentation missing in model
|
4305 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2905 4306 | pub fn language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2906 - | self.language = input;
|
4307 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4308 + | self.language =
|
4309 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4310 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2907 4311 | self
|
4312 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2908 4313 | }
|
4314 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2909 4315 | #[allow(missing_docs)] // documentation missing in model
|
4316 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2910 4317 | pub fn greeting(mut self, input: ::std::string::String) -> Self {
|
2911 - | self.greeting = Some(input);
|
4318 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4319 + | self.greeting =
|
4320 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4321 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4322 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4323 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2912 4324 | self
|
4325 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2913 4326 | }
|
4327 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2914 4328 | #[allow(missing_docs)] // documentation missing in model
|
4329 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2915 4330 | pub fn farewell(mut self, input: ::std::option::Option<crate::model::Farewell>) -> Self {
|
2916 - | self.farewell = input;
|
4331 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4332 + | self.farewell =
|
4333 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4334 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2917 4335 | self
|
4336 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2918 4337 | }
|
2919 - | /// Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
4338 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
4339 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
2920 4340 | pub fn build(self) -> crate::model::Dialog {
|
2921 4341 | self.build_enforcing_required_and_enum_traits()
|
2922 4342 | }
|
4343 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2923 4344 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::Dialog {
|
4345 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2924 4346 | crate::model::Dialog {
|
4347 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2925 4348 | language: self.language,
|
2926 - | greeting: self.greeting.unwrap_or_else(
|
4349 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4350 + | greeting: self
|
4351 + | .greeting
|
4352 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4353 + | .unwrap_or_else(
|
2927 4354 | #[allow(clippy::redundant_closure)]
|
2928 4355 | || String::from("hi"),
|
2929 4356 | ),
|
4357 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2930 4358 | farewell: self.farewell,
|
4359 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2931 4360 | }
|
4361 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2932 4362 | }
|
4363 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2933 4364 | }
|
4365 + |
|
4366 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2934 4367 | }
|
2935 - | /// See [`Farewell`](crate::model::Farewell).
|
4368 + | /// /* ServerBuilderGenerator.kt:171 */See [`Farewell`](crate::model::Farewell).
|
2936 4369 | pub(crate) mod farewell_internal {
|
2937 4370 |
|
4371 + | /* ServerBuilderGenerator.kt:461 */
|
2938 4372 | impl ::std::convert::From<Builder> for crate::model::Farewell {
|
2939 4373 | fn from(builder: Builder) -> Self {
|
2940 4374 | builder.build()
|
2941 4375 | }
|
2942 4376 | }
|
2943 - | /// A builder for [`Farewell`](crate::model::Farewell).
|
4377 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Farewell`](crate::model::Farewell).
|
4378 + | /* RustType.kt:516 */
|
2944 4379 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4380 + | /* ServerBuilderGenerator.kt:211 */
|
2945 4381 | pub(crate) struct Builder {
|
4382 + | /* ServerBuilderGenerator.kt:308 */
|
2946 4383 | pub(crate) phrase: ::std::option::Option<::std::string::String>,
|
4384 + | /* ServerBuilderGenerator.kt:211 */
|
2947 4385 | }
|
4386 + | /* ServerBuilderGenerator.kt:215 */
|
2948 4387 | impl Builder {
|
4388 + | /* ServerBuilderGenerator.kt:426 */
|
2949 4389 | #[allow(missing_docs)] // documentation missing in model
|
4390 + | /* ServerBuilderGenerator.kt:428 */
|
2950 4391 | pub(crate) fn set_phrase(
|
2951 4392 | mut self,
|
2952 4393 | input: impl ::std::convert::Into<::std::string::String>,
|
2953 4394 | ) -> Self {
|
4395 + | /* ServerBuilderGenerator.kt:429 */
|
2954 4396 | self.phrase = Some(input.into());
|
2955 4397 | self
|
4398 + | /* ServerBuilderGenerator.kt:428 */
|
2956 4399 | }
|
2957 - | /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
4400 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
4401 + | /* ServerBuilderGenerator.kt:271 */
|
2958 4402 | pub fn build(self) -> crate::model::Farewell {
|
2959 4403 | self.build_enforcing_all_constraints()
|
2960 4404 | }
|
4405 + | /* ServerBuilderGenerator.kt:283 */
|
2961 4406 | fn build_enforcing_all_constraints(self) -> crate::model::Farewell {
|
4407 + | /* ServerBuilderGenerator.kt:542 */
|
2962 4408 | crate::model::Farewell {
|
2963 - | phrase: self.phrase.unwrap_or_else(
|
4409 + | /* ServerBuilderGenerator.kt:546 */
|
4410 + | phrase: self
|
4411 + | .phrase
|
4412 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4413 + | .unwrap_or_else(
|
2964 4414 | #[allow(clippy::redundant_closure)]
|
2965 4415 | || String::from("bye"),
|
2966 4416 | ),
|
4417 + | /* ServerBuilderGenerator.kt:542 */
|
2967 4418 | }
|
4419 + | /* ServerBuilderGenerator.kt:283 */
|
2968 4420 | }
|
4421 + | /* ServerBuilderGenerator.kt:215 */
|
2969 4422 | }
|
4423 + |
|
4424 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2970 4425 | }
|
2971 - | /// See [`Farewell`](crate::model::Farewell).
|
4426 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`Farewell`](crate::model::Farewell).
|
2972 4427 | pub mod farewell {
|
2973 4428 |
|
4429 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
2974 4430 | impl ::std::convert::From<Builder> for crate::model::Farewell {
|
2975 4431 | fn from(builder: Builder) -> Self {
|
2976 4432 | builder.build()
|
2977 4433 | }
|
2978 4434 | }
|
2979 - | /// A builder for [`Farewell`](crate::model::Farewell).
|
4435 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`Farewell`](crate::model::Farewell).
|
4436 + | /* RustType.kt:516 */
|
2980 4437 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4438 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2981 4439 | pub struct Builder {
|
4440 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2982 4441 | pub(crate) phrase: ::std::option::Option<::std::string::String>,
|
4442 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2983 4443 | }
|
4444 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2984 4445 | impl Builder {
|
4446 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2985 4447 | #[allow(missing_docs)] // documentation missing in model
|
4448 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2986 4449 | pub fn phrase(mut self, input: ::std::string::String) -> Self {
|
2987 - | self.phrase = Some(input);
|
4450 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4451 + | self.phrase =
|
4452 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4453 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4454 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4455 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2988 4456 | self
|
4457 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2989 4458 | }
|
2990 - | /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
4459 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
4460 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
2991 4461 | pub fn build(self) -> crate::model::Farewell {
|
2992 4462 | self.build_enforcing_required_and_enum_traits()
|
2993 4463 | }
|
4464 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2994 4465 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::Farewell {
|
4466 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2995 4467 | crate::model::Farewell {
|
2996 - | phrase: self.phrase.unwrap_or_else(
|
4468 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4469 + | phrase: self
|
4470 + | .phrase
|
4471 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4472 + | .unwrap_or_else(
|
2997 4473 | #[allow(clippy::redundant_closure)]
|
2998 4474 | || String::from("bye"),
|
2999 4475 | ),
|
4476 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
3000 4477 | }
|
4478 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
3001 4479 | }
|
4480 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
3002 4481 | }
|
4482 + |
|
4483 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3003 4484 | }
|
3004 - | /// See [`TopLevel`](crate::model::TopLevel).
|
4485 + | /// /* ServerBuilderGenerator.kt:171 */See [`TopLevel`](crate::model::TopLevel).
|
3005 4486 | pub(crate) mod top_level_internal {
|
3006 4487 |
|
4488 + | /* RustType.kt:516 */
|
3007 4489 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3008 - | /// Holds one variant for each of the ways the builder can fail.
|
4490 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
4491 + | /* RustType.kt:516 */
|
3009 4492 | #[non_exhaustive]
|
4493 + | /* ServerBuilderConstraintViolations.kt:75 */
|
3010 4494 | #[allow(clippy::enum_variant_names)]
|
3011 4495 | pub(crate) enum ConstraintViolation {
|
3012 - | /// `dialog` was not provided but it is required when building `TopLevel`.
|
4496 + | /// /* ServerBuilderConstraintViolations.kt:138 */`dialog` was not provided but it is required when building `TopLevel`.
|
4497 + | /* ServerBuilderConstraintViolations.kt:143 */
|
3013 4498 | MissingDialog,
|
4499 + | /* ServerBuilderConstraintViolations.kt:75 */
|
3014 4500 | }
|
4501 + | /* ServerBuilderConstraintViolations.kt:117 */
|
3015 4502 | impl ::std::fmt::Display for ConstraintViolation {
|
4503 + | /* ServerBuilderConstraintViolations.kt:118 */
|
3016 4504 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4505 + | /* ServerBuilderConstraintViolations.kt:119 */
|
3017 4506 | match self {
|
4507 + | /* ServerBuilderConstraintViolations.kt:127 */
|
3018 4508 | ConstraintViolation::MissingDialog => write!(
|
3019 4509 | f,
|
3020 4510 | "`dialog` was not provided but it is required when building `TopLevel`"
|
3021 4511 | ),
|
4512 + | /* ServerBuilderConstraintViolations.kt:119 */
|
3022 4513 | }
|
4514 + | /* ServerBuilderConstraintViolations.kt:118 */
|
3023 4515 | }
|
4516 + | /* ServerBuilderConstraintViolations.kt:117 */
|
3024 4517 | }
|
4518 + | /* ServerBuilderConstraintViolations.kt:84 */
|
3025 4519 | impl ::std::error::Error for ConstraintViolation {}
|
4520 + | /* ServerBuilderConstraintViolations.kt:171 */
|
3026 4521 | impl ConstraintViolation {
|
3027 4522 | pub(crate) fn as_validation_exception_field(
|
3028 4523 | self,
|
3029 4524 | path: ::std::string::String,
|
3030 4525 | ) -> crate::model::ValidationExceptionField {
|
3031 4526 | match self {
|
3032 4527 | ConstraintViolation::MissingDialog => crate::model::ValidationExceptionField {
|
3033 4528 | message: format!("Value at '{}/dialog' failed to satisfy constraint: Member must not be null", path),
|
3034 4529 | path: path + "/dialog",
|
3035 4530 | },
|
3036 4531 | }
|
3037 4532 | }
|
3038 4533 | }
|
4534 + | /* ServerBuilderGenerator.kt:244 */
|
3039 4535 | impl ::std::convert::From<Builder>
|
3040 4536 | for crate::constrained::MaybeConstrained<crate::model::TopLevel>
|
3041 4537 | {
|
3042 4538 | fn from(builder: Builder) -> Self {
|
3043 4539 | Self::Unconstrained(builder)
|
3044 4540 | }
|
3045 4541 | }
|
4542 + | /* ServerBuilderGenerator.kt:446 */
|
3046 4543 | impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
|
3047 4544 | type Error = ConstraintViolation;
|
3048 4545 |
|
3049 4546 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3050 4547 | builder.build()
|
3051 4548 | }
|
3052 4549 | }
|
3053 - | /// A builder for [`TopLevel`](crate::model::TopLevel).
|
4550 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`TopLevel`](crate::model::TopLevel).
|
4551 + | /* RustType.kt:516 */
|
3054 4552 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4553 + | /* ServerBuilderGenerator.kt:211 */
|
3055 4554 | pub(crate) struct Builder {
|
4555 + | /* ServerBuilderGenerator.kt:308 */
|
3056 4556 | pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
|
4557 + | /* ServerBuilderGenerator.kt:308 */
|
3057 4558 | pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
|
4559 + | /* ServerBuilderGenerator.kt:308 */
|
3058 4560 | pub(crate) dialog_map: ::std::option::Option<
|
3059 4561 | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
3060 4562 | >,
|
4563 + | /* ServerBuilderGenerator.kt:211 */
|
3061 4564 | }
|
4565 + | /* ServerBuilderGenerator.kt:215 */
|
3062 4566 | impl Builder {
|
4567 + | /* ServerBuilderGenerator.kt:426 */
|
3063 4568 | #[allow(missing_docs)] // documentation missing in model
|
4569 + | /* ServerBuilderGenerator.kt:428 */
|
3064 4570 | pub(crate) fn set_dialog(
|
3065 4571 | mut self,
|
3066 4572 | input: impl ::std::convert::Into<crate::model::Dialog>,
|
3067 4573 | ) -> Self {
|
4574 + | /* ServerBuilderGenerator.kt:429 */
|
3068 4575 | self.dialog = Some(input.into());
|
3069 4576 | self
|
4577 + | /* ServerBuilderGenerator.kt:428 */
|
3070 4578 | }
|
4579 + | /* ServerBuilderGenerator.kt:426 */
|
3071 4580 | #[allow(missing_docs)] // documentation missing in model
|
4581 + | /* ServerBuilderGenerator.kt:428 */
|
3072 4582 | pub(crate) fn set_dialog_list(
|
3073 4583 | mut self,
|
3074 4584 | input: impl ::std::convert::Into<::std::vec::Vec<crate::model::Dialog>>,
|
3075 4585 | ) -> Self {
|
4586 + | /* ServerBuilderGenerator.kt:429 */
|
3076 4587 | self.dialog_list = Some(input.into());
|
3077 4588 | self
|
4589 + | /* ServerBuilderGenerator.kt:428 */
|
3078 4590 | }
|
4591 + | /* ServerBuilderGenerator.kt:426 */
|
3079 4592 | #[allow(missing_docs)] // documentation missing in model
|
4593 + | /* ServerBuilderGenerator.kt:428 */
|
3080 4594 | pub(crate) fn set_dialog_map(
|
3081 4595 | mut self,
|
3082 4596 | input: impl ::std::convert::Into<
|
3083 4597 | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
3084 4598 | >,
|
3085 4599 | ) -> Self {
|
4600 + | /* ServerBuilderGenerator.kt:429 */
|
3086 4601 | self.dialog_map = Some(input.into());
|
3087 4602 | self
|
4603 + | /* ServerBuilderGenerator.kt:428 */
|
3088 4604 | }
|
3089 - | /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
3090 - | ///
|
4605 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
4606 + | /// /* ServerBuilderGenerator.kt:260 */
|
3091 4607 | /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
|
3092 4608 | ///
|
4609 + | /* ServerBuilderGenerator.kt:271 */
|
3093 4610 | pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
3094 4611 | self.build_enforcing_all_constraints()
|
3095 4612 | }
|
4613 + | /* ServerBuilderGenerator.kt:283 */
|
3096 4614 | fn build_enforcing_all_constraints(
|
3097 4615 | self,
|
3098 4616 | ) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
3099 - | Ok(crate::model::TopLevel {
|
3100 - | dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
|
3101 - | dialog_list: self.dialog_list.unwrap_or_else(
|
3102 - | #[allow(clippy::redundant_closure)]
|
3103 - | || ::std::vec::Vec::new(),
|
3104 - | ),
|
3105 - | dialog_map: self.dialog_map.unwrap_or_else(
|
3106 - | #[allow(clippy::redundant_closure)]
|
3107 - | || ::std::collections::HashMap::new(),
|
3108 - | ),
|
3109 - | })
|
4617 + | /* ServerBuilderGenerator.kt:287 */
|
4618 + | Ok(
|
4619 + | /* ServerBuilderGenerator.kt:542 */
|
4620 + | crate::model::TopLevel {
|
4621 + | /* ServerBuilderGenerator.kt:546 */
|
4622 + | dialog: self
|
4623 + | .dialog
|
4624 + | /* ServerBuilderGenerator.kt:569 */
|
4625 + | .ok_or(ConstraintViolation::MissingDialog)?,
|
4626 + | /* ServerBuilderGenerator.kt:546 */
|
4627 + | dialog_list: self
|
4628 + | .dialog_list
|
4629 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
4630 + | .unwrap_or_default(),
|
4631 + | /* ServerBuilderGenerator.kt:546 */
|
4632 + | dialog_map: self
|
4633 + | .dialog_map
|
4634 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
4635 + | .unwrap_or_default(),
|
4636 + | /* ServerBuilderGenerator.kt:542 */
|
4637 + | }, /* ServerBuilderGenerator.kt:287 */
|
4638 + | )
|
4639 + | /* ServerBuilderGenerator.kt:283 */
|
3110 4640 | }
|
4641 + | /* ServerBuilderGenerator.kt:215 */
|
3111 4642 | }
|
4643 + |
|
4644 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3112 4645 | }
|
3113 - | /// See [`TopLevel`](crate::model::TopLevel).
|
4646 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`TopLevel`](crate::model::TopLevel).
|
3114 4647 | pub mod top_level {
|
3115 4648 |
|
4649 + | /* RustType.kt:516 */
|
3116 4650 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3117 - | /// Holds one variant for each of the ways the builder can fail.
|
3118 - |
|
4651 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
4652 + | /* ServerBuilderConstraintViolations.kt:75 */
|
3119 4653 | #[allow(clippy::enum_variant_names)]
|
3120 4654 | pub enum ConstraintViolation {
|
3121 - | /// `dialog` was not provided but it is required when building `TopLevel`.
|
4655 + | /// /* ServerBuilderConstraintViolations.kt:138 */`dialog` was not provided but it is required when building `TopLevel`.
|
4656 + | /* ServerBuilderConstraintViolations.kt:143 */
|
3122 4657 | MissingDialog,
|
4658 + | /* ServerBuilderConstraintViolations.kt:75 */
|
3123 4659 | }
|
4660 + | /* ServerBuilderConstraintViolations.kt:117 */
|
3124 4661 | impl ::std::fmt::Display for ConstraintViolation {
|
4662 + | /* ServerBuilderConstraintViolations.kt:118 */
|
3125 4663 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4664 + | /* ServerBuilderConstraintViolations.kt:119 */
|
3126 4665 | match self {
|
4666 + | /* ServerBuilderConstraintViolations.kt:127 */
|
3127 4667 | ConstraintViolation::MissingDialog => write!(
|
3128 4668 | f,
|
3129 4669 | "`dialog` was not provided but it is required when building `TopLevel`"
|
3130 4670 | ),
|
4671 + | /* ServerBuilderConstraintViolations.kt:119 */
|
3131 4672 | }
|
4673 + | /* ServerBuilderConstraintViolations.kt:118 */
|
3132 4674 | }
|
4675 + | /* ServerBuilderConstraintViolations.kt:117 */
|
3133 4676 | }
|
4677 + | /* ServerBuilderConstraintViolations.kt:84 */
|
3134 4678 | impl ::std::error::Error for ConstraintViolation {}
|
4679 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
3135 4680 | impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
|
3136 4681 | type Error = ConstraintViolation;
|
3137 4682 |
|
3138 4683 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3139 4684 | builder.build()
|
3140 4685 | }
|
3141 4686 | }
|
3142 - | /// A builder for [`TopLevel`](crate::model::TopLevel).
|
4687 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`TopLevel`](crate::model::TopLevel).
|
4688 + | /* RustType.kt:516 */
|
3143 4689 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4690 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
3144 4691 | pub struct Builder {
|
4692 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3145 4693 | pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
|
4694 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3146 4695 | pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
|
4696 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3147 4697 | pub(crate) dialog_map: ::std::option::Option<
|
3148 4698 | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
3149 4699 | >,
|
4700 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
3150 4701 | }
|
4702 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
3151 4703 | impl Builder {
|
4704 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3152 4705 | #[allow(missing_docs)] // documentation missing in model
|
4706 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3153 4707 | pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
|
3154 - | self.dialog = Some(input);
|
4708 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4709 + | self.dialog =
|
4710 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4711 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4712 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4713 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3155 4714 | self
|
4715 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3156 4716 | }
|
4717 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3157 4718 | #[allow(missing_docs)] // documentation missing in model
|
4719 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3158 4720 | pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
|
3159 - | self.dialog_list = Some(input);
|
4721 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4722 + | self.dialog_list =
|
4723 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4724 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4725 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4726 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3160 4727 | self
|
4728 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3161 4729 | }
|
4730 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3162 4731 | #[allow(missing_docs)] // documentation missing in model
|
4732 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3163 4733 | pub fn dialog_map(
|
3164 4734 | mut self,
|
3165 4735 | input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
3166 4736 | ) -> Self {
|
3167 - | self.dialog_map = Some(input);
|
4737 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4738 + | self.dialog_map =
|
4739 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4740 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4741 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4742 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3168 4743 | self
|
4744 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3169 4745 | }
|
3170 - | /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
3171 - | ///
|
4746 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
4747 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
3172 4748 | /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if you do not provide a value for all non-`Option`al members.
|
3173 4749 | ///
|
4750 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
3174 4751 | pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
3175 4752 | self.build_enforcing_required_and_enum_traits()
|
3176 4753 | }
|
4754 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
3177 4755 | fn build_enforcing_required_and_enum_traits(
|
3178 4756 | self,
|
3179 4757 | ) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
3180 - | Ok(crate::model::TopLevel {
|
3181 - | dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
|
3182 - | dialog_list: self.dialog_list.unwrap_or_else(
|
3183 - | #[allow(clippy::redundant_closure)]
|
3184 - | || ::std::vec::Vec::new(),
|
3185 - | ),
|
3186 - | dialog_map: self.dialog_map.unwrap_or_else(
|
3187 - | #[allow(clippy::redundant_closure)]
|
3188 - | || ::std::collections::HashMap::new(),
|
3189 - | ),
|
3190 - | })
|
4758 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
4759 + | Ok(
|
4760 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4761 + | crate::model::TopLevel {
|
4762 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4763 + | dialog: self
|
4764 + | .dialog
|
4765 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
4766 + | .ok_or(ConstraintViolation::MissingDialog)?,
|
4767 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4768 + | dialog_list: self
|
4769 + | .dialog_list
|
4770 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
4771 + | .unwrap_or_default(),
|
4772 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4773 + | dialog_map: self
|
4774 + | .dialog_map
|
4775 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
4776 + | .unwrap_or_default(),
|
4777 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4778 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
4779 + | )
|
4780 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
3191 4781 | }
|
4782 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
3192 4783 | }
|
4784 + |
|
4785 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3193 4786 | }
|
3194 - | /// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4787 + | /// /* ServerBuilderGenerator.kt:171 */See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
3195 4788 | pub(crate) mod client_optional_defaults_internal {
|
3196 4789 |
|
4790 + | /* ServerBuilderGenerator.kt:461 */
|
3197 4791 | impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
|
3198 4792 | fn from(builder: Builder) -> Self {
|
3199 4793 | builder.build()
|
3200 4794 | }
|
3201 4795 | }
|
3202 - | /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4796 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4797 + | /* RustType.kt:516 */
|
3203 4798 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4799 + | /* ServerBuilderGenerator.kt:211 */
|
3204 4800 | pub(crate) struct Builder {
|
4801 + | /* ServerBuilderGenerator.kt:308 */
|
3205 4802 | pub(crate) member: ::std::option::Option<i32>,
|
4803 + | /* ServerBuilderGenerator.kt:211 */
|
3206 4804 | }
|
4805 + | /* ServerBuilderGenerator.kt:215 */
|
3207 4806 | impl Builder {
|
4807 + | /* ServerBuilderGenerator.kt:426 */
|
3208 4808 | #[allow(missing_docs)] // documentation missing in model
|
4809 + | /* ServerBuilderGenerator.kt:428 */
|
3209 4810 | pub(crate) fn set_member(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
4811 + | /* ServerBuilderGenerator.kt:429 */
|
3210 4812 | self.member = Some(input.into());
|
3211 4813 | self
|
4814 + | /* ServerBuilderGenerator.kt:428 */
|
3212 4815 | }
|
3213 - | /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4816 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4817 + | /* ServerBuilderGenerator.kt:271 */
|
3214 4818 | pub fn build(self) -> crate::model::ClientOptionalDefaults {
|
3215 4819 | self.build_enforcing_all_constraints()
|
3216 4820 | }
|
4821 + | /* ServerBuilderGenerator.kt:283 */
|
3217 4822 | fn build_enforcing_all_constraints(self) -> crate::model::ClientOptionalDefaults {
|
4823 + | /* ServerBuilderGenerator.kt:542 */
|
3218 4824 | crate::model::ClientOptionalDefaults {
|
3219 - | member: self.member.unwrap_or(0i32),
|
4825 + | /* ServerBuilderGenerator.kt:546 */
|
4826 + | member: self
|
4827 + | .member
|
4828 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4829 + | .unwrap_or(0i32),
|
4830 + | /* ServerBuilderGenerator.kt:542 */
|
3220 4831 | }
|
4832 + | /* ServerBuilderGenerator.kt:283 */
|
3221 4833 | }
|
4834 + | /* ServerBuilderGenerator.kt:215 */
|
3222 4835 | }
|
4836 + |
|
4837 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3223 4838 | }
|
3224 - | /// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4839 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
3225 4840 | pub mod client_optional_defaults {
|
3226 4841 |
|
4842 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
3227 4843 | impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
|
3228 4844 | fn from(builder: Builder) -> Self {
|
3229 4845 | builder.build()
|
3230 4846 | }
|
3231 4847 | }
|
3232 - | /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4848 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4849 + | /* RustType.kt:516 */
|
3233 4850 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4851 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
3234 4852 | pub struct Builder {
|
4853 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3235 4854 | pub(crate) member: ::std::option::Option<i32>,
|
4855 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
3236 4856 | }
|
4857 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
3237 4858 | impl Builder {
|
4859 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3238 4860 | #[allow(missing_docs)] // documentation missing in model
|
4861 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3239 4862 | pub fn member(mut self, input: i32) -> Self {
|
3240 - | self.member = Some(input);
|
4863 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4864 + | self.member =
|
4865 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4866 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4867 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4868 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3241 4869 | self
|
4870 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3242 4871 | }
|
3243 - | /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4872 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
4873 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
3244 4874 | pub fn build(self) -> crate::model::ClientOptionalDefaults {
|
3245 4875 | self.build_enforcing_required_and_enum_traits()
|
3246 4876 | }
|
4877 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
3247 4878 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::ClientOptionalDefaults {
|
4879 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
3248 4880 | crate::model::ClientOptionalDefaults {
|
3249 - | member: self.member.unwrap_or(0i32),
|
4881 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4882 + | member: self
|
4883 + | .member
|
4884 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4885 + | .unwrap_or(0i32),
|
4886 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
3250 4887 | }
|
4888 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
3251 4889 | }
|
4890 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
3252 4891 | }
|
4892 + |
|
4893 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3253 4894 | }
|
3254 - | /// See [`Defaults`](crate::model::Defaults).
|
4895 + | /// /* ServerBuilderGenerator.kt:171 */See [`Defaults`](crate::model::Defaults).
|
3255 4896 | pub(crate) mod defaults_internal {
|
3256 4897 |
|
4898 + | /* RustType.kt:516 */
|
3257 4899 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3258 - | /// Holds one variant for each of the ways the builder can fail.
|
4900 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
4901 + | /* RustType.kt:516 */
|
3259 4902 | #[non_exhaustive]
|
4903 + | /* ServerBuilderConstraintViolations.kt:75 */
|
3260 4904 | #[allow(clippy::enum_variant_names)]
|
3261 4905 | pub(crate) enum ConstraintViolation {
|
3262 - | /// Constraint violation occurred building member `default_enum` when building `Defaults`.
|
4906 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `default_enum` when building `Defaults`.
|
4907 + | /* RustType.kt:516 */
|
3263 4908 | #[doc(hidden)]
|
4909 + | /* ServerBuilderConstraintViolations.kt:164 */
|
3264 4910 | DefaultEnum(crate::model::test_enum_internal::ConstraintViolation),
|
4911 + | /* ServerBuilderConstraintViolations.kt:75 */
|
3265 4912 | }
|
4913 + | /* ServerBuilderConstraintViolations.kt:117 */
|
3266 4914 | impl ::std::fmt::Display for ConstraintViolation {
|
4915 + | /* ServerBuilderConstraintViolations.kt:118 */
|
3267 4916 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4917 + | /* ServerBuilderConstraintViolations.kt:119 */
|
3268 4918 | match self {
|
3269 - | ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
|
3270 - | }
|
4919 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
|
4920 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
4921 + | /* ServerBuilderConstraintViolations.kt:118 */
|
3271 4922 | }
|
4923 + | /* ServerBuilderConstraintViolations.kt:117 */
|
3272 4924 | }
|
4925 + | /* ServerBuilderConstraintViolations.kt:84 */
|
3273 4926 | impl ::std::error::Error for ConstraintViolation {}
|
4927 + | /* ServerBuilderConstraintViolations.kt:171 */
|
3274 4928 | impl ConstraintViolation {
|
3275 4929 | pub(crate) fn as_validation_exception_field(
|
3276 4930 | self,
|
3277 4931 | path: ::std::string::String,
|
3278 4932 | ) -> crate::model::ValidationExceptionField {
|
3279 4933 | match self {
|
3280 4934 | ConstraintViolation::DefaultEnum(inner) => {
|
3281 4935 | inner.as_validation_exception_field(path + "/defaultEnum")
|
3282 4936 | }
|
3283 4937 | }
|
3284 4938 | }
|
3285 4939 | }
|
4940 + | /* ServerBuilderGenerator.kt:244 */
|
3286 4941 | impl ::std::convert::From<Builder>
|
3287 4942 | for crate::constrained::MaybeConstrained<crate::model::Defaults>
|
3288 4943 | {
|
3289 4944 | fn from(builder: Builder) -> Self {
|
3290 4945 | Self::Unconstrained(builder)
|
3291 4946 | }
|
3292 4947 | }
|
4948 + | /* ServerBuilderGenerator.kt:446 */
|
3293 4949 | impl ::std::convert::TryFrom<Builder> for crate::model::Defaults {
|
3294 4950 | type Error = ConstraintViolation;
|
3295 4951 |
|
3296 4952 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3297 4953 | builder.build()
|
3298 4954 | }
|
3299 4955 | }
|
3300 - | /// A builder for [`Defaults`](crate::model::Defaults).
|
4956 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Defaults`](crate::model::Defaults).
|
4957 + | /* RustType.kt:516 */
|
3301 4958 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4959 + | /* ServerBuilderGenerator.kt:211 */
|
3302 4960 | pub(crate) struct Builder {
|
4961 + | /* ServerBuilderGenerator.kt:308 */
|
3303 4962 | pub(crate) default_string: ::std::option::Option<::std::string::String>,
|
4963 + | /* ServerBuilderGenerator.kt:308 */
|
3304 4964 | pub(crate) default_boolean: ::std::option::Option<bool>,
|
4965 + | /* ServerBuilderGenerator.kt:308 */
|
3305 4966 | pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4967 + | /* ServerBuilderGenerator.kt:308 */
|
3306 4968 | pub(crate) default_document_map:
|
3307 4969 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
4970 + | /* ServerBuilderGenerator.kt:308 */
|
3308 4971 | pub(crate) default_document_string:
|
3309 4972 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
4973 + | /* ServerBuilderGenerator.kt:308 */
|
3310 4974 | pub(crate) default_document_boolean:
|
3311 4975 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
4976 + | /* ServerBuilderGenerator.kt:308 */
|
3312 4977 | pub(crate) default_document_list:
|
3313 4978 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
4979 + | /* ServerBuilderGenerator.kt:308 */
|
3314 4980 | pub(crate) default_null_document:
|
3315 4981 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
4982 + | /* ServerBuilderGenerator.kt:308 */
|
3316 4983 | pub(crate) default_timestamp:
|
3317 4984 | ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
|
4985 + | /* ServerBuilderGenerator.kt:308 */
|
3318 4986 | pub(crate) default_blob:
|
3319 4987 | ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
4988 + | /* ServerBuilderGenerator.kt:308 */
|
3320 4989 | pub(crate) default_byte: ::std::option::Option<i8>,
|
4990 + | /* ServerBuilderGenerator.kt:308 */
|
3321 4991 | pub(crate) default_short: ::std::option::Option<i16>,
|
4992 + | /* ServerBuilderGenerator.kt:308 */
|
3322 4993 | pub(crate) default_integer: ::std::option::Option<i32>,
|
4994 + | /* ServerBuilderGenerator.kt:308 */
|
3323 4995 | pub(crate) default_long: ::std::option::Option<i64>,
|
4996 + | /* ServerBuilderGenerator.kt:308 */
|
3324 4997 | pub(crate) default_float: ::std::option::Option<f32>,
|
4998 + | /* ServerBuilderGenerator.kt:308 */
|
3325 4999 | pub(crate) default_double: ::std::option::Option<f64>,
|
5000 + | /* ServerBuilderGenerator.kt:308 */
|
3326 5001 | pub(crate) default_map: ::std::option::Option<
|
3327 5002 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3328 5003 | >,
|
5004 + | /* ServerBuilderGenerator.kt:308 */
|
3329 5005 | pub(crate) default_enum:
|
3330 5006 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TestEnum>>,
|
5007 + | /* ServerBuilderGenerator.kt:308 */
|
3331 5008 | pub(crate) default_int_enum: ::std::option::Option<i32>,
|
5009 + | /* ServerBuilderGenerator.kt:308 */
|
3332 5010 | pub(crate) empty_string: ::std::option::Option<::std::string::String>,
|
5011 + | /* ServerBuilderGenerator.kt:308 */
|
3333 5012 | pub(crate) false_boolean: ::std::option::Option<bool>,
|
5013 + | /* ServerBuilderGenerator.kt:308 */
|
3334 5014 | pub(crate) empty_blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
3335 - | pub(crate) zero_byte: ::std::option::Option<i8>,
|
5015 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_byte: ::std::option::Option<i8>,
|
5016 + | /* ServerBuilderGenerator.kt:308 */
|
3336 5017 | pub(crate) zero_short: ::std::option::Option<i16>,
|
5018 + | /* ServerBuilderGenerator.kt:308 */
|
3337 5019 | pub(crate) zero_integer: ::std::option::Option<i32>,
|
3338 - | pub(crate) zero_long: ::std::option::Option<i64>,
|
5020 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_long: ::std::option::Option<i64>,
|
5021 + | /* ServerBuilderGenerator.kt:308 */
|
3339 5022 | pub(crate) zero_float: ::std::option::Option<f32>,
|
5023 + | /* ServerBuilderGenerator.kt:308 */
|
3340 5024 | pub(crate) zero_double: ::std::option::Option<f64>,
|
5025 + | /* ServerBuilderGenerator.kt:211 */
|
3341 5026 | }
|
5027 + | /* ServerBuilderGenerator.kt:215 */
|
3342 5028 | impl Builder {
|
5029 + | /* ServerBuilderGenerator.kt:426 */
|
3343 5030 | #[allow(missing_docs)] // documentation missing in model
|
5031 + | /* ServerBuilderGenerator.kt:428 */
|
3344 5032 | pub(crate) fn set_default_string(
|
3345 5033 | mut self,
|
3346 5034 | input: impl ::std::convert::Into<::std::string::String>,
|
3347 5035 | ) -> Self {
|
5036 + | /* ServerBuilderGenerator.kt:429 */
|
3348 5037 | self.default_string = Some(input.into());
|
3349 5038 | self
|
5039 + | /* ServerBuilderGenerator.kt:428 */
|
3350 5040 | }
|
5041 + | /* ServerBuilderGenerator.kt:426 */
|
3351 5042 | #[allow(missing_docs)] // documentation missing in model
|
5043 + | /* ServerBuilderGenerator.kt:428 */
|
3352 5044 | pub(crate) fn set_default_boolean(
|
3353 5045 | mut self,
|
3354 5046 | input: impl ::std::convert::Into<bool>,
|
3355 5047 | ) -> Self {
|
5048 + | /* ServerBuilderGenerator.kt:429 */
|
3356 5049 | self.default_boolean = Some(input.into());
|
3357 5050 | self
|
5051 + | /* ServerBuilderGenerator.kt:428 */
|
3358 5052 | }
|
5053 + | /* ServerBuilderGenerator.kt:426 */
|
3359 5054 | #[allow(missing_docs)] // documentation missing in model
|
5055 + | /* ServerBuilderGenerator.kt:428 */
|
3360 5056 | pub(crate) fn set_default_list(
|
3361 5057 | mut self,
|
3362 5058 | input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
|
3363 5059 | ) -> Self {
|
5060 + | /* ServerBuilderGenerator.kt:429 */
|
3364 5061 | self.default_list = Some(input.into());
|
3365 5062 | self
|
5063 + | /* ServerBuilderGenerator.kt:428 */
|
3366 5064 | }
|
5065 + | /* ServerBuilderGenerator.kt:426 */
|
3367 5066 | #[allow(missing_docs)] // documentation missing in model
|
5067 + | /* ServerBuilderGenerator.kt:428 */
|
3368 5068 | pub(crate) fn set_default_document_map(
|
3369 5069 | mut self,
|
3370 5070 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
3371 5071 | ) -> Self {
|
5072 + | /* ServerBuilderGenerator.kt:429 */
|
3372 5073 | self.default_document_map = Some(input.into());
|
3373 5074 | self
|
5075 + | /* ServerBuilderGenerator.kt:428 */
|
3374 5076 | }
|
5077 + | /* ServerBuilderGenerator.kt:426 */
|
3375 5078 | #[allow(missing_docs)] // documentation missing in model
|
5079 + | /* ServerBuilderGenerator.kt:428 */
|
3376 5080 | pub(crate) fn set_default_document_string(
|
3377 5081 | mut self,
|
3378 5082 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
3379 5083 | ) -> Self {
|
5084 + | /* ServerBuilderGenerator.kt:429 */
|
3380 5085 | self.default_document_string = Some(input.into());
|
3381 5086 | self
|
5087 + | /* ServerBuilderGenerator.kt:428 */
|
3382 5088 | }
|
5089 + | /* ServerBuilderGenerator.kt:426 */
|
3383 5090 | #[allow(missing_docs)] // documentation missing in model
|
5091 + | /* ServerBuilderGenerator.kt:428 */
|
3384 5092 | pub(crate) fn set_default_document_boolean(
|
3385 5093 | mut self,
|
3386 5094 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
3387 5095 | ) -> Self {
|
5096 + | /* ServerBuilderGenerator.kt:429 */
|
3388 5097 | self.default_document_boolean = Some(input.into());
|
3389 5098 | self
|
5099 + | /* ServerBuilderGenerator.kt:428 */
|
3390 5100 | }
|
5101 + | /* ServerBuilderGenerator.kt:426 */
|
3391 5102 | #[allow(missing_docs)] // documentation missing in model
|
5103 + | /* ServerBuilderGenerator.kt:428 */
|
3392 5104 | pub(crate) fn set_default_document_list(
|
3393 5105 | mut self,
|
3394 5106 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
3395 5107 | ) -> Self {
|
5108 + | /* ServerBuilderGenerator.kt:429 */
|
3396 5109 | self.default_document_list = Some(input.into());
|
3397 5110 | self
|
5111 + | /* ServerBuilderGenerator.kt:428 */
|
3398 5112 | }
|
5113 + | /* ServerBuilderGenerator.kt:426 */
|
3399 5114 | #[allow(missing_docs)] // documentation missing in model
|
5115 + | /* ServerBuilderGenerator.kt:428 */
|
3400 5116 | pub(crate) fn set_default_null_document(
|
3401 5117 | mut self,
|
3402 5118 | input: Option<
|
3403 5119 | impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
3404 5120 | >,
|
3405 5121 | ) -> Self {
|
5122 + | /* ServerBuilderGenerator.kt:429 */
|
3406 5123 | self.default_null_document = input.map(|v| v.into());
|
3407 5124 | self
|
5125 + | /* ServerBuilderGenerator.kt:428 */
|
3408 5126 | }
|
5127 + | /* ServerBuilderGenerator.kt:426 */
|
3409 5128 | #[allow(missing_docs)] // documentation missing in model
|
5129 + | /* ServerBuilderGenerator.kt:428 */
|
3410 5130 | pub(crate) fn set_default_timestamp(
|
3411 5131 | mut self,
|
3412 5132 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::DateTime>,
|
3413 5133 | ) -> Self {
|
5134 + | /* ServerBuilderGenerator.kt:429 */
|
3414 5135 | self.default_timestamp = Some(input.into());
|
3415 5136 | self
|
5137 + | /* ServerBuilderGenerator.kt:428 */
|
3416 5138 | }
|
5139 + | /* ServerBuilderGenerator.kt:426 */
|
3417 5140 | #[allow(missing_docs)] // documentation missing in model
|
5141 + | /* ServerBuilderGenerator.kt:428 */
|
3418 5142 | pub(crate) fn set_default_blob(
|
3419 5143 | mut self,
|
3420 5144 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>,
|
3421 5145 | ) -> Self {
|
5146 + | /* ServerBuilderGenerator.kt:429 */
|
3422 5147 | self.default_blob = Some(input.into());
|
3423 5148 | self
|
5149 + | /* ServerBuilderGenerator.kt:428 */
|
3424 5150 | }
|
5151 + | /* ServerBuilderGenerator.kt:426 */
|
3425 5152 | #[allow(missing_docs)] // documentation missing in model
|
5153 + | /* ServerBuilderGenerator.kt:428 */
|
3426 5154 | pub(crate) fn set_default_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
5155 + | /* ServerBuilderGenerator.kt:429 */
|
3427 5156 | self.default_byte = Some(input.into());
|
3428 5157 | self
|
5158 + | /* ServerBuilderGenerator.kt:428 */
|
3429 5159 | }
|
5160 + | /* ServerBuilderGenerator.kt:426 */
|
3430 5161 | #[allow(missing_docs)] // documentation missing in model
|
5162 + | /* ServerBuilderGenerator.kt:428 */
|
3431 5163 | pub(crate) fn set_default_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
5164 + | /* ServerBuilderGenerator.kt:429 */
|
3432 5165 | self.default_short = Some(input.into());
|
3433 5166 | self
|
5167 + | /* ServerBuilderGenerator.kt:428 */
|
3434 5168 | }
|
5169 + | /* ServerBuilderGenerator.kt:426 */
|
3435 5170 | #[allow(missing_docs)] // documentation missing in model
|
5171 + | /* ServerBuilderGenerator.kt:428 */
|
3436 5172 | pub(crate) fn set_default_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
5173 + | /* ServerBuilderGenerator.kt:429 */
|
3437 5174 | self.default_integer = Some(input.into());
|
3438 5175 | self
|
5176 + | /* ServerBuilderGenerator.kt:428 */
|
3439 5177 | }
|
5178 + | /* ServerBuilderGenerator.kt:426 */
|
3440 5179 | #[allow(missing_docs)] // documentation missing in model
|
5180 + | /* ServerBuilderGenerator.kt:428 */
|
3441 5181 | pub(crate) fn set_default_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
5182 + | /* ServerBuilderGenerator.kt:429 */
|
3442 5183 | self.default_long = Some(input.into());
|
3443 5184 | self
|
5185 + | /* ServerBuilderGenerator.kt:428 */
|
3444 5186 | }
|
5187 + | /* ServerBuilderGenerator.kt:426 */
|
3445 5188 | #[allow(missing_docs)] // documentation missing in model
|
5189 + | /* ServerBuilderGenerator.kt:428 */
|
3446 5190 | pub(crate) fn set_default_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
5191 + | /* ServerBuilderGenerator.kt:429 */
|
3447 5192 | self.default_float = Some(input.into());
|
3448 5193 | self
|
5194 + | /* ServerBuilderGenerator.kt:428 */
|
3449 5195 | }
|
5196 + | /* ServerBuilderGenerator.kt:426 */
|
3450 5197 | #[allow(missing_docs)] // documentation missing in model
|
5198 + | /* ServerBuilderGenerator.kt:428 */
|
3451 5199 | pub(crate) fn set_default_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
5200 + | /* ServerBuilderGenerator.kt:429 */
|
3452 5201 | self.default_double = Some(input.into());
|
3453 5202 | self
|
5203 + | /* ServerBuilderGenerator.kt:428 */
|
3454 5204 | }
|
5205 + | /* ServerBuilderGenerator.kt:426 */
|
3455 5206 | #[allow(missing_docs)] // documentation missing in model
|
5207 + | /* ServerBuilderGenerator.kt:428 */
|
3456 5208 | pub(crate) fn set_default_map(
|
3457 5209 | mut self,
|
3458 5210 | input: impl ::std::convert::Into<
|
3459 5211 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3460 5212 | >,
|
3461 5213 | ) -> Self {
|
5214 + | /* ServerBuilderGenerator.kt:429 */
|
3462 5215 | self.default_map = Some(input.into());
|
3463 5216 | self
|
5217 + | /* ServerBuilderGenerator.kt:428 */
|
3464 5218 | }
|
5219 + | /* ServerBuilderGenerator.kt:426 */
|
3465 5220 | #[allow(missing_docs)] // documentation missing in model
|
5221 + | /* ServerBuilderGenerator.kt:428 */
|
3466 5222 | pub(crate) fn set_default_enum(
|
3467 5223 | mut self,
|
3468 5224 | input: impl ::std::convert::Into<
|
3469 5225 | crate::constrained::MaybeConstrained<crate::model::TestEnum>,
|
3470 5226 | >,
|
3471 5227 | ) -> Self {
|
5228 + | /* ServerBuilderGenerator.kt:429 */
|
3472 5229 | self.default_enum = Some(input.into());
|
3473 5230 | self
|
5231 + | /* ServerBuilderGenerator.kt:428 */
|
3474 5232 | }
|
5233 + | /* ServerBuilderGenerator.kt:426 */
|
3475 5234 | #[allow(missing_docs)] // documentation missing in model
|
5235 + | /* ServerBuilderGenerator.kt:428 */
|
3476 5236 | pub(crate) fn set_default_int_enum(
|
3477 5237 | mut self,
|
3478 5238 | input: impl ::std::convert::Into<i32>,
|
3479 5239 | ) -> Self {
|
5240 + | /* ServerBuilderGenerator.kt:429 */
|
3480 5241 | self.default_int_enum = Some(input.into());
|
3481 5242 | self
|
5243 + | /* ServerBuilderGenerator.kt:428 */
|
3482 5244 | }
|
5245 + | /* ServerBuilderGenerator.kt:426 */
|
3483 5246 | #[allow(missing_docs)] // documentation missing in model
|
5247 + | /* ServerBuilderGenerator.kt:428 */
|
3484 5248 | pub(crate) fn set_empty_string(
|
3485 5249 | mut self,
|
3486 5250 | input: impl ::std::convert::Into<::std::string::String>,
|
3487 5251 | ) -> Self {
|
5252 + | /* ServerBuilderGenerator.kt:429 */
|
3488 5253 | self.empty_string = Some(input.into());
|
3489 5254 | self
|
5255 + | /* ServerBuilderGenerator.kt:428 */
|
3490 5256 | }
|
5257 + | /* ServerBuilderGenerator.kt:426 */
|
3491 5258 | #[allow(missing_docs)] // documentation missing in model
|
5259 + | /* ServerBuilderGenerator.kt:428 */
|
3492 5260 | pub(crate) fn set_false_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
|
5261 + | /* ServerBuilderGenerator.kt:429 */
|
3493 5262 | self.false_boolean = Some(input.into());
|
3494 5263 | self
|
5264 + | /* ServerBuilderGenerator.kt:428 */
|
3495 5265 | }
|
5266 + | /* ServerBuilderGenerator.kt:426 */
|
3496 5267 | #[allow(missing_docs)] // documentation missing in model
|
5268 + | /* ServerBuilderGenerator.kt:428 */
|
3497 5269 | pub(crate) fn set_empty_blob(
|
3498 5270 | mut self,
|
3499 5271 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>,
|
3500 5272 | ) -> Self {
|
5273 + | /* ServerBuilderGenerator.kt:429 */
|
3501 5274 | self.empty_blob = Some(input.into());
|
3502 5275 | self
|
5276 + | /* ServerBuilderGenerator.kt:428 */
|
3503 5277 | }
|
5278 + | /* ServerBuilderGenerator.kt:426 */
|
3504 5279 | #[allow(missing_docs)] // documentation missing in model
|
5280 + | /* ServerBuilderGenerator.kt:428 */
|
3505 5281 | pub(crate) fn set_zero_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
5282 + | /* ServerBuilderGenerator.kt:429 */
|
3506 5283 | self.zero_byte = Some(input.into());
|
3507 5284 | self
|
5285 + | /* ServerBuilderGenerator.kt:428 */
|
3508 5286 | }
|
5287 + | /* ServerBuilderGenerator.kt:426 */
|
3509 5288 | #[allow(missing_docs)] // documentation missing in model
|
5289 + | /* ServerBuilderGenerator.kt:428 */
|
3510 5290 | pub(crate) fn set_zero_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
5291 + | /* ServerBuilderGenerator.kt:429 */
|
3511 5292 | self.zero_short = Some(input.into());
|
3512 5293 | self
|
5294 + | /* ServerBuilderGenerator.kt:428 */
|
3513 5295 | }
|
5296 + | /* ServerBuilderGenerator.kt:426 */
|
3514 5297 | #[allow(missing_docs)] // documentation missing in model
|
5298 + | /* ServerBuilderGenerator.kt:428 */
|
3515 5299 | pub(crate) fn set_zero_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
5300 + | /* ServerBuilderGenerator.kt:429 */
|
3516 5301 | self.zero_integer = Some(input.into());
|
3517 5302 | self
|
5303 + | /* ServerBuilderGenerator.kt:428 */
|
3518 5304 | }
|
5305 + | /* ServerBuilderGenerator.kt:426 */
|
3519 5306 | #[allow(missing_docs)] // documentation missing in model
|
5307 + | /* ServerBuilderGenerator.kt:428 */
|
3520 5308 | pub(crate) fn set_zero_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
5309 + | /* ServerBuilderGenerator.kt:429 */
|
3521 5310 | self.zero_long = Some(input.into());
|
3522 5311 | self
|
5312 + | /* ServerBuilderGenerator.kt:428 */
|
3523 5313 | }
|
5314 + | /* ServerBuilderGenerator.kt:426 */
|
3524 5315 | #[allow(missing_docs)] // documentation missing in model
|
5316 + | /* ServerBuilderGenerator.kt:428 */
|
3525 5317 | pub(crate) fn set_zero_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
5318 + | /* ServerBuilderGenerator.kt:429 */
|
3526 5319 | self.zero_float = Some(input.into());
|
3527 5320 | self
|
5321 + | /* ServerBuilderGenerator.kt:428 */
|
3528 5322 | }
|
5323 + | /* ServerBuilderGenerator.kt:426 */
|
3529 5324 | #[allow(missing_docs)] // documentation missing in model
|
5325 + | /* ServerBuilderGenerator.kt:428 */
|
3530 5326 | pub(crate) fn set_zero_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
5327 + | /* ServerBuilderGenerator.kt:429 */
|
3531 5328 | self.zero_double = Some(input.into());
|
3532 5329 | self
|
5330 + | /* ServerBuilderGenerator.kt:428 */
|
3533 5331 | }
|
3534 - | /// Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
3535 - | ///
|
5332 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
5333 + | /// /* ServerBuilderGenerator.kt:260 */
|
3536 5334 | /// The builder fails to construct a [`Defaults`](crate::model::Defaults) if a [`ConstraintViolation`] occurs.
|
3537 5335 | ///
|
5336 + | /* ServerBuilderGenerator.kt:271 */
|
3538 5337 | pub fn build(self) -> Result<crate::model::Defaults, ConstraintViolation> {
|
3539 5338 | self.build_enforcing_all_constraints()
|
3540 5339 | }
|
5340 + | /* ServerBuilderGenerator.kt:283 */
|
3541 5341 | fn build_enforcing_all_constraints(
|
3542 5342 | self,
|
3543 5343 | ) -> Result<crate::model::Defaults, ConstraintViolation> {
|
3544 - | Ok(crate::model::Defaults {
|
3545 - | default_string: self.default_string.unwrap_or_else(
|
5344 + | /* ServerBuilderGenerator.kt:287 */
|
5345 + | Ok(
|
5346 + | /* ServerBuilderGenerator.kt:542 */
|
5347 + | crate::model::Defaults {
|
5348 + | /* ServerBuilderGenerator.kt:546 */
|
5349 + | default_string: self
|
5350 + | .default_string
|
5351 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
5352 + | .unwrap_or_else(
|
3546 5353 | #[allow(clippy::redundant_closure)]
|
3547 5354 | || String::from("hi"),
|
3548 5355 | ),
|
3549 - | default_boolean: self.default_boolean.unwrap_or(true),
|
3550 - | default_list: self.default_list.unwrap_or_else(
|
3551 - | #[allow(clippy::redundant_closure)]
|
3552 - | || ::std::vec::Vec::new(),
|
3553 - | ),
|
3554 - | default_document_map: self.default_document_map.unwrap_or_else(
|
5356 + | /* ServerBuilderGenerator.kt:546 */
|
5357 + | default_boolean: self
|
5358 + | .default_boolean
|
5359 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5360 + | .unwrap_or(true),
|
5361 + | /* ServerBuilderGenerator.kt:546 */
|
5362 + | default_list: self
|
5363 + | .default_list
|
5364 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
5365 + | .unwrap_or_default(),
|
5366 + | /* ServerBuilderGenerator.kt:546 */
|
5367 + | default_document_map: self
|
5368 + | .default_document_map
|
5369 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
5370 + | .unwrap_or_else(
|
3555 5371 | #[allow(clippy::redundant_closure)]
|
3556 5372 | || {
|
3557 - | ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
|
5373 + | ::aws_smithy_types::Document::Object(
|
5374 + | ::std::collections::HashMap::new(),
|
5375 + | )
|
3558 5376 | .into()
|
3559 5377 | },
|
3560 5378 | ),
|
3561 - | default_document_string: self.default_document_string.unwrap_or_else(
|
5379 + | /* ServerBuilderGenerator.kt:546 */
|
5380 + | default_document_string: self
|
5381 + | .default_document_string
|
5382 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
5383 + | .unwrap_or_else(
|
3562 5384 | #[allow(clippy::redundant_closure)]
|
3563 5385 | || {
|
3564 - | ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
|
5386 + | ::aws_smithy_types::Document::String(::std::string::String::from(
|
5387 + | "hi",
|
5388 + | ))
|
3565 5389 | .into()
|
3566 5390 | },
|
3567 5391 | ),
|
5392 + | /* ServerBuilderGenerator.kt:546 */
|
3568 5393 | default_document_boolean: self
|
3569 5394 | .default_document_boolean
|
5395 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3570 5396 | .unwrap_or(::aws_smithy_types::Document::Bool(true).into()),
|
3571 - | default_document_list: self.default_document_list.unwrap_or_else(
|
5397 + | /* ServerBuilderGenerator.kt:546 */
|
5398 + | default_document_list: self
|
5399 + | .default_document_list
|
5400 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
5401 + | .unwrap_or_else(
|
3572 5402 | #[allow(clippy::redundant_closure)]
|
3573 5403 | || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()).into(),
|
3574 5404 | ),
|
5405 + | /* ServerBuilderGenerator.kt:546 */
|
3575 5406 | default_null_document: self.default_null_document,
|
3576 - | default_timestamp: self.default_timestamp.unwrap_or_else(
|
5407 + | /* ServerBuilderGenerator.kt:546 */
|
5408 + | default_timestamp: self
|
5409 + | .default_timestamp
|
5410 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
5411 + | .unwrap_or_else(
|
3577 5412 | #[allow(clippy::redundant_closure)]
|
3578 5413 | || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64).into(),
|
3579 5414 | ),
|
3580 - | default_blob: self.default_blob.unwrap_or_else(
|
5415 + | /* ServerBuilderGenerator.kt:546 */
|
5416 + | default_blob: self
|
5417 + | .default_blob
|
5418 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
5419 + | .unwrap_or_else(
|
3581 5420 | #[allow(clippy::redundant_closure)]
|
3582 5421 | || ::aws_smithy_types::Blob::new("abc").into(),
|
3583 5422 | ),
|
3584 - | default_byte: self.default_byte.unwrap_or(1i8),
|
3585 - | default_short: self.default_short.unwrap_or(1i16),
|
3586 - | default_integer: self.default_integer.unwrap_or(10i32),
|
3587 - | default_long: self.default_long.unwrap_or(100i64),
|
3588 - | default_float: self.default_float.unwrap_or(1.0f32),
|
3589 - | default_double: self.default_double.unwrap_or(1.0f64),
|
3590 - | default_map: self.default_map.unwrap_or_else(
|
3591 - | #[allow(clippy::redundant_closure)]
|
3592 - | || ::std::collections::HashMap::new(),
|
3593 - | ),
|
5423 + | /* ServerBuilderGenerator.kt:546 */
|
5424 + | default_byte: self
|
5425 + | .default_byte
|
5426 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5427 + | .unwrap_or(1i8),
|
5428 + | /* ServerBuilderGenerator.kt:546 */
|
5429 + | default_short: self
|
5430 + | .default_short
|
5431 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5432 + | .unwrap_or(1i16),
|
5433 + | /* ServerBuilderGenerator.kt:546 */
|
5434 + | default_integer: self
|
5435 + | .default_integer
|
5436 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5437 + | .unwrap_or(10i32),
|
5438 + | /* ServerBuilderGenerator.kt:546 */
|
5439 + | default_long: self
|
5440 + | .default_long
|
5441 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5442 + | .unwrap_or(100i64),
|
5443 + | /* ServerBuilderGenerator.kt:546 */
|
5444 + | default_float: self
|
5445 + | .default_float
|
5446 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5447 + | .unwrap_or(1.0f32),
|
5448 + | /* ServerBuilderGenerator.kt:546 */
|
5449 + | default_double: self
|
5450 + | .default_double
|
5451 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5452 + | .unwrap_or(1.0f64),
|
5453 + | /* ServerBuilderGenerator.kt:546 */
|
5454 + | default_map: self
|
5455 + | .default_map
|
5456 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
5457 + | .unwrap_or_default(),
|
5458 + | /* ServerBuilderGenerator.kt:546 */
|
3594 5459 | default_enum: self
|
3595 5460 | .default_enum
|
5461 + | /* ServerBuilderGenerator.kt:602 */
|
3596 5462 | .map(|v| match v {
|
3597 5463 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3598 5464 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3599 5465 | })
|
5466 + | /* ServerBuilderGenerator.kt:614 */
|
3600 5467 | .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
|
3601 5468 | .transpose()?
|
5469 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3602 5470 | .unwrap_or(
|
3603 5471 | "FOO"
|
3604 5472 | .parse::<crate::model::TestEnum>()
|
3605 5473 | .expect("static value validated to member"),
|
3606 5474 | ),
|
3607 - | default_int_enum: self.default_int_enum.unwrap_or(1i32),
|
3608 - | empty_string: self.empty_string.unwrap_or_else(
|
5475 + | /* ServerBuilderGenerator.kt:546 */
|
5476 + | default_int_enum: self
|
5477 + | .default_int_enum
|
5478 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5479 + | .unwrap_or(1i32),
|
5480 + | /* ServerBuilderGenerator.kt:546 */
|
5481 + | empty_string: self
|
5482 + | .empty_string
|
5483 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
5484 + | .unwrap_or_else(
|
3609 5485 | #[allow(clippy::redundant_closure)]
|
3610 5486 | || String::from(""),
|
3611 5487 | ),
|
3612 - | false_boolean: self.false_boolean.unwrap_or(false),
|
3613 - | empty_blob: self.empty_blob.unwrap_or_else(
|
5488 + | /* ServerBuilderGenerator.kt:546 */
|
5489 + | false_boolean: self
|
5490 + | .false_boolean
|
5491 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5492 + | .unwrap_or(false),
|
5493 + | /* ServerBuilderGenerator.kt:546 */
|
5494 + | empty_blob: self
|
5495 + | .empty_blob
|
5496 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
5497 + | .unwrap_or_else(
|
3614 5498 | #[allow(clippy::redundant_closure)]
|
3615 5499 | || ::aws_smithy_types::Blob::new("").into(),
|
3616 5500 | ),
|
3617 - | zero_byte: self.zero_byte.unwrap_or(0i8),
|
3618 - | zero_short: self.zero_short.unwrap_or(0i16),
|
3619 - | zero_integer: self.zero_integer.unwrap_or(0i32),
|
3620 - | zero_long: self.zero_long.unwrap_or(0i64),
|
3621 - | zero_float: self.zero_float.unwrap_or(0.0f32),
|
3622 - | zero_double: self.zero_double.unwrap_or(0.0f64),
|
3623 - | })
|
5501 + | /* ServerBuilderGenerator.kt:546 */
|
5502 + | zero_byte: self
|
5503 + | .zero_byte
|
5504 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5505 + | .unwrap_or(0i8),
|
5506 + | /* ServerBuilderGenerator.kt:546 */
|
5507 + | zero_short: self
|
5508 + | .zero_short
|
5509 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5510 + | .unwrap_or(0i16),
|
5511 + | /* ServerBuilderGenerator.kt:546 */
|
5512 + | zero_integer: self
|
5513 + | .zero_integer
|
5514 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5515 + | .unwrap_or(0i32),
|
5516 + | /* ServerBuilderGenerator.kt:546 */
|
5517 + | zero_long: self
|
5518 + | .zero_long
|
5519 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5520 + | .unwrap_or(0i64),
|
5521 + | /* ServerBuilderGenerator.kt:546 */
|
5522 + | zero_float: self
|
5523 + | .zero_float
|
5524 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5525 + | .unwrap_or(0.0f32),
|
5526 + | /* ServerBuilderGenerator.kt:546 */
|
5527 + | zero_double: self
|
5528 + | .zero_double
|
5529 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
5530 + | .unwrap_or(0.0f64),
|
5531 + | /* ServerBuilderGenerator.kt:542 */
|
5532 + | }, /* ServerBuilderGenerator.kt:287 */
|
5533 + | )
|
5534 + | /* ServerBuilderGenerator.kt:283 */
|
3624 5535 | }
|
5536 + | /* ServerBuilderGenerator.kt:215 */
|
3625 5537 | }
|
5538 + |
|
5539 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3626 5540 | }
|
3627 - | /// See [`Defaults`](crate::model::Defaults).
|
5541 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`Defaults`](crate::model::Defaults).
|
3628 5542 | pub mod defaults {
|
3629 5543 |
|
5544 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
3630 5545 | impl ::std::convert::From<Builder> for crate::model::Defaults {
|
3631 5546 | fn from(builder: Builder) -> Self {
|
3632 5547 | builder.build()
|
3633 5548 | }
|
3634 5549 | }
|
3635 - | /// A builder for [`Defaults`](crate::model::Defaults).
|
5550 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`Defaults`](crate::model::Defaults).
|
5551 + | /* RustType.kt:516 */
|
3636 5552 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5553 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
3637 5554 | pub struct Builder {
|
5555 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3638 5556 | pub(crate) default_string: ::std::option::Option<::std::string::String>,
|
5557 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3639 5558 | pub(crate) default_boolean: ::std::option::Option<bool>,
|
5559 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3640 5560 | pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
5561 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3641 5562 | pub(crate) default_document_map:
|
3642 5563 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
5564 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3643 5565 | pub(crate) default_document_string:
|
3644 5566 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
5567 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3645 5568 | pub(crate) default_document_boolean:
|
3646 5569 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
5570 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3647 5571 | pub(crate) default_document_list:
|
3648 5572 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
5573 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3649 5574 | pub(crate) default_null_document:
|
3650 5575 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
5576 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3651 5577 | pub(crate) default_timestamp:
|
3652 5578 | ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
|
5579 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3653 5580 | pub(crate) default_blob:
|
3654 5581 | ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
5582 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3655 5583 | pub(crate) default_byte: ::std::option::Option<i8>,
|
5584 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3656 5585 | pub(crate) default_short: ::std::option::Option<i16>,
|
5586 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3657 5587 | pub(crate) default_integer: ::std::option::Option<i32>,
|
5588 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3658 5589 | pub(crate) default_long: ::std::option::Option<i64>,
|
5590 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3659 5591 | pub(crate) default_float: ::std::option::Option<f32>,
|
5592 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3660 5593 | pub(crate) default_double: ::std::option::Option<f64>,
|
5594 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3661 5595 | pub(crate) default_map: ::std::option::Option<
|
3662 5596 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3663 5597 | >,
|
5598 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3664 5599 | pub(crate) default_enum: ::std::option::Option<crate::model::TestEnum>,
|
5600 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3665 5601 | pub(crate) default_int_enum: ::std::option::Option<i32>,
|
5602 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3666 5603 | pub(crate) empty_string: ::std::option::Option<::std::string::String>,
|
5604 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3667 5605 | pub(crate) false_boolean: ::std::option::Option<bool>,
|
5606 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3668 5607 | pub(crate) empty_blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
5608 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3669 5609 | pub(crate) zero_byte: ::std::option::Option<i8>,
|
5610 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3670 5611 | pub(crate) zero_short: ::std::option::Option<i16>,
|
5612 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3671 5613 | pub(crate) zero_integer: ::std::option::Option<i32>,
|
5614 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3672 5615 | pub(crate) zero_long: ::std::option::Option<i64>,
|
5616 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3673 5617 | pub(crate) zero_float: ::std::option::Option<f32>,
|
5618 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3674 5619 | pub(crate) zero_double: ::std::option::Option<f64>,
|
5620 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
3675 5621 | }
|
5622 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
3676 5623 | impl Builder {
|
5624 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3677 5625 | #[allow(missing_docs)] // documentation missing in model
|
5626 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3678 5627 | pub fn default_string(mut self, input: ::std::string::String) -> Self {
|
3679 - | self.default_string = Some(input);
|
5628 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5629 + | self.default_string =
|
5630 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5631 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5632 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5633 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3680 5634 | self
|
5635 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3681 5636 | }
|
5637 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3682 5638 | #[allow(missing_docs)] // documentation missing in model
|
5639 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3683 5640 | pub fn default_boolean(mut self, input: bool) -> Self {
|
3684 - | self.default_boolean = Some(input);
|
5641 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5642 + | self.default_boolean =
|
5643 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5644 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5645 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5646 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3685 5647 | self
|
5648 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3686 5649 | }
|
5650 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3687 5651 | #[allow(missing_docs)] // documentation missing in model
|
5652 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3688 5653 | pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
|
3689 - | self.default_list = Some(input);
|
5654 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5655 + | self.default_list =
|
5656 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5657 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5658 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5659 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3690 5660 | self
|
5661 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3691 5662 | }
|
5663 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3692 5664 | #[allow(missing_docs)] // documentation missing in model
|
5665 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3693 5666 | pub fn default_document_map(
|
3694 5667 | mut self,
|
3695 5668 | input: ::aws_smithy_http_server_python::types::Document,
|
3696 5669 | ) -> Self {
|
3697 - | self.default_document_map = Some(input);
|
5670 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5671 + | self.default_document_map =
|
5672 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5673 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5674 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5675 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3698 5676 | self
|
5677 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3699 5678 | }
|
5679 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3700 5680 | #[allow(missing_docs)] // documentation missing in model
|
5681 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3701 5682 | pub fn default_document_string(
|
3702 5683 | mut self,
|
3703 5684 | input: ::aws_smithy_http_server_python::types::Document,
|
3704 5685 | ) -> Self {
|
3705 - | self.default_document_string = Some(input);
|
5686 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5687 + | self.default_document_string =
|
5688 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5689 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5690 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5691 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3706 5692 | self
|
5693 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3707 5694 | }
|
5695 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3708 5696 | #[allow(missing_docs)] // documentation missing in model
|
5697 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3709 5698 | pub fn default_document_boolean(
|
3710 5699 | mut self,
|
3711 5700 | input: ::aws_smithy_http_server_python::types::Document,
|
3712 5701 | ) -> Self {
|
3713 - | self.default_document_boolean = Some(input);
|
5702 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5703 + | self.default_document_boolean =
|
5704 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5705 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5706 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5707 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3714 5708 | self
|
5709 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3715 5710 | }
|
5711 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3716 5712 | #[allow(missing_docs)] // documentation missing in model
|
5713 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3717 5714 | pub fn default_document_list(
|
3718 5715 | mut self,
|
3719 5716 | input: ::aws_smithy_http_server_python::types::Document,
|
3720 5717 | ) -> Self {
|
3721 - | self.default_document_list = Some(input);
|
5718 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5719 + | self.default_document_list =
|
5720 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5721 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5722 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5723 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3722 5724 | self
|
5725 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3723 5726 | }
|
5727 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3724 5728 | #[allow(missing_docs)] // documentation missing in model
|
5729 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3725 5730 | pub fn default_null_document(
|
3726 5731 | mut self,
|
3727 5732 | input: ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3728 5733 | ) -> Self {
|
3729 - | self.default_null_document = input;
|
5734 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5735 + | self.default_null_document =
|
5736 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5737 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3730 5738 | self
|
5739 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3731 5740 | }
|
5741 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3732 5742 | #[allow(missing_docs)] // documentation missing in model
|
5743 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3733 5744 | pub fn default_timestamp(
|
3734 5745 | mut self,
|
3735 5746 | input: ::aws_smithy_http_server_python::types::DateTime,
|
3736 5747 | ) -> Self {
|
3737 - | self.default_timestamp = Some(input);
|
5748 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5749 + | self.default_timestamp =
|
5750 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5751 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5752 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5753 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3738 5754 | self
|
5755 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3739 5756 | }
|
5757 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3740 5758 | #[allow(missing_docs)] // documentation missing in model
|
5759 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3741 5760 | pub fn default_blob(mut self, input: ::aws_smithy_http_server_python::types::Blob) -> Self {
|
3742 - | self.default_blob = Some(input);
|
5761 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5762 + | self.default_blob =
|
5763 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5764 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5765 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5766 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3743 5767 | self
|
5768 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3744 5769 | }
|
5770 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3745 5771 | #[allow(missing_docs)] // documentation missing in model
|
5772 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3746 5773 | pub fn default_byte(mut self, input: i8) -> Self {
|
3747 - | self.default_byte = Some(input);
|
5774 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5775 + | self.default_byte =
|
5776 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5777 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5778 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5779 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3748 5780 | self
|
5781 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3749 5782 | }
|
5783 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3750 5784 | #[allow(missing_docs)] // documentation missing in model
|
5785 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3751 5786 | pub fn default_short(mut self, input: i16) -> Self {
|
3752 - | self.default_short = Some(input);
|
5787 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5788 + | self.default_short =
|
5789 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5790 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5791 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5792 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3753 5793 | self
|
5794 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3754 5795 | }
|
5796 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3755 5797 | #[allow(missing_docs)] // documentation missing in model
|
5798 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3756 5799 | pub fn default_integer(mut self, input: i32) -> Self {
|
3757 - | self.default_integer = Some(input);
|
5800 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5801 + | self.default_integer =
|
5802 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5803 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5804 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5805 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3758 5806 | self
|
5807 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3759 5808 | }
|
5809 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3760 5810 | #[allow(missing_docs)] // documentation missing in model
|
5811 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3761 5812 | pub fn default_long(mut self, input: i64) -> Self {
|
3762 - | self.default_long = Some(input);
|
5813 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5814 + | self.default_long =
|
5815 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5816 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5817 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5818 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3763 5819 | self
|
5820 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3764 5821 | }
|
5822 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3765 5823 | #[allow(missing_docs)] // documentation missing in model
|
5824 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3766 5825 | pub fn default_float(mut self, input: f32) -> Self {
|
3767 - | self.default_float = Some(input);
|
5826 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5827 + | self.default_float =
|
5828 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5829 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5830 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5831 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3768 5832 | self
|
5833 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3769 5834 | }
|
5835 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3770 5836 | #[allow(missing_docs)] // documentation missing in model
|
5837 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3771 5838 | pub fn default_double(mut self, input: f64) -> Self {
|
3772 - | self.default_double = Some(input);
|
5839 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5840 + | self.default_double =
|
5841 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5842 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5843 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5844 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3773 5845 | self
|
5846 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3774 5847 | }
|
5848 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3775 5849 | #[allow(missing_docs)] // documentation missing in model
|
5850 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3776 5851 | pub fn default_map(
|
3777 5852 | mut self,
|
3778 5853 | input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3779 5854 | ) -> Self {
|
3780 - | self.default_map = Some(input);
|
5855 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5856 + | self.default_map =
|
5857 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5858 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5859 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5860 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3781 5861 | self
|
5862 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3782 5863 | }
|
5864 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3783 5865 | #[allow(missing_docs)] // documentation missing in model
|
5866 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3784 5867 | pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
|
3785 - | self.default_enum = Some(input);
|
5868 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5869 + | self.default_enum =
|
5870 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5871 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5872 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5873 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3786 5874 | self
|
5875 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3787 5876 | }
|
5877 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3788 5878 | #[allow(missing_docs)] // documentation missing in model
|
5879 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3789 5880 | pub fn default_int_enum(mut self, input: i32) -> Self {
|
3790 - | self.default_int_enum = Some(input);
|
5881 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5882 + | self.default_int_enum =
|
5883 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5884 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5885 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5886 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3791 5887 | self
|
5888 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3792 5889 | }
|
5890 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3793 5891 | #[allow(missing_docs)] // documentation missing in model
|
5892 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3794 5893 | pub fn empty_string(mut self, input: ::std::string::String) -> Self {
|
3795 - | self.empty_string = Some(input);
|
5894 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5895 + | self.empty_string =
|
5896 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5897 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5898 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5899 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3796 5900 | self
|
5901 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3797 5902 | }
|
5903 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3798 5904 | #[allow(missing_docs)] // documentation missing in model
|
5905 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3799 5906 | pub fn false_boolean(mut self, input: bool) -> Self {
|
3800 - | self.false_boolean = Some(input);
|
5907 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5908 + | self.false_boolean =
|
5909 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5910 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5911 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5912 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3801 5913 | self
|
5914 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3802 5915 | }
|
5916 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3803 5917 | #[allow(missing_docs)] // documentation missing in model
|
5918 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3804 5919 | pub fn empty_blob(mut self, input: ::aws_smithy_http_server_python::types::Blob) -> Self {
|
3805 - | self.empty_blob = Some(input);
|
5920 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5921 + | self.empty_blob =
|
5922 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5923 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5924 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5925 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3806 5926 | self
|
5927 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3807 5928 | }
|
5929 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3808 5930 | #[allow(missing_docs)] // documentation missing in model
|
5931 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3809 5932 | pub fn zero_byte(mut self, input: i8) -> Self {
|
3810 - | self.zero_byte = Some(input);
|
5933 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5934 + | self.zero_byte =
|
5935 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5936 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5937 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5938 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3811 5939 | self
|
5940 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3812 5941 | }
|
5942 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3813 5943 | #[allow(missing_docs)] // documentation missing in model
|
5944 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3814 5945 | pub fn zero_short(mut self, input: i16) -> Self {
|
3815 - | self.zero_short = Some(input);
|
5946 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5947 + | self.zero_short =
|
5948 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5949 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5950 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5951 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3816 5952 | self
|
5953 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3817 5954 | }
|
5955 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3818 5956 | #[allow(missing_docs)] // documentation missing in model
|
5957 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3819 5958 | pub fn zero_integer(mut self, input: i32) -> Self {
|
3820 - | self.zero_integer = Some(input);
|
5959 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5960 + | self.zero_integer =
|
5961 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5962 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5963 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5964 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3821 5965 | self
|
5966 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3822 5967 | }
|
5968 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3823 5969 | #[allow(missing_docs)] // documentation missing in model
|
5970 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3824 5971 | pub fn zero_long(mut self, input: i64) -> Self {
|
3825 - | self.zero_long = Some(input);
|
5972 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5973 + | self.zero_long =
|
5974 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5975 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5976 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5977 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3826 5978 | self
|
5979 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3827 5980 | }
|
5981 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3828 5982 | #[allow(missing_docs)] // documentation missing in model
|
5983 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3829 5984 | pub fn zero_float(mut self, input: f32) -> Self {
|
3830 - | self.zero_float = Some(input);
|
5985 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5986 + | self.zero_float =
|
5987 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
5988 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
5989 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
5990 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3831 5991 | self
|
5992 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3832 5993 | }
|
5994 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3833 5995 | #[allow(missing_docs)] // documentation missing in model
|
5996 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3834 5997 | pub fn zero_double(mut self, input: f64) -> Self {
|
3835 - | self.zero_double = Some(input);
|
5998 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
5999 + | self.zero_double =
|
6000 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
6001 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
6002 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
6003 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3836 6004 | self
|
6005 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3837 6006 | }
|
3838 - | /// Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
6007 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
6008 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
3839 6009 | pub fn build(self) -> crate::model::Defaults {
|
3840 6010 | self.build_enforcing_required_and_enum_traits()
|
3841 6011 | }
|
6012 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
3842 6013 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::Defaults {
|
6014 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
3843 6015 | crate::model::Defaults {
|
3844 - | default_string: self.default_string.unwrap_or_else(
|
6016 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6017 + | default_string: self
|
6018 + | .default_string
|
6019 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
6020 + | .unwrap_or_else(
|
3845 6021 | #[allow(clippy::redundant_closure)]
|
3846 6022 | || String::from("hi"),
|
3847 6023 | ),
|
3848 - | default_boolean: self.default_boolean.unwrap_or(true),
|
3849 - | default_list: self.default_list.unwrap_or_else(
|
3850 - | #[allow(clippy::redundant_closure)]
|
3851 - | || ::std::vec::Vec::new(),
|
3852 - | ),
|
3853 - | default_document_map: self.default_document_map.unwrap_or_else(
|
6024 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6025 + | default_boolean: self
|
6026 + | .default_boolean
|
6027 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6028 + | .unwrap_or(true),
|
6029 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6030 + | default_list: self
|
6031 + | .default_list
|
6032 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
6033 + | .unwrap_or_default(),
|
6034 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6035 + | default_document_map: self
|
6036 + | .default_document_map
|
6037 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
6038 + | .unwrap_or_else(
|
3854 6039 | #[allow(clippy::redundant_closure)]
|
3855 6040 | || {
|
3856 6041 | ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
|
3857 6042 | .into()
|
3858 6043 | },
|
3859 6044 | ),
|
3860 - | default_document_string: self.default_document_string.unwrap_or_else(
|
6045 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6046 + | default_document_string: self
|
6047 + | .default_document_string
|
6048 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
6049 + | .unwrap_or_else(
|
3861 6050 | #[allow(clippy::redundant_closure)]
|
3862 6051 | || {
|
3863 6052 | ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
|
3864 6053 | .into()
|
3865 6054 | },
|
3866 6055 | ),
|
6056 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
3867 6057 | default_document_boolean: self
|
3868 6058 | .default_document_boolean
|
6059 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3869 6060 | .unwrap_or(::aws_smithy_types::Document::Bool(true).into()),
|
3870 - | default_document_list: self.default_document_list.unwrap_or_else(
|
6061 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6062 + | default_document_list: self
|
6063 + | .default_document_list
|
6064 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
6065 + | .unwrap_or_else(
|
3871 6066 | #[allow(clippy::redundant_closure)]
|
3872 6067 | || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()).into(),
|
3873 6068 | ),
|
6069 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
3874 6070 | default_null_document: self.default_null_document,
|
3875 - | default_timestamp: self.default_timestamp.unwrap_or_else(
|
6071 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6072 + | default_timestamp: self
|
6073 + | .default_timestamp
|
6074 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
6075 + | .unwrap_or_else(
|
3876 6076 | #[allow(clippy::redundant_closure)]
|
3877 6077 | || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64).into(),
|
3878 6078 | ),
|
3879 - | default_blob: self.default_blob.unwrap_or_else(
|
6079 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6080 + | default_blob: self
|
6081 + | .default_blob
|
6082 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
6083 + | .unwrap_or_else(
|
3880 6084 | #[allow(clippy::redundant_closure)]
|
3881 6085 | || ::aws_smithy_types::Blob::new("abc").into(),
|
3882 6086 | ),
|
3883 - | default_byte: self.default_byte.unwrap_or(1i8),
|
3884 - | default_short: self.default_short.unwrap_or(1i16),
|
3885 - | default_integer: self.default_integer.unwrap_or(10i32),
|
3886 - | default_long: self.default_long.unwrap_or(100i64),
|
3887 - | default_float: self.default_float.unwrap_or(1.0f32),
|
3888 - | default_double: self.default_double.unwrap_or(1.0f64),
|
3889 - | default_map: self.default_map.unwrap_or_else(
|
3890 - | #[allow(clippy::redundant_closure)]
|
3891 - | || ::std::collections::HashMap::new(),
|
3892 - | ),
|
3893 - | default_enum: self.default_enum.unwrap_or(
|
6087 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6088 + | default_byte: self
|
6089 + | .default_byte
|
6090 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6091 + | .unwrap_or(1i8),
|
6092 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6093 + | default_short: self
|
6094 + | .default_short
|
6095 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6096 + | .unwrap_or(1i16),
|
6097 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6098 + | default_integer: self
|
6099 + | .default_integer
|
6100 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6101 + | .unwrap_or(10i32),
|
6102 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6103 + | default_long: self
|
6104 + | .default_long
|
6105 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6106 + | .unwrap_or(100i64),
|
6107 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6108 + | default_float: self
|
6109 + | .default_float
|
6110 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6111 + | .unwrap_or(1.0f32),
|
6112 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6113 + | default_double: self
|
6114 + | .default_double
|
6115 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6116 + | .unwrap_or(1.0f64),
|
6117 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6118 + | default_map: self
|
6119 + | .default_map
|
6120 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
6121 + | .unwrap_or_default(),
|
6122 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6123 + | default_enum: self
|
6124 + | .default_enum
|
6125 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6126 + | .unwrap_or(
|
3894 6127 | "FOO"
|
3895 6128 | .parse::<crate::model::TestEnum>()
|
3896 6129 | .expect("static value validated to member"),
|
3897 6130 | ),
|
3898 - | default_int_enum: self.default_int_enum.unwrap_or(1i32),
|
3899 - | empty_string: self.empty_string.unwrap_or_else(
|
6131 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6132 + | default_int_enum: self
|
6133 + | .default_int_enum
|
6134 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6135 + | .unwrap_or(1i32),
|
6136 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6137 + | empty_string: self
|
6138 + | .empty_string
|
6139 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
6140 + | .unwrap_or_else(
|
3900 6141 | #[allow(clippy::redundant_closure)]
|
3901 6142 | || String::from(""),
|
3902 6143 | ),
|
3903 - | false_boolean: self.false_boolean.unwrap_or(false),
|
3904 - | empty_blob: self.empty_blob.unwrap_or_else(
|
6144 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6145 + | false_boolean: self
|
6146 + | .false_boolean
|
6147 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6148 + | .unwrap_or(false),
|
6149 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6150 + | empty_blob: self
|
6151 + | .empty_blob
|
6152 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
6153 + | .unwrap_or_else(
|
3905 6154 | #[allow(clippy::redundant_closure)]
|
3906 6155 | || ::aws_smithy_types::Blob::new("").into(),
|
3907 6156 | ),
|
3908 - | zero_byte: self.zero_byte.unwrap_or(0i8),
|
3909 - | zero_short: self.zero_short.unwrap_or(0i16),
|
3910 - | zero_integer: self.zero_integer.unwrap_or(0i32),
|
3911 - | zero_long: self.zero_long.unwrap_or(0i64),
|
3912 - | zero_float: self.zero_float.unwrap_or(0.0f32),
|
3913 - | zero_double: self.zero_double.unwrap_or(0.0f64),
|
3914 - | }
|
3915 - | }
|
3916 - | }
|
3917 - | }
|
3918 - | /// See [`PayloadConfig`](crate::model::PayloadConfig).
|
6157 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6158 + | zero_byte: self
|
6159 + | .zero_byte
|
6160 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6161 + | .unwrap_or(0i8),
|
6162 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6163 + | zero_short: self
|
6164 + | .zero_short
|
6165 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6166 + | .unwrap_or(0i16),
|
6167 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6168 + | zero_integer: self
|
6169 + | .zero_integer
|
6170 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6171 + | .unwrap_or(0i32),
|
6172 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6173 + | zero_long: self
|
6174 + | .zero_long
|
6175 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6176 + | .unwrap_or(0i64),
|
6177 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6178 + | zero_float: self
|
6179 + | .zero_float
|
6180 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6181 + | .unwrap_or(0.0f32),
|
6182 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6183 + | zero_double: self
|
6184 + | .zero_double
|
6185 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
6186 + | .unwrap_or(0.0f64),
|
6187 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
6188 + | }
|
6189 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
6190 + | }
|
6191 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
6192 + | }
|
6193 + |
|
6194 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
6195 + | }
|
6196 + | /// /* ServerBuilderGenerator.kt:171 */See [`PayloadConfig`](crate::model::PayloadConfig).
|
3919 6197 | pub(crate) mod payload_config_internal {
|
3920 6198 |
|
6199 + | /* ServerBuilderGenerator.kt:461 */
|
3921 6200 | impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
|
3922 6201 | fn from(builder: Builder) -> Self {
|
3923 6202 | builder.build()
|
3924 6203 | }
|
3925 6204 | }
|
3926 - | /// A builder for [`PayloadConfig`](crate::model::PayloadConfig).
|
6205 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`PayloadConfig`](crate::model::PayloadConfig).
|
6206 + | /* RustType.kt:516 */
|
3927 6207 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6208 + | /* ServerBuilderGenerator.kt:211 */
|
3928 6209 | pub(crate) struct Builder {
|
6210 + | /* ServerBuilderGenerator.kt:308 */
|
3929 6211 | pub(crate) data: ::std::option::Option<i32>,
|
6212 + | /* ServerBuilderGenerator.kt:211 */
|
3930 6213 | }
|
6214 + | /* ServerBuilderGenerator.kt:215 */
|
3931 6215 | impl Builder {
|
6216 + | /* ServerBuilderGenerator.kt:426 */
|
3932 6217 | #[allow(missing_docs)] // documentation missing in model
|
6218 + | /* ServerBuilderGenerator.kt:428 */
|
3933 6219 | pub(crate) fn set_data(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
6220 + | /* ServerBuilderGenerator.kt:429 */
|
3934 6221 | self.data = input.map(|v| v.into());
|
3935 6222 | self
|
6223 + | /* ServerBuilderGenerator.kt:428 */
|
3936 6224 | }
|
3937 - | /// Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
|
6225 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
|
6226 + | /* ServerBuilderGenerator.kt:271 */
|
3938 6227 | pub fn build(self) -> crate::model::PayloadConfig {
|
3939 6228 | self.build_enforcing_all_constraints()
|
3940 6229 | }
|
6230 + | /* ServerBuilderGenerator.kt:283 */
|
3941 6231 | fn build_enforcing_all_constraints(self) -> crate::model::PayloadConfig {
|
3942 - | crate::model::PayloadConfig { data: self.data }
|
6232 + | /* ServerBuilderGenerator.kt:542 */
|
6233 + | crate::model::PayloadConfig {
|
6234 + | /* ServerBuilderGenerator.kt:546 */
|
6235 + | data: self.data,
|
6236 + | /* ServerBuilderGenerator.kt:542 */
|
6237 + | }
|
6238 + | /* ServerBuilderGenerator.kt:283 */
|
3943 6239 | }
|
6240 + | /* ServerBuilderGenerator.kt:215 */
|
3944 6241 | }
|
6242 + |
|
6243 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3945 6244 | }
|
3946 - | /// See [`PayloadConfig`](crate::model::PayloadConfig).
|
6245 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`PayloadConfig`](crate::model::PayloadConfig).
|
3947 6246 | pub mod payload_config {
|
3948 6247 |
|
6248 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
3949 6249 | impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
|
3950 6250 | fn from(builder: Builder) -> Self {
|
3951 6251 | builder.build()
|
3952 6252 | }
|
3953 6253 | }
|
3954 - | /// A builder for [`PayloadConfig`](crate::model::PayloadConfig).
|
6254 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`PayloadConfig`](crate::model::PayloadConfig).
|
6255 + | /* RustType.kt:516 */
|
3955 6256 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6257 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
3956 6258 | pub struct Builder {
|
6259 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
3957 6260 | pub(crate) data: ::std::option::Option<i32>,
|
6261 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
3958 6262 | }
|
6263 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
3959 6264 | impl Builder {
|
6265 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
3960 6266 | #[allow(missing_docs)] // documentation missing in model
|
6267 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3961 6268 | pub fn data(mut self, input: ::std::option::Option<i32>) -> Self {
|
3962 - | self.data = input;
|
6269 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
6270 + | self.data =
|
6271 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
6272 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
3963 6273 | self
|
6274 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
3964 6275 | }
|
3965 - | /// Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
|
6276 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
|
6277 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
3966 6278 | pub fn build(self) -> crate::model::PayloadConfig {
|
3967 6279 | self.build_enforcing_required_and_enum_traits()
|
3968 6280 | }
|
6281 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
3969 6282 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::PayloadConfig {
|
3970 - | crate::model::PayloadConfig { data: self.data }
|
6283 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
6284 + | crate::model::PayloadConfig {
|
6285 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6286 + | data: self.data,
|
6287 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
6288 + | }
|
6289 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
3971 6290 | }
|
6291 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
3972 6292 | }
|
6293 + |
|
6294 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
3973 6295 | }
|
3974 - | /// See [`TestConfig`](crate::model::TestConfig).
|
6296 + | /// /* ServerBuilderGenerator.kt:171 */See [`TestConfig`](crate::model::TestConfig).
|
3975 6297 | pub(crate) mod test_config_internal {
|
3976 6298 |
|
6299 + | /* ServerBuilderGenerator.kt:461 */
|
3977 6300 | impl ::std::convert::From<Builder> for crate::model::TestConfig {
|
3978 6301 | fn from(builder: Builder) -> Self {
|
3979 6302 | builder.build()
|
3980 6303 | }
|
3981 6304 | }
|
3982 - | /// A builder for [`TestConfig`](crate::model::TestConfig).
|
6305 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`TestConfig`](crate::model::TestConfig).
|
6306 + | /* RustType.kt:516 */
|
3983 6307 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6308 + | /* ServerBuilderGenerator.kt:211 */
|
3984 6309 | pub(crate) struct Builder {
|
6310 + | /* ServerBuilderGenerator.kt:308 */
|
3985 6311 | pub(crate) timeout: ::std::option::Option<i32>,
|
6312 + | /* ServerBuilderGenerator.kt:211 */
|
3986 6313 | }
|
6314 + | /* ServerBuilderGenerator.kt:215 */
|
3987 6315 | impl Builder {
|
6316 + | /* ServerBuilderGenerator.kt:426 */
|
3988 6317 | #[allow(missing_docs)] // documentation missing in model
|
6318 + | /* ServerBuilderGenerator.kt:428 */
|
3989 6319 | pub(crate) fn set_timeout(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
6320 + | /* ServerBuilderGenerator.kt:429 */
|
3990 6321 | self.timeout = input.map(|v| v.into());
|
3991 6322 | self
|
6323 + | /* ServerBuilderGenerator.kt:428 */
|
3992 6324 | }
|
3993 - | /// Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
|
6325 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
|
6326 + | /* ServerBuilderGenerator.kt:271 */
|
3994 6327 | pub fn build(self) -> crate::model::TestConfig {
|
3995 6328 | self.build_enforcing_all_constraints()
|
3996 6329 | }
|
6330 + | /* ServerBuilderGenerator.kt:283 */
|
3997 6331 | fn build_enforcing_all_constraints(self) -> crate::model::TestConfig {
|
6332 + | /* ServerBuilderGenerator.kt:542 */
|
3998 6333 | crate::model::TestConfig {
|
6334 + | /* ServerBuilderGenerator.kt:546 */
|
3999 6335 | timeout: self.timeout,
|
6336 + | /* ServerBuilderGenerator.kt:542 */
|
4000 6337 | }
|
6338 + | /* ServerBuilderGenerator.kt:283 */
|
4001 6339 | }
|
6340 + | /* ServerBuilderGenerator.kt:215 */
|
4002 6341 | }
|
6342 + |
|
6343 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4003 6344 | }
|
4004 - | /// See [`TestConfig`](crate::model::TestConfig).
|
6345 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`TestConfig`](crate::model::TestConfig).
|
4005 6346 | pub mod test_config {
|
4006 6347 |
|
6348 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4007 6349 | impl ::std::convert::From<Builder> for crate::model::TestConfig {
|
4008 6350 | fn from(builder: Builder) -> Self {
|
4009 6351 | builder.build()
|
4010 6352 | }
|
4011 6353 | }
|
4012 - | /// A builder for [`TestConfig`](crate::model::TestConfig).
|
6354 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`TestConfig`](crate::model::TestConfig).
|
6355 + | /* RustType.kt:516 */
|
4013 6356 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6357 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4014 6358 | pub struct Builder {
|
6359 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4015 6360 | pub(crate) timeout: ::std::option::Option<i32>,
|
6361 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4016 6362 | }
|
6363 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4017 6364 | impl Builder {
|
6365 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4018 6366 | #[allow(missing_docs)] // documentation missing in model
|
6367 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4019 6368 | pub fn timeout(mut self, input: ::std::option::Option<i32>) -> Self {
|
4020 - | self.timeout = input;
|
6369 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
6370 + | self.timeout =
|
6371 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
6372 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4021 6373 | self
|
6374 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4022 6375 | }
|
4023 - | /// Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
|
6376 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
|
6377 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4024 6378 | pub fn build(self) -> crate::model::TestConfig {
|
4025 6379 | self.build_enforcing_required_and_enum_traits()
|
4026 6380 | }
|
6381 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4027 6382 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::TestConfig {
|
6383 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4028 6384 | crate::model::TestConfig {
|
6385 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4029 6386 | timeout: self.timeout,
|
6387 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4030 6388 | }
|
6389 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4031 6390 | }
|
6391 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4032 6392 | }
|
6393 + |
|
6394 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4033 6395 | }
|
4034 - | /// See [`Unit`](crate::model::Unit).
|
6396 + | /// /* ServerBuilderGenerator.kt:171 */See [`Unit`](crate::model::Unit).
|
4035 6397 | pub(crate) mod unit_internal {
|
4036 6398 |
|
6399 + | /* ServerBuilderGenerator.kt:461 */
|
4037 6400 | impl ::std::convert::From<Builder> for crate::model::Unit {
|
4038 6401 | fn from(builder: Builder) -> Self {
|
4039 6402 | builder.build()
|
4040 6403 | }
|
4041 6404 | }
|
4042 - | /// A builder for [`Unit`](crate::model::Unit).
|
6405 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Unit`](crate::model::Unit).
|
6406 + | /* RustType.kt:516 */
|
4043 6407 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4044 - | pub(crate) struct Builder {}
|
6408 + | /* ServerBuilderGenerator.kt:211 */
|
6409 + | pub(crate) struct Builder {/* ServerBuilderGenerator.kt:211 */}
|
6410 + | /* ServerBuilderGenerator.kt:215 */
|
4045 6411 | impl Builder {
|
4046 - | /// Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
6412 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
6413 + | /* ServerBuilderGenerator.kt:271 */
|
4047 6414 | pub fn build(self) -> crate::model::Unit {
|
4048 6415 | self.build_enforcing_all_constraints()
|
4049 6416 | }
|
6417 + | /* ServerBuilderGenerator.kt:283 */
|
4050 6418 | fn build_enforcing_all_constraints(self) -> crate::model::Unit {
|
4051 - | crate::model::Unit {}
|
6419 + | /* ServerBuilderGenerator.kt:542 */
|
6420 + | crate::model::Unit {
|
6421 + | /* ServerBuilderGenerator.kt:542 */}
|
6422 + | /* ServerBuilderGenerator.kt:283 */
|
4052 6423 | }
|
6424 + | /* ServerBuilderGenerator.kt:215 */
|
4053 6425 | }
|
6426 + |
|
6427 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4054 6428 | }
|
4055 - | /// See [`Unit`](crate::model::Unit).
|
6429 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`Unit`](crate::model::Unit).
|
4056 6430 | pub mod unit {
|
4057 6431 |
|
6432 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4058 6433 | impl ::std::convert::From<Builder> for crate::model::Unit {
|
4059 6434 | fn from(builder: Builder) -> Self {
|
4060 6435 | builder.build()
|
4061 6436 | }
|
4062 6437 | }
|
4063 - | /// A builder for [`Unit`](crate::model::Unit).
|
6438 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`Unit`](crate::model::Unit).
|
6439 + | /* RustType.kt:516 */
|
4064 6440 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4065 - | pub struct Builder {}
|
6441 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
6442 + | pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
|
6443 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4066 6444 | impl Builder {
|
4067 - | /// Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
6445 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`Unit`](crate::model::Unit).
|
6446 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4068 6447 | pub fn build(self) -> crate::model::Unit {
|
4069 6448 | self.build_enforcing_required_and_enum_traits()
|
4070 6449 | }
|
6450 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4071 6451 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::Unit {
|
4072 - | crate::model::Unit {}
|
6452 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
6453 + | crate::model::Unit {
|
6454 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
|
6455 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4073 6456 | }
|
6457 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4074 6458 | }
|
6459 + |
|
6460 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4075 6461 | }
|
4076 6462 | pub(crate) mod my_union_internal {
|
4077 6463 |
|
6464 + | /* RustType.kt:516 */
|
4078 6465 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6466 + | /* UnconstrainedUnionGenerator.kt:150 */
|
4079 6467 | #[allow(clippy::enum_variant_names)]
|
4080 6468 | pub(crate) enum ConstraintViolation {
|
6469 + | /* UnconstrainedUnionGenerator.kt:218 */
|
4081 6470 | EnumValue(crate::model::foo_enum_internal::ConstraintViolation),
|
6471 + | /* UnconstrainedUnionGenerator.kt:150 */
|
4082 6472 | }
|
6473 + | /* UnconstrainedUnionGenerator.kt:158 */
|
4083 6474 | impl ::std::fmt::Display for ConstraintViolation {
|
4084 6475 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4085 6476 | match self {
|
4086 6477 | Self::EnumValue(inner) => write!(f, "{inner}"),
|
4087 6478 | }
|
4088 6479 | }
|
4089 6480 | }
|
4090 6481 |
|
4091 6482 | impl ::std::error::Error for ConstraintViolation {}
|
6483 + | /* UnconstrainedUnionGenerator.kt:176 */
|
4092 6484 | impl ConstraintViolation {
|
4093 6485 | pub(crate) fn as_validation_exception_field(
|
4094 6486 | self,
|
4095 6487 | path: ::std::string::String,
|
4096 6488 | ) -> crate::model::ValidationExceptionField {
|
4097 6489 | match self {
|
4098 6490 | Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
|
4099 6491 | }
|
4100 6492 | }
|
4101 6493 | }
|
6494 + |
|
6495 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4102 6496 | }
|
4103 - | /// See [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6497 + | /// /* ServerBuilderGenerator.kt:171 */See [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4104 6498 | pub(crate) mod renamed_greeting_internal {
|
4105 6499 |
|
6500 + | /* ServerBuilderGenerator.kt:461 */
|
4106 6501 | impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
|
4107 6502 | fn from(builder: Builder) -> Self {
|
4108 6503 | builder.build()
|
4109 6504 | }
|
4110 6505 | }
|
4111 - | /// A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6506 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6507 + | /* RustType.kt:516 */
|
4112 6508 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6509 + | /* ServerBuilderGenerator.kt:211 */
|
4113 6510 | pub(crate) struct Builder {
|
6511 + | /* ServerBuilderGenerator.kt:308 */
|
4114 6512 | pub(crate) salutation: ::std::option::Option<::std::string::String>,
|
6513 + | /* ServerBuilderGenerator.kt:211 */
|
4115 6514 | }
|
6515 + | /* ServerBuilderGenerator.kt:215 */
|
4116 6516 | impl Builder {
|
6517 + | /* ServerBuilderGenerator.kt:426 */
|
4117 6518 | #[allow(missing_docs)] // documentation missing in model
|
6519 + | /* ServerBuilderGenerator.kt:428 */
|
4118 6520 | pub(crate) fn set_salutation(
|
4119 6521 | mut self,
|
4120 6522 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4121 6523 | ) -> Self {
|
6524 + | /* ServerBuilderGenerator.kt:429 */
|
4122 6525 | self.salutation = input.map(|v| v.into());
|
4123 6526 | self
|
6527 + | /* ServerBuilderGenerator.kt:428 */
|
4124 6528 | }
|
4125 - | /// Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6529 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6530 + | /* ServerBuilderGenerator.kt:271 */
|
4126 6531 | pub fn build(self) -> crate::model::RenamedGreeting {
|
4127 6532 | self.build_enforcing_all_constraints()
|
4128 6533 | }
|
6534 + | /* ServerBuilderGenerator.kt:283 */
|
4129 6535 | fn build_enforcing_all_constraints(self) -> crate::model::RenamedGreeting {
|
6536 + | /* ServerBuilderGenerator.kt:542 */
|
4130 6537 | crate::model::RenamedGreeting {
|
6538 + | /* ServerBuilderGenerator.kt:546 */
|
4131 6539 | salutation: self.salutation,
|
6540 + | /* ServerBuilderGenerator.kt:542 */
|
4132 6541 | }
|
6542 + | /* ServerBuilderGenerator.kt:283 */
|
4133 6543 | }
|
6544 + | /* ServerBuilderGenerator.kt:215 */
|
4134 6545 | }
|
6546 + |
|
6547 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4135 6548 | }
|
4136 - | /// See [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6549 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`RenamedGreeting`](crate::model::RenamedGreeting).
|
4137 6550 | pub mod renamed_greeting {
|
4138 6551 |
|
6552 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4139 6553 | impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
|
4140 6554 | fn from(builder: Builder) -> Self {
|
4141 6555 | builder.build()
|
4142 6556 | }
|
4143 6557 | }
|
4144 - | /// A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6558 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6559 + | /* RustType.kt:516 */
|
4145 6560 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6561 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4146 6562 | pub struct Builder {
|
6563 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4147 6564 | pub(crate) salutation: ::std::option::Option<::std::string::String>,
|
6565 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4148 6566 | }
|
6567 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4149 6568 | impl Builder {
|
6569 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4150 6570 | #[allow(missing_docs)] // documentation missing in model
|
6571 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4151 6572 | pub fn salutation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4152 - | self.salutation = input;
|
6573 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
6574 + | self.salutation =
|
6575 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
6576 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4153 6577 | self
|
6578 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4154 6579 | }
|
4155 - | /// Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6580 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
|
6581 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4156 6582 | pub fn build(self) -> crate::model::RenamedGreeting {
|
4157 6583 | self.build_enforcing_required_and_enum_traits()
|
4158 6584 | }
|
6585 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4159 6586 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::RenamedGreeting {
|
6587 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4160 6588 | crate::model::RenamedGreeting {
|
6589 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4161 6590 | salutation: self.salutation,
|
6591 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4162 6592 | }
|
6593 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4163 6594 | }
|
6595 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4164 6596 | }
|
6597 + |
|
6598 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4165 6599 | }
|
4166 - | /// See [`GreetingStruct`](crate::model::GreetingStruct).
|
6600 + | /// /* ServerBuilderGenerator.kt:171 */See [`GreetingStruct`](crate::model::GreetingStruct).
|
4167 6601 | pub(crate) mod greeting_struct_internal {
|
4168 6602 |
|
6603 + | /* ServerBuilderGenerator.kt:461 */
|
4169 6604 | impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
|
4170 6605 | fn from(builder: Builder) -> Self {
|
4171 6606 | builder.build()
|
4172 6607 | }
|
4173 6608 | }
|
4174 - | /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
6609 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
6610 + | /* RustType.kt:516 */
|
4175 6611 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6612 + | /* ServerBuilderGenerator.kt:211 */
|
4176 6613 | pub(crate) struct Builder {
|
6614 + | /* ServerBuilderGenerator.kt:308 */
|
4177 6615 | pub(crate) hi: ::std::option::Option<::std::string::String>,
|
6616 + | /* ServerBuilderGenerator.kt:211 */
|
4178 6617 | }
|
6618 + | /* ServerBuilderGenerator.kt:215 */
|
4179 6619 | impl Builder {
|
6620 + | /* ServerBuilderGenerator.kt:426 */
|
4180 6621 | #[allow(missing_docs)] // documentation missing in model
|
6622 + | /* ServerBuilderGenerator.kt:428 */
|
4181 6623 | pub(crate) fn set_hi(
|
4182 6624 | mut self,
|
4183 6625 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4184 6626 | ) -> Self {
|
6627 + | /* ServerBuilderGenerator.kt:429 */
|
4185 6628 | self.hi = input.map(|v| v.into());
|
4186 6629 | self
|
6630 + | /* ServerBuilderGenerator.kt:428 */
|
4187 6631 | }
|
4188 - | /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
6632 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
6633 + | /* ServerBuilderGenerator.kt:271 */
|
4189 6634 | pub fn build(self) -> crate::model::GreetingStruct {
|
4190 6635 | self.build_enforcing_all_constraints()
|
4191 6636 | }
|
6637 + | /* ServerBuilderGenerator.kt:283 */
|
4192 6638 | fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
|
4193 - | crate::model::GreetingStruct { hi: self.hi }
|
6639 + | /* ServerBuilderGenerator.kt:542 */
|
6640 + | crate::model::GreetingStruct {
|
6641 + | /* ServerBuilderGenerator.kt:546 */
|
6642 + | hi: self.hi,
|
6643 + | /* ServerBuilderGenerator.kt:542 */
|
6644 + | }
|
6645 + | /* ServerBuilderGenerator.kt:283 */
|
4194 6646 | }
|
6647 + | /* ServerBuilderGenerator.kt:215 */
|
4195 6648 | }
|
6649 + |
|
6650 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4196 6651 | }
|
4197 - | /// See [`GreetingStruct`](crate::model::GreetingStruct).
|
6652 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`GreetingStruct`](crate::model::GreetingStruct).
|
4198 6653 | pub mod greeting_struct {
|
4199 6654 |
|
6655 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4200 6656 | impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
|
4201 6657 | fn from(builder: Builder) -> Self {
|
4202 6658 | builder.build()
|
4203 6659 | }
|
4204 6660 | }
|
4205 - | /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
6661 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
6662 + | /* RustType.kt:516 */
|
4206 6663 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6664 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4207 6665 | pub struct Builder {
|
6666 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4208 6667 | pub(crate) hi: ::std::option::Option<::std::string::String>,
|
6668 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4209 6669 | }
|
6670 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4210 6671 | impl Builder {
|
6672 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4211 6673 | #[allow(missing_docs)] // documentation missing in model
|
6674 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4212 6675 | pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4213 - | self.hi = input;
|
6676 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
6677 + | self.hi =
|
6678 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
6679 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4214 6680 | self
|
6681 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4215 6682 | }
|
4216 - | /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
6683 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
6684 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4217 6685 | pub fn build(self) -> crate::model::GreetingStruct {
|
4218 6686 | self.build_enforcing_required_and_enum_traits()
|
4219 6687 | }
|
6688 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4220 6689 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::GreetingStruct {
|
4221 - | crate::model::GreetingStruct { hi: self.hi }
|
6690 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
6691 + | crate::model::GreetingStruct {
|
6692 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
6693 + | hi: self.hi,
|
6694 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4222 6695 | }
|
6696 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4223 6697 | }
|
6698 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
6699 + | }
|
6700 + |
|
6701 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4224 6702 | }
|
4225 6703 | pub(crate) mod sparse_set_map_internal {
|
4226 6704 |
|
6705 + | /* MapConstraintViolationGenerator.kt:82 */
|
4227 6706 | #[allow(clippy::enum_variant_names)]
|
4228 6707 | #[derive(Debug, PartialEq)]
|
4229 6708 | pub(crate) enum ConstraintViolation {
|
4230 6709 | #[doc(hidden)]
|
4231 6710 | Value(
|
4232 6711 | ::std::string::String,
|
4233 6712 | crate::model::string_set_internal::ConstraintViolation,
|
4234 6713 | ),
|
4235 6714 | }
|
4236 6715 |
|
4237 6716 | impl ::std::fmt::Display for ConstraintViolation {
|
4238 6717 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4239 6718 | match self {
|
4240 6719 | Self::Value(_, value_constraint_violation) => {
|
4241 6720 | write!(f, "{}", value_constraint_violation)
|
4242 6721 | }
|
4243 6722 | }
|
4244 6723 | }
|
4245 6724 | }
|
4246 6725 |
|
4247 6726 | impl ::std::error::Error for ConstraintViolation {}
|
6727 + | /* MapConstraintViolationGenerator.kt:111 */
|
4248 6728 | impl ConstraintViolation {
|
4249 6729 | pub(crate) fn as_validation_exception_field(
|
4250 6730 | self,
|
4251 6731 | path: ::std::string::String,
|
4252 6732 | ) -> crate::model::ValidationExceptionField {
|
4253 6733 | match self {
|
4254 6734 | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
4255 6735 | .as_validation_exception_field(path + "/" + key.as_str()),
|
4256 6736 | }
|
4257 6737 | }
|
4258 6738 | }
|
6739 + |
|
6740 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4259 6741 | }
|
4260 6742 | pub(crate) mod string_set_internal {
|
4261 6743 |
|
6744 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4262 6745 | #[allow(clippy::enum_variant_names)]
|
4263 6746 | #[derive(Debug, PartialEq)]
|
4264 6747 | pub(crate) enum ConstraintViolation {
|
4265 6748 | /// Constraint violation error when the list does not contain unique items
|
4266 6749 | UniqueItems {
|
4267 6750 | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
4268 6751 | /// at least two elements.
|
4269 6752 | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
4270 6753 | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
4271 6754 | /// Nothing is guaranteed about the order of the indices.
|
4272 6755 | duplicate_indices: ::std::vec::Vec<usize>,
|
4273 6756 | /// The original vector, that contains duplicate items.
|
4274 6757 | original: ::std::vec::Vec<::std::string::String>,
|
4275 6758 | },
|
4276 6759 | }
|
4277 6760 |
|
4278 6761 | impl ::std::fmt::Display for ConstraintViolation {
|
4279 6762 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4280 6763 | let message = match self {
|
4281 6764 | Self::UniqueItems { duplicate_indices, .. } =>
|
4282 6765 | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#StringSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
4283 6766 | };
|
4284 6767 | write!(f, "{message}")
|
4285 6768 | }
|
4286 6769 | }
|
4287 6770 |
|
4288 6771 | impl ::std::error::Error for ConstraintViolation {}
|
6772 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4289 6773 | impl ConstraintViolation {
|
4290 6774 | pub(crate) fn as_validation_exception_field(
|
4291 6775 | self,
|
4292 6776 | path: ::std::string::String,
|
4293 6777 | ) -> crate::model::ValidationExceptionField {
|
4294 6778 | match self {
|
4295 6779 | Self::UniqueItems { duplicate_indices, .. } =>
|
4296 6780 | crate::model::ValidationExceptionField {
|
4297 6781 | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
4298 6782 | path,
|
4299 6783 | },
|
4300 6784 | }
|
4301 6785 | }
|
4302 6786 | }
|
6787 + |
|
6788 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4303 6789 | }
|
4304 6790 | pub(crate) mod dense_set_map_internal {
|
4305 6791 |
|
6792 + | /* MapConstraintViolationGenerator.kt:82 */
|
4306 6793 | #[allow(clippy::enum_variant_names)]
|
4307 6794 | #[derive(Debug, PartialEq)]
|
4308 6795 | pub(crate) enum ConstraintViolation {
|
4309 6796 | #[doc(hidden)]
|
4310 6797 | Value(
|
4311 6798 | ::std::string::String,
|
4312 6799 | crate::model::string_set_internal::ConstraintViolation,
|
4313 6800 | ),
|
4314 6801 | }
|
4315 6802 |
|
4316 6803 | impl ::std::fmt::Display for ConstraintViolation {
|
4317 6804 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4318 6805 | match self {
|
4319 6806 | Self::Value(_, value_constraint_violation) => {
|
4320 6807 | write!(f, "{}", value_constraint_violation)
|
4321 6808 | }
|
4322 6809 | }
|
4323 6810 | }
|
4324 6811 | }
|
4325 6812 |
|
4326 6813 | impl ::std::error::Error for ConstraintViolation {}
|
6814 + | /* MapConstraintViolationGenerator.kt:111 */
|
4327 6815 | impl ConstraintViolation {
|
4328 6816 | pub(crate) fn as_validation_exception_field(
|
4329 6817 | self,
|
4330 6818 | path: ::std::string::String,
|
4331 6819 | ) -> crate::model::ValidationExceptionField {
|
4332 6820 | match self {
|
4333 6821 | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
4334 6822 | .as_validation_exception_field(path + "/" + key.as_str()),
|
4335 6823 | }
|
4336 6824 | }
|
4337 6825 | }
|
6826 + |
|
6827 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4338 6828 | }
|
4339 - | /// See [`StructureListMember`](crate::model::StructureListMember).
|
6829 + | /// /* ServerBuilderGenerator.kt:171 */See [`StructureListMember`](crate::model::StructureListMember).
|
4340 6830 | pub(crate) mod structure_list_member_internal {
|
4341 6831 |
|
6832 + | /* ServerBuilderGenerator.kt:461 */
|
4342 6833 | impl ::std::convert::From<Builder> for crate::model::StructureListMember {
|
4343 6834 | fn from(builder: Builder) -> Self {
|
4344 6835 | builder.build()
|
4345 6836 | }
|
4346 6837 | }
|
4347 - | /// A builder for [`StructureListMember`](crate::model::StructureListMember).
|
6838 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`StructureListMember`](crate::model::StructureListMember).
|
6839 + | /* RustType.kt:516 */
|
4348 6840 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6841 + | /* ServerBuilderGenerator.kt:211 */
|
4349 6842 | pub(crate) struct Builder {
|
6843 + | /* ServerBuilderGenerator.kt:308 */
|
4350 6844 | pub(crate) a: ::std::option::Option<::std::string::String>,
|
6845 + | /* ServerBuilderGenerator.kt:308 */
|
4351 6846 | pub(crate) b: ::std::option::Option<::std::string::String>,
|
6847 + | /* ServerBuilderGenerator.kt:211 */
|
4352 6848 | }
|
6849 + | /* ServerBuilderGenerator.kt:215 */
|
4353 6850 | impl Builder {
|
6851 + | /* ServerBuilderGenerator.kt:426 */
|
4354 6852 | #[allow(missing_docs)] // documentation missing in model
|
6853 + | /* ServerBuilderGenerator.kt:428 */
|
4355 6854 | pub(crate) fn set_a(
|
4356 6855 | mut self,
|
4357 6856 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4358 6857 | ) -> Self {
|
6858 + | /* ServerBuilderGenerator.kt:429 */
|
4359 6859 | self.a = input.map(|v| v.into());
|
4360 6860 | self
|
6861 + | /* ServerBuilderGenerator.kt:428 */
|
4361 6862 | }
|
6863 + | /* ServerBuilderGenerator.kt:426 */
|
4362 6864 | #[allow(missing_docs)] // documentation missing in model
|
6865 + | /* ServerBuilderGenerator.kt:428 */
|
4363 6866 | pub(crate) fn set_b(
|
4364 6867 | mut self,
|
4365 6868 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4366 6869 | ) -> Self {
|
6870 + | /* ServerBuilderGenerator.kt:429 */
|
4367 6871 | self.b = input.map(|v| v.into());
|
4368 6872 | self
|
6873 + | /* ServerBuilderGenerator.kt:428 */
|
4369 6874 | }
|
4370 - | /// Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
|
6875 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
|
6876 + | /* ServerBuilderGenerator.kt:271 */
|
4371 6877 | pub fn build(self) -> crate::model::StructureListMember {
|
4372 6878 | self.build_enforcing_all_constraints()
|
4373 6879 | }
|
6880 + | /* ServerBuilderGenerator.kt:283 */
|
4374 6881 | fn build_enforcing_all_constraints(self) -> crate::model::StructureListMember {
|
6882 + | /* ServerBuilderGenerator.kt:542 */
|
4375 6883 | crate::model::StructureListMember {
|
6884 + | /* ServerBuilderGenerator.kt:546 */
|
4376 6885 | a: self.a,
|
6886 + | /* ServerBuilderGenerator.kt:546 */
|
4377 6887 | b: self.b,
|
6888 + | /* ServerBuilderGenerator.kt:542 */
|
4378 6889 | }
|
6890 + | /* ServerBuilderGenerator.kt:283 */
|
4379 6891 | }
|
6892 + | /* ServerBuilderGenerator.kt:215 */
|
4380 6893 | }
|
6894 + |
|
6895 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4381 6896 | }
|
4382 - | /// See [`StructureListMember`](crate::model::StructureListMember).
|
6897 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`StructureListMember`](crate::model::StructureListMember).
|
4383 6898 | pub mod structure_list_member {
|
4384 6899 |
|
6900 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4385 6901 | impl ::std::convert::From<Builder> for crate::model::StructureListMember {
|
4386 6902 | fn from(builder: Builder) -> Self {
|
4387 6903 | builder.build()
|
4388 6904 | }
|
4389 6905 | }
|
4390 - | /// A builder for [`StructureListMember`](crate::model::StructureListMember).
|
6906 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`StructureListMember`](crate::model::StructureListMember).
|
6907 + | /* RustType.kt:516 */
|
4391 6908 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
6909 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4392 6910 | pub struct Builder {
|
6911 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4393 6912 | pub(crate) a: ::std::option::Option<::std::string::String>,
|
6913 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4394 6914 | pub(crate) b: ::std::option::Option<::std::string::String>,
|
6915 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4395 6916 | }
|
6917 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4396 6918 | impl Builder {
|
6919 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4397 6920 | #[allow(missing_docs)] // documentation missing in model
|
6921 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4398 6922 | pub fn a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4399 - | self.a = input;
|
6923 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
6924 + | self.a =
|
6925 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
6926 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4400 6927 | self
|
6928 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4401 6929 | }
|
6930 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4402 6931 | #[allow(missing_docs)] // documentation missing in model
|
6932 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4403 6933 | pub fn b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4404 - | self.b = input;
|
6934 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
6935 + | self.b =
|
6936 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
6937 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4405 6938 | self
|
6939 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4406 6940 | }
|
4407 - | /// Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
|
6941 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
|
6942 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4408 6943 | pub fn build(self) -> crate::model::StructureListMember {
|
4409 6944 | self.build_enforcing_required_and_enum_traits()
|
4410 6945 | }
|
6946 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4411 6947 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::StructureListMember {
|
6948 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4412 6949 | crate::model::StructureListMember {
|
6950 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4413 6951 | a: self.a,
|
6952 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4414 6953 | b: self.b,
|
6954 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4415 6955 | }
|
6956 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4416 6957 | }
|
6958 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4417 6959 | }
|
6960 + |
|
6961 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4418 6962 | }
|
4419 6963 | pub(crate) mod foo_enum_list_internal {
|
4420 6964 |
|
6965 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4421 6966 | #[allow(clippy::enum_variant_names)]
|
4422 6967 | #[derive(Debug, PartialEq)]
|
4423 6968 | pub(crate) enum ConstraintViolation {
|
4424 6969 | /// Constraint violation error when an element doesn't satisfy its own constraints.
|
4425 6970 | /// The first component of the tuple is the index in the collection where the
|
4426 6971 | /// first constraint violation was found.
|
4427 6972 | #[doc(hidden)]
|
4428 6973 | Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
|
4429 6974 | }
|
4430 6975 |
|
4431 6976 | impl ::std::fmt::Display for ConstraintViolation {
|
4432 6977 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4433 6978 | let message = match self {
|
4434 6979 | Self::Member(index, failing_member) => format!(
|
4435 6980 | "Value at index {index} failed to satisfy constraint. {}",
|
4436 6981 | failing_member
|
4437 6982 | ),
|
4438 6983 | };
|
4439 6984 | write!(f, "{message}")
|
4440 6985 | }
|
4441 6986 | }
|
4442 6987 |
|
4443 6988 | impl ::std::error::Error for ConstraintViolation {}
|
6989 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4444 6990 | impl ConstraintViolation {
|
4445 6991 | pub(crate) fn as_validation_exception_field(
|
4446 6992 | self,
|
4447 6993 | path: ::std::string::String,
|
4448 6994 | ) -> crate::model::ValidationExceptionField {
|
4449 6995 | match self {
|
4450 6996 | Self::Member(index, member_constraint_violation) => member_constraint_violation
|
4451 6997 | .as_validation_exception_field(path + "/" + &index.to_string()),
|
4452 6998 | }
|
4453 6999 | }
|
4454 7000 | }
|
7001 + |
|
7002 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4455 7003 | }
|
4456 - | /// See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7004 + | /// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4457 7005 | pub(crate) mod recursive_shapes_input_output_nested1_internal {
|
4458 7006 |
|
7007 + | /* ServerBuilderGenerator.kt:461 */
|
4459 7008 | impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
|
4460 7009 | fn from(builder: Builder) -> Self {
|
4461 7010 | builder.build()
|
4462 7011 | }
|
4463 7012 | }
|
4464 - | /// A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7013 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7014 + | /* RustType.kt:516 */
|
4465 7015 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
7016 + | /* ServerBuilderGenerator.kt:211 */
|
4466 7017 | pub(crate) struct Builder {
|
7018 + | /* ServerBuilderGenerator.kt:308 */
|
4467 7019 | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
7020 + | /* ServerBuilderGenerator.kt:308 */
|
4468 7021 | pub(crate) nested: ::std::option::Option<
|
4469 7022 | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
4470 7023 | >,
|
7024 + | /* ServerBuilderGenerator.kt:211 */
|
4471 7025 | }
|
7026 + | /* ServerBuilderGenerator.kt:215 */
|
4472 7027 | impl Builder {
|
7028 + | /* ServerBuilderGenerator.kt:426 */
|
4473 7029 | #[allow(missing_docs)] // documentation missing in model
|
7030 + | /* ServerBuilderGenerator.kt:428 */
|
4474 7031 | pub(crate) fn set_foo(
|
4475 7032 | mut self,
|
4476 7033 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4477 7034 | ) -> Self {
|
7035 + | /* ServerBuilderGenerator.kt:429 */
|
4478 7036 | self.foo = input.map(|v| v.into());
|
4479 7037 | self
|
7038 + | /* ServerBuilderGenerator.kt:428 */
|
4480 7039 | }
|
7040 + | /* ServerBuilderGenerator.kt:426 */
|
4481 7041 | #[allow(missing_docs)] // documentation missing in model
|
7042 + | /* ServerBuilderGenerator.kt:428 */
|
4482 7043 | pub(crate) fn set_nested(
|
4483 7044 | mut self,
|
4484 7045 | input: Option<
|
4485 7046 | impl ::std::convert::Into<
|
4486 7047 | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
4487 7048 | >,
|
4488 7049 | >,
|
4489 7050 | ) -> Self {
|
7051 + | /* ServerBuilderGenerator.kt:429 */
|
4490 7052 | self.nested = input.map(|v| v.into());
|
4491 7053 | self
|
7054 + | /* ServerBuilderGenerator.kt:428 */
|
4492 7055 | }
|
4493 - | /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7056 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7057 + | /* ServerBuilderGenerator.kt:271 */
|
4494 7058 | pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
|
4495 7059 | self.build_enforcing_all_constraints()
|
4496 7060 | }
|
7061 + | /* ServerBuilderGenerator.kt:283 */
|
4497 7062 | fn build_enforcing_all_constraints(
|
4498 7063 | self,
|
4499 7064 | ) -> crate::model::RecursiveShapesInputOutputNested1 {
|
7065 + | /* ServerBuilderGenerator.kt:542 */
|
4500 7066 | crate::model::RecursiveShapesInputOutputNested1 {
|
7067 + | /* ServerBuilderGenerator.kt:546 */
|
4501 7068 | foo: self.foo,
|
7069 + | /* ServerBuilderGenerator.kt:546 */
|
4502 7070 | nested: self.nested,
|
7071 + | /* ServerBuilderGenerator.kt:542 */
|
4503 7072 | }
|
7073 + | /* ServerBuilderGenerator.kt:283 */
|
4504 7074 | }
|
7075 + | /* ServerBuilderGenerator.kt:215 */
|
4505 7076 | }
|
7077 + |
|
7078 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4506 7079 | }
|
4507 - | /// See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7080 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
4508 7081 | pub mod recursive_shapes_input_output_nested1 {
|
4509 7082 |
|
7083 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4510 7084 | impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
|
4511 7085 | fn from(builder: Builder) -> Self {
|
4512 7086 | builder.build()
|
4513 7087 | }
|
4514 7088 | }
|
4515 - | /// A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7089 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7090 + | /* RustType.kt:516 */
|
4516 7091 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
7092 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4517 7093 | pub struct Builder {
|
7094 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4518 7095 | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
7096 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4519 7097 | pub(crate) nested: ::std::option::Option<
|
4520 7098 | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
4521 7099 | >,
|
7100 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4522 7101 | }
|
7102 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4523 7103 | impl Builder {
|
7104 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4524 7105 | #[allow(missing_docs)] // documentation missing in model
|
7106 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4525 7107 | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4526 - | self.foo = input;
|
7108 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
7109 + | self.foo =
|
7110 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
7111 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4527 7112 | self
|
7113 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4528 7114 | }
|
7115 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4529 7116 | #[allow(missing_docs)] // documentation missing in model
|
7117 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4530 7118 | pub fn nested(
|
4531 7119 | mut self,
|
4532 7120 | input: ::std::option::Option<
|
4533 7121 | ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
|
4534 7122 | >,
|
4535 7123 | ) -> Self {
|
4536 - | self.nested = input;
|
7124 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
7125 + | self.nested =
|
7126 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
7127 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4537 7128 | self
|
7129 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4538 7130 | }
|
4539 - | /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7131 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
|
7132 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4540 7133 | pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
|
4541 7134 | self.build_enforcing_required_and_enum_traits()
|
4542 7135 | }
|
7136 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4543 7137 | fn build_enforcing_required_and_enum_traits(
|
4544 7138 | self,
|
4545 7139 | ) -> crate::model::RecursiveShapesInputOutputNested1 {
|
7140 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4546 7141 | crate::model::RecursiveShapesInputOutputNested1 {
|
7142 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4547 7143 | foo: self.foo,
|
7144 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4548 7145 | nested: self.nested,
|
7146 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4549 7147 | }
|
7148 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4550 7149 | }
|
7150 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4551 7151 | }
|
7152 + |
|
7153 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4552 7154 | }
|
4553 - | /// See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7155 + | /// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4554 7156 | pub(crate) mod recursive_shapes_input_output_nested2_internal {
|
4555 7157 |
|
7158 + | /* ServerBuilderGenerator.kt:461 */
|
4556 7159 | impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
|
4557 7160 | fn from(builder: Builder) -> Self {
|
4558 7161 | builder.build()
|
4559 7162 | }
|
4560 7163 | }
|
4561 - | /// A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7164 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7165 + | /* RustType.kt:516 */
|
4562 7166 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
7167 + | /* ServerBuilderGenerator.kt:211 */
|
4563 7168 | pub(crate) struct Builder {
|
7169 + | /* ServerBuilderGenerator.kt:308 */
|
4564 7170 | pub(crate) bar: ::std::option::Option<::std::string::String>,
|
7171 + | /* ServerBuilderGenerator.kt:308 */
|
4565 7172 | pub(crate) recursive_member:
|
4566 7173 | ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
7174 + | /* ServerBuilderGenerator.kt:211 */
|
4567 7175 | }
|
7176 + | /* ServerBuilderGenerator.kt:215 */
|
4568 7177 | impl Builder {
|
7178 + | /* ServerBuilderGenerator.kt:426 */
|
4569 7179 | #[allow(missing_docs)] // documentation missing in model
|
7180 + | /* ServerBuilderGenerator.kt:428 */
|
4570 7181 | pub(crate) fn set_bar(
|
4571 7182 | mut self,
|
4572 7183 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4573 7184 | ) -> Self {
|
7185 + | /* ServerBuilderGenerator.kt:429 */
|
4574 7186 | self.bar = input.map(|v| v.into());
|
4575 7187 | self
|
7188 + | /* ServerBuilderGenerator.kt:428 */
|
4576 7189 | }
|
7190 + | /* ServerBuilderGenerator.kt:426 */
|
4577 7191 | #[allow(missing_docs)] // documentation missing in model
|
7192 + | /* ServerBuilderGenerator.kt:428 */
|
4578 7193 | pub(crate) fn set_recursive_member(
|
4579 7194 | mut self,
|
4580 7195 | input: Option<
|
4581 7196 | impl ::std::convert::Into<crate::model::RecursiveShapesInputOutputNested1>,
|
4582 7197 | >,
|
4583 7198 | ) -> Self {
|
7199 + | /* ServerBuilderGenerator.kt:429 */
|
4584 7200 | self.recursive_member = input.map(|v| v.into());
|
4585 7201 | self
|
7202 + | /* ServerBuilderGenerator.kt:428 */
|
4586 7203 | }
|
4587 - | /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7204 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7205 + | /* ServerBuilderGenerator.kt:271 */
|
4588 7206 | pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
|
4589 7207 | self.build_enforcing_all_constraints()
|
4590 7208 | }
|
7209 + | /* ServerBuilderGenerator.kt:283 */
|
4591 7210 | fn build_enforcing_all_constraints(
|
4592 7211 | self,
|
4593 7212 | ) -> crate::model::RecursiveShapesInputOutputNested2 {
|
7213 + | /* ServerBuilderGenerator.kt:542 */
|
4594 7214 | crate::model::RecursiveShapesInputOutputNested2 {
|
7215 + | /* ServerBuilderGenerator.kt:546 */
|
4595 7216 | bar: self.bar,
|
7217 + | /* ServerBuilderGenerator.kt:546 */
|
4596 7218 | recursive_member: self.recursive_member,
|
7219 + | /* ServerBuilderGenerator.kt:542 */
|
4597 7220 | }
|
7221 + | /* ServerBuilderGenerator.kt:283 */
|
4598 7222 | }
|
7223 + | /* ServerBuilderGenerator.kt:215 */
|
4599 7224 | }
|
7225 + |
|
7226 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4600 7227 | }
|
4601 - | /// See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7228 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
4602 7229 | pub mod recursive_shapes_input_output_nested2 {
|
4603 7230 |
|
7231 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4604 7232 | impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
|
4605 7233 | fn from(builder: Builder) -> Self {
|
4606 7234 | builder.build()
|
4607 7235 | }
|
4608 7236 | }
|
4609 - | /// A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7237 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7238 + | /* RustType.kt:516 */
|
4610 7239 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
7240 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4611 7241 | pub struct Builder {
|
7242 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4612 7243 | pub(crate) bar: ::std::option::Option<::std::string::String>,
|
7244 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4613 7245 | pub(crate) recursive_member:
|
4614 7246 | ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
7247 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4615 7248 | }
|
7249 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4616 7250 | impl Builder {
|
7251 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4617 7252 | #[allow(missing_docs)] // documentation missing in model
|
7253 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4618 7254 | pub fn bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4619 - | self.bar = input;
|
7255 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
7256 + | self.bar =
|
7257 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
7258 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4620 7259 | self
|
7260 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4621 7261 | }
|
7262 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4622 7263 | #[allow(missing_docs)] // documentation missing in model
|
7264 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4623 7265 | pub fn recursive_member(
|
4624 7266 | mut self,
|
4625 7267 | input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
4626 7268 | ) -> Self {
|
4627 - | self.recursive_member = input;
|
7269 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
7270 + | self.recursive_member =
|
7271 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
7272 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4628 7273 | self
|
7274 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4629 7275 | }
|
4630 - | /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7276 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
|
7277 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4631 7278 | pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
|
4632 7279 | self.build_enforcing_required_and_enum_traits()
|
4633 7280 | }
|
7281 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4634 7282 | fn build_enforcing_required_and_enum_traits(
|
4635 7283 | self,
|
4636 7284 | ) -> crate::model::RecursiveShapesInputOutputNested2 {
|
7285 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4637 7286 | crate::model::RecursiveShapesInputOutputNested2 {
|
7287 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4638 7288 | bar: self.bar,
|
7289 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4639 7290 | recursive_member: self.recursive_member,
|
7291 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4640 7292 | }
|
7293 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4641 7294 | }
|
7295 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4642 7296 | }
|
7297 + |
|
7298 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4643 7299 | }
|
4644 7300 | pub(crate) mod integer_enum_set_internal {
|
4645 7301 |
|
7302 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4646 7303 | #[allow(clippy::enum_variant_names)]
|
4647 7304 | #[derive(Debug, PartialEq)]
|
4648 7305 | pub(crate) enum ConstraintViolation {
|
4649 7306 | /// Constraint violation error when the list does not contain unique items
|
4650 7307 | UniqueItems {
|
4651 7308 | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
4652 7309 | /// at least two elements.
|
4653 7310 | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
4654 7311 | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
4655 7312 | /// Nothing is guaranteed about the order of the indices.
|
4656 7313 | duplicate_indices: ::std::vec::Vec<usize>,
|
4657 7314 | /// The original vector, that contains duplicate items.
|
4658 7315 | original: ::std::vec::Vec<i32>,
|
4659 7316 | },
|
4660 7317 | }
|
4661 7318 |
|
4662 7319 | impl ::std::fmt::Display for ConstraintViolation {
|
4663 7320 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4664 7321 | let message = match self {
|
4665 7322 | Self::UniqueItems { duplicate_indices, .. } =>
|
4666 7323 | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
4667 7324 | };
|
4668 7325 | write!(f, "{message}")
|
4669 7326 | }
|
4670 7327 | }
|
4671 7328 |
|
4672 7329 | impl ::std::error::Error for ConstraintViolation {}
|
7330 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4673 7331 | impl ConstraintViolation {
|
4674 7332 | pub(crate) fn as_validation_exception_field(
|
4675 7333 | self,
|
4676 7334 | path: ::std::string::String,
|
4677 7335 | ) -> crate::model::ValidationExceptionField {
|
4678 7336 | match self {
|
4679 7337 | Self::UniqueItems { duplicate_indices, .. } =>
|
4680 7338 | crate::model::ValidationExceptionField {
|
4681 7339 | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
4682 7340 | path,
|
4683 7341 | },
|
4684 7342 | }
|
4685 7343 | }
|
4686 7344 | }
|
7345 + |
|
7346 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4687 7347 | }
|
4688 7348 | pub(crate) mod foo_enum_map_internal {
|
4689 7349 |
|
7350 + | /* MapConstraintViolationGenerator.kt:82 */
|
4690 7351 | #[allow(clippy::enum_variant_names)]
|
4691 7352 | #[derive(Debug, PartialEq)]
|
4692 7353 | pub(crate) enum ConstraintViolation {
|
4693 7354 | #[doc(hidden)]
|
4694 7355 | Value(
|
4695 7356 | ::std::string::String,
|
4696 7357 | crate::model::foo_enum_internal::ConstraintViolation,
|
4697 7358 | ),
|
4698 7359 | }
|
4699 7360 |
|
4700 7361 | impl ::std::fmt::Display for ConstraintViolation {
|
4701 7362 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4702 7363 | match self {
|
4703 7364 | Self::Value(_, value_constraint_violation) => {
|
4704 7365 | write!(f, "{}", value_constraint_violation)
|
4705 7366 | }
|
4706 7367 | }
|
4707 7368 | }
|
4708 7369 | }
|
4709 7370 |
|
4710 7371 | impl ::std::error::Error for ConstraintViolation {}
|
7372 + | /* MapConstraintViolationGenerator.kt:111 */
|
4711 7373 | impl ConstraintViolation {
|
4712 7374 | pub(crate) fn as_validation_exception_field(
|
4713 7375 | self,
|
4714 7376 | path: ::std::string::String,
|
4715 7377 | ) -> crate::model::ValidationExceptionField {
|
4716 7378 | match self {
|
4717 7379 | Self::Value(key, value_constraint_violation) => value_constraint_violation
|
4718 7380 | .as_validation_exception_field(path + "/" + key.as_str()),
|
4719 7381 | }
|
4720 7382 | }
|
4721 7383 | }
|
7384 + |
|
7385 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4722 7386 | }
|
4723 7387 | pub(crate) mod foo_enum_set_internal {
|
4724 7388 |
|
7389 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4725 7390 | #[allow(clippy::enum_variant_names)]
|
4726 7391 | #[derive(Debug, PartialEq)]
|
4727 7392 | pub(crate) enum ConstraintViolation {
|
4728 7393 | /// Constraint violation error when the list does not contain unique items
|
4729 7394 | UniqueItems {
|
4730 7395 | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
4731 7396 | /// at least two elements.
|
4732 7397 | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
4733 7398 | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
4734 7399 | /// Nothing is guaranteed about the order of the indices.
|
4735 7400 | duplicate_indices: ::std::vec::Vec<usize>,
|
4736 7401 | /// The original vector, that contains duplicate items.
|
4737 7402 | original: ::std::vec::Vec<crate::model::FooEnum>,
|
4738 7403 | },
|
4739 7404 | /// Constraint violation error when an element doesn't satisfy its own constraints.
|
4740 7405 | /// The first component of the tuple is the index in the collection where the
|
4741 7406 | /// first constraint violation was found.
|
4742 7407 | #[doc(hidden)]
|
4743 7408 | Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
|
4744 7409 | }
|
4745 7410 |
|
4746 7411 | impl ::std::fmt::Display for ConstraintViolation {
|
4747 7412 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4748 7413 | let message = match self {
|
4749 7414 | Self::UniqueItems { duplicate_indices, .. } =>
|
4750 7415 | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
4751 7416 | Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
|
4752 7417 | failing_member)
|
4753 7418 | };
|
4754 7419 | write!(f, "{message}")
|
4755 7420 | }
|
4756 7421 | }
|
4757 7422 |
|
4758 7423 | impl ::std::error::Error for ConstraintViolation {}
|
7424 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4759 7425 | impl ConstraintViolation {
|
4760 7426 | pub(crate) fn as_validation_exception_field(
|
4761 7427 | self,
|
4762 7428 | path: ::std::string::String,
|
4763 7429 | ) -> crate::model::ValidationExceptionField {
|
4764 7430 | match self {
|
4765 7431 | Self::UniqueItems { duplicate_indices, .. } =>
|
4766 7432 | crate::model::ValidationExceptionField {
|
4767 7433 | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
4768 7434 | path,
|
4769 7435 | },
|
4770 7436 | Self::Member(index, member_constraint_violation) =>
|
4771 7437 | member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
|
4772 7438 | }
|
4773 7439 | }
|
4774 7440 | }
|
7441 + |
|
7442 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4775 7443 | }
|
4776 - | /// See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
7444 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4777 7445 | pub mod complex_nested_error_data {
|
4778 7446 |
|
7447 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4779 7448 | impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
|
4780 7449 | fn from(builder: Builder) -> Self {
|
4781 7450 | builder.build()
|
4782 7451 | }
|
4783 7452 | }
|
4784 - | /// A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
7453 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
7454 + | /* RustType.kt:516 */
|
4785 7455 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
7456 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4786 7457 | pub struct Builder {
|
7458 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4787 7459 | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
7460 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4788 7461 | }
|
7462 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4789 7463 | impl Builder {
|
7464 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4790 7465 | #[allow(missing_docs)] // documentation missing in model
|
7466 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4791 7467 | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4792 - | self.foo = input;
|
7468 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
7469 + | self.foo =
|
7470 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
7471 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4793 7472 | self
|
7473 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4794 7474 | }
|
4795 - | /// Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
7475 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
7476 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4796 7477 | pub fn build(self) -> crate::model::ComplexNestedErrorData {
|
4797 7478 | self.build_enforcing_required_and_enum_traits()
|
4798 7479 | }
|
7480 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4799 7481 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::ComplexNestedErrorData {
|
4800 - | crate::model::ComplexNestedErrorData { foo: self.foo }
|
7482 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
7483 + | crate::model::ComplexNestedErrorData {
|
7484 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
7485 + | foo: self.foo,
|
7486 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4801 7487 | }
|
7488 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4802 7489 | }
|
7490 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
7491 + | }
|
7492 + |
|
7493 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4803 7494 | }
|
4804 - | /// See [`NestedPayload`](crate::model::NestedPayload).
|
7495 + | /// /* ServerBuilderGenerator.kt:171 */See [`NestedPayload`](crate::model::NestedPayload).
|
4805 7496 | pub(crate) mod nested_payload_internal {
|
4806 7497 |
|
7498 + | /* ServerBuilderGenerator.kt:461 */
|
4807 7499 | impl ::std::convert::From<Builder> for crate::model::NestedPayload {
|
4808 7500 | fn from(builder: Builder) -> Self {
|
4809 7501 | builder.build()
|
4810 7502 | }
|
4811 7503 | }
|
4812 - | /// A builder for [`NestedPayload`](crate::model::NestedPayload).
|
7504 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`NestedPayload`](crate::model::NestedPayload).
|
7505 + | /* RustType.kt:516 */
|
4813 7506 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
7507 + | /* ServerBuilderGenerator.kt:211 */
|
4814 7508 | pub(crate) struct Builder {
|
7509 + | /* ServerBuilderGenerator.kt:308 */
|
4815 7510 | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
7511 + | /* ServerBuilderGenerator.kt:308 */
|
4816 7512 | pub(crate) name: ::std::option::Option<::std::string::String>,
|
7513 + | /* ServerBuilderGenerator.kt:211 */
|
4817 7514 | }
|
7515 + | /* ServerBuilderGenerator.kt:215 */
|
4818 7516 | impl Builder {
|
7517 + | /* ServerBuilderGenerator.kt:426 */
|
4819 7518 | #[allow(missing_docs)] // documentation missing in model
|
7519 + | /* ServerBuilderGenerator.kt:428 */
|
4820 7520 | pub(crate) fn set_greeting(
|
4821 7521 | mut self,
|
4822 7522 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4823 7523 | ) -> Self {
|
7524 + | /* ServerBuilderGenerator.kt:429 */
|
4824 7525 | self.greeting = input.map(|v| v.into());
|
4825 7526 | self
|
7527 + | /* ServerBuilderGenerator.kt:428 */
|
4826 7528 | }
|
7529 + | /* ServerBuilderGenerator.kt:426 */
|
4827 7530 | #[allow(missing_docs)] // documentation missing in model
|
7531 + | /* ServerBuilderGenerator.kt:428 */
|
4828 7532 | pub(crate) fn set_name(
|
4829 7533 | mut self,
|
4830 7534 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
4831 7535 | ) -> Self {
|
7536 + | /* ServerBuilderGenerator.kt:429 */
|
4832 7537 | self.name = input.map(|v| v.into());
|
4833 7538 | self
|
7539 + | /* ServerBuilderGenerator.kt:428 */
|
4834 7540 | }
|
4835 - | /// Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
|
7541 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
|
7542 + | /* ServerBuilderGenerator.kt:271 */
|
4836 7543 | pub fn build(self) -> crate::model::NestedPayload {
|
4837 7544 | self.build_enforcing_all_constraints()
|
4838 7545 | }
|
7546 + | /* ServerBuilderGenerator.kt:283 */
|
4839 7547 | fn build_enforcing_all_constraints(self) -> crate::model::NestedPayload {
|
7548 + | /* ServerBuilderGenerator.kt:542 */
|
4840 7549 | crate::model::NestedPayload {
|
7550 + | /* ServerBuilderGenerator.kt:546 */
|
4841 7551 | greeting: self.greeting,
|
7552 + | /* ServerBuilderGenerator.kt:546 */
|
4842 7553 | name: self.name,
|
7554 + | /* ServerBuilderGenerator.kt:542 */
|
4843 7555 | }
|
7556 + | /* ServerBuilderGenerator.kt:283 */
|
4844 7557 | }
|
7558 + | /* ServerBuilderGenerator.kt:215 */
|
4845 7559 | }
|
7560 + |
|
7561 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4846 7562 | }
|
4847 - | /// See [`NestedPayload`](crate::model::NestedPayload).
|
7563 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`NestedPayload`](crate::model::NestedPayload).
|
4848 7564 | pub mod nested_payload {
|
4849 7565 |
|
7566 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
4850 7567 | impl ::std::convert::From<Builder> for crate::model::NestedPayload {
|
4851 7568 | fn from(builder: Builder) -> Self {
|
4852 7569 | builder.build()
|
4853 7570 | }
|
4854 7571 | }
|
4855 - | /// A builder for [`NestedPayload`](crate::model::NestedPayload).
|
7572 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`NestedPayload`](crate::model::NestedPayload).
|
7573 + | /* RustType.kt:516 */
|
4856 7574 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
7575 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4857 7576 | pub struct Builder {
|
7577 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4858 7578 | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
7579 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
4859 7580 | pub(crate) name: ::std::option::Option<::std::string::String>,
|
7581 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
4860 7582 | }
|
7583 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4861 7584 | impl Builder {
|
7585 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4862 7586 | #[allow(missing_docs)] // documentation missing in model
|
7587 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4863 7588 | pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4864 - | self.greeting = input;
|
7589 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
7590 + | self.greeting =
|
7591 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
7592 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4865 7593 | self
|
7594 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4866 7595 | }
|
7596 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
4867 7597 | #[allow(missing_docs)] // documentation missing in model
|
7598 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4868 7599 | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
4869 - | self.name = input;
|
7600 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
7601 + | self.name =
|
7602 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
7603 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
4870 7604 | self
|
7605 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
4871 7606 | }
|
4872 - | /// Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
|
7607 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
|
7608 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
4873 7609 | pub fn build(self) -> crate::model::NestedPayload {
|
4874 7610 | self.build_enforcing_required_and_enum_traits()
|
4875 7611 | }
|
7612 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4876 7613 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::NestedPayload {
|
7614 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4877 7615 | crate::model::NestedPayload {
|
7616 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4878 7617 | greeting: self.greeting,
|
7618 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4879 7619 | name: self.name,
|
7620 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4880 7621 | }
|
7622 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4881 7623 | }
|
7624 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4882 7625 | }
|
7626 + |
|
7627 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4883 7628 | }
|
4884 7629 | pub(crate) mod integer_set_internal {
|
4885 7630 |
|
7631 + | /* CollectionConstraintViolationGenerator.kt:78 */
|
4886 7632 | #[allow(clippy::enum_variant_names)]
|
4887 7633 | #[derive(Debug, PartialEq)]
|
4888 7634 | pub(crate) enum ConstraintViolation {
|
4889 7635 | /// Constraint violation error when the list does not contain unique items
|
4890 7636 | UniqueItems {
|
4891 7637 | /// A vector of indices into `original` pointing to all duplicate items. This vector has
|
4892 7638 | /// at least two elements.
|
4893 7639 | /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
|
4894 7640 | /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
|
4895 7641 | /// Nothing is guaranteed about the order of the indices.
|
4896 7642 | duplicate_indices: ::std::vec::Vec<usize>,
|
4897 7643 | /// The original vector, that contains duplicate items.
|
4898 7644 | original: ::std::vec::Vec<i32>,
|
4899 7645 | },
|
4900 7646 | }
|
4901 7647 |
|
4902 7648 | impl ::std::fmt::Display for ConstraintViolation {
|
4903 7649 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4904 7650 | let message = match self {
|
4905 7651 | Self::UniqueItems { duplicate_indices, .. } =>
|
4906 7652 | format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
|
4907 7653 | };
|
4908 7654 | write!(f, "{message}")
|
4909 7655 | }
|
4910 7656 | }
|
4911 7657 |
|
4912 7658 | impl ::std::error::Error for ConstraintViolation {}
|
7659 + | /* CollectionConstraintViolationGenerator.kt:104 */
|
4913 7660 | impl ConstraintViolation {
|
4914 7661 | pub(crate) fn as_validation_exception_field(
|
4915 7662 | self,
|
4916 7663 | path: ::std::string::String,
|
4917 7664 | ) -> crate::model::ValidationExceptionField {
|
4918 7665 | match self {
|
4919 7666 | Self::UniqueItems { duplicate_indices, .. } =>
|
4920 7667 | crate::model::ValidationExceptionField {
|
4921 7668 | message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
|
4922 7669 | path,
|
4923 7670 | },
|
4924 7671 | }
|
4925 7672 | }
|
4926 7673 | }
|
7674 + |
|
7675 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
4927 7676 | }
|