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\[json_rpc10.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\[json_rpc10.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 json_rpc10.model.Dialog:
|
205 297 | /// :param dialog_list typing.List\[json_rpc10.model.Dialog\]:
|
206 298 | /// :param dialog_map typing.Dict\[str, json_rpc10.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 json_rpc10.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\[json_rpc10.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, json_rpc10.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.json10#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 json_rpc10.types.Document:
|
475 650 | /// :param default_document_string json_rpc10.types.Document:
|
476 651 | /// :param default_document_boolean json_rpc10.types.Document:
|
477 652 | /// :param default_document_list json_rpc10.types.Document:
|
478 - | /// :param default_null_document typing.Optional\[json_rpc10.types.Document\]:
|
479 653 | /// :param default_timestamp json_rpc10.types.DateTime:
|
480 654 | /// :param default_blob json_rpc10.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 json_rpc10.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 json_rpc10.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\[json_rpc10.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 json_rpc10.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 json_rpc10.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 json_rpc10.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 json_rpc10.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\[json_rpc10.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 json_rpc10.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 json_rpc10.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 json_rpc10.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 json_rpc10.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 |
|
834 - | /// A union with a representative set of types for members.
|
1221 + | /// /* UnionGenerator.kt:67 */A union with a representative set of types for members.
|
1222 + | /* RustType.kt:516 */
|
835 1223 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
836 - | pub enum MyUnion {
|
1224 + | pub /* UnionGenerator.kt:85 */ enum MyUnion {
|
1225 + | /* UnionGenerator.kt:90 */
|
837 1226 | #[allow(missing_docs)] // documentation missing in model
|
1227 + | /* UnionGenerator.kt:190 */
|
838 1228 | BlobValue(::aws_smithy_http_server_python::types::Blob),
|
1229 + | /* UnionGenerator.kt:90 */
|
839 1230 | #[allow(missing_docs)] // documentation missing in model
|
1231 + | /* UnionGenerator.kt:190 */
|
840 1232 | BooleanValue(bool),
|
1233 + | /* UnionGenerator.kt:90 */
|
841 1234 | #[allow(missing_docs)] // documentation missing in model
|
1235 + | /* UnionGenerator.kt:190 */
|
842 1236 | EnumValue(crate::model::FooEnum),
|
1237 + | /* UnionGenerator.kt:90 */
|
843 1238 | #[allow(missing_docs)] // documentation missing in model
|
1239 + | /* UnionGenerator.kt:190 */
|
844 1240 | IntEnumValue(i32),
|
1241 + | /* UnionGenerator.kt:90 */
|
845 1242 | #[allow(missing_docs)] // documentation missing in model
|
1243 + | /* UnionGenerator.kt:190 */
|
846 1244 | ListValue(::std::vec::Vec<::std::string::String>),
|
1245 + | /* UnionGenerator.kt:90 */
|
847 1246 | #[allow(missing_docs)] // documentation missing in model
|
1247 + | /* UnionGenerator.kt:190 */
|
848 1248 | MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
|
1249 + | /* UnionGenerator.kt:90 */
|
849 1250 | #[allow(missing_docs)] // documentation missing in model
|
1251 + | /* UnionGenerator.kt:190 */
|
850 1252 | NumberValue(i32),
|
1253 + | /* UnionGenerator.kt:90 */
|
851 1254 | #[allow(missing_docs)] // documentation missing in model
|
1255 + | /* UnionGenerator.kt:190 */
|
852 1256 | StringValue(::std::string::String),
|
1257 + | /* UnionGenerator.kt:90 */
|
853 1258 | #[allow(missing_docs)] // documentation missing in model
|
1259 + | /* UnionGenerator.kt:190 */
|
854 1260 | StructureValue(crate::model::GreetingStruct),
|
1261 + | /* UnionGenerator.kt:90 */
|
855 1262 | #[allow(missing_docs)] // documentation missing in model
|
1263 + | /* UnionGenerator.kt:190 */
|
856 1264 | TimestampValue(::aws_smithy_http_server_python::types::DateTime),
|
1265 + | /* UnionGenerator.kt:85 */
|
857 1266 | }
|
1267 + | /* UnionGenerator.kt:111 */
|
858 1268 | impl MyUnion {
|
1269 + | /* UnionGenerator.kt:217 */
|
859 1270 | /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
|
1271 + | /* UnionGenerator.kt:222 */
|
860 1272 | /// Returns `Err(&Self)` if it can't be converted.
|
1273 + | /* UnionGenerator.kt:223 */
|
861 1274 | pub fn as_blob_value(
|
862 1275 | &self,
|
863 1276 | ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::Blob, &Self> {
|
1277 + | /* UnionGenerator.kt:227 */
|
864 1278 | if let MyUnion::BlobValue(val) = &self {
|
865 1279 | ::std::result::Result::Ok(val)
|
866 1280 | } else {
|
867 1281 | ::std::result::Result::Err(self)
|
868 1282 | }
|
1283 + | /* UnionGenerator.kt:223 */
|
869 1284 | }
|
1285 + | /* UnionGenerator.kt:121 */
|
870 1286 | /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
|
1287 + | /* UnionGenerator.kt:122 */
|
871 1288 | pub fn is_blob_value(&self) -> bool {
|
1289 + | /* UnionGenerator.kt:123 */
|
872 1290 | self.as_blob_value().is_ok()
|
1291 + | /* UnionGenerator.kt:122 */
|
873 1292 | }
|
1293 + | /* UnionGenerator.kt:217 */
|
874 1294 | /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
|
1295 + | /* UnionGenerator.kt:222 */
|
875 1296 | /// Returns `Err(&Self)` if it can't be converted.
|
1297 + | /* UnionGenerator.kt:223 */
|
876 1298 | pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
|
1299 + | /* UnionGenerator.kt:227 */
|
877 1300 | if let MyUnion::BooleanValue(val) = &self {
|
878 1301 | ::std::result::Result::Ok(val)
|
879 1302 | } else {
|
880 1303 | ::std::result::Result::Err(self)
|
881 1304 | }
|
1305 + | /* UnionGenerator.kt:223 */
|
882 1306 | }
|
1307 + | /* UnionGenerator.kt:121 */
|
883 1308 | /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
|
1309 + | /* UnionGenerator.kt:122 */
|
884 1310 | pub fn is_boolean_value(&self) -> bool {
|
1311 + | /* UnionGenerator.kt:123 */
|
885 1312 | self.as_boolean_value().is_ok()
|
1313 + | /* UnionGenerator.kt:122 */
|
886 1314 | }
|
1315 + | /* UnionGenerator.kt:217 */
|
887 1316 | /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
|
1317 + | /* UnionGenerator.kt:222 */
|
888 1318 | /// Returns `Err(&Self)` if it can't be converted.
|
1319 + | /* UnionGenerator.kt:223 */
|
889 1320 | pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
|
1321 + | /* UnionGenerator.kt:227 */
|
890 1322 | if let MyUnion::EnumValue(val) = &self {
|
891 1323 | ::std::result::Result::Ok(val)
|
892 1324 | } else {
|
893 1325 | ::std::result::Result::Err(self)
|
894 1326 | }
|
1327 + | /* UnionGenerator.kt:223 */
|
895 1328 | }
|
1329 + | /* UnionGenerator.kt:121 */
|
896 1330 | /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
|
1331 + | /* UnionGenerator.kt:122 */
|
897 1332 | pub fn is_enum_value(&self) -> bool {
|
1333 + | /* UnionGenerator.kt:123 */
|
898 1334 | self.as_enum_value().is_ok()
|
1335 + | /* UnionGenerator.kt:122 */
|
899 1336 | }
|
1337 + | /* UnionGenerator.kt:217 */
|
900 1338 | /// Tries to convert the enum instance into [`IntEnumValue`](crate::model::MyUnion::IntEnumValue), extracting the inner [`i32`](i32).
|
1339 + | /* UnionGenerator.kt:222 */
|
901 1340 | /// Returns `Err(&Self)` if it can't be converted.
|
1341 + | /* UnionGenerator.kt:223 */
|
902 1342 | pub fn as_int_enum_value(&self) -> ::std::result::Result<&i32, &Self> {
|
1343 + | /* UnionGenerator.kt:227 */
|
903 1344 | if let MyUnion::IntEnumValue(val) = &self {
|
904 1345 | ::std::result::Result::Ok(val)
|
905 1346 | } else {
|
906 1347 | ::std::result::Result::Err(self)
|
907 1348 | }
|
1349 + | /* UnionGenerator.kt:223 */
|
908 1350 | }
|
1351 + | /* UnionGenerator.kt:121 */
|
909 1352 | /// Returns true if this is a [`IntEnumValue`](crate::model::MyUnion::IntEnumValue).
|
1353 + | /* UnionGenerator.kt:122 */
|
910 1354 | pub fn is_int_enum_value(&self) -> bool {
|
1355 + | /* UnionGenerator.kt:123 */
|
911 1356 | self.as_int_enum_value().is_ok()
|
1357 + | /* UnionGenerator.kt:122 */
|
912 1358 | }
|
1359 + | /* UnionGenerator.kt:217 */
|
913 1360 | /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
|
1361 + | /* UnionGenerator.kt:222 */
|
914 1362 | /// Returns `Err(&Self)` if it can't be converted.
|
1363 + | /* UnionGenerator.kt:223 */
|
915 1364 | pub fn as_list_value(
|
916 1365 | &self,
|
917 1366 | ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
|
1367 + | /* UnionGenerator.kt:227 */
|
918 1368 | if let MyUnion::ListValue(val) = &self {
|
919 1369 | ::std::result::Result::Ok(val)
|
920 1370 | } else {
|
921 1371 | ::std::result::Result::Err(self)
|
922 1372 | }
|
1373 + | /* UnionGenerator.kt:223 */
|
923 1374 | }
|
1375 + | /* UnionGenerator.kt:121 */
|
924 1376 | /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
|
1377 + | /* UnionGenerator.kt:122 */
|
925 1378 | pub fn is_list_value(&self) -> bool {
|
1379 + | /* UnionGenerator.kt:123 */
|
926 1380 | self.as_list_value().is_ok()
|
1381 + | /* UnionGenerator.kt:122 */
|
927 1382 | }
|
1383 + | /* UnionGenerator.kt:217 */
|
928 1384 | /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
|
1385 + | /* UnionGenerator.kt:222 */
|
929 1386 | /// Returns `Err(&Self)` if it can't be converted.
|
1387 + | /* UnionGenerator.kt:223 */
|
930 1388 | pub fn as_map_value(
|
931 1389 | &self,
|
932 1390 | ) -> ::std::result::Result<
|
933 1391 | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
934 1392 | &Self,
|
935 1393 | > {
|
1394 + | /* UnionGenerator.kt:227 */
|
936 1395 | if let MyUnion::MapValue(val) = &self {
|
937 1396 | ::std::result::Result::Ok(val)
|
938 1397 | } else {
|
939 1398 | ::std::result::Result::Err(self)
|
940 1399 | }
|
1400 + | /* UnionGenerator.kt:223 */
|
941 1401 | }
|
1402 + | /* UnionGenerator.kt:121 */
|
942 1403 | /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
|
1404 + | /* UnionGenerator.kt:122 */
|
943 1405 | pub fn is_map_value(&self) -> bool {
|
1406 + | /* UnionGenerator.kt:123 */
|
944 1407 | self.as_map_value().is_ok()
|
1408 + | /* UnionGenerator.kt:122 */
|
945 1409 | }
|
1410 + | /* UnionGenerator.kt:217 */
|
946 1411 | /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
|
1412 + | /* UnionGenerator.kt:222 */
|
947 1413 | /// Returns `Err(&Self)` if it can't be converted.
|
1414 + | /* UnionGenerator.kt:223 */
|
948 1415 | pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
|
1416 + | /* UnionGenerator.kt:227 */
|
949 1417 | if let MyUnion::NumberValue(val) = &self {
|
950 1418 | ::std::result::Result::Ok(val)
|
951 1419 | } else {
|
952 1420 | ::std::result::Result::Err(self)
|
953 1421 | }
|
1422 + | /* UnionGenerator.kt:223 */
|
954 1423 | }
|
1424 + | /* UnionGenerator.kt:121 */
|
955 1425 | /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
|
1426 + | /* UnionGenerator.kt:122 */
|
956 1427 | pub fn is_number_value(&self) -> bool {
|
1428 + | /* UnionGenerator.kt:123 */
|
957 1429 | self.as_number_value().is_ok()
|
1430 + | /* UnionGenerator.kt:122 */
|
958 1431 | }
|
1432 + | /* UnionGenerator.kt:217 */
|
959 1433 | /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
|
1434 + | /* UnionGenerator.kt:222 */
|
960 1435 | /// Returns `Err(&Self)` if it can't be converted.
|
1436 + | /* UnionGenerator.kt:223 */
|
961 1437 | pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
|
1438 + | /* UnionGenerator.kt:227 */
|
962 1439 | if let MyUnion::StringValue(val) = &self {
|
963 1440 | ::std::result::Result::Ok(val)
|
964 1441 | } else {
|
965 1442 | ::std::result::Result::Err(self)
|
966 1443 | }
|
1444 + | /* UnionGenerator.kt:223 */
|
967 1445 | }
|
1446 + | /* UnionGenerator.kt:121 */
|
968 1447 | /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
|
1448 + | /* UnionGenerator.kt:122 */
|
969 1449 | pub fn is_string_value(&self) -> bool {
|
1450 + | /* UnionGenerator.kt:123 */
|
970 1451 | self.as_string_value().is_ok()
|
1452 + | /* UnionGenerator.kt:122 */
|
971 1453 | }
|
1454 + | /* UnionGenerator.kt:217 */
|
972 1455 | /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
|
1456 + | /* UnionGenerator.kt:222 */
|
973 1457 | /// Returns `Err(&Self)` if it can't be converted.
|
1458 + | /* UnionGenerator.kt:223 */
|
974 1459 | pub fn as_structure_value(
|
975 1460 | &self,
|
976 1461 | ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
|
1462 + | /* UnionGenerator.kt:227 */
|
977 1463 | if let MyUnion::StructureValue(val) = &self {
|
978 1464 | ::std::result::Result::Ok(val)
|
979 1465 | } else {
|
980 1466 | ::std::result::Result::Err(self)
|
981 1467 | }
|
1468 + | /* UnionGenerator.kt:223 */
|
982 1469 | }
|
1470 + | /* UnionGenerator.kt:121 */
|
983 1471 | /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
|
1472 + | /* UnionGenerator.kt:122 */
|
984 1473 | pub fn is_structure_value(&self) -> bool {
|
1474 + | /* UnionGenerator.kt:123 */
|
985 1475 | self.as_structure_value().is_ok()
|
1476 + | /* UnionGenerator.kt:122 */
|
986 1477 | }
|
1478 + | /* UnionGenerator.kt:217 */
|
987 1479 | /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
|
1480 + | /* UnionGenerator.kt:222 */
|
988 1481 | /// Returns `Err(&Self)` if it can't be converted.
|
1482 + | /* UnionGenerator.kt:223 */
|
989 1483 | pub fn as_timestamp_value(
|
990 1484 | &self,
|
991 1485 | ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::DateTime, &Self> {
|
1486 + | /* UnionGenerator.kt:227 */
|
992 1487 | if let MyUnion::TimestampValue(val) = &self {
|
993 1488 | ::std::result::Result::Ok(val)
|
994 1489 | } else {
|
995 1490 | ::std::result::Result::Err(self)
|
996 1491 | }
|
1492 + | /* UnionGenerator.kt:223 */
|
997 1493 | }
|
1494 + | /* UnionGenerator.kt:121 */
|
998 1495 | /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
|
1496 + | /* UnionGenerator.kt:122 */
|
999 1497 | pub fn is_timestamp_value(&self) -> bool {
|
1498 + | /* UnionGenerator.kt:123 */
|
1000 1499 | self.as_timestamp_value().is_ok()
|
1500 + | /* UnionGenerator.kt:122 */
|
1001 1501 | }
|
1502 + | /* UnionGenerator.kt:111 */
|
1002 1503 | }
|
1504 + | /* PythonServerUnionGenerator.kt:58 */
|
1003 1505 | #[pyo3::pyclass(name = "MyUnion")]
|
1506 + | /* RustType.kt:516 */
|
1004 1507 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1005 - | pub struct PyUnionMarkerMyUnion(pub MyUnion);
|
1508 + | pub /* PythonServerUnionGenerator.kt:61 */ struct PyUnionMarkerMyUnion(pub MyUnion);
|
1509 + | /* RustType.kt:516 */
|
1006 1510 | #[::pyo3::pymethods]
|
1511 + | /* PythonServerUnionGenerator.kt:66 */
|
1007 1512 | impl PyUnionMarkerMyUnion {
|
1513 + | /* RustType.kt:516 */
|
1008 1514 | #[staticmethod]
|
1515 + | /* PythonServerUnionGenerator.kt:134 */
|
1009 1516 | /// Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
|
1517 + | /* PythonServerUnionGenerator.kt:138 */
|
1010 1518 | /// :param data json_rpc10.types.Blob:
|
1519 + | /* PythonServerUnionGenerator.kt:139 */
|
1011 1520 | /// :rtype MyUnion:
|
1521 + | /* PythonServerUnionGenerator.kt:140 */
|
1012 1522 | pub fn blob_value(data: ::aws_smithy_http_server_python::types::Blob) -> Self {
|
1523 + | /* PythonServerUnionGenerator.kt:141 */
|
1013 1524 | Self(MyUnion::BlobValue(data))
|
1525 + | /* PythonServerUnionGenerator.kt:140 */
|
1014 1526 | }
|
1527 + | /* PythonServerUnionGenerator.kt:176 */
|
1015 1528 | /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
|
1529 + | /* PythonServerUnionGenerator.kt:181 */
|
1016 1530 | /// :rtype json_rpc10.types.Blob:
|
1531 + | /* PythonServerUnionGenerator.kt:182 */
|
1017 1532 | pub fn as_blob_value(&self) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::Blob> {
|
1533 + | /* PythonServerUnionGenerator.kt:190 */
|
1018 1534 | match self.0.as_blob_value() {
|
1019 1535 | Ok(variant) => Ok(variant.clone()),
|
1020 1536 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1021 1537 | r"MyUnion variant is not of type json_rpc10.types.Blob",
|
1022 1538 | )),
|
1023 1539 | }
|
1540 + | /* PythonServerUnionGenerator.kt:182 */
|
1024 1541 | }
|
1542 + | /* PythonServerUnionGenerator.kt:76 */
|
1025 1543 | /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
|
1544 + | /* PythonServerUnionGenerator.kt:77 */
|
1026 1545 | /// :rtype bool:
|
1546 + | /* PythonServerUnionGenerator.kt:78 */
|
1027 1547 | pub fn is_blob_value(&self) -> bool {
|
1548 + | /* PythonServerUnionGenerator.kt:79 */
|
1028 1549 | self.0.is_blob_value()
|
1550 + | /* PythonServerUnionGenerator.kt:78 */
|
1029 1551 | }
|
1552 + | /* RustType.kt:516 */
|
1030 1553 | #[staticmethod]
|
1554 + | /* PythonServerUnionGenerator.kt:134 */
|
1031 1555 | /// Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
|
1556 + | /* PythonServerUnionGenerator.kt:138 */
|
1032 1557 | /// :param data bool:
|
1558 + | /* PythonServerUnionGenerator.kt:139 */
|
1033 1559 | /// :rtype MyUnion:
|
1560 + | /* PythonServerUnionGenerator.kt:140 */
|
1034 1561 | pub fn boolean_value(data: bool) -> Self {
|
1562 + | /* PythonServerUnionGenerator.kt:141 */
|
1035 1563 | Self(MyUnion::BooleanValue(data))
|
1564 + | /* PythonServerUnionGenerator.kt:140 */
|
1036 1565 | }
|
1566 + | /* PythonServerUnionGenerator.kt:176 */
|
1037 1567 | /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
|
1568 + | /* PythonServerUnionGenerator.kt:181 */
|
1038 1569 | /// :rtype bool:
|
1570 + | /* PythonServerUnionGenerator.kt:182 */
|
1039 1571 | pub fn as_boolean_value(&self) -> ::pyo3::PyResult<bool> {
|
1572 + | /* PythonServerUnionGenerator.kt:190 */
|
1040 1573 | match self.0.as_boolean_value() {
|
1041 1574 | Ok(variant) => Ok(*variant),
|
1042 1575 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1043 1576 | r"MyUnion variant is not of type bool",
|
1044 1577 | )),
|
1045 1578 | }
|
1579 + | /* PythonServerUnionGenerator.kt:182 */
|
1046 1580 | }
|
1581 + | /* PythonServerUnionGenerator.kt:76 */
|
1047 1582 | /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
|
1583 + | /* PythonServerUnionGenerator.kt:77 */
|
1048 1584 | /// :rtype bool:
|
1585 + | /* PythonServerUnionGenerator.kt:78 */
|
1049 1586 | pub fn is_boolean_value(&self) -> bool {
|
1587 + | /* PythonServerUnionGenerator.kt:79 */
|
1050 1588 | self.0.is_boolean_value()
|
1589 + | /* PythonServerUnionGenerator.kt:78 */
|
1051 1590 | }
|
1591 + | /* RustType.kt:516 */
|
1052 1592 | #[staticmethod]
|
1593 + | /* PythonServerUnionGenerator.kt:134 */
|
1053 1594 | /// Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
|
1595 + | /* PythonServerUnionGenerator.kt:138 */
|
1054 1596 | /// :param data json_rpc10.model.FooEnum:
|
1597 + | /* PythonServerUnionGenerator.kt:139 */
|
1055 1598 | /// :rtype MyUnion:
|
1599 + | /* PythonServerUnionGenerator.kt:140 */
|
1056 1600 | pub fn enum_value(data: crate::model::FooEnum) -> Self {
|
1601 + | /* PythonServerUnionGenerator.kt:141 */
|
1057 1602 | Self(MyUnion::EnumValue(data))
|
1603 + | /* PythonServerUnionGenerator.kt:140 */
|
1058 1604 | }
|
1605 + | /* PythonServerUnionGenerator.kt:176 */
|
1059 1606 | /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
|
1607 + | /* PythonServerUnionGenerator.kt:181 */
|
1060 1608 | /// :rtype json_rpc10.model.FooEnum:
|
1609 + | /* PythonServerUnionGenerator.kt:182 */
|
1061 1610 | pub fn as_enum_value(&self) -> ::pyo3::PyResult<crate::model::FooEnum> {
|
1611 + | /* PythonServerUnionGenerator.kt:190 */
|
1062 1612 | match self.0.as_enum_value() {
|
1063 1613 | Ok(variant) => Ok(variant.clone()),
|
1064 1614 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1065 1615 | r"MyUnion variant is not of type json_rpc10.model.FooEnum",
|
1066 1616 | )),
|
1067 1617 | }
|
1618 + | /* PythonServerUnionGenerator.kt:182 */
|
1068 1619 | }
|
1620 + | /* PythonServerUnionGenerator.kt:76 */
|
1069 1621 | /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
|
1622 + | /* PythonServerUnionGenerator.kt:77 */
|
1070 1623 | /// :rtype bool:
|
1624 + | /* PythonServerUnionGenerator.kt:78 */
|
1071 1625 | pub fn is_enum_value(&self) -> bool {
|
1626 + | /* PythonServerUnionGenerator.kt:79 */
|
1072 1627 | self.0.is_enum_value()
|
1628 + | /* PythonServerUnionGenerator.kt:78 */
|
1073 1629 | }
|
1630 + | /* RustType.kt:516 */
|
1074 1631 | #[staticmethod]
|
1632 + | /* PythonServerUnionGenerator.kt:134 */
|
1075 1633 | /// Creates a new union instance of [`IntEnumValue`](crate::model::MyUnion::IntEnumValue)
|
1634 + | /* PythonServerUnionGenerator.kt:138 */
|
1076 1635 | /// :param data int:
|
1636 + | /* PythonServerUnionGenerator.kt:139 */
|
1077 1637 | /// :rtype MyUnion:
|
1638 + | /* PythonServerUnionGenerator.kt:140 */
|
1078 1639 | pub fn int_enum_value(data: i32) -> Self {
|
1640 + | /* PythonServerUnionGenerator.kt:141 */
|
1079 1641 | Self(MyUnion::IntEnumValue(data))
|
1642 + | /* PythonServerUnionGenerator.kt:140 */
|
1080 1643 | }
|
1644 + | /* PythonServerUnionGenerator.kt:176 */
|
1081 1645 | /// Tries to convert the enum instance into [`IntEnumValue`](crate::model::MyUnion::IntEnumValue), extracting the inner [`i32`](i32).
|
1646 + | /* PythonServerUnionGenerator.kt:181 */
|
1082 1647 | /// :rtype int:
|
1648 + | /* PythonServerUnionGenerator.kt:182 */
|
1083 1649 | pub fn as_int_enum_value(&self) -> ::pyo3::PyResult<i32> {
|
1650 + | /* PythonServerUnionGenerator.kt:190 */
|
1084 1651 | match self.0.as_int_enum_value() {
|
1085 1652 | Ok(variant) => Ok(*variant),
|
1086 1653 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1087 1654 | r"MyUnion variant is not of type int",
|
1088 1655 | )),
|
1089 1656 | }
|
1657 + | /* PythonServerUnionGenerator.kt:182 */
|
1090 1658 | }
|
1659 + | /* PythonServerUnionGenerator.kt:76 */
|
1091 1660 | /// Returns true if this is a [`IntEnumValue`](crate::model::MyUnion::IntEnumValue).
|
1661 + | /* PythonServerUnionGenerator.kt:77 */
|
1092 1662 | /// :rtype bool:
|
1663 + | /* PythonServerUnionGenerator.kt:78 */
|
1093 1664 | pub fn is_int_enum_value(&self) -> bool {
|
1665 + | /* PythonServerUnionGenerator.kt:79 */
|
1094 1666 | self.0.is_int_enum_value()
|
1667 + | /* PythonServerUnionGenerator.kt:78 */
|
1095 1668 | }
|
1669 + | /* RustType.kt:516 */
|
1096 1670 | #[staticmethod]
|
1671 + | /* PythonServerUnionGenerator.kt:134 */
|
1097 1672 | /// Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
|
1673 + | /* PythonServerUnionGenerator.kt:138 */
|
1098 1674 | /// :param data typing.List\[str\]:
|
1675 + | /* PythonServerUnionGenerator.kt:139 */
|
1099 1676 | /// :rtype MyUnion:
|
1677 + | /* PythonServerUnionGenerator.kt:140 */
|
1100 1678 | pub fn list_value(data: ::std::vec::Vec<::std::string::String>) -> Self {
|
1679 + | /* PythonServerUnionGenerator.kt:141 */
|
1101 1680 | Self(MyUnion::ListValue(data))
|
1681 + | /* PythonServerUnionGenerator.kt:140 */
|
1102 1682 | }
|
1683 + | /* PythonServerUnionGenerator.kt:176 */
|
1103 1684 | /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
|
1685 + | /* PythonServerUnionGenerator.kt:181 */
|
1104 1686 | /// :rtype typing.List\[str\]:
|
1687 + | /* PythonServerUnionGenerator.kt:182 */
|
1105 1688 | pub fn as_list_value(&self) -> ::pyo3::PyResult<::std::vec::Vec<::std::string::String>> {
|
1689 + | /* PythonServerUnionGenerator.kt:190 */
|
1106 1690 | match self.0.as_list_value() {
|
1107 1691 | Ok(variant) => Ok(variant.clone()),
|
1108 1692 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1109 1693 | r"MyUnion variant is not of type typing.List\[str\]",
|
1110 1694 | )),
|
1111 1695 | }
|
1696 + | /* PythonServerUnionGenerator.kt:182 */
|
1112 1697 | }
|
1698 + | /* PythonServerUnionGenerator.kt:76 */
|
1113 1699 | /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
|
1700 + | /* PythonServerUnionGenerator.kt:77 */
|
1114 1701 | /// :rtype bool:
|
1702 + | /* PythonServerUnionGenerator.kt:78 */
|
1115 1703 | pub fn is_list_value(&self) -> bool {
|
1704 + | /* PythonServerUnionGenerator.kt:79 */
|
1116 1705 | self.0.is_list_value()
|
1706 + | /* PythonServerUnionGenerator.kt:78 */
|
1117 1707 | }
|
1708 + | /* RustType.kt:516 */
|
1118 1709 | #[staticmethod]
|
1710 + | /* PythonServerUnionGenerator.kt:134 */
|
1119 1711 | /// Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
|
1712 + | /* PythonServerUnionGenerator.kt:138 */
|
1120 1713 | /// :param data typing.Dict\[str, str\]:
|
1714 + | /* PythonServerUnionGenerator.kt:139 */
|
1121 1715 | /// :rtype MyUnion:
|
1716 + | /* PythonServerUnionGenerator.kt:140 */
|
1122 1717 | pub fn map_value(
|
1123 1718 | data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1124 1719 | ) -> Self {
|
1720 + | /* PythonServerUnionGenerator.kt:141 */
|
1125 1721 | Self(MyUnion::MapValue(data))
|
1722 + | /* PythonServerUnionGenerator.kt:140 */
|
1126 1723 | }
|
1724 + | /* PythonServerUnionGenerator.kt:176 */
|
1127 1725 | /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
|
1726 + | /* PythonServerUnionGenerator.kt:181 */
|
1128 1727 | /// :rtype typing.Dict\[str, str\]:
|
1728 + | /* PythonServerUnionGenerator.kt:182 */
|
1129 1729 | pub fn as_map_value(
|
1130 1730 | &self,
|
1131 1731 | ) -> ::pyo3::PyResult<::std::collections::HashMap<::std::string::String, ::std::string::String>>
|
1132 1732 | {
|
1733 + | /* PythonServerUnionGenerator.kt:190 */
|
1133 1734 | match self.0.as_map_value() {
|
1134 1735 | Ok(variant) => Ok(variant.clone()),
|
1135 1736 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1136 1737 | r"MyUnion variant is not of type typing.Dict\[str, str\]",
|
1137 1738 | )),
|
1138 1739 | }
|
1740 + | /* PythonServerUnionGenerator.kt:182 */
|
1139 1741 | }
|
1742 + | /* PythonServerUnionGenerator.kt:76 */
|
1140 1743 | /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
|
1744 + | /* PythonServerUnionGenerator.kt:77 */
|
1141 1745 | /// :rtype bool:
|
1746 + | /* PythonServerUnionGenerator.kt:78 */
|
1142 1747 | pub fn is_map_value(&self) -> bool {
|
1748 + | /* PythonServerUnionGenerator.kt:79 */
|
1143 1749 | self.0.is_map_value()
|
1750 + | /* PythonServerUnionGenerator.kt:78 */
|
1144 1751 | }
|
1752 + | /* RustType.kt:516 */
|
1145 1753 | #[staticmethod]
|
1754 + | /* PythonServerUnionGenerator.kt:134 */
|
1146 1755 | /// Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
|
1756 + | /* PythonServerUnionGenerator.kt:138 */
|
1147 1757 | /// :param data int:
|
1758 + | /* PythonServerUnionGenerator.kt:139 */
|
1148 1759 | /// :rtype MyUnion:
|
1760 + | /* PythonServerUnionGenerator.kt:140 */
|
1149 1761 | pub fn number_value(data: i32) -> Self {
|
1762 + | /* PythonServerUnionGenerator.kt:141 */
|
1150 1763 | Self(MyUnion::NumberValue(data))
|
1764 + | /* PythonServerUnionGenerator.kt:140 */
|
1151 1765 | }
|
1766 + | /* PythonServerUnionGenerator.kt:176 */
|
1152 1767 | /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
|
1768 + | /* PythonServerUnionGenerator.kt:181 */
|
1153 1769 | /// :rtype int:
|
1770 + | /* PythonServerUnionGenerator.kt:182 */
|
1154 1771 | pub fn as_number_value(&self) -> ::pyo3::PyResult<i32> {
|
1772 + | /* PythonServerUnionGenerator.kt:190 */
|
1155 1773 | match self.0.as_number_value() {
|
1156 1774 | Ok(variant) => Ok(*variant),
|
1157 1775 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1158 1776 | r"MyUnion variant is not of type int",
|
1159 1777 | )),
|
1160 1778 | }
|
1779 + | /* PythonServerUnionGenerator.kt:182 */
|
1161 1780 | }
|
1781 + | /* PythonServerUnionGenerator.kt:76 */
|
1162 1782 | /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
|
1783 + | /* PythonServerUnionGenerator.kt:77 */
|
1163 1784 | /// :rtype bool:
|
1785 + | /* PythonServerUnionGenerator.kt:78 */
|
1164 1786 | pub fn is_number_value(&self) -> bool {
|
1787 + | /* PythonServerUnionGenerator.kt:79 */
|
1165 1788 | self.0.is_number_value()
|
1789 + | /* PythonServerUnionGenerator.kt:78 */
|
1166 1790 | }
|
1791 + | /* RustType.kt:516 */
|
1167 1792 | #[staticmethod]
|
1793 + | /* PythonServerUnionGenerator.kt:134 */
|
1168 1794 | /// Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
|
1795 + | /* PythonServerUnionGenerator.kt:138 */
|
1169 1796 | /// :param data str:
|
1797 + | /* PythonServerUnionGenerator.kt:139 */
|
1170 1798 | /// :rtype MyUnion:
|
1799 + | /* PythonServerUnionGenerator.kt:140 */
|
1171 1800 | pub fn string_value(data: ::std::string::String) -> Self {
|
1801 + | /* PythonServerUnionGenerator.kt:141 */
|
1172 1802 | Self(MyUnion::StringValue(data))
|
1803 + | /* PythonServerUnionGenerator.kt:140 */
|
1173 1804 | }
|
1805 + | /* PythonServerUnionGenerator.kt:176 */
|
1174 1806 | /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
|
1807 + | /* PythonServerUnionGenerator.kt:181 */
|
1175 1808 | /// :rtype str:
|
1809 + | /* PythonServerUnionGenerator.kt:182 */
|
1176 1810 | pub fn as_string_value(&self) -> ::pyo3::PyResult<::std::string::String> {
|
1811 + | /* PythonServerUnionGenerator.kt:190 */
|
1177 1812 | match self.0.as_string_value() {
|
1178 1813 | Ok(variant) => Ok(variant.clone()),
|
1179 1814 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1180 1815 | r"MyUnion variant is not of type str",
|
1181 1816 | )),
|
1182 1817 | }
|
1818 + | /* PythonServerUnionGenerator.kt:182 */
|
1183 1819 | }
|
1820 + | /* PythonServerUnionGenerator.kt:76 */
|
1184 1821 | /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
|
1822 + | /* PythonServerUnionGenerator.kt:77 */
|
1185 1823 | /// :rtype bool:
|
1824 + | /* PythonServerUnionGenerator.kt:78 */
|
1186 1825 | pub fn is_string_value(&self) -> bool {
|
1826 + | /* PythonServerUnionGenerator.kt:79 */
|
1187 1827 | self.0.is_string_value()
|
1828 + | /* PythonServerUnionGenerator.kt:78 */
|
1188 1829 | }
|
1830 + | /* RustType.kt:516 */
|
1189 1831 | #[staticmethod]
|
1832 + | /* PythonServerUnionGenerator.kt:134 */
|
1190 1833 | /// Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
|
1834 + | /* PythonServerUnionGenerator.kt:138 */
|
1191 1835 | /// :param data json_rpc10.model.GreetingStruct:
|
1836 + | /* PythonServerUnionGenerator.kt:139 */
|
1192 1837 | /// :rtype MyUnion:
|
1838 + | /* PythonServerUnionGenerator.kt:140 */
|
1193 1839 | pub fn structure_value(data: crate::model::GreetingStruct) -> Self {
|
1840 + | /* PythonServerUnionGenerator.kt:141 */
|
1194 1841 | Self(MyUnion::StructureValue(data))
|
1842 + | /* PythonServerUnionGenerator.kt:140 */
|
1195 1843 | }
|
1844 + | /* PythonServerUnionGenerator.kt:176 */
|
1196 1845 | /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
|
1846 + | /* PythonServerUnionGenerator.kt:181 */
|
1197 1847 | /// :rtype json_rpc10.model.GreetingStruct:
|
1848 + | /* PythonServerUnionGenerator.kt:182 */
|
1198 1849 | pub fn as_structure_value(&self) -> ::pyo3::PyResult<crate::model::GreetingStruct> {
|
1850 + | /* PythonServerUnionGenerator.kt:190 */
|
1199 1851 | match self.0.as_structure_value() {
|
1200 1852 | Ok(variant) => Ok(variant.clone()),
|
1201 1853 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1202 1854 | r"MyUnion variant is not of type json_rpc10.model.GreetingStruct",
|
1203 1855 | )),
|
1204 1856 | }
|
1857 + | /* PythonServerUnionGenerator.kt:182 */
|
1205 1858 | }
|
1859 + | /* PythonServerUnionGenerator.kt:76 */
|
1206 1860 | /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
|
1861 + | /* PythonServerUnionGenerator.kt:77 */
|
1207 1862 | /// :rtype bool:
|
1863 + | /* PythonServerUnionGenerator.kt:78 */
|
1208 1864 | pub fn is_structure_value(&self) -> bool {
|
1865 + | /* PythonServerUnionGenerator.kt:79 */
|
1209 1866 | self.0.is_structure_value()
|
1867 + | /* PythonServerUnionGenerator.kt:78 */
|
1210 1868 | }
|
1869 + | /* RustType.kt:516 */
|
1211 1870 | #[staticmethod]
|
1871 + | /* PythonServerUnionGenerator.kt:134 */
|
1212 1872 | /// Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
|
1873 + | /* PythonServerUnionGenerator.kt:138 */
|
1213 1874 | /// :param data json_rpc10.types.DateTime:
|
1875 + | /* PythonServerUnionGenerator.kt:139 */
|
1214 1876 | /// :rtype MyUnion:
|
1877 + | /* PythonServerUnionGenerator.kt:140 */
|
1215 1878 | pub fn timestamp_value(data: ::aws_smithy_http_server_python::types::DateTime) -> Self {
|
1879 + | /* PythonServerUnionGenerator.kt:141 */
|
1216 1880 | Self(MyUnion::TimestampValue(data))
|
1881 + | /* PythonServerUnionGenerator.kt:140 */
|
1217 1882 | }
|
1883 + | /* PythonServerUnionGenerator.kt:176 */
|
1218 1884 | /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
|
1885 + | /* PythonServerUnionGenerator.kt:181 */
|
1219 1886 | /// :rtype json_rpc10.types.DateTime:
|
1887 + | /* PythonServerUnionGenerator.kt:182 */
|
1220 1888 | pub fn as_timestamp_value(
|
1221 1889 | &self,
|
1222 1890 | ) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::DateTime> {
|
1891 + | /* PythonServerUnionGenerator.kt:190 */
|
1223 1892 | match self.0.as_timestamp_value() {
|
1224 1893 | Ok(variant) => Ok(variant.clone()),
|
1225 1894 | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
1226 1895 | r"MyUnion variant is not of type json_rpc10.types.DateTime",
|
1227 1896 | )),
|
1228 1897 | }
|
1898 + | /* PythonServerUnionGenerator.kt:182 */
|
1229 1899 | }
|
1900 + | /* PythonServerUnionGenerator.kt:76 */
|
1230 1901 | /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
|
1902 + | /* PythonServerUnionGenerator.kt:77 */
|
1231 1903 | /// :rtype bool:
|
1904 + | /* PythonServerUnionGenerator.kt:78 */
|
1232 1905 | pub fn is_timestamp_value(&self) -> bool {
|
1906 + | /* PythonServerUnionGenerator.kt:79 */
|
1233 1907 | self.0.is_timestamp_value()
|
1908 + | /* PythonServerUnionGenerator.kt:78 */
|
1234 1909 | }
|
1910 + | /* PythonServerUnionGenerator.kt:66 */
|
1235 1911 | }
|
1912 + | /* PythonServerUnionGenerator.kt:93 */
|
1236 1913 | impl ::pyo3::IntoPy<::pyo3::PyObject> for MyUnion {
|
1914 + | /* PythonServerUnionGenerator.kt:94 */
|
1237 1915 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1916 + | /* PythonServerUnionGenerator.kt:95 */
|
1238 1917 | PyUnionMarkerMyUnion(self).into_py(py)
|
1918 + | /* PythonServerUnionGenerator.kt:94 */
|
1239 1919 | }
|
1920 + | /* PythonServerUnionGenerator.kt:93 */
|
1240 1921 | }
|
1922 + | /* PythonServerUnionGenerator.kt:98 */
|
1241 1923 | impl<'source> ::pyo3::FromPyObject<'source> for MyUnion {
|
1924 + | /* PythonServerUnionGenerator.kt:99 */
|
1242 1925 | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1926 + | /* PythonServerUnionGenerator.kt:100 */
|
1243 1927 | let data: PyUnionMarkerMyUnion = obj.extract()?;
|
1244 1928 | Ok(data.0)
|
1929 + | /* PythonServerUnionGenerator.kt:99 */
|
1245 1930 | }
|
1931 + | /* PythonServerUnionGenerator.kt:98 */
|
1246 1932 | }
|
1247 1933 |
|
1934 + | /* RustType.kt:516 */
|
1248 1935 | #[::pyo3::pyclass]
|
1936 + | /* PythonServerStructureGenerator.kt:63 */
|
1249 1937 | /// :param hi typing.Optional\[str\]:
|
1250 1938 | /// :rtype None:
|
1939 + | /* StructureGenerator.kt:197 */
|
1251 1940 | #[allow(missing_docs)] // documentation missing in model
|
1941 + | /* RustType.kt:516 */
|
1252 1942 | #[derive(
|
1253 1943 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1254 1944 | )]
|
1255 - | pub struct GreetingStruct {
|
1945 + | pub /* StructureGenerator.kt:201 */ struct GreetingStruct {
|
1946 + | /* RustType.kt:516 */
|
1256 1947 | #[pyo3(get, set)]
|
1948 + | /* PythonServerStructureGenerator.kt:80 */
|
1257 1949 | /// :type typing.Optional\[str\]:
|
1950 + | /* StructureGenerator.kt:231 */
|
1258 1951 | #[allow(missing_docs)] // documentation missing in model
|
1259 1952 | pub hi: ::std::option::Option<::std::string::String>,
|
1953 + | /* StructureGenerator.kt:201 */
|
1260 1954 | }
|
1955 + | /* StructureGenerator.kt:135 */
|
1261 1956 | impl GreetingStruct {
|
1957 + | /* StructureGenerator.kt:231 */
|
1262 1958 | #[allow(missing_docs)] // documentation missing in model
|
1959 + | /* StructureGenerator.kt:166 */
|
1263 1960 | pub fn hi(&self) -> ::std::option::Option<&str> {
|
1961 + | /* StructureGenerator.kt:169 */
|
1264 1962 | self.hi.as_deref()
|
1963 + | /* StructureGenerator.kt:166 */
|
1265 1964 | }
|
1965 + | /* StructureGenerator.kt:135 */
|
1266 1966 | }
|
1967 + | /* RustType.kt:516 */
|
1267 1968 | #[allow(clippy::new_without_default)]
|
1969 + | /* RustType.kt:516 */
|
1268 1970 | #[allow(clippy::too_many_arguments)]
|
1971 + | /* RustType.kt:516 */
|
1269 1972 | #[::pyo3::pymethods]
|
1973 + | /* PythonServerStructureGenerator.kt:88 */
|
1270 1974 | impl GreetingStruct {
|
1271 1975 | #[new]
|
1272 1976 | pub fn new(hi: ::std::option::Option<::std::string::String>) -> Self {
|
1273 1977 | Self { hi }
|
1274 1978 | }
|
1275 1979 | fn __repr__(&self) -> String {
|
1276 1980 | format!("{self:?}")
|
1277 1981 | }
|
1278 1982 | fn __str__(&self) -> String {
|
1279 1983 | format!("{self:?}")
|
1280 1984 | }
|
1281 1985 | }
|
1986 + | /* PythonServerStructureGenerator.kt:111 */
|
1282 1987 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<GreetingStruct> {
|
1283 1988 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1284 1989 | ob.extract::<GreetingStruct>().map(Box::new)
|
1285 1990 | }
|
1286 1991 | }
|
1287 1992 |
|
1288 1993 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<GreetingStruct> {
|
1289 1994 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1290 1995 | (*self).into_py(py)
|
1291 1996 | }
|
1292 1997 | }
|
1998 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
1293 1999 | impl crate::constrained::Constrained for crate::model::GreetingStruct {
|
1294 2000 | type Unconstrained = crate::model::greeting_struct_internal::Builder;
|
1295 2001 | }
|
2002 + | /* ServerCodegenVisitor.kt:370 */
|
1296 2003 | impl GreetingStruct {
|
1297 - | /// Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
|
2004 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
|
2005 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1298 2006 | pub fn builder() -> crate::model::greeting_struct::Builder {
|
2007 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
1299 2008 | crate::model::greeting_struct::Builder::default()
|
2009 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1300 2010 | }
|
2011 + | /* ServerCodegenVisitor.kt:370 */
|
1301 2012 | }
|
1302 2013 |
|
2014 + | /* RustType.kt:516 */
|
1303 2015 | #[::pyo3::pyclass]
|
2016 + | /* EnumGenerator.kt:154 */
|
1304 2017 | #[allow(missing_docs)] // documentation missing in model
|
2018 + | /* RustType.kt:516 */
|
1305 2019 | #[derive(
|
1306 2020 | ::std::clone::Clone,
|
1307 2021 | ::std::cmp::Eq,
|
1308 2022 | ::std::cmp::Ord,
|
1309 2023 | ::std::cmp::PartialEq,
|
1310 2024 | ::std::cmp::PartialOrd,
|
1311 2025 | ::std::fmt::Debug,
|
1312 2026 | ::std::hash::Hash,
|
1313 2027 | )]
|
1314 - | pub enum FooEnum {
|
2028 + | pub /* EnumGenerator.kt:267 */ enum FooEnum {
|
2029 + | /* EnumGenerator.kt:154 */
|
1315 2030 | #[allow(missing_docs)] // documentation missing in model
|
2031 + | /* EnumGenerator.kt:143 */
|
1316 2032 | Zero,
|
2033 + | /* EnumGenerator.kt:154 */
|
1317 2034 | #[allow(missing_docs)] // documentation missing in model
|
2035 + | /* EnumGenerator.kt:143 */
|
1318 2036 | One,
|
2037 + | /* EnumGenerator.kt:154 */
|
1319 2038 | #[allow(missing_docs)] // documentation missing in model
|
2039 + | /* EnumGenerator.kt:143 */
|
1320 2040 | Bar,
|
2041 + | /* EnumGenerator.kt:154 */
|
1321 2042 | #[allow(missing_docs)] // documentation missing in model
|
2043 + | /* EnumGenerator.kt:143 */
|
1322 2044 | Baz,
|
2045 + | /* EnumGenerator.kt:154 */
|
1323 2046 | #[allow(missing_docs)] // documentation missing in model
|
2047 + | /* EnumGenerator.kt:143 */
|
1324 2048 | Foo,
|
2049 + | /* EnumGenerator.kt:267 */
|
1325 2050 | }
|
1326 2051 | pub(crate) mod foo_enum_internal {
|
1327 2052 | #[derive(Debug, PartialEq)]
|
1328 2053 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
1329 2054 |
|
1330 2055 | impl ::std::fmt::Display for ConstraintViolation {
|
1331 2056 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1332 2057 | write!(
|
1333 2058 | f,
|
1334 2059 | r#"Value provided for 'aws.protocoltests.shared#FooEnum' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#
|
1335 2060 | )
|
1336 2061 | }
|
1337 2062 | }
|
1338 2063 |
|
1339 2064 | impl ::std::error::Error for ConstraintViolation {}
|
1340 2065 | impl ConstraintViolation {
|
1341 2066 | pub(crate) fn as_validation_exception_field(
|
1342 2067 | self,
|
1343 2068 | path: ::std::string::String,
|
1344 2069 | ) -> crate::model::ValidationExceptionField {
|
1345 2070 | crate::model::ValidationExceptionField {
|
1346 2071 | message: format!(
|
1347 2072 | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#,
|
1348 2073 | &path
|
1349 2074 | ),
|
1350 2075 | path,
|
1351 2076 | }
|
1352 2077 | }
|
1353 2078 | }
|
2079 + |
|
2080 + | /* ServerEnumGenerator.kt:46 */
|
1354 2081 | }
|
2082 + | /* ServerEnumGenerator.kt:85 */
|
1355 2083 | impl ::std::convert::TryFrom<&str> for FooEnum {
|
1356 2084 | type Error = crate::model::foo_enum_internal::ConstraintViolation;
|
1357 2085 | fn try_from(
|
1358 2086 | s: &str,
|
1359 2087 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
1360 2088 | match s {
|
1361 2089 | "0" => Ok(FooEnum::Zero),
|
1362 2090 | "1" => Ok(FooEnum::One),
|
1363 2091 | "Bar" => Ok(FooEnum::Bar),
|
1364 2092 | "Baz" => Ok(FooEnum::Baz),
|
1365 2093 | "Foo" => Ok(FooEnum::Foo),
|
1366 2094 | _ => Err(crate::model::foo_enum_internal::ConstraintViolation(
|
1367 2095 | s.to_owned(),
|
1368 2096 | )),
|
1369 2097 | }
|
1370 2098 | }
|
1371 2099 | }
|
1372 2100 | impl ::std::convert::TryFrom<::std::string::String> for FooEnum {
|
1373 2101 | type Error = crate::model::foo_enum_internal::ConstraintViolation;
|
1374 2102 | fn try_from(
|
1375 2103 | s: ::std::string::String,
|
1376 2104 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
1377 2105 | {
|
1378 2106 | s.as_str().try_into()
|
1379 2107 | }
|
1380 2108 | }
|
2109 + | /* ServerEnumGenerator.kt:145 */
|
1381 2110 | impl std::str::FromStr for FooEnum {
|
1382 2111 | type Err = crate::model::foo_enum_internal::ConstraintViolation;
|
1383 2112 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
1384 2113 | Self::try_from(s)
|
1385 2114 | }
|
1386 2115 | }
|
2116 + | /* EnumGenerator.kt:274 */
|
1387 2117 | impl FooEnum {
|
1388 2118 | /// Returns the `&str` value of the enum member.
|
1389 2119 | pub fn as_str(&self) -> &str {
|
1390 2120 | match self {
|
1391 2121 | FooEnum::Zero => "0",
|
1392 2122 | FooEnum::One => "1",
|
1393 2123 | FooEnum::Bar => "Bar",
|
1394 2124 | FooEnum::Baz => "Baz",
|
1395 2125 | FooEnum::Foo => "Foo",
|
1396 2126 | }
|
1397 2127 | }
|
1398 2128 | /// Returns all the `&str` representations of the enum members.
|
1399 2129 | pub const fn values() -> &'static [&'static str] {
|
1400 2130 | &["0", "1", "Bar", "Baz", "Foo"]
|
1401 2131 | }
|
1402 2132 | }
|
2133 + | /* EnumGenerator.kt:223 */
|
1403 2134 | impl ::std::convert::AsRef<str> for FooEnum {
|
1404 2135 | fn as_ref(&self) -> &str {
|
1405 2136 | self.as_str()
|
1406 2137 | }
|
1407 2138 | }
|
2139 + | /* RustType.kt:516 */
|
1408 2140 | #[::pyo3::pymethods]
|
2141 + | /* PythonServerEnumGenerator.kt:41 */
|
1409 2142 | impl FooEnum {
|
1410 2143 | #[getter]
|
1411 2144 | pub fn name(&self) -> &str {
|
1412 2145 | match self {
|
1413 2146 | FooEnum::Zero => "Zero",
|
1414 2147 | FooEnum::One => "One",
|
1415 2148 | FooEnum::Bar => "Bar",
|
1416 2149 | FooEnum::Baz => "Baz",
|
1417 2150 | FooEnum::Foo => "Foo",
|
1418 2151 | }
|
1419 2152 | }
|
1420 2153 | #[getter]
|
1421 2154 | pub fn value(&self) -> &str {
|
1422 2155 | self.as_str()
|
1423 2156 | }
|
1424 2157 | fn __repr__(&self) -> String {
|
1425 2158 | self.as_str().to_owned()
|
1426 2159 | }
|
1427 2160 | fn __str__(&self) -> String {
|
1428 2161 | self.as_str().to_owned()
|
1429 2162 | }
|
1430 2163 | }
|
2164 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
1431 2165 | impl crate::constrained::Constrained for FooEnum {
|
1432 2166 | type Unconstrained = ::std::string::String;
|
1433 2167 | }
|
1434 2168 |
|
1435 2169 | impl ::std::convert::From<::std::string::String>
|
1436 2170 | for crate::constrained::MaybeConstrained<crate::model::FooEnum>
|
1437 2171 | {
|
1438 2172 | fn from(value: ::std::string::String) -> Self {
|
1439 2173 | Self::Unconstrained(value)
|
1440 2174 | }
|
1441 2175 | }
|
1442 2176 |
|
2177 + | /* RustType.kt:516 */
|
1443 2178 | #[::pyo3::pyclass]
|
2179 + | /* PythonServerStructureGenerator.kt:63 */
|
1444 2180 | /// :param foo typing.Optional\[str\]:
|
1445 2181 | /// :rtype None:
|
2182 + | /* StructureGenerator.kt:197 */
|
1446 2183 | #[allow(missing_docs)] // documentation missing in model
|
2184 + | /* RustType.kt:516 */
|
1447 2185 | #[derive(
|
1448 2186 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
1449 2187 | )]
|
1450 - | pub struct ComplexNestedErrorData {
|
2188 + | pub /* StructureGenerator.kt:201 */ struct ComplexNestedErrorData {
|
2189 + | /* RustType.kt:516 */
|
1451 2190 | #[pyo3(get, set)]
|
2191 + | /* PythonServerStructureGenerator.kt:80 */
|
1452 2192 | /// :type typing.Optional\[str\]:
|
2193 + | /* StructureGenerator.kt:231 */
|
1453 2194 | #[allow(missing_docs)] // documentation missing in model
|
1454 2195 | pub foo: ::std::option::Option<::std::string::String>,
|
2196 + | /* StructureGenerator.kt:201 */
|
1455 2197 | }
|
2198 + | /* StructureGenerator.kt:135 */
|
1456 2199 | impl ComplexNestedErrorData {
|
2200 + | /* StructureGenerator.kt:231 */
|
1457 2201 | #[allow(missing_docs)] // documentation missing in model
|
2202 + | /* StructureGenerator.kt:166 */
|
1458 2203 | pub fn foo(&self) -> ::std::option::Option<&str> {
|
2204 + | /* StructureGenerator.kt:169 */
|
1459 2205 | self.foo.as_deref()
|
2206 + | /* StructureGenerator.kt:166 */
|
1460 2207 | }
|
2208 + | /* StructureGenerator.kt:135 */
|
1461 2209 | }
|
2210 + | /* RustType.kt:516 */
|
1462 2211 | #[allow(clippy::new_without_default)]
|
2212 + | /* RustType.kt:516 */
|
1463 2213 | #[allow(clippy::too_many_arguments)]
|
2214 + | /* RustType.kt:516 */
|
1464 2215 | #[::pyo3::pymethods]
|
2216 + | /* PythonServerStructureGenerator.kt:88 */
|
1465 2217 | impl ComplexNestedErrorData {
|
1466 2218 | #[new]
|
1467 2219 | pub fn new(foo: ::std::option::Option<::std::string::String>) -> Self {
|
1468 2220 | Self { foo }
|
1469 2221 | }
|
1470 2222 | fn __repr__(&self) -> String {
|
1471 2223 | format!("{self:?}")
|
1472 2224 | }
|
1473 2225 | fn __str__(&self) -> String {
|
1474 2226 | format!("{self:?}")
|
1475 2227 | }
|
1476 2228 | }
|
2229 + | /* PythonServerStructureGenerator.kt:111 */
|
1477 2230 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ComplexNestedErrorData> {
|
1478 2231 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
1479 2232 | ob.extract::<ComplexNestedErrorData>().map(Box::new)
|
1480 2233 | }
|
1481 2234 | }
|
1482 2235 |
|
1483 2236 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ComplexNestedErrorData> {
|
1484 2237 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
1485 2238 | (*self).into_py(py)
|
1486 2239 | }
|
1487 2240 | }
|
2241 + | /* ServerCodegenVisitor.kt:370 */
|
1488 2242 | impl ComplexNestedErrorData {
|
1489 - | /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
2243 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
2244 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1490 2245 | pub fn builder() -> crate::model::complex_nested_error_data::Builder {
|
2246 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
|
1491 2247 | crate::model::complex_nested_error_data::Builder::default()
|
2248 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
|
1492 2249 | }
|
2250 + | /* ServerCodegenVisitor.kt:370 */
|
1493 2251 | }
|
1494 - | /// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2252 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
1495 2253 | pub mod validation_exception_field {
|
1496 2254 |
|
2255 + | /* RustType.kt:516 */
|
1497 2256 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1498 - | /// Holds one variant for each of the ways the builder can fail.
|
1499 - |
|
2257 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2258 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1500 2259 | #[allow(clippy::enum_variant_names)]
|
1501 2260 | pub enum ConstraintViolation {
|
1502 - | /// `path` was not provided but it is required when building `ValidationExceptionField`.
|
2261 + | /// /* ServerBuilderConstraintViolations.kt:138 */`path` was not provided but it is required when building `ValidationExceptionField`.
|
2262 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1503 2263 | MissingPath,
|
1504 - | /// `message` was not provided but it is required when building `ValidationExceptionField`.
|
2264 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationExceptionField`.
|
2265 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1505 2266 | MissingMessage,
|
2267 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1506 2268 | }
|
2269 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1507 2270 | impl ::std::fmt::Display for ConstraintViolation {
|
2271 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1508 2272 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2273 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1509 2274 | match self {
|
1510 - | ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
1511 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
1512 - | }
|
2275 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
2276 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
2277 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2278 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1513 2279 | }
|
2280 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1514 2281 | }
|
2282 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1515 2283 | impl ::std::error::Error for ConstraintViolation {}
|
2284 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1516 2285 | impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
|
1517 2286 | type Error = ConstraintViolation;
|
1518 2287 |
|
1519 2288 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1520 2289 | builder.build()
|
1521 2290 | }
|
1522 2291 | }
|
1523 - | /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2292 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2293 + | /* RustType.kt:516 */
|
1524 2294 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2295 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1525 2296 | pub struct Builder {
|
2297 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1526 2298 | pub(crate) path: ::std::option::Option<::std::string::String>,
|
2299 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1527 2300 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
2301 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1528 2302 | }
|
2303 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1529 2304 | impl Builder {
|
1530 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
2305 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
2306 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1531 2307 | pub fn path(mut self, input: ::std::string::String) -> Self {
|
1532 - | self.path = Some(input);
|
2308 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2309 + | self.path =
|
2310 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2311 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2312 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2313 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1533 2314 | self
|
2315 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1534 2316 | }
|
1535 - | /// A detailed description of the validation failure.
|
2317 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A detailed description of the validation failure.
|
2318 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1536 2319 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
1537 - | self.message = Some(input);
|
2320 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2321 + | self.message =
|
2322 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2323 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2324 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2325 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1538 2326 | self
|
2327 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1539 2328 | }
|
1540 - | /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
1541 - | ///
|
2329 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
2330 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1542 2331 | /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if you do not provide a value for all non-`Option`al members.
|
1543 2332 | ///
|
2333 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1544 2334 | pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
1545 2335 | self.build_enforcing_required_and_enum_traits()
|
1546 2336 | }
|
2337 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1547 2338 | fn build_enforcing_required_and_enum_traits(
|
1548 2339 | self,
|
1549 2340 | ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
1550 - | Ok(crate::model::ValidationExceptionField {
|
1551 - | path: self.path.ok_or(ConstraintViolation::MissingPath)?,
|
1552 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
1553 - | })
|
2341 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2342 + | Ok(
|
2343 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2344 + | crate::model::ValidationExceptionField {
|
2345 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2346 + | path: self
|
2347 + | .path
|
2348 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2349 + | .ok_or(ConstraintViolation::MissingPath)?,
|
2350 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2351 + | message: self
|
2352 + | .message
|
2353 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2354 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
2355 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2356 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2357 + | )
|
2358 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1554 2359 | }
|
2360 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1555 2361 | }
|
2362 + |
|
2363 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1556 2364 | }
|
1557 - | /// See [`Dialog`](crate::model::Dialog).
|
2365 + | /// /* ServerBuilderGenerator.kt:171 */See [`Dialog`](crate::model::Dialog).
|
1558 2366 | pub(crate) mod dialog_internal {
|
1559 2367 |
|
2368 + | /* ServerBuilderGenerator.kt:461 */
|
1560 2369 | impl ::std::convert::From<Builder> for crate::model::Dialog {
|
1561 2370 | fn from(builder: Builder) -> Self {
|
1562 2371 | builder.build()
|
1563 2372 | }
|
1564 2373 | }
|
1565 - | /// A builder for [`Dialog`](crate::model::Dialog).
|
2374 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Dialog`](crate::model::Dialog).
|
2375 + | /* RustType.kt:516 */
|
1566 2376 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2377 + | /* ServerBuilderGenerator.kt:211 */
|
1567 2378 | pub(crate) struct Builder {
|
2379 + | /* ServerBuilderGenerator.kt:308 */
|
1568 2380 | pub(crate) language: ::std::option::Option<::std::string::String>,
|
2381 + | /* ServerBuilderGenerator.kt:308 */
|
1569 2382 | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
2383 + | /* ServerBuilderGenerator.kt:308 */
|
1570 2384 | pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
|
2385 + | /* ServerBuilderGenerator.kt:211 */
|
1571 2386 | }
|
2387 + | /* ServerBuilderGenerator.kt:215 */
|
1572 2388 | impl Builder {
|
2389 + | /* ServerBuilderGenerator.kt:426 */
|
1573 2390 | #[allow(missing_docs)] // documentation missing in model
|
2391 + | /* ServerBuilderGenerator.kt:428 */
|
1574 2392 | pub(crate) fn set_language(
|
1575 2393 | mut self,
|
1576 2394 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1577 2395 | ) -> Self {
|
2396 + | /* ServerBuilderGenerator.kt:429 */
|
1578 2397 | self.language = input.map(|v| v.into());
|
1579 2398 | self
|
2399 + | /* ServerBuilderGenerator.kt:428 */
|
1580 2400 | }
|
2401 + | /* ServerBuilderGenerator.kt:426 */
|
1581 2402 | #[allow(missing_docs)] // documentation missing in model
|
2403 + | /* ServerBuilderGenerator.kt:428 */
|
1582 2404 | pub(crate) fn set_greeting(
|
1583 2405 | mut self,
|
1584 2406 | input: impl ::std::convert::Into<::std::string::String>,
|
1585 2407 | ) -> Self {
|
2408 + | /* ServerBuilderGenerator.kt:429 */
|
1586 2409 | self.greeting = Some(input.into());
|
1587 2410 | self
|
2411 + | /* ServerBuilderGenerator.kt:428 */
|
1588 2412 | }
|
2413 + | /* ServerBuilderGenerator.kt:426 */
|
1589 2414 | #[allow(missing_docs)] // documentation missing in model
|
2415 + | /* ServerBuilderGenerator.kt:428 */
|
1590 2416 | pub(crate) fn set_farewell(
|
1591 2417 | mut self,
|
1592 2418 | input: Option<impl ::std::convert::Into<crate::model::Farewell>>,
|
1593 2419 | ) -> Self {
|
2420 + | /* ServerBuilderGenerator.kt:429 */
|
1594 2421 | self.farewell = input.map(|v| v.into());
|
1595 2422 | self
|
2423 + | /* ServerBuilderGenerator.kt:428 */
|
1596 2424 | }
|
1597 - | /// Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
2425 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
2426 + | /* ServerBuilderGenerator.kt:271 */
|
1598 2427 | pub fn build(self) -> crate::model::Dialog {
|
1599 2428 | self.build_enforcing_all_constraints()
|
1600 2429 | }
|
2430 + | /* ServerBuilderGenerator.kt:283 */
|
1601 2431 | fn build_enforcing_all_constraints(self) -> crate::model::Dialog {
|
2432 + | /* ServerBuilderGenerator.kt:542 */
|
1602 2433 | crate::model::Dialog {
|
2434 + | /* ServerBuilderGenerator.kt:546 */
|
1603 2435 | language: self.language,
|
1604 - | greeting: self.greeting.unwrap_or_else(
|
2436 + | /* ServerBuilderGenerator.kt:546 */
|
2437 + | greeting: self
|
2438 + | .greeting
|
2439 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
2440 + | .unwrap_or_else(
|
1605 2441 | #[allow(clippy::redundant_closure)]
|
1606 2442 | || String::from("hi"),
|
1607 2443 | ),
|
2444 + | /* ServerBuilderGenerator.kt:546 */
|
1608 2445 | farewell: self.farewell,
|
2446 + | /* ServerBuilderGenerator.kt:542 */
|
1609 2447 | }
|
2448 + | /* ServerBuilderGenerator.kt:283 */
|
1610 2449 | }
|
2450 + | /* ServerBuilderGenerator.kt:215 */
|
1611 2451 | }
|
2452 + |
|
2453 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1612 2454 | }
|
1613 - | /// See [`Dialog`](crate::model::Dialog).
|
2455 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`Dialog`](crate::model::Dialog).
|
1614 2456 | pub mod dialog {
|
1615 2457 |
|
2458 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1616 2459 | impl ::std::convert::From<Builder> for crate::model::Dialog {
|
1617 2460 | fn from(builder: Builder) -> Self {
|
1618 2461 | builder.build()
|
1619 2462 | }
|
1620 2463 | }
|
1621 - | /// A builder for [`Dialog`](crate::model::Dialog).
|
2464 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`Dialog`](crate::model::Dialog).
|
2465 + | /* RustType.kt:516 */
|
1622 2466 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2467 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1623 2468 | pub struct Builder {
|
2469 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1624 2470 | pub(crate) language: ::std::option::Option<::std::string::String>,
|
2471 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1625 2472 | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
2473 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1626 2474 | pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
|
2475 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1627 2476 | }
|
2477 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1628 2478 | impl Builder {
|
2479 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1629 2480 | #[allow(missing_docs)] // documentation missing in model
|
2481 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1630 2482 | pub fn language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1631 - | self.language = input;
|
2483 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2484 + | self.language =
|
2485 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2486 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1632 2487 | self
|
2488 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1633 2489 | }
|
2490 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1634 2491 | #[allow(missing_docs)] // documentation missing in model
|
2492 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1635 2493 | pub fn greeting(mut self, input: ::std::string::String) -> Self {
|
1636 - | self.greeting = Some(input);
|
2494 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2495 + | self.greeting =
|
2496 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2497 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2498 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2499 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1637 2500 | self
|
2501 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1638 2502 | }
|
2503 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1639 2504 | #[allow(missing_docs)] // documentation missing in model
|
2505 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1640 2506 | pub fn farewell(mut self, input: ::std::option::Option<crate::model::Farewell>) -> Self {
|
1641 - | self.farewell = input;
|
2507 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2508 + | self.farewell =
|
2509 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2510 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1642 2511 | self
|
2512 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1643 2513 | }
|
1644 - | /// Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
2514 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
|
2515 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1645 2516 | pub fn build(self) -> crate::model::Dialog {
|
1646 2517 | self.build_enforcing_required_and_enum_traits()
|
1647 2518 | }
|
2519 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1648 2520 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::Dialog {
|
2521 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1649 2522 | crate::model::Dialog {
|
2523 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
1650 2524 | language: self.language,
|
1651 - | greeting: self.greeting.unwrap_or_else(
|
2525 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2526 + | greeting: self
|
2527 + | .greeting
|
2528 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
2529 + | .unwrap_or_else(
|
1652 2530 | #[allow(clippy::redundant_closure)]
|
1653 2531 | || String::from("hi"),
|
1654 2532 | ),
|
2533 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
1655 2534 | farewell: self.farewell,
|
2535 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1656 2536 | }
|
2537 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1657 2538 | }
|
2539 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1658 2540 | }
|
2541 + |
|
2542 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1659 2543 | }
|
1660 - | /// See [`Farewell`](crate::model::Farewell).
|
2544 + | /// /* ServerBuilderGenerator.kt:171 */See [`Farewell`](crate::model::Farewell).
|
1661 2545 | pub(crate) mod farewell_internal {
|
1662 2546 |
|
2547 + | /* ServerBuilderGenerator.kt:461 */
|
1663 2548 | impl ::std::convert::From<Builder> for crate::model::Farewell {
|
1664 2549 | fn from(builder: Builder) -> Self {
|
1665 2550 | builder.build()
|
1666 2551 | }
|
1667 2552 | }
|
1668 - | /// A builder for [`Farewell`](crate::model::Farewell).
|
2553 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Farewell`](crate::model::Farewell).
|
2554 + | /* RustType.kt:516 */
|
1669 2555 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2556 + | /* ServerBuilderGenerator.kt:211 */
|
1670 2557 | pub(crate) struct Builder {
|
2558 + | /* ServerBuilderGenerator.kt:308 */
|
1671 2559 | pub(crate) phrase: ::std::option::Option<::std::string::String>,
|
2560 + | /* ServerBuilderGenerator.kt:211 */
|
1672 2561 | }
|
2562 + | /* ServerBuilderGenerator.kt:215 */
|
1673 2563 | impl Builder {
|
2564 + | /* ServerBuilderGenerator.kt:426 */
|
1674 2565 | #[allow(missing_docs)] // documentation missing in model
|
2566 + | /* ServerBuilderGenerator.kt:428 */
|
1675 2567 | pub(crate) fn set_phrase(
|
1676 2568 | mut self,
|
1677 2569 | input: impl ::std::convert::Into<::std::string::String>,
|
1678 2570 | ) -> Self {
|
2571 + | /* ServerBuilderGenerator.kt:429 */
|
1679 2572 | self.phrase = Some(input.into());
|
1680 2573 | self
|
2574 + | /* ServerBuilderGenerator.kt:428 */
|
1681 2575 | }
|
1682 - | /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
2576 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
2577 + | /* ServerBuilderGenerator.kt:271 */
|
1683 2578 | pub fn build(self) -> crate::model::Farewell {
|
1684 2579 | self.build_enforcing_all_constraints()
|
1685 2580 | }
|
2581 + | /* ServerBuilderGenerator.kt:283 */
|
1686 2582 | fn build_enforcing_all_constraints(self) -> crate::model::Farewell {
|
2583 + | /* ServerBuilderGenerator.kt:542 */
|
1687 2584 | crate::model::Farewell {
|
1688 - | phrase: self.phrase.unwrap_or_else(
|
2585 + | /* ServerBuilderGenerator.kt:546 */
|
2586 + | phrase: self
|
2587 + | .phrase
|
2588 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
2589 + | .unwrap_or_else(
|
1689 2590 | #[allow(clippy::redundant_closure)]
|
1690 2591 | || String::from("bye"),
|
1691 2592 | ),
|
2593 + | /* ServerBuilderGenerator.kt:542 */
|
1692 2594 | }
|
2595 + | /* ServerBuilderGenerator.kt:283 */
|
1693 2596 | }
|
2597 + | /* ServerBuilderGenerator.kt:215 */
|
1694 2598 | }
|
2599 + |
|
2600 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1695 2601 | }
|
1696 - | /// See [`Farewell`](crate::model::Farewell).
|
2602 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`Farewell`](crate::model::Farewell).
|
1697 2603 | pub mod farewell {
|
1698 2604 |
|
2605 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1699 2606 | impl ::std::convert::From<Builder> for crate::model::Farewell {
|
1700 2607 | fn from(builder: Builder) -> Self {
|
1701 2608 | builder.build()
|
1702 2609 | }
|
1703 2610 | }
|
1704 - | /// A builder for [`Farewell`](crate::model::Farewell).
|
2611 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`Farewell`](crate::model::Farewell).
|
2612 + | /* RustType.kt:516 */
|
1705 2613 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2614 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1706 2615 | pub struct Builder {
|
2616 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1707 2617 | pub(crate) phrase: ::std::option::Option<::std::string::String>,
|
2618 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1708 2619 | }
|
2620 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1709 2621 | impl Builder {
|
2622 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1710 2623 | #[allow(missing_docs)] // documentation missing in model
|
2624 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1711 2625 | pub fn phrase(mut self, input: ::std::string::String) -> Self {
|
1712 - | self.phrase = Some(input);
|
2626 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2627 + | self.phrase =
|
2628 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2629 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2630 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2631 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1713 2632 | self
|
2633 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1714 2634 | }
|
1715 - | /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
2635 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
|
2636 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1716 2637 | pub fn build(self) -> crate::model::Farewell {
|
1717 2638 | self.build_enforcing_required_and_enum_traits()
|
1718 2639 | }
|
2640 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1719 2641 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::Farewell {
|
2642 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1720 2643 | crate::model::Farewell {
|
1721 - | phrase: self.phrase.unwrap_or_else(
|
2644 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2645 + | phrase: self
|
2646 + | .phrase
|
2647 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
2648 + | .unwrap_or_else(
|
1722 2649 | #[allow(clippy::redundant_closure)]
|
1723 2650 | || String::from("bye"),
|
1724 2651 | ),
|
2652 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1725 2653 | }
|
2654 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1726 2655 | }
|
2656 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1727 2657 | }
|
2658 + |
|
2659 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1728 2660 | }
|
1729 - | /// See [`TopLevel`](crate::model::TopLevel).
|
2661 + | /// /* ServerBuilderGenerator.kt:171 */See [`TopLevel`](crate::model::TopLevel).
|
1730 2662 | pub(crate) mod top_level_internal {
|
1731 2663 |
|
2664 + | /* RustType.kt:516 */
|
1732 2665 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1733 - | /// Holds one variant for each of the ways the builder can fail.
|
2666 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2667 + | /* RustType.kt:516 */
|
1734 2668 | #[non_exhaustive]
|
2669 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1735 2670 | #[allow(clippy::enum_variant_names)]
|
1736 2671 | pub(crate) enum ConstraintViolation {
|
1737 - | /// `dialog` was not provided but it is required when building `TopLevel`.
|
2672 + | /// /* ServerBuilderConstraintViolations.kt:138 */`dialog` was not provided but it is required when building `TopLevel`.
|
2673 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1738 2674 | MissingDialog,
|
2675 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1739 2676 | }
|
2677 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1740 2678 | impl ::std::fmt::Display for ConstraintViolation {
|
2679 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1741 2680 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2681 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1742 2682 | match self {
|
2683 + | /* ServerBuilderConstraintViolations.kt:127 */
|
1743 2684 | ConstraintViolation::MissingDialog => write!(
|
1744 2685 | f,
|
1745 2686 | "`dialog` was not provided but it is required when building `TopLevel`"
|
1746 2687 | ),
|
2688 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1747 2689 | }
|
2690 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1748 2691 | }
|
2692 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1749 2693 | }
|
2694 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1750 2695 | impl ::std::error::Error for ConstraintViolation {}
|
2696 + | /* ServerBuilderConstraintViolations.kt:171 */
|
1751 2697 | impl ConstraintViolation {
|
1752 2698 | pub(crate) fn as_validation_exception_field(
|
1753 2699 | self,
|
1754 2700 | path: ::std::string::String,
|
1755 2701 | ) -> crate::model::ValidationExceptionField {
|
1756 2702 | match self {
|
1757 2703 | ConstraintViolation::MissingDialog => crate::model::ValidationExceptionField {
|
1758 2704 | message: format!("Value at '{}/dialog' failed to satisfy constraint: Member must not be null", path),
|
1759 2705 | path: path + "/dialog",
|
1760 2706 | },
|
1761 2707 | }
|
1762 2708 | }
|
1763 2709 | }
|
2710 + | /* ServerBuilderGenerator.kt:244 */
|
1764 2711 | impl ::std::convert::From<Builder>
|
1765 2712 | for crate::constrained::MaybeConstrained<crate::model::TopLevel>
|
1766 2713 | {
|
1767 2714 | fn from(builder: Builder) -> Self {
|
1768 2715 | Self::Unconstrained(builder)
|
1769 2716 | }
|
1770 2717 | }
|
2718 + | /* ServerBuilderGenerator.kt:446 */
|
1771 2719 | impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
|
1772 2720 | type Error = ConstraintViolation;
|
1773 2721 |
|
1774 2722 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1775 2723 | builder.build()
|
1776 2724 | }
|
1777 2725 | }
|
1778 - | /// A builder for [`TopLevel`](crate::model::TopLevel).
|
2726 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`TopLevel`](crate::model::TopLevel).
|
2727 + | /* RustType.kt:516 */
|
1779 2728 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2729 + | /* ServerBuilderGenerator.kt:211 */
|
1780 2730 | pub(crate) struct Builder {
|
2731 + | /* ServerBuilderGenerator.kt:308 */
|
1781 2732 | pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
|
2733 + | /* ServerBuilderGenerator.kt:308 */
|
1782 2734 | pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
|
2735 + | /* ServerBuilderGenerator.kt:308 */
|
1783 2736 | pub(crate) dialog_map: ::std::option::Option<
|
1784 2737 | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
1785 2738 | >,
|
2739 + | /* ServerBuilderGenerator.kt:211 */
|
1786 2740 | }
|
2741 + | /* ServerBuilderGenerator.kt:215 */
|
1787 2742 | impl Builder {
|
2743 + | /* ServerBuilderGenerator.kt:426 */
|
1788 2744 | #[allow(missing_docs)] // documentation missing in model
|
2745 + | /* ServerBuilderGenerator.kt:428 */
|
1789 2746 | pub(crate) fn set_dialog(
|
1790 2747 | mut self,
|
1791 2748 | input: impl ::std::convert::Into<crate::model::Dialog>,
|
1792 2749 | ) -> Self {
|
2750 + | /* ServerBuilderGenerator.kt:429 */
|
1793 2751 | self.dialog = Some(input.into());
|
1794 2752 | self
|
2753 + | /* ServerBuilderGenerator.kt:428 */
|
1795 2754 | }
|
2755 + | /* ServerBuilderGenerator.kt:426 */
|
1796 2756 | #[allow(missing_docs)] // documentation missing in model
|
2757 + | /* ServerBuilderGenerator.kt:428 */
|
1797 2758 | pub(crate) fn set_dialog_list(
|
1798 2759 | mut self,
|
1799 2760 | input: impl ::std::convert::Into<::std::vec::Vec<crate::model::Dialog>>,
|
1800 2761 | ) -> Self {
|
2762 + | /* ServerBuilderGenerator.kt:429 */
|
1801 2763 | self.dialog_list = Some(input.into());
|
1802 2764 | self
|
2765 + | /* ServerBuilderGenerator.kt:428 */
|
1803 2766 | }
|
2767 + | /* ServerBuilderGenerator.kt:426 */
|
1804 2768 | #[allow(missing_docs)] // documentation missing in model
|
2769 + | /* ServerBuilderGenerator.kt:428 */
|
1805 2770 | pub(crate) fn set_dialog_map(
|
1806 2771 | mut self,
|
1807 2772 | input: impl ::std::convert::Into<
|
1808 2773 | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
1809 2774 | >,
|
1810 2775 | ) -> Self {
|
2776 + | /* ServerBuilderGenerator.kt:429 */
|
1811 2777 | self.dialog_map = Some(input.into());
|
1812 2778 | self
|
2779 + | /* ServerBuilderGenerator.kt:428 */
|
1813 2780 | }
|
1814 - | /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
1815 - | ///
|
2781 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
2782 + | /// /* ServerBuilderGenerator.kt:260 */
|
1816 2783 | /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
|
1817 2784 | ///
|
2785 + | /* ServerBuilderGenerator.kt:271 */
|
1818 2786 | pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
1819 2787 | self.build_enforcing_all_constraints()
|
1820 2788 | }
|
2789 + | /* ServerBuilderGenerator.kt:283 */
|
1821 2790 | fn build_enforcing_all_constraints(
|
1822 2791 | self,
|
1823 2792 | ) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
1824 - | Ok(crate::model::TopLevel {
|
1825 - | dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
|
1826 - | dialog_list: self.dialog_list.unwrap_or_else(
|
1827 - | #[allow(clippy::redundant_closure)]
|
1828 - | || ::std::vec::Vec::new(),
|
1829 - | ),
|
1830 - | dialog_map: self.dialog_map.unwrap_or_else(
|
1831 - | #[allow(clippy::redundant_closure)]
|
1832 - | || ::std::collections::HashMap::new(),
|
1833 - | ),
|
1834 - | })
|
2793 + | /* ServerBuilderGenerator.kt:287 */
|
2794 + | Ok(
|
2795 + | /* ServerBuilderGenerator.kt:542 */
|
2796 + | crate::model::TopLevel {
|
2797 + | /* ServerBuilderGenerator.kt:546 */
|
2798 + | dialog: self
|
2799 + | .dialog
|
2800 + | /* ServerBuilderGenerator.kt:569 */
|
2801 + | .ok_or(ConstraintViolation::MissingDialog)?,
|
2802 + | /* ServerBuilderGenerator.kt:546 */
|
2803 + | dialog_list: self
|
2804 + | .dialog_list
|
2805 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
2806 + | .unwrap_or_default(),
|
2807 + | /* ServerBuilderGenerator.kt:546 */
|
2808 + | dialog_map: self
|
2809 + | .dialog_map
|
2810 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
2811 + | .unwrap_or_default(),
|
2812 + | /* ServerBuilderGenerator.kt:542 */
|
2813 + | }, /* ServerBuilderGenerator.kt:287 */
|
2814 + | )
|
2815 + | /* ServerBuilderGenerator.kt:283 */
|
1835 2816 | }
|
2817 + | /* ServerBuilderGenerator.kt:215 */
|
1836 2818 | }
|
2819 + |
|
2820 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1837 2821 | }
|
1838 - | /// See [`TopLevel`](crate::model::TopLevel).
|
2822 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`TopLevel`](crate::model::TopLevel).
|
1839 2823 | pub mod top_level {
|
1840 2824 |
|
2825 + | /* RustType.kt:516 */
|
1841 2826 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1842 - | /// Holds one variant for each of the ways the builder can fail.
|
1843 - |
|
2827 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2828 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1844 2829 | #[allow(clippy::enum_variant_names)]
|
1845 2830 | pub enum ConstraintViolation {
|
1846 - | /// `dialog` was not provided but it is required when building `TopLevel`.
|
2831 + | /// /* ServerBuilderConstraintViolations.kt:138 */`dialog` was not provided but it is required when building `TopLevel`.
|
2832 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1847 2833 | MissingDialog,
|
2834 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1848 2835 | }
|
2836 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1849 2837 | impl ::std::fmt::Display for ConstraintViolation {
|
2838 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1850 2839 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2840 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1851 2841 | match self {
|
2842 + | /* ServerBuilderConstraintViolations.kt:127 */
|
1852 2843 | ConstraintViolation::MissingDialog => write!(
|
1853 2844 | f,
|
1854 2845 | "`dialog` was not provided but it is required when building `TopLevel`"
|
1855 2846 | ),
|
2847 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1856 2848 | }
|
2849 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1857 2850 | }
|
2851 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1858 2852 | }
|
2853 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1859 2854 | impl ::std::error::Error for ConstraintViolation {}
|
2855 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
|
1860 2856 | impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
|
1861 2857 | type Error = ConstraintViolation;
|
1862 2858 |
|
1863 2859 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1864 2860 | builder.build()
|
1865 2861 | }
|
1866 2862 | }
|
1867 - | /// A builder for [`TopLevel`](crate::model::TopLevel).
|
2863 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`TopLevel`](crate::model::TopLevel).
|
2864 + | /* RustType.kt:516 */
|
1868 2865 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2866 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1869 2867 | pub struct Builder {
|
2868 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1870 2869 | pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
|
2870 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1871 2871 | pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
|
2872 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1872 2873 | pub(crate) dialog_map: ::std::option::Option<
|
1873 2874 | ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
1874 2875 | >,
|
2876 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1875 2877 | }
|
2878 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1876 2879 | impl Builder {
|
2880 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1877 2881 | #[allow(missing_docs)] // documentation missing in model
|
2882 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1878 2883 | pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
|
1879 - | self.dialog = Some(input);
|
2884 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2885 + | self.dialog =
|
2886 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2887 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2888 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2889 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1880 2890 | self
|
2891 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1881 2892 | }
|
2893 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1882 2894 | #[allow(missing_docs)] // documentation missing in model
|
2895 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1883 2896 | pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
|
1884 - | self.dialog_list = Some(input);
|
2897 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2898 + | self.dialog_list =
|
2899 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2900 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2901 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2902 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1885 2903 | self
|
2904 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1886 2905 | }
|
2906 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1887 2907 | #[allow(missing_docs)] // documentation missing in model
|
2908 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1888 2909 | pub fn dialog_map(
|
1889 2910 | mut self,
|
1890 2911 | input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
|
1891 2912 | ) -> Self {
|
1892 - | self.dialog_map = Some(input);
|
2913 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
2914 + | self.dialog_map =
|
2915 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
2916 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
2917 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
2918 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1893 2919 | self
|
2920 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1894 2921 | }
|
1895 - | /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
1896 - | ///
|
2922 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
|
2923 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
|
1897 2924 | /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if you do not provide a value for all non-`Option`al members.
|
1898 2925 | ///
|
2926 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1899 2927 | pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
1900 2928 | self.build_enforcing_required_and_enum_traits()
|
1901 2929 | }
|
2930 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1902 2931 | fn build_enforcing_required_and_enum_traits(
|
1903 2932 | self,
|
1904 2933 | ) -> Result<crate::model::TopLevel, ConstraintViolation> {
|
1905 - | Ok(crate::model::TopLevel {
|
1906 - | dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
|
1907 - | dialog_list: self.dialog_list.unwrap_or_else(
|
1908 - | #[allow(clippy::redundant_closure)]
|
1909 - | || ::std::vec::Vec::new(),
|
1910 - | ),
|
1911 - | dialog_map: self.dialog_map.unwrap_or_else(
|
1912 - | #[allow(clippy::redundant_closure)]
|
1913 - | || ::std::collections::HashMap::new(),
|
1914 - | ),
|
1915 - | })
|
2934 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2935 + | Ok(
|
2936 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2937 + | crate::model::TopLevel {
|
2938 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2939 + | dialog: self
|
2940 + | .dialog
|
2941 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
|
2942 + | .ok_or(ConstraintViolation::MissingDialog)?,
|
2943 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2944 + | dialog_list: self
|
2945 + | .dialog_list
|
2946 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
2947 + | .unwrap_or_default(),
|
2948 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2949 + | dialog_map: self
|
2950 + | .dialog_map
|
2951 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
2952 + | .unwrap_or_default(),
|
2953 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2954 + | }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
|
2955 + | )
|
2956 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1916 2957 | }
|
2958 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1917 2959 | }
|
2960 + |
|
2961 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1918 2962 | }
|
1919 - | /// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2963 + | /// /* ServerBuilderGenerator.kt:171 */See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
1920 2964 | pub(crate) mod client_optional_defaults_internal {
|
1921 2965 |
|
2966 + | /* ServerBuilderGenerator.kt:461 */
|
1922 2967 | impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
|
1923 2968 | fn from(builder: Builder) -> Self {
|
1924 2969 | builder.build()
|
1925 2970 | }
|
1926 2971 | }
|
1927 - | /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2972 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2973 + | /* RustType.kt:516 */
|
1928 2974 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2975 + | /* ServerBuilderGenerator.kt:211 */
|
1929 2976 | pub(crate) struct Builder {
|
2977 + | /* ServerBuilderGenerator.kt:308 */
|
1930 2978 | pub(crate) member: ::std::option::Option<i32>,
|
2979 + | /* ServerBuilderGenerator.kt:211 */
|
1931 2980 | }
|
2981 + | /* ServerBuilderGenerator.kt:215 */
|
1932 2982 | impl Builder {
|
2983 + | /* ServerBuilderGenerator.kt:426 */
|
1933 2984 | #[allow(missing_docs)] // documentation missing in model
|
2985 + | /* ServerBuilderGenerator.kt:428 */
|
1934 2986 | pub(crate) fn set_member(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
2987 + | /* ServerBuilderGenerator.kt:429 */
|
1935 2988 | self.member = Some(input.into());
|
1936 2989 | self
|
2990 + | /* ServerBuilderGenerator.kt:428 */
|
1937 2991 | }
|
1938 - | /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2992 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
2993 + | /* ServerBuilderGenerator.kt:271 */
|
1939 2994 | pub fn build(self) -> crate::model::ClientOptionalDefaults {
|
1940 2995 | self.build_enforcing_all_constraints()
|
1941 2996 | }
|
2997 + | /* ServerBuilderGenerator.kt:283 */
|
1942 2998 | fn build_enforcing_all_constraints(self) -> crate::model::ClientOptionalDefaults {
|
2999 + | /* ServerBuilderGenerator.kt:542 */
|
1943 3000 | crate::model::ClientOptionalDefaults {
|
1944 - | member: self.member.unwrap_or(0i32),
|
3001 + | /* ServerBuilderGenerator.kt:546 */
|
3002 + | member: self
|
3003 + | .member
|
3004 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3005 + | .unwrap_or(0i32),
|
3006 + | /* ServerBuilderGenerator.kt:542 */
|
1945 3007 | }
|
3008 + | /* ServerBuilderGenerator.kt:283 */
|
1946 3009 | }
|
3010 + | /* ServerBuilderGenerator.kt:215 */
|
1947 3011 | }
|
3012 + |
|
3013 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1948 3014 | }
|
1949 - | /// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
3015 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
1950 3016 | pub mod client_optional_defaults {
|
1951 3017 |
|
3018 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
1952 3019 | impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
|
1953 3020 | fn from(builder: Builder) -> Self {
|
1954 3021 | builder.build()
|
1955 3022 | }
|
1956 3023 | }
|
1957 - | /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
3024 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
3025 + | /* RustType.kt:516 */
|
1958 3026 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3027 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1959 3028 | pub struct Builder {
|
3029 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
1960 3030 | pub(crate) member: ::std::option::Option<i32>,
|
3031 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
1961 3032 | }
|
3033 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1962 3034 | impl Builder {
|
3035 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
1963 3036 | #[allow(missing_docs)] // documentation missing in model
|
3037 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1964 3038 | pub fn member(mut self, input: i32) -> Self {
|
1965 - | self.member = Some(input);
|
3039 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3040 + | self.member =
|
3041 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3042 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3043 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3044 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
1966 3045 | self
|
3046 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
1967 3047 | }
|
1968 - | /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
3048 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
|
3049 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
1969 3050 | pub fn build(self) -> crate::model::ClientOptionalDefaults {
|
1970 3051 | self.build_enforcing_required_and_enum_traits()
|
1971 3052 | }
|
3053 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1972 3054 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::ClientOptionalDefaults {
|
3055 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1973 3056 | crate::model::ClientOptionalDefaults {
|
1974 - | member: self.member.unwrap_or(0i32),
|
3057 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
3058 + | member: self
|
3059 + | .member
|
3060 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3061 + | .unwrap_or(0i32),
|
3062 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
1975 3063 | }
|
3064 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
1976 3065 | }
|
3066 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
1977 3067 | }
|
3068 + |
|
3069 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1978 3070 | }
|
1979 - | /// See [`Defaults`](crate::model::Defaults).
|
3071 + | /// /* ServerBuilderGenerator.kt:171 */See [`Defaults`](crate::model::Defaults).
|
1980 3072 | pub(crate) mod defaults_internal {
|
1981 3073 |
|
3074 + | /* RustType.kt:516 */
|
1982 3075 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1983 - | /// Holds one variant for each of the ways the builder can fail.
|
3076 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
3077 + | /* RustType.kt:516 */
|
1984 3078 | #[non_exhaustive]
|
3079 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1985 3080 | #[allow(clippy::enum_variant_names)]
|
1986 3081 | pub(crate) enum ConstraintViolation {
|
1987 - | /// Constraint violation occurred building member `default_enum` when building `Defaults`.
|
3082 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `default_enum` when building `Defaults`.
|
3083 + | /* RustType.kt:516 */
|
1988 3084 | #[doc(hidden)]
|
3085 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1989 3086 | DefaultEnum(crate::model::test_enum_internal::ConstraintViolation),
|
3087 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1990 3088 | }
|
3089 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1991 3090 | impl ::std::fmt::Display for ConstraintViolation {
|
3091 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1992 3092 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3093 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1993 3094 | match self {
|
1994 - | ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
|
1995 - | }
|
3095 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
|
3096 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
3097 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1996 3098 | }
|
3099 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1997 3100 | }
|
3101 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1998 3102 | impl ::std::error::Error for ConstraintViolation {}
|
3103 + | /* ServerBuilderConstraintViolations.kt:171 */
|
1999 3104 | impl ConstraintViolation {
|
2000 3105 | pub(crate) fn as_validation_exception_field(
|
2001 3106 | self,
|
2002 3107 | path: ::std::string::String,
|
2003 3108 | ) -> crate::model::ValidationExceptionField {
|
2004 3109 | match self {
|
2005 3110 | ConstraintViolation::DefaultEnum(inner) => {
|
2006 3111 | inner.as_validation_exception_field(path + "/defaultEnum")
|
2007 3112 | }
|
2008 3113 | }
|
2009 3114 | }
|
2010 3115 | }
|
3116 + | /* ServerBuilderGenerator.kt:244 */
|
2011 3117 | impl ::std::convert::From<Builder>
|
2012 3118 | for crate::constrained::MaybeConstrained<crate::model::Defaults>
|
2013 3119 | {
|
2014 3120 | fn from(builder: Builder) -> Self {
|
2015 3121 | Self::Unconstrained(builder)
|
2016 3122 | }
|
2017 3123 | }
|
3124 + | /* ServerBuilderGenerator.kt:446 */
|
2018 3125 | impl ::std::convert::TryFrom<Builder> for crate::model::Defaults {
|
2019 3126 | type Error = ConstraintViolation;
|
2020 3127 |
|
2021 3128 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2022 3129 | builder.build()
|
2023 3130 | }
|
2024 3131 | }
|
2025 - | /// A builder for [`Defaults`](crate::model::Defaults).
|
3132 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Defaults`](crate::model::Defaults).
|
3133 + | /* RustType.kt:516 */
|
2026 3134 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3135 + | /* ServerBuilderGenerator.kt:211 */
|
2027 3136 | pub(crate) struct Builder {
|
3137 + | /* ServerBuilderGenerator.kt:308 */
|
2028 3138 | pub(crate) default_string: ::std::option::Option<::std::string::String>,
|
3139 + | /* ServerBuilderGenerator.kt:308 */
|
2029 3140 | pub(crate) default_boolean: ::std::option::Option<bool>,
|
3141 + | /* ServerBuilderGenerator.kt:308 */
|
2030 3142 | pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
3143 + | /* ServerBuilderGenerator.kt:308 */
|
2031 3144 | pub(crate) default_document_map:
|
2032 3145 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3146 + | /* ServerBuilderGenerator.kt:308 */
|
2033 3147 | pub(crate) default_document_string:
|
2034 3148 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3149 + | /* ServerBuilderGenerator.kt:308 */
|
2035 3150 | pub(crate) default_document_boolean:
|
2036 3151 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3152 + | /* ServerBuilderGenerator.kt:308 */
|
2037 3153 | pub(crate) default_document_list:
|
2038 3154 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3155 + | /* ServerBuilderGenerator.kt:308 */
|
2039 3156 | pub(crate) default_null_document:
|
2040 3157 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3158 + | /* ServerBuilderGenerator.kt:308 */
|
2041 3159 | pub(crate) default_timestamp:
|
2042 3160 | ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
|
3161 + | /* ServerBuilderGenerator.kt:308 */
|
2043 3162 | pub(crate) default_blob:
|
2044 3163 | ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
3164 + | /* ServerBuilderGenerator.kt:308 */
|
2045 3165 | pub(crate) default_byte: ::std::option::Option<i8>,
|
3166 + | /* ServerBuilderGenerator.kt:308 */
|
2046 3167 | pub(crate) default_short: ::std::option::Option<i16>,
|
3168 + | /* ServerBuilderGenerator.kt:308 */
|
2047 3169 | pub(crate) default_integer: ::std::option::Option<i32>,
|
3170 + | /* ServerBuilderGenerator.kt:308 */
|
2048 3171 | pub(crate) default_long: ::std::option::Option<i64>,
|
3172 + | /* ServerBuilderGenerator.kt:308 */
|
2049 3173 | pub(crate) default_float: ::std::option::Option<f32>,
|
3174 + | /* ServerBuilderGenerator.kt:308 */
|
2050 3175 | pub(crate) default_double: ::std::option::Option<f64>,
|
3176 + | /* ServerBuilderGenerator.kt:308 */
|
2051 3177 | pub(crate) default_map: ::std::option::Option<
|
2052 3178 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2053 3179 | >,
|
3180 + | /* ServerBuilderGenerator.kt:308 */
|
2054 3181 | pub(crate) default_enum:
|
2055 3182 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TestEnum>>,
|
3183 + | /* ServerBuilderGenerator.kt:308 */
|
2056 3184 | pub(crate) default_int_enum: ::std::option::Option<i32>,
|
3185 + | /* ServerBuilderGenerator.kt:308 */
|
2057 3186 | pub(crate) empty_string: ::std::option::Option<::std::string::String>,
|
3187 + | /* ServerBuilderGenerator.kt:308 */
|
2058 3188 | pub(crate) false_boolean: ::std::option::Option<bool>,
|
3189 + | /* ServerBuilderGenerator.kt:308 */
|
2059 3190 | pub(crate) empty_blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
2060 - | pub(crate) zero_byte: ::std::option::Option<i8>,
|
3191 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_byte: ::std::option::Option<i8>,
|
3192 + | /* ServerBuilderGenerator.kt:308 */
|
2061 3193 | pub(crate) zero_short: ::std::option::Option<i16>,
|
3194 + | /* ServerBuilderGenerator.kt:308 */
|
2062 3195 | pub(crate) zero_integer: ::std::option::Option<i32>,
|
2063 - | pub(crate) zero_long: ::std::option::Option<i64>,
|
3196 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_long: ::std::option::Option<i64>,
|
3197 + | /* ServerBuilderGenerator.kt:308 */
|
2064 3198 | pub(crate) zero_float: ::std::option::Option<f32>,
|
3199 + | /* ServerBuilderGenerator.kt:308 */
|
2065 3200 | pub(crate) zero_double: ::std::option::Option<f64>,
|
3201 + | /* ServerBuilderGenerator.kt:211 */
|
2066 3202 | }
|
3203 + | /* ServerBuilderGenerator.kt:215 */
|
2067 3204 | impl Builder {
|
3205 + | /* ServerBuilderGenerator.kt:426 */
|
2068 3206 | #[allow(missing_docs)] // documentation missing in model
|
3207 + | /* ServerBuilderGenerator.kt:428 */
|
2069 3208 | pub(crate) fn set_default_string(
|
2070 3209 | mut self,
|
2071 3210 | input: impl ::std::convert::Into<::std::string::String>,
|
2072 3211 | ) -> Self {
|
3212 + | /* ServerBuilderGenerator.kt:429 */
|
2073 3213 | self.default_string = Some(input.into());
|
2074 3214 | self
|
3215 + | /* ServerBuilderGenerator.kt:428 */
|
2075 3216 | }
|
3217 + | /* ServerBuilderGenerator.kt:426 */
|
2076 3218 | #[allow(missing_docs)] // documentation missing in model
|
3219 + | /* ServerBuilderGenerator.kt:428 */
|
2077 3220 | pub(crate) fn set_default_boolean(
|
2078 3221 | mut self,
|
2079 3222 | input: impl ::std::convert::Into<bool>,
|
2080 3223 | ) -> Self {
|
3224 + | /* ServerBuilderGenerator.kt:429 */
|
2081 3225 | self.default_boolean = Some(input.into());
|
2082 3226 | self
|
3227 + | /* ServerBuilderGenerator.kt:428 */
|
2083 3228 | }
|
3229 + | /* ServerBuilderGenerator.kt:426 */
|
2084 3230 | #[allow(missing_docs)] // documentation missing in model
|
3231 + | /* ServerBuilderGenerator.kt:428 */
|
2085 3232 | pub(crate) fn set_default_list(
|
2086 3233 | mut self,
|
2087 3234 | input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
|
2088 3235 | ) -> Self {
|
3236 + | /* ServerBuilderGenerator.kt:429 */
|
2089 3237 | self.default_list = Some(input.into());
|
2090 3238 | self
|
3239 + | /* ServerBuilderGenerator.kt:428 */
|
2091 3240 | }
|
3241 + | /* ServerBuilderGenerator.kt:426 */
|
2092 3242 | #[allow(missing_docs)] // documentation missing in model
|
3243 + | /* ServerBuilderGenerator.kt:428 */
|
2093 3244 | pub(crate) fn set_default_document_map(
|
2094 3245 | mut self,
|
2095 3246 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
2096 3247 | ) -> Self {
|
3248 + | /* ServerBuilderGenerator.kt:429 */
|
2097 3249 | self.default_document_map = Some(input.into());
|
2098 3250 | self
|
3251 + | /* ServerBuilderGenerator.kt:428 */
|
2099 3252 | }
|
3253 + | /* ServerBuilderGenerator.kt:426 */
|
2100 3254 | #[allow(missing_docs)] // documentation missing in model
|
3255 + | /* ServerBuilderGenerator.kt:428 */
|
2101 3256 | pub(crate) fn set_default_document_string(
|
2102 3257 | mut self,
|
2103 3258 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
2104 3259 | ) -> Self {
|
3260 + | /* ServerBuilderGenerator.kt:429 */
|
2105 3261 | self.default_document_string = Some(input.into());
|
2106 3262 | self
|
3263 + | /* ServerBuilderGenerator.kt:428 */
|
2107 3264 | }
|
3265 + | /* ServerBuilderGenerator.kt:426 */
|
2108 3266 | #[allow(missing_docs)] // documentation missing in model
|
3267 + | /* ServerBuilderGenerator.kt:428 */
|
2109 3268 | pub(crate) fn set_default_document_boolean(
|
2110 3269 | mut self,
|
2111 3270 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
2112 3271 | ) -> Self {
|
3272 + | /* ServerBuilderGenerator.kt:429 */
|
2113 3273 | self.default_document_boolean = Some(input.into());
|
2114 3274 | self
|
3275 + | /* ServerBuilderGenerator.kt:428 */
|
2115 3276 | }
|
3277 + | /* ServerBuilderGenerator.kt:426 */
|
2116 3278 | #[allow(missing_docs)] // documentation missing in model
|
3279 + | /* ServerBuilderGenerator.kt:428 */
|
2117 3280 | pub(crate) fn set_default_document_list(
|
2118 3281 | mut self,
|
2119 3282 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
2120 3283 | ) -> Self {
|
3284 + | /* ServerBuilderGenerator.kt:429 */
|
2121 3285 | self.default_document_list = Some(input.into());
|
2122 3286 | self
|
3287 + | /* ServerBuilderGenerator.kt:428 */
|
2123 3288 | }
|
3289 + | /* ServerBuilderGenerator.kt:426 */
|
2124 3290 | #[allow(missing_docs)] // documentation missing in model
|
3291 + | /* ServerBuilderGenerator.kt:428 */
|
2125 3292 | pub(crate) fn set_default_null_document(
|
2126 3293 | mut self,
|
2127 3294 | input: Option<
|
2128 3295 | impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
|
2129 3296 | >,
|
2130 3297 | ) -> Self {
|
3298 + | /* ServerBuilderGenerator.kt:429 */
|
2131 3299 | self.default_null_document = input.map(|v| v.into());
|
2132 3300 | self
|
3301 + | /* ServerBuilderGenerator.kt:428 */
|
2133 3302 | }
|
3303 + | /* ServerBuilderGenerator.kt:426 */
|
2134 3304 | #[allow(missing_docs)] // documentation missing in model
|
3305 + | /* ServerBuilderGenerator.kt:428 */
|
2135 3306 | pub(crate) fn set_default_timestamp(
|
2136 3307 | mut self,
|
2137 3308 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::DateTime>,
|
2138 3309 | ) -> Self {
|
3310 + | /* ServerBuilderGenerator.kt:429 */
|
2139 3311 | self.default_timestamp = Some(input.into());
|
2140 3312 | self
|
3313 + | /* ServerBuilderGenerator.kt:428 */
|
2141 3314 | }
|
3315 + | /* ServerBuilderGenerator.kt:426 */
|
2142 3316 | #[allow(missing_docs)] // documentation missing in model
|
3317 + | /* ServerBuilderGenerator.kt:428 */
|
2143 3318 | pub(crate) fn set_default_blob(
|
2144 3319 | mut self,
|
2145 3320 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>,
|
2146 3321 | ) -> Self {
|
3322 + | /* ServerBuilderGenerator.kt:429 */
|
2147 3323 | self.default_blob = Some(input.into());
|
2148 3324 | self
|
3325 + | /* ServerBuilderGenerator.kt:428 */
|
2149 3326 | }
|
3327 + | /* ServerBuilderGenerator.kt:426 */
|
2150 3328 | #[allow(missing_docs)] // documentation missing in model
|
3329 + | /* ServerBuilderGenerator.kt:428 */
|
2151 3330 | pub(crate) fn set_default_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
3331 + | /* ServerBuilderGenerator.kt:429 */
|
2152 3332 | self.default_byte = Some(input.into());
|
2153 3333 | self
|
3334 + | /* ServerBuilderGenerator.kt:428 */
|
2154 3335 | }
|
3336 + | /* ServerBuilderGenerator.kt:426 */
|
2155 3337 | #[allow(missing_docs)] // documentation missing in model
|
3338 + | /* ServerBuilderGenerator.kt:428 */
|
2156 3339 | pub(crate) fn set_default_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
3340 + | /* ServerBuilderGenerator.kt:429 */
|
2157 3341 | self.default_short = Some(input.into());
|
2158 3342 | self
|
3343 + | /* ServerBuilderGenerator.kt:428 */
|
2159 3344 | }
|
3345 + | /* ServerBuilderGenerator.kt:426 */
|
2160 3346 | #[allow(missing_docs)] // documentation missing in model
|
3347 + | /* ServerBuilderGenerator.kt:428 */
|
2161 3348 | pub(crate) fn set_default_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
3349 + | /* ServerBuilderGenerator.kt:429 */
|
2162 3350 | self.default_integer = Some(input.into());
|
2163 3351 | self
|
3352 + | /* ServerBuilderGenerator.kt:428 */
|
2164 3353 | }
|
3354 + | /* ServerBuilderGenerator.kt:426 */
|
2165 3355 | #[allow(missing_docs)] // documentation missing in model
|
3356 + | /* ServerBuilderGenerator.kt:428 */
|
2166 3357 | pub(crate) fn set_default_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
3358 + | /* ServerBuilderGenerator.kt:429 */
|
2167 3359 | self.default_long = Some(input.into());
|
2168 3360 | self
|
3361 + | /* ServerBuilderGenerator.kt:428 */
|
2169 3362 | }
|
3363 + | /* ServerBuilderGenerator.kt:426 */
|
2170 3364 | #[allow(missing_docs)] // documentation missing in model
|
3365 + | /* ServerBuilderGenerator.kt:428 */
|
2171 3366 | pub(crate) fn set_default_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
3367 + | /* ServerBuilderGenerator.kt:429 */
|
2172 3368 | self.default_float = Some(input.into());
|
2173 3369 | self
|
3370 + | /* ServerBuilderGenerator.kt:428 */
|
2174 3371 | }
|
3372 + | /* ServerBuilderGenerator.kt:426 */
|
2175 3373 | #[allow(missing_docs)] // documentation missing in model
|
3374 + | /* ServerBuilderGenerator.kt:428 */
|
2176 3375 | pub(crate) fn set_default_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
3376 + | /* ServerBuilderGenerator.kt:429 */
|
2177 3377 | self.default_double = Some(input.into());
|
2178 3378 | self
|
3379 + | /* ServerBuilderGenerator.kt:428 */
|
2179 3380 | }
|
3381 + | /* ServerBuilderGenerator.kt:426 */
|
2180 3382 | #[allow(missing_docs)] // documentation missing in model
|
3383 + | /* ServerBuilderGenerator.kt:428 */
|
2181 3384 | pub(crate) fn set_default_map(
|
2182 3385 | mut self,
|
2183 3386 | input: impl ::std::convert::Into<
|
2184 3387 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2185 3388 | >,
|
2186 3389 | ) -> Self {
|
3390 + | /* ServerBuilderGenerator.kt:429 */
|
2187 3391 | self.default_map = Some(input.into());
|
2188 3392 | self
|
3393 + | /* ServerBuilderGenerator.kt:428 */
|
2189 3394 | }
|
3395 + | /* ServerBuilderGenerator.kt:426 */
|
2190 3396 | #[allow(missing_docs)] // documentation missing in model
|
3397 + | /* ServerBuilderGenerator.kt:428 */
|
2191 3398 | pub(crate) fn set_default_enum(
|
2192 3399 | mut self,
|
2193 3400 | input: impl ::std::convert::Into<
|
2194 3401 | crate::constrained::MaybeConstrained<crate::model::TestEnum>,
|
2195 3402 | >,
|
2196 3403 | ) -> Self {
|
3404 + | /* ServerBuilderGenerator.kt:429 */
|
2197 3405 | self.default_enum = Some(input.into());
|
2198 3406 | self
|
3407 + | /* ServerBuilderGenerator.kt:428 */
|
2199 3408 | }
|
3409 + | /* ServerBuilderGenerator.kt:426 */
|
2200 3410 | #[allow(missing_docs)] // documentation missing in model
|
3411 + | /* ServerBuilderGenerator.kt:428 */
|
2201 3412 | pub(crate) fn set_default_int_enum(
|
2202 3413 | mut self,
|
2203 3414 | input: impl ::std::convert::Into<i32>,
|
2204 3415 | ) -> Self {
|
3416 + | /* ServerBuilderGenerator.kt:429 */
|
2205 3417 | self.default_int_enum = Some(input.into());
|
2206 3418 | self
|
3419 + | /* ServerBuilderGenerator.kt:428 */
|
2207 3420 | }
|
3421 + | /* ServerBuilderGenerator.kt:426 */
|
2208 3422 | #[allow(missing_docs)] // documentation missing in model
|
3423 + | /* ServerBuilderGenerator.kt:428 */
|
2209 3424 | pub(crate) fn set_empty_string(
|
2210 3425 | mut self,
|
2211 3426 | input: impl ::std::convert::Into<::std::string::String>,
|
2212 3427 | ) -> Self {
|
3428 + | /* ServerBuilderGenerator.kt:429 */
|
2213 3429 | self.empty_string = Some(input.into());
|
2214 3430 | self
|
3431 + | /* ServerBuilderGenerator.kt:428 */
|
2215 3432 | }
|
3433 + | /* ServerBuilderGenerator.kt:426 */
|
2216 3434 | #[allow(missing_docs)] // documentation missing in model
|
3435 + | /* ServerBuilderGenerator.kt:428 */
|
2217 3436 | pub(crate) fn set_false_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
|
3437 + | /* ServerBuilderGenerator.kt:429 */
|
2218 3438 | self.false_boolean = Some(input.into());
|
2219 3439 | self
|
3440 + | /* ServerBuilderGenerator.kt:428 */
|
2220 3441 | }
|
3442 + | /* ServerBuilderGenerator.kt:426 */
|
2221 3443 | #[allow(missing_docs)] // documentation missing in model
|
3444 + | /* ServerBuilderGenerator.kt:428 */
|
2222 3445 | pub(crate) fn set_empty_blob(
|
2223 3446 | mut self,
|
2224 3447 | input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>,
|
2225 3448 | ) -> Self {
|
3449 + | /* ServerBuilderGenerator.kt:429 */
|
2226 3450 | self.empty_blob = Some(input.into());
|
2227 3451 | self
|
3452 + | /* ServerBuilderGenerator.kt:428 */
|
2228 3453 | }
|
3454 + | /* ServerBuilderGenerator.kt:426 */
|
2229 3455 | #[allow(missing_docs)] // documentation missing in model
|
3456 + | /* ServerBuilderGenerator.kt:428 */
|
2230 3457 | pub(crate) fn set_zero_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
|
3458 + | /* ServerBuilderGenerator.kt:429 */
|
2231 3459 | self.zero_byte = Some(input.into());
|
2232 3460 | self
|
3461 + | /* ServerBuilderGenerator.kt:428 */
|
2233 3462 | }
|
3463 + | /* ServerBuilderGenerator.kt:426 */
|
2234 3464 | #[allow(missing_docs)] // documentation missing in model
|
3465 + | /* ServerBuilderGenerator.kt:428 */
|
2235 3466 | pub(crate) fn set_zero_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
|
3467 + | /* ServerBuilderGenerator.kt:429 */
|
2236 3468 | self.zero_short = Some(input.into());
|
2237 3469 | self
|
3470 + | /* ServerBuilderGenerator.kt:428 */
|
2238 3471 | }
|
3472 + | /* ServerBuilderGenerator.kt:426 */
|
2239 3473 | #[allow(missing_docs)] // documentation missing in model
|
3474 + | /* ServerBuilderGenerator.kt:428 */
|
2240 3475 | pub(crate) fn set_zero_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
3476 + | /* ServerBuilderGenerator.kt:429 */
|
2241 3477 | self.zero_integer = Some(input.into());
|
2242 3478 | self
|
3479 + | /* ServerBuilderGenerator.kt:428 */
|
2243 3480 | }
|
3481 + | /* ServerBuilderGenerator.kt:426 */
|
2244 3482 | #[allow(missing_docs)] // documentation missing in model
|
3483 + | /* ServerBuilderGenerator.kt:428 */
|
2245 3484 | pub(crate) fn set_zero_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
|
3485 + | /* ServerBuilderGenerator.kt:429 */
|
2246 3486 | self.zero_long = Some(input.into());
|
2247 3487 | self
|
3488 + | /* ServerBuilderGenerator.kt:428 */
|
2248 3489 | }
|
3490 + | /* ServerBuilderGenerator.kt:426 */
|
2249 3491 | #[allow(missing_docs)] // documentation missing in model
|
3492 + | /* ServerBuilderGenerator.kt:428 */
|
2250 3493 | pub(crate) fn set_zero_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
|
3494 + | /* ServerBuilderGenerator.kt:429 */
|
2251 3495 | self.zero_float = Some(input.into());
|
2252 3496 | self
|
3497 + | /* ServerBuilderGenerator.kt:428 */
|
2253 3498 | }
|
3499 + | /* ServerBuilderGenerator.kt:426 */
|
2254 3500 | #[allow(missing_docs)] // documentation missing in model
|
3501 + | /* ServerBuilderGenerator.kt:428 */
|
2255 3502 | pub(crate) fn set_zero_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
|
3503 + | /* ServerBuilderGenerator.kt:429 */
|
2256 3504 | self.zero_double = Some(input.into());
|
2257 3505 | self
|
3506 + | /* ServerBuilderGenerator.kt:428 */
|
2258 3507 | }
|
2259 - | /// Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
2260 - | ///
|
3508 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
3509 + | /// /* ServerBuilderGenerator.kt:260 */
|
2261 3510 | /// The builder fails to construct a [`Defaults`](crate::model::Defaults) if a [`ConstraintViolation`] occurs.
|
2262 3511 | ///
|
3512 + | /* ServerBuilderGenerator.kt:271 */
|
2263 3513 | pub fn build(self) -> Result<crate::model::Defaults, ConstraintViolation> {
|
2264 3514 | self.build_enforcing_all_constraints()
|
2265 3515 | }
|
3516 + | /* ServerBuilderGenerator.kt:283 */
|
2266 3517 | fn build_enforcing_all_constraints(
|
2267 3518 | self,
|
2268 3519 | ) -> Result<crate::model::Defaults, ConstraintViolation> {
|
2269 - | Ok(crate::model::Defaults {
|
2270 - | default_string: self.default_string.unwrap_or_else(
|
3520 + | /* ServerBuilderGenerator.kt:287 */
|
3521 + | Ok(
|
3522 + | /* ServerBuilderGenerator.kt:542 */
|
3523 + | crate::model::Defaults {
|
3524 + | /* ServerBuilderGenerator.kt:546 */
|
3525 + | default_string: self
|
3526 + | .default_string
|
3527 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
3528 + | .unwrap_or_else(
|
2271 3529 | #[allow(clippy::redundant_closure)]
|
2272 3530 | || String::from("hi"),
|
2273 3531 | ),
|
2274 - | default_boolean: self.default_boolean.unwrap_or(true),
|
2275 - | default_list: self.default_list.unwrap_or_else(
|
2276 - | #[allow(clippy::redundant_closure)]
|
2277 - | || ::std::vec::Vec::new(),
|
2278 - | ),
|
2279 - | default_document_map: self.default_document_map.unwrap_or_else(
|
3532 + | /* ServerBuilderGenerator.kt:546 */
|
3533 + | default_boolean: self
|
3534 + | .default_boolean
|
3535 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3536 + | .unwrap_or(true),
|
3537 + | /* ServerBuilderGenerator.kt:546 */
|
3538 + | default_list: self
|
3539 + | .default_list
|
3540 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
3541 + | .unwrap_or_default(),
|
3542 + | /* ServerBuilderGenerator.kt:546 */
|
3543 + | default_document_map: self
|
3544 + | .default_document_map
|
3545 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
3546 + | .unwrap_or_else(
|
2280 3547 | #[allow(clippy::redundant_closure)]
|
2281 3548 | || {
|
2282 - | ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
|
3549 + | ::aws_smithy_types::Document::Object(
|
3550 + | ::std::collections::HashMap::new(),
|
3551 + | )
|
2283 3552 | .into()
|
2284 3553 | },
|
2285 3554 | ),
|
2286 - | default_document_string: self.default_document_string.unwrap_or_else(
|
3555 + | /* ServerBuilderGenerator.kt:546 */
|
3556 + | default_document_string: self
|
3557 + | .default_document_string
|
3558 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
3559 + | .unwrap_or_else(
|
2287 3560 | #[allow(clippy::redundant_closure)]
|
2288 3561 | || {
|
2289 - | ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
|
3562 + | ::aws_smithy_types::Document::String(::std::string::String::from(
|
3563 + | "hi",
|
3564 + | ))
|
2290 3565 | .into()
|
2291 3566 | },
|
2292 3567 | ),
|
3568 + | /* ServerBuilderGenerator.kt:546 */
|
2293 3569 | default_document_boolean: self
|
2294 3570 | .default_document_boolean
|
3571 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
2295 3572 | .unwrap_or(::aws_smithy_types::Document::Bool(true).into()),
|
2296 - | default_document_list: self.default_document_list.unwrap_or_else(
|
3573 + | /* ServerBuilderGenerator.kt:546 */
|
3574 + | default_document_list: self
|
3575 + | .default_document_list
|
3576 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
3577 + | .unwrap_or_else(
|
2297 3578 | #[allow(clippy::redundant_closure)]
|
2298 3579 | || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()).into(),
|
2299 3580 | ),
|
3581 + | /* ServerBuilderGenerator.kt:546 */
|
2300 3582 | default_null_document: self.default_null_document,
|
2301 - | default_timestamp: self.default_timestamp.unwrap_or_else(
|
3583 + | /* ServerBuilderGenerator.kt:546 */
|
3584 + | default_timestamp: self
|
3585 + | .default_timestamp
|
3586 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
3587 + | .unwrap_or_else(
|
2302 3588 | #[allow(clippy::redundant_closure)]
|
2303 3589 | || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64).into(),
|
2304 3590 | ),
|
2305 - | default_blob: self.default_blob.unwrap_or_else(
|
3591 + | /* ServerBuilderGenerator.kt:546 */
|
3592 + | default_blob: self
|
3593 + | .default_blob
|
3594 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
3595 + | .unwrap_or_else(
|
2306 3596 | #[allow(clippy::redundant_closure)]
|
2307 3597 | || ::aws_smithy_types::Blob::new("abc").into(),
|
2308 3598 | ),
|
2309 - | default_byte: self.default_byte.unwrap_or(1i8),
|
2310 - | default_short: self.default_short.unwrap_or(1i16),
|
2311 - | default_integer: self.default_integer.unwrap_or(10i32),
|
2312 - | default_long: self.default_long.unwrap_or(100i64),
|
2313 - | default_float: self.default_float.unwrap_or(1.0f32),
|
2314 - | default_double: self.default_double.unwrap_or(1.0f64),
|
2315 - | default_map: self.default_map.unwrap_or_else(
|
2316 - | #[allow(clippy::redundant_closure)]
|
2317 - | || ::std::collections::HashMap::new(),
|
2318 - | ),
|
3599 + | /* ServerBuilderGenerator.kt:546 */
|
3600 + | default_byte: self
|
3601 + | .default_byte
|
3602 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3603 + | .unwrap_or(1i8),
|
3604 + | /* ServerBuilderGenerator.kt:546 */
|
3605 + | default_short: self
|
3606 + | .default_short
|
3607 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3608 + | .unwrap_or(1i16),
|
3609 + | /* ServerBuilderGenerator.kt:546 */
|
3610 + | default_integer: self
|
3611 + | .default_integer
|
3612 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3613 + | .unwrap_or(10i32),
|
3614 + | /* ServerBuilderGenerator.kt:546 */
|
3615 + | default_long: self
|
3616 + | .default_long
|
3617 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3618 + | .unwrap_or(100i64),
|
3619 + | /* ServerBuilderGenerator.kt:546 */
|
3620 + | default_float: self
|
3621 + | .default_float
|
3622 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3623 + | .unwrap_or(1.0f32),
|
3624 + | /* ServerBuilderGenerator.kt:546 */
|
3625 + | default_double: self
|
3626 + | .default_double
|
3627 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3628 + | .unwrap_or(1.0f64),
|
3629 + | /* ServerBuilderGenerator.kt:546 */
|
3630 + | default_map: self
|
3631 + | .default_map
|
3632 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
3633 + | .unwrap_or_default(),
|
3634 + | /* ServerBuilderGenerator.kt:546 */
|
2319 3635 | default_enum: self
|
2320 3636 | .default_enum
|
3637 + | /* ServerBuilderGenerator.kt:602 */
|
2321 3638 | .map(|v| match v {
|
2322 3639 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2323 3640 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2324 3641 | })
|
3642 + | /* ServerBuilderGenerator.kt:614 */
|
2325 3643 | .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
|
2326 3644 | .transpose()?
|
3645 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
2327 3646 | .unwrap_or(
|
2328 3647 | "FOO"
|
2329 3648 | .parse::<crate::model::TestEnum>()
|
2330 3649 | .expect("static value validated to member"),
|
2331 3650 | ),
|
2332 - | default_int_enum: self.default_int_enum.unwrap_or(1i32),
|
2333 - | empty_string: self.empty_string.unwrap_or_else(
|
3651 + | /* ServerBuilderGenerator.kt:546 */
|
3652 + | default_int_enum: self
|
3653 + | .default_int_enum
|
3654 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3655 + | .unwrap_or(1i32),
|
3656 + | /* ServerBuilderGenerator.kt:546 */
|
3657 + | empty_string: self
|
3658 + | .empty_string
|
3659 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
3660 + | .unwrap_or_else(
|
2334 3661 | #[allow(clippy::redundant_closure)]
|
2335 3662 | || String::from(""),
|
2336 3663 | ),
|
2337 - | false_boolean: self.false_boolean.unwrap_or(false),
|
2338 - | empty_blob: self.empty_blob.unwrap_or_else(
|
3664 + | /* ServerBuilderGenerator.kt:546 */
|
3665 + | false_boolean: self
|
3666 + | .false_boolean
|
3667 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3668 + | .unwrap_or(false),
|
3669 + | /* ServerBuilderGenerator.kt:546 */
|
3670 + | empty_blob: self
|
3671 + | .empty_blob
|
3672 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
3673 + | .unwrap_or_else(
|
2339 3674 | #[allow(clippy::redundant_closure)]
|
2340 3675 | || ::aws_smithy_types::Blob::new("").into(),
|
2341 3676 | ),
|
2342 - | zero_byte: self.zero_byte.unwrap_or(0i8),
|
2343 - | zero_short: self.zero_short.unwrap_or(0i16),
|
2344 - | zero_integer: self.zero_integer.unwrap_or(0i32),
|
2345 - | zero_long: self.zero_long.unwrap_or(0i64),
|
2346 - | zero_float: self.zero_float.unwrap_or(0.0f32),
|
2347 - | zero_double: self.zero_double.unwrap_or(0.0f64),
|
2348 - | })
|
3677 + | /* ServerBuilderGenerator.kt:546 */
|
3678 + | zero_byte: self
|
3679 + | .zero_byte
|
3680 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3681 + | .unwrap_or(0i8),
|
3682 + | /* ServerBuilderGenerator.kt:546 */
|
3683 + | zero_short: self
|
3684 + | .zero_short
|
3685 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3686 + | .unwrap_or(0i16),
|
3687 + | /* ServerBuilderGenerator.kt:546 */
|
3688 + | zero_integer: self
|
3689 + | .zero_integer
|
3690 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3691 + | .unwrap_or(0i32),
|
3692 + | /* ServerBuilderGenerator.kt:546 */
|
3693 + | zero_long: self
|
3694 + | .zero_long
|
3695 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3696 + | .unwrap_or(0i64),
|
3697 + | /* ServerBuilderGenerator.kt:546 */
|
3698 + | zero_float: self
|
3699 + | .zero_float
|
3700 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3701 + | .unwrap_or(0.0f32),
|
3702 + | /* ServerBuilderGenerator.kt:546 */
|
3703 + | zero_double: self
|
3704 + | .zero_double
|
3705 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
3706 + | .unwrap_or(0.0f64),
|
3707 + | /* ServerBuilderGenerator.kt:542 */
|
3708 + | }, /* ServerBuilderGenerator.kt:287 */
|
3709 + | )
|
3710 + | /* ServerBuilderGenerator.kt:283 */
|
2349 3711 | }
|
3712 + | /* ServerBuilderGenerator.kt:215 */
|
2350 3713 | }
|
3714 + |
|
3715 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2351 3716 | }
|
2352 - | /// See [`Defaults`](crate::model::Defaults).
|
3717 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`Defaults`](crate::model::Defaults).
|
2353 3718 | pub mod defaults {
|
2354 3719 |
|
3720 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
2355 3721 | impl ::std::convert::From<Builder> for crate::model::Defaults {
|
2356 3722 | fn from(builder: Builder) -> Self {
|
2357 3723 | builder.build()
|
2358 3724 | }
|
2359 3725 | }
|
2360 - | /// A builder for [`Defaults`](crate::model::Defaults).
|
3726 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`Defaults`](crate::model::Defaults).
|
3727 + | /* RustType.kt:516 */
|
2361 3728 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3729 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2362 3730 | pub struct Builder {
|
3731 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2363 3732 | pub(crate) default_string: ::std::option::Option<::std::string::String>,
|
3733 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2364 3734 | pub(crate) default_boolean: ::std::option::Option<bool>,
|
3735 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2365 3736 | pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
3737 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2366 3738 | pub(crate) default_document_map:
|
2367 3739 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3740 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2368 3741 | pub(crate) default_document_string:
|
2369 3742 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3743 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2370 3744 | pub(crate) default_document_boolean:
|
2371 3745 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3746 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2372 3747 | pub(crate) default_document_list:
|
2373 3748 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3749 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2374 3750 | pub(crate) default_null_document:
|
2375 3751 | ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
3752 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2376 3753 | pub(crate) default_timestamp:
|
2377 3754 | ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
|
3755 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2378 3756 | pub(crate) default_blob:
|
2379 3757 | ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
3758 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2380 3759 | pub(crate) default_byte: ::std::option::Option<i8>,
|
3760 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2381 3761 | pub(crate) default_short: ::std::option::Option<i16>,
|
3762 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2382 3763 | pub(crate) default_integer: ::std::option::Option<i32>,
|
3764 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2383 3765 | pub(crate) default_long: ::std::option::Option<i64>,
|
3766 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2384 3767 | pub(crate) default_float: ::std::option::Option<f32>,
|
3768 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2385 3769 | pub(crate) default_double: ::std::option::Option<f64>,
|
3770 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2386 3771 | pub(crate) default_map: ::std::option::Option<
|
2387 3772 | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2388 3773 | >,
|
3774 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2389 3775 | pub(crate) default_enum: ::std::option::Option<crate::model::TestEnum>,
|
3776 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2390 3777 | pub(crate) default_int_enum: ::std::option::Option<i32>,
|
3778 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2391 3779 | pub(crate) empty_string: ::std::option::Option<::std::string::String>,
|
3780 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2392 3781 | pub(crate) false_boolean: ::std::option::Option<bool>,
|
3782 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2393 3783 | pub(crate) empty_blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
3784 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2394 3785 | pub(crate) zero_byte: ::std::option::Option<i8>,
|
3786 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2395 3787 | pub(crate) zero_short: ::std::option::Option<i16>,
|
3788 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2396 3789 | pub(crate) zero_integer: ::std::option::Option<i32>,
|
3790 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2397 3791 | pub(crate) zero_long: ::std::option::Option<i64>,
|
3792 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2398 3793 | pub(crate) zero_float: ::std::option::Option<f32>,
|
3794 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2399 3795 | pub(crate) zero_double: ::std::option::Option<f64>,
|
3796 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2400 3797 | }
|
3798 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2401 3799 | impl Builder {
|
3800 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2402 3801 | #[allow(missing_docs)] // documentation missing in model
|
3802 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2403 3803 | pub fn default_string(mut self, input: ::std::string::String) -> Self {
|
2404 - | self.default_string = Some(input);
|
3804 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3805 + | self.default_string =
|
3806 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3807 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3808 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3809 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2405 3810 | self
|
3811 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2406 3812 | }
|
3813 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2407 3814 | #[allow(missing_docs)] // documentation missing in model
|
3815 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2408 3816 | pub fn default_boolean(mut self, input: bool) -> Self {
|
2409 - | self.default_boolean = Some(input);
|
3817 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3818 + | self.default_boolean =
|
3819 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3820 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3821 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3822 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2410 3823 | self
|
3824 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2411 3825 | }
|
3826 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2412 3827 | #[allow(missing_docs)] // documentation missing in model
|
3828 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2413 3829 | pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
|
2414 - | self.default_list = Some(input);
|
3830 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3831 + | self.default_list =
|
3832 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3833 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3834 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3835 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2415 3836 | self
|
3837 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2416 3838 | }
|
3839 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2417 3840 | #[allow(missing_docs)] // documentation missing in model
|
3841 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2418 3842 | pub fn default_document_map(
|
2419 3843 | mut self,
|
2420 3844 | input: ::aws_smithy_http_server_python::types::Document,
|
2421 3845 | ) -> Self {
|
2422 - | self.default_document_map = Some(input);
|
3846 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3847 + | self.default_document_map =
|
3848 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3849 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3850 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3851 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2423 3852 | self
|
3853 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2424 3854 | }
|
3855 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2425 3856 | #[allow(missing_docs)] // documentation missing in model
|
3857 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2426 3858 | pub fn default_document_string(
|
2427 3859 | mut self,
|
2428 3860 | input: ::aws_smithy_http_server_python::types::Document,
|
2429 3861 | ) -> Self {
|
2430 - | self.default_document_string = Some(input);
|
3862 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3863 + | self.default_document_string =
|
3864 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3865 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3866 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3867 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2431 3868 | self
|
3869 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2432 3870 | }
|
3871 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2433 3872 | #[allow(missing_docs)] // documentation missing in model
|
3873 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2434 3874 | pub fn default_document_boolean(
|
2435 3875 | mut self,
|
2436 3876 | input: ::aws_smithy_http_server_python::types::Document,
|
2437 3877 | ) -> Self {
|
2438 - | self.default_document_boolean = Some(input);
|
3878 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3879 + | self.default_document_boolean =
|
3880 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3881 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3882 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3883 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2439 3884 | self
|
3885 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2440 3886 | }
|
3887 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2441 3888 | #[allow(missing_docs)] // documentation missing in model
|
3889 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2442 3890 | pub fn default_document_list(
|
2443 3891 | mut self,
|
2444 3892 | input: ::aws_smithy_http_server_python::types::Document,
|
2445 3893 | ) -> Self {
|
2446 - | self.default_document_list = Some(input);
|
3894 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3895 + | self.default_document_list =
|
3896 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3897 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3898 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3899 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2447 3900 | self
|
3901 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2448 3902 | }
|
3903 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2449 3904 | #[allow(missing_docs)] // documentation missing in model
|
3905 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2450 3906 | pub fn default_null_document(
|
2451 3907 | mut self,
|
2452 3908 | input: ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
|
2453 3909 | ) -> Self {
|
2454 - | self.default_null_document = input;
|
3910 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3911 + | self.default_null_document =
|
3912 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3913 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2455 3914 | self
|
3915 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2456 3916 | }
|
3917 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2457 3918 | #[allow(missing_docs)] // documentation missing in model
|
3919 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2458 3920 | pub fn default_timestamp(
|
2459 3921 | mut self,
|
2460 3922 | input: ::aws_smithy_http_server_python::types::DateTime,
|
2461 3923 | ) -> Self {
|
2462 - | self.default_timestamp = Some(input);
|
3924 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3925 + | self.default_timestamp =
|
3926 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3927 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3928 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3929 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2463 3930 | self
|
3931 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2464 3932 | }
|
3933 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2465 3934 | #[allow(missing_docs)] // documentation missing in model
|
3935 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2466 3936 | pub fn default_blob(mut self, input: ::aws_smithy_http_server_python::types::Blob) -> Self {
|
2467 - | self.default_blob = Some(input);
|
3937 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3938 + | self.default_blob =
|
3939 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3940 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3941 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3942 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2468 3943 | self
|
3944 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2469 3945 | }
|
3946 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2470 3947 | #[allow(missing_docs)] // documentation missing in model
|
3948 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2471 3949 | pub fn default_byte(mut self, input: i8) -> Self {
|
2472 - | self.default_byte = Some(input);
|
3950 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3951 + | self.default_byte =
|
3952 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3953 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3954 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3955 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2473 3956 | self
|
3957 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2474 3958 | }
|
3959 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2475 3960 | #[allow(missing_docs)] // documentation missing in model
|
3961 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2476 3962 | pub fn default_short(mut self, input: i16) -> Self {
|
2477 - | self.default_short = Some(input);
|
3963 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3964 + | self.default_short =
|
3965 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3966 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3967 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3968 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2478 3969 | self
|
3970 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2479 3971 | }
|
3972 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2480 3973 | #[allow(missing_docs)] // documentation missing in model
|
3974 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2481 3975 | pub fn default_integer(mut self, input: i32) -> Self {
|
2482 - | self.default_integer = Some(input);
|
3976 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3977 + | self.default_integer =
|
3978 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3979 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3980 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3981 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2483 3982 | self
|
3983 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2484 3984 | }
|
3985 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2485 3986 | #[allow(missing_docs)] // documentation missing in model
|
3987 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2486 3988 | pub fn default_long(mut self, input: i64) -> Self {
|
2487 - | self.default_long = Some(input);
|
3989 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
3990 + | self.default_long =
|
3991 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
3992 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
3993 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
3994 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2488 3995 | self
|
3996 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2489 3997 | }
|
3998 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2490 3999 | #[allow(missing_docs)] // documentation missing in model
|
4000 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2491 4001 | pub fn default_float(mut self, input: f32) -> Self {
|
2492 - | self.default_float = Some(input);
|
4002 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4003 + | self.default_float =
|
4004 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4005 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4006 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4007 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2493 4008 | self
|
4009 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2494 4010 | }
|
4011 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2495 4012 | #[allow(missing_docs)] // documentation missing in model
|
4013 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2496 4014 | pub fn default_double(mut self, input: f64) -> Self {
|
2497 - | self.default_double = Some(input);
|
4015 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4016 + | self.default_double =
|
4017 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4018 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4019 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4020 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2498 4021 | self
|
4022 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2499 4023 | }
|
4024 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2500 4025 | #[allow(missing_docs)] // documentation missing in model
|
4026 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2501 4027 | pub fn default_map(
|
2502 4028 | mut self,
|
2503 4029 | input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2504 4030 | ) -> Self {
|
2505 - | self.default_map = Some(input);
|
4031 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4032 + | self.default_map =
|
4033 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4034 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4035 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4036 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2506 4037 | self
|
4038 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2507 4039 | }
|
4040 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2508 4041 | #[allow(missing_docs)] // documentation missing in model
|
4042 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2509 4043 | pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
|
2510 - | self.default_enum = Some(input);
|
4044 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4045 + | self.default_enum =
|
4046 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4047 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4048 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4049 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2511 4050 | self
|
4051 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2512 4052 | }
|
4053 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2513 4054 | #[allow(missing_docs)] // documentation missing in model
|
4055 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2514 4056 | pub fn default_int_enum(mut self, input: i32) -> Self {
|
2515 - | self.default_int_enum = Some(input);
|
4057 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4058 + | self.default_int_enum =
|
4059 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4060 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4061 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4062 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2516 4063 | self
|
4064 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2517 4065 | }
|
4066 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2518 4067 | #[allow(missing_docs)] // documentation missing in model
|
4068 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2519 4069 | pub fn empty_string(mut self, input: ::std::string::String) -> Self {
|
2520 - | self.empty_string = Some(input);
|
4070 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4071 + | self.empty_string =
|
4072 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4073 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4074 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4075 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2521 4076 | self
|
4077 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2522 4078 | }
|
4079 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2523 4080 | #[allow(missing_docs)] // documentation missing in model
|
4081 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2524 4082 | pub fn false_boolean(mut self, input: bool) -> Self {
|
2525 - | self.false_boolean = Some(input);
|
4083 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4084 + | self.false_boolean =
|
4085 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4086 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4087 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4088 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2526 4089 | self
|
4090 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2527 4091 | }
|
4092 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2528 4093 | #[allow(missing_docs)] // documentation missing in model
|
4094 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2529 4095 | pub fn empty_blob(mut self, input: ::aws_smithy_http_server_python::types::Blob) -> Self {
|
2530 - | self.empty_blob = Some(input);
|
4096 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4097 + | self.empty_blob =
|
4098 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4099 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4100 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4101 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2531 4102 | self
|
4103 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2532 4104 | }
|
4105 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2533 4106 | #[allow(missing_docs)] // documentation missing in model
|
4107 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2534 4108 | pub fn zero_byte(mut self, input: i8) -> Self {
|
2535 - | self.zero_byte = Some(input);
|
4109 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4110 + | self.zero_byte =
|
4111 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4112 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4113 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4114 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2536 4115 | self
|
4116 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2537 4117 | }
|
4118 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2538 4119 | #[allow(missing_docs)] // documentation missing in model
|
4120 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2539 4121 | pub fn zero_short(mut self, input: i16) -> Self {
|
2540 - | self.zero_short = Some(input);
|
4122 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4123 + | self.zero_short =
|
4124 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4125 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4126 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4127 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2541 4128 | self
|
4129 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2542 4130 | }
|
4131 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2543 4132 | #[allow(missing_docs)] // documentation missing in model
|
4133 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2544 4134 | pub fn zero_integer(mut self, input: i32) -> Self {
|
2545 - | self.zero_integer = Some(input);
|
4135 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4136 + | self.zero_integer =
|
4137 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4138 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4139 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4140 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2546 4141 | self
|
4142 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2547 4143 | }
|
4144 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2548 4145 | #[allow(missing_docs)] // documentation missing in model
|
4146 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2549 4147 | pub fn zero_long(mut self, input: i64) -> Self {
|
2550 - | self.zero_long = Some(input);
|
4148 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4149 + | self.zero_long =
|
4150 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4151 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4152 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4153 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2551 4154 | self
|
4155 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2552 4156 | }
|
4157 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2553 4158 | #[allow(missing_docs)] // documentation missing in model
|
4159 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2554 4160 | pub fn zero_float(mut self, input: f32) -> Self {
|
2555 - | self.zero_float = Some(input);
|
4161 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4162 + | self.zero_float =
|
4163 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4164 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4165 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4166 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2556 4167 | self
|
4168 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2557 4169 | }
|
4170 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2558 4171 | #[allow(missing_docs)] // documentation missing in model
|
4172 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2559 4173 | pub fn zero_double(mut self, input: f64) -> Self {
|
2560 - | self.zero_double = Some(input);
|
4174 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4175 + | self.zero_double =
|
4176 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
|
4177 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4178 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
|
4179 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2561 4180 | self
|
4181 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2562 4182 | }
|
2563 - | /// Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
4183 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
|
4184 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
2564 4185 | pub fn build(self) -> crate::model::Defaults {
|
2565 4186 | self.build_enforcing_required_and_enum_traits()
|
2566 4187 | }
|
4188 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2567 4189 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::Defaults {
|
4190 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2568 4191 | crate::model::Defaults {
|
2569 - | default_string: self.default_string.unwrap_or_else(
|
4192 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4193 + | default_string: self
|
4194 + | .default_string
|
4195 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4196 + | .unwrap_or_else(
|
2570 4197 | #[allow(clippy::redundant_closure)]
|
2571 4198 | || String::from("hi"),
|
2572 4199 | ),
|
2573 - | default_boolean: self.default_boolean.unwrap_or(true),
|
2574 - | default_list: self.default_list.unwrap_or_else(
|
2575 - | #[allow(clippy::redundant_closure)]
|
2576 - | || ::std::vec::Vec::new(),
|
2577 - | ),
|
2578 - | default_document_map: self.default_document_map.unwrap_or_else(
|
4200 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4201 + | default_boolean: self
|
4202 + | .default_boolean
|
4203 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4204 + | .unwrap_or(true),
|
4205 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4206 + | default_list: self
|
4207 + | .default_list
|
4208 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
4209 + | .unwrap_or_default(),
|
4210 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4211 + | default_document_map: self
|
4212 + | .default_document_map
|
4213 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4214 + | .unwrap_or_else(
|
2579 4215 | #[allow(clippy::redundant_closure)]
|
2580 4216 | || {
|
2581 4217 | ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
|
2582 4218 | .into()
|
2583 4219 | },
|
2584 4220 | ),
|
2585 - | default_document_string: self.default_document_string.unwrap_or_else(
|
4221 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4222 + | default_document_string: self
|
4223 + | .default_document_string
|
4224 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4225 + | .unwrap_or_else(
|
2586 4226 | #[allow(clippy::redundant_closure)]
|
2587 4227 | || {
|
2588 4228 | ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
|
2589 4229 | .into()
|
2590 4230 | },
|
2591 4231 | ),
|
4232 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2592 4233 | default_document_boolean: self
|
2593 4234 | .default_document_boolean
|
4235 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
2594 4236 | .unwrap_or(::aws_smithy_types::Document::Bool(true).into()),
|
2595 - | default_document_list: self.default_document_list.unwrap_or_else(
|
4237 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4238 + | default_document_list: self
|
4239 + | .default_document_list
|
4240 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4241 + | .unwrap_or_else(
|
2596 4242 | #[allow(clippy::redundant_closure)]
|
2597 4243 | || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()).into(),
|
2598 4244 | ),
|
4245 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
2599 4246 | default_null_document: self.default_null_document,
|
2600 - | default_timestamp: self.default_timestamp.unwrap_or_else(
|
4247 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4248 + | default_timestamp: self
|
4249 + | .default_timestamp
|
4250 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4251 + | .unwrap_or_else(
|
2601 4252 | #[allow(clippy::redundant_closure)]
|
2602 4253 | || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64).into(),
|
2603 4254 | ),
|
2604 - | default_blob: self.default_blob.unwrap_or_else(
|
4255 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4256 + | default_blob: self
|
4257 + | .default_blob
|
4258 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4259 + | .unwrap_or_else(
|
2605 4260 | #[allow(clippy::redundant_closure)]
|
2606 4261 | || ::aws_smithy_types::Blob::new("abc").into(),
|
2607 4262 | ),
|
2608 - | default_byte: self.default_byte.unwrap_or(1i8),
|
2609 - | default_short: self.default_short.unwrap_or(1i16),
|
2610 - | default_integer: self.default_integer.unwrap_or(10i32),
|
2611 - | default_long: self.default_long.unwrap_or(100i64),
|
2612 - | default_float: self.default_float.unwrap_or(1.0f32),
|
2613 - | default_double: self.default_double.unwrap_or(1.0f64),
|
2614 - | default_map: self.default_map.unwrap_or_else(
|
2615 - | #[allow(clippy::redundant_closure)]
|
2616 - | || ::std::collections::HashMap::new(),
|
2617 - | ),
|
2618 - | default_enum: self.default_enum.unwrap_or(
|
4263 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4264 + | default_byte: self
|
4265 + | .default_byte
|
4266 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4267 + | .unwrap_or(1i8),
|
4268 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4269 + | default_short: self
|
4270 + | .default_short
|
4271 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4272 + | .unwrap_or(1i16),
|
4273 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4274 + | default_integer: self
|
4275 + | .default_integer
|
4276 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4277 + | .unwrap_or(10i32),
|
4278 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4279 + | default_long: self
|
4280 + | .default_long
|
4281 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4282 + | .unwrap_or(100i64),
|
4283 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4284 + | default_float: self
|
4285 + | .default_float
|
4286 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4287 + | .unwrap_or(1.0f32),
|
4288 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4289 + | default_double: self
|
4290 + | .default_double
|
4291 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4292 + | .unwrap_or(1.0f64),
|
4293 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4294 + | default_map: self
|
4295 + | .default_map
|
4296 + | /* ServerBuilderGeneratorCommon.kt:100 */
|
4297 + | .unwrap_or_default(),
|
4298 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4299 + | default_enum: self
|
4300 + | .default_enum
|
4301 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4302 + | .unwrap_or(
|
2619 4303 | "FOO"
|
2620 4304 | .parse::<crate::model::TestEnum>()
|
2621 4305 | .expect("static value validated to member"),
|
2622 4306 | ),
|
2623 - | default_int_enum: self.default_int_enum.unwrap_or(1i32),
|
2624 - | empty_string: self.empty_string.unwrap_or_else(
|
4307 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4308 + | default_int_enum: self
|
4309 + | .default_int_enum
|
4310 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4311 + | .unwrap_or(1i32),
|
4312 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4313 + | empty_string: self
|
4314 + | .empty_string
|
4315 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4316 + | .unwrap_or_else(
|
2625 4317 | #[allow(clippy::redundant_closure)]
|
2626 4318 | || String::from(""),
|
2627 4319 | ),
|
2628 - | false_boolean: self.false_boolean.unwrap_or(false),
|
2629 - | empty_blob: self.empty_blob.unwrap_or_else(
|
4320 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4321 + | false_boolean: self
|
4322 + | .false_boolean
|
4323 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4324 + | .unwrap_or(false),
|
4325 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4326 + | empty_blob: self
|
4327 + | .empty_blob
|
4328 + | /* ServerBuilderGeneratorCommon.kt:139 */
|
4329 + | .unwrap_or_else(
|
2630 4330 | #[allow(clippy::redundant_closure)]
|
2631 4331 | || ::aws_smithy_types::Blob::new("").into(),
|
2632 4332 | ),
|
2633 - | zero_byte: self.zero_byte.unwrap_or(0i8),
|
2634 - | zero_short: self.zero_short.unwrap_or(0i16),
|
2635 - | zero_integer: self.zero_integer.unwrap_or(0i32),
|
2636 - | zero_long: self.zero_long.unwrap_or(0i64),
|
2637 - | zero_float: self.zero_float.unwrap_or(0.0f32),
|
2638 - | zero_double: self.zero_double.unwrap_or(0.0f64),
|
2639 - | }
|
2640 - | }
|
4333 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4334 + | zero_byte: self
|
4335 + | .zero_byte
|
4336 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4337 + | .unwrap_or(0i8),
|
4338 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4339 + | zero_short: self
|
4340 + | .zero_short
|
4341 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4342 + | .unwrap_or(0i16),
|
4343 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4344 + | zero_integer: self
|
4345 + | .zero_integer
|
4346 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4347 + | .unwrap_or(0i32),
|
4348 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4349 + | zero_long: self
|
4350 + | .zero_long
|
4351 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4352 + | .unwrap_or(0i64),
|
4353 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4354 + | zero_float: self
|
4355 + | .zero_float
|
4356 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4357 + | .unwrap_or(0.0f32),
|
4358 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4359 + | zero_double: self
|
4360 + | .zero_double
|
4361 + | /* ServerBuilderGeneratorCommon.kt:135 */
|
4362 + | .unwrap_or(0.0f64),
|
4363 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4364 + | }
|
4365 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
4366 + | }
|
4367 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2641 4368 | }
|
4369 + |
|
4370 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2642 4371 | }
|
2643 4372 | pub(crate) mod my_union_internal {
|
2644 4373 |
|
4374 + | /* RustType.kt:516 */
|
2645 4375 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4376 + | /* UnconstrainedUnionGenerator.kt:150 */
|
2646 4377 | #[allow(clippy::enum_variant_names)]
|
2647 4378 | pub(crate) enum ConstraintViolation {
|
4379 + | /* UnconstrainedUnionGenerator.kt:218 */
|
2648 4380 | EnumValue(crate::model::foo_enum_internal::ConstraintViolation),
|
4381 + | /* UnconstrainedUnionGenerator.kt:150 */
|
2649 4382 | }
|
4383 + | /* UnconstrainedUnionGenerator.kt:158 */
|
2650 4384 | impl ::std::fmt::Display for ConstraintViolation {
|
2651 4385 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2652 4386 | match self {
|
2653 4387 | Self::EnumValue(inner) => write!(f, "{inner}"),
|
2654 4388 | }
|
2655 4389 | }
|
2656 4390 | }
|
2657 4391 |
|
2658 4392 | impl ::std::error::Error for ConstraintViolation {}
|
4393 + | /* UnconstrainedUnionGenerator.kt:176 */
|
2659 4394 | impl ConstraintViolation {
|
2660 4395 | pub(crate) fn as_validation_exception_field(
|
2661 4396 | self,
|
2662 4397 | path: ::std::string::String,
|
2663 4398 | ) -> crate::model::ValidationExceptionField {
|
2664 4399 | match self {
|
2665 4400 | Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
|
2666 4401 | }
|
2667 4402 | }
|
2668 4403 | }
|
4404 + |
|
4405 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2669 4406 | }
|
2670 - | /// See [`GreetingStruct`](crate::model::GreetingStruct).
|
4407 + | /// /* ServerBuilderGenerator.kt:171 */See [`GreetingStruct`](crate::model::GreetingStruct).
|
2671 4408 | pub(crate) mod greeting_struct_internal {
|
2672 4409 |
|
4410 + | /* ServerBuilderGenerator.kt:461 */
|
2673 4411 | impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
|
2674 4412 | fn from(builder: Builder) -> Self {
|
2675 4413 | builder.build()
|
2676 4414 | }
|
2677 4415 | }
|
2678 - | /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
4416 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
4417 + | /* RustType.kt:516 */
|
2679 4418 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4419 + | /* ServerBuilderGenerator.kt:211 */
|
2680 4420 | pub(crate) struct Builder {
|
4421 + | /* ServerBuilderGenerator.kt:308 */
|
2681 4422 | pub(crate) hi: ::std::option::Option<::std::string::String>,
|
4423 + | /* ServerBuilderGenerator.kt:211 */
|
2682 4424 | }
|
4425 + | /* ServerBuilderGenerator.kt:215 */
|
2683 4426 | impl Builder {
|
4427 + | /* ServerBuilderGenerator.kt:426 */
|
2684 4428 | #[allow(missing_docs)] // documentation missing in model
|
4429 + | /* ServerBuilderGenerator.kt:428 */
|
2685 4430 | pub(crate) fn set_hi(
|
2686 4431 | mut self,
|
2687 4432 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2688 4433 | ) -> Self {
|
4434 + | /* ServerBuilderGenerator.kt:429 */
|
2689 4435 | self.hi = input.map(|v| v.into());
|
2690 4436 | self
|
4437 + | /* ServerBuilderGenerator.kt:428 */
|
2691 4438 | }
|
2692 - | /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
4439 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
4440 + | /* ServerBuilderGenerator.kt:271 */
|
2693 4441 | pub fn build(self) -> crate::model::GreetingStruct {
|
2694 4442 | self.build_enforcing_all_constraints()
|
2695 4443 | }
|
4444 + | /* ServerBuilderGenerator.kt:283 */
|
2696 4445 | fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
|
2697 - | crate::model::GreetingStruct { hi: self.hi }
|
4446 + | /* ServerBuilderGenerator.kt:542 */
|
4447 + | crate::model::GreetingStruct {
|
4448 + | /* ServerBuilderGenerator.kt:546 */
|
4449 + | hi: self.hi,
|
4450 + | /* ServerBuilderGenerator.kt:542 */
|
4451 + | }
|
4452 + | /* ServerBuilderGenerator.kt:283 */
|
2698 4453 | }
|
4454 + | /* ServerBuilderGenerator.kt:215 */
|
2699 4455 | }
|
4456 + |
|
4457 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2700 4458 | }
|
2701 - | /// See [`GreetingStruct`](crate::model::GreetingStruct).
|
4459 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`GreetingStruct`](crate::model::GreetingStruct).
|
2702 4460 | pub mod greeting_struct {
|
2703 4461 |
|
4462 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
2704 4463 | impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
|
2705 4464 | fn from(builder: Builder) -> Self {
|
2706 4465 | builder.build()
|
2707 4466 | }
|
2708 4467 | }
|
2709 - | /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
4468 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`GreetingStruct`](crate::model::GreetingStruct).
|
4469 + | /* RustType.kt:516 */
|
2710 4470 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4471 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2711 4472 | pub struct Builder {
|
4473 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2712 4474 | pub(crate) hi: ::std::option::Option<::std::string::String>,
|
4475 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2713 4476 | }
|
4477 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2714 4478 | impl Builder {
|
4479 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2715 4480 | #[allow(missing_docs)] // documentation missing in model
|
4481 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2716 4482 | pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2717 - | self.hi = input;
|
4483 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4484 + | self.hi =
|
4485 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4486 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2718 4487 | self
|
4488 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2719 4489 | }
|
2720 - | /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
4490 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
|
4491 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
2721 4492 | pub fn build(self) -> crate::model::GreetingStruct {
|
2722 4493 | self.build_enforcing_required_and_enum_traits()
|
2723 4494 | }
|
4495 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2724 4496 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::GreetingStruct {
|
2725 - | crate::model::GreetingStruct { hi: self.hi }
|
4497 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4498 + | crate::model::GreetingStruct {
|
4499 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4500 + | hi: self.hi,
|
4501 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4502 + | }
|
4503 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2726 4504 | }
|
4505 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2727 4506 | }
|
4507 + |
|
4508 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2728 4509 | }
|
2729 - | /// See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4510 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
2730 4511 | pub mod complex_nested_error_data {
|
2731 4512 |
|
4513 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
|
2732 4514 | impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
|
2733 4515 | fn from(builder: Builder) -> Self {
|
2734 4516 | builder.build()
|
2735 4517 | }
|
2736 4518 | }
|
2737 - | /// A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4519 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4520 + | /* RustType.kt:516 */
|
2738 4521 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4522 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2739 4523 | pub struct Builder {
|
4524 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
|
2740 4525 | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
4526 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
|
2741 4527 | }
|
4528 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
2742 4529 | impl Builder {
|
4530 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
|
2743 4531 | #[allow(missing_docs)] // documentation missing in model
|
4532 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2744 4533 | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2745 - | self.foo = input;
|
4534 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
|
4535 + | self.foo =
|
4536 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
|
4537 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
|
2746 4538 | self
|
4539 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
|
2747 4540 | }
|
2748 - | /// Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4541 + | /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
|
4542 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
|
2749 4543 | pub fn build(self) -> crate::model::ComplexNestedErrorData {
|
2750 4544 | self.build_enforcing_required_and_enum_traits()
|
2751 4545 | }
|
4546 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2752 4547 | fn build_enforcing_required_and_enum_traits(self) -> crate::model::ComplexNestedErrorData {
|
2753 - | crate::model::ComplexNestedErrorData { foo: self.foo }
|
4548 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
4549 + | crate::model::ComplexNestedErrorData {
|
4550 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
|
4551 + | foo: self.foo,
|
4552 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
|
2754 4553 | }
|
4554 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
|
2755 4555 | }
|
4556 + | /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
|
4557 + | }
|
4558 + |
|
4559 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2756 4560 | }
|