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