7 7 | /// :param crate_ typing.Optional\[bool\]:
|
8 8 | /// :param super_ typing.Optional\[bool\]:
|
9 9 | /// :param build_value typing.Optional\[str\]:
|
10 10 | /// :param default_value typing.Optional\[str\]:
|
11 11 | /// :param send typing.Optional\[str\]:
|
12 12 | /// :rtype None:
|
13 13 | #[allow(missing_docs)] // documentation missing in model
|
14 14 | #[derive(
|
15 15 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
16 16 | )]
|
17 - | pub struct RpcEchoInput {
|
17 + | pub struct ReservedWordsAsMembersInput {
|
18 18 | #[pyo3(get, set)]
|
19 19 | /// :type typing.Optional\[int\]:
|
20 20 | #[allow(missing_docs)] // documentation missing in model
|
21 21 | pub r#as: ::std::option::Option<i32>,
|
22 22 | #[pyo3(get, set)]
|
23 23 | /// :type typing.Optional\[bool\]:
|
24 24 | #[allow(missing_docs)] // documentation missing in model
|
25 25 | pub r#async: ::std::option::Option<bool>,
|
26 26 | #[pyo3(get, set)]
|
27 27 | /// :type typing.Optional\[naming_test_ops.model.UnknownVariantCollidingEnum\]:
|
28 28 | #[allow(missing_docs)] // documentation missing in model
|
29 29 | pub r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
30 30 | #[pyo3(get, set)]
|
31 31 | /// :type typing.Optional\[bool\]:
|
32 32 | #[allow(missing_docs)] // documentation missing in model
|
33 33 | pub self_: ::std::option::Option<bool>,
|
34 34 | #[pyo3(get, set)]
|
35 35 | /// :type typing.Optional\[bool\]:
|
36 36 | #[allow(missing_docs)] // documentation missing in model
|
37 37 | pub crate_: ::std::option::Option<bool>,
|
38 38 | #[pyo3(get, set)]
|
39 39 | /// :type typing.Optional\[bool\]:
|
40 40 | #[allow(missing_docs)] // documentation missing in model
|
41 41 | pub super_: ::std::option::Option<bool>,
|
42 42 | #[pyo3(get, set)]
|
43 43 | /// :type typing.Optional\[str\]:
|
44 44 | #[allow(missing_docs)] // documentation missing in model
|
45 45 | pub build_value: ::std::option::Option<::std::string::String>,
|
46 46 | #[pyo3(get, set)]
|
47 47 | /// :type typing.Optional\[str\]:
|
48 48 | #[allow(missing_docs)] // documentation missing in model
|
49 49 | pub default_value: ::std::option::Option<::std::string::String>,
|
50 50 | #[pyo3(get, set)]
|
51 51 | /// :type typing.Optional\[str\]:
|
52 52 | #[allow(missing_docs)] // documentation missing in model
|
53 53 | pub send: ::std::option::Option<::std::string::String>,
|
54 54 | }
|
55 - | impl RpcEchoInput {
|
55 + | impl ReservedWordsAsMembersInput {
|
56 56 | #[allow(missing_docs)] // documentation missing in model
|
57 57 | pub fn r#as(&self) -> ::std::option::Option<i32> {
|
58 58 | self.r#as
|
59 59 | }
|
60 60 | #[allow(missing_docs)] // documentation missing in model
|
61 61 | pub fn r#async(&self) -> ::std::option::Option<bool> {
|
62 62 | self.r#async
|
63 63 | }
|
64 64 | #[allow(missing_docs)] // documentation missing in model
|
65 65 | pub fn r#enum(&self) -> ::std::option::Option<&crate::model::UnknownVariantCollidingEnum> {
|
66 66 | self.r#enum.as_ref()
|
67 67 | }
|
68 68 | #[allow(missing_docs)] // documentation missing in model
|
69 69 | pub fn self_(&self) -> ::std::option::Option<bool> {
|
70 70 | self.self_
|
71 71 | }
|
72 72 | #[allow(missing_docs)] // documentation missing in model
|
73 73 | pub fn crate_(&self) -> ::std::option::Option<bool> {
|
74 74 | self.crate_
|
75 75 | }
|
76 76 | #[allow(missing_docs)] // documentation missing in model
|
77 77 | pub fn super_(&self) -> ::std::option::Option<bool> {
|
78 78 | self.super_
|
79 79 | }
|
80 80 | #[allow(missing_docs)] // documentation missing in model
|
81 81 | pub fn build_value(&self) -> ::std::option::Option<&str> {
|
82 82 | self.build_value.as_deref()
|
83 83 | }
|
84 84 | #[allow(missing_docs)] // documentation missing in model
|
85 85 | pub fn default_value(&self) -> ::std::option::Option<&str> {
|
86 86 | self.default_value.as_deref()
|
87 87 | }
|
88 88 | #[allow(missing_docs)] // documentation missing in model
|
89 89 | pub fn send(&self) -> ::std::option::Option<&str> {
|
90 90 | self.send.as_deref()
|
91 91 | }
|
92 92 | }
|
93 93 | #[allow(clippy::new_without_default)]
|
94 94 | #[allow(clippy::too_many_arguments)]
|
95 95 | #[::pyo3::pymethods]
|
96 - | impl RpcEchoInput {
|
96 + | impl ReservedWordsAsMembersInput {
|
97 97 | #[new]
|
98 98 | pub fn new(
|
99 99 | r#as: ::std::option::Option<i32>,
|
100 100 | r#async: ::std::option::Option<bool>,
|
101 101 | r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
102 102 | self_: ::std::option::Option<bool>,
|
103 103 | crate_: ::std::option::Option<bool>,
|
104 104 | super_: ::std::option::Option<bool>,
|
105 105 | build_value: ::std::option::Option<::std::string::String>,
|
106 106 | default_value: ::std::option::Option<::std::string::String>,
|
107 107 | send: ::std::option::Option<::std::string::String>,
|
108 108 | ) -> Self {
|
109 109 | Self {
|
110 110 | r#as,
|
111 111 | r#async,
|
112 112 | r#enum,
|
113 113 | self_,
|
114 114 | crate_,
|
115 115 | super_,
|
116 116 | build_value,
|
117 117 | default_value,
|
118 118 | send,
|
119 119 | }
|
120 120 | }
|
121 121 | fn __repr__(&self) -> String {
|
122 122 | format!("{self:?}")
|
123 123 | }
|
124 124 | fn __str__(&self) -> String {
|
125 125 | format!("{self:?}")
|
126 126 | }
|
127 127 | }
|
128 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RpcEchoInput> {
|
128 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ReservedWordsAsMembersInput> {
|
129 129 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
130 - | ob.extract::<RpcEchoInput>().map(Box::new)
|
130 + | ob.extract::<ReservedWordsAsMembersInput>().map(Box::new)
|
131 131 | }
|
132 132 | }
|
133 133 |
|
134 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RpcEchoInput> {
|
134 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ReservedWordsAsMembersInput> {
|
135 135 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
136 136 | (*self).into_py(py)
|
137 137 | }
|
138 138 | }
|
139 - | impl crate::constrained::Constrained for crate::input::RpcEchoInput {
|
140 - | type Unconstrained = crate::input::rpc_echo_input_internal::Builder;
|
139 + | impl crate::constrained::Constrained for crate::input::ReservedWordsAsMembersInput {
|
140 + | type Unconstrained = crate::input::reserved_words_as_members_input_internal::Builder;
|
141 141 | }
|
142 - | impl RpcEchoInput {
|
143 - | /// Creates a new builder-style object to manufacture [`RpcEchoInput`](crate::input::RpcEchoInput).
|
144 - | pub fn builder() -> crate::input::rpc_echo_input::Builder {
|
145 - | crate::input::rpc_echo_input::Builder::default()
|
142 + | impl ReservedWordsAsMembersInput {
|
143 + | /// Creates a new builder-style object to manufacture [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
|
144 + | pub fn builder() -> crate::input::reserved_words_as_members_input::Builder {
|
145 + | crate::input::reserved_words_as_members_input::Builder::default()
|
146 146 | }
|
147 147 | }
|
148 148 |
|
149 149 | #[::pyo3::pyclass]
|
150 - | /// :param r#as typing.Optional\[int\]:
|
151 - | /// :param r#async typing.Optional\[bool\]:
|
152 - | /// :param r#enum typing.Optional\[naming_test_ops.model.UnknownVariantCollidingEnum\]:
|
153 - | /// :param self_ typing.Optional\[bool\]:
|
154 - | /// :param crate_ typing.Optional\[bool\]:
|
155 - | /// :param super_ typing.Optional\[bool\]:
|
156 - | /// :param build_value typing.Optional\[str\]:
|
157 - | /// :param default_value typing.Optional\[str\]:
|
158 - | /// :param send typing.Optional\[str\]:
|
150 + | /// :param regular_string typing.Optional\[str\]:
|
151 + | /// :param punned_vec typing.Optional\[naming_test_ops.model.Vec\]:
|
159 152 | /// :rtype None:
|
160 153 | #[allow(missing_docs)] // documentation missing in model
|
161 154 | #[derive(
|
162 155 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
163 156 | )]
|
164 - | pub struct MatchInput {
|
165 - | #[pyo3(get, set)]
|
166 - | /// :type typing.Optional\[int\]:
|
167 - | #[allow(missing_docs)] // documentation missing in model
|
168 - | pub r#as: ::std::option::Option<i32>,
|
169 - | #[pyo3(get, set)]
|
170 - | /// :type typing.Optional\[bool\]:
|
171 - | #[allow(missing_docs)] // documentation missing in model
|
172 - | pub r#async: ::std::option::Option<bool>,
|
173 - | #[pyo3(get, set)]
|
174 - | /// :type typing.Optional\[naming_test_ops.model.UnknownVariantCollidingEnum\]:
|
175 - | #[allow(missing_docs)] // documentation missing in model
|
176 - | pub r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
177 - | #[pyo3(get, set)]
|
178 - | /// :type typing.Optional\[bool\]:
|
179 - | #[allow(missing_docs)] // documentation missing in model
|
180 - | pub self_: ::std::option::Option<bool>,
|
181 - | #[pyo3(get, set)]
|
182 - | /// :type typing.Optional\[bool\]:
|
183 - | #[allow(missing_docs)] // documentation missing in model
|
184 - | pub crate_: ::std::option::Option<bool>,
|
185 - | #[pyo3(get, set)]
|
186 - | /// :type typing.Optional\[bool\]:
|
187 - | #[allow(missing_docs)] // documentation missing in model
|
188 - | pub super_: ::std::option::Option<bool>,
|
189 - | #[pyo3(get, set)]
|
190 - | /// :type typing.Optional\[str\]:
|
191 - | #[allow(missing_docs)] // documentation missing in model
|
192 - | pub build_value: ::std::option::Option<::std::string::String>,
|
157 + | pub struct StructureNamePunningInput {
|
193 158 | #[pyo3(get, set)]
|
194 159 | /// :type typing.Optional\[str\]:
|
195 160 | #[allow(missing_docs)] // documentation missing in model
|
196 - | pub default_value: ::std::option::Option<::std::string::String>,
|
161 + | pub regular_string: ::std::option::Option<::std::string::String>,
|
197 162 | #[pyo3(get, set)]
|
198 - | /// :type typing.Optional\[str\]:
|
163 + | /// :type typing.Optional\[naming_test_ops.model.Vec\]:
|
199 164 | #[allow(missing_docs)] // documentation missing in model
|
200 - | pub send: ::std::option::Option<::std::string::String>,
|
165 + | pub punned_vec: ::std::option::Option<crate::model::Vec>,
|
201 166 | }
|
202 - | impl MatchInput {
|
203 - | #[allow(missing_docs)] // documentation missing in model
|
204 - | pub fn r#as(&self) -> ::std::option::Option<i32> {
|
205 - | self.r#as
|
206 - | }
|
207 - | #[allow(missing_docs)] // documentation missing in model
|
208 - | pub fn r#async(&self) -> ::std::option::Option<bool> {
|
209 - | self.r#async
|
210 - | }
|
211 - | #[allow(missing_docs)] // documentation missing in model
|
212 - | pub fn r#enum(&self) -> ::std::option::Option<&crate::model::UnknownVariantCollidingEnum> {
|
213 - | self.r#enum.as_ref()
|
214 - | }
|
215 - | #[allow(missing_docs)] // documentation missing in model
|
216 - | pub fn self_(&self) -> ::std::option::Option<bool> {
|
217 - | self.self_
|
218 - | }
|
219 - | #[allow(missing_docs)] // documentation missing in model
|
220 - | pub fn crate_(&self) -> ::std::option::Option<bool> {
|
221 - | self.crate_
|
222 - | }
|
223 - | #[allow(missing_docs)] // documentation missing in model
|
224 - | pub fn super_(&self) -> ::std::option::Option<bool> {
|
225 - | self.super_
|
226 - | }
|
227 - | #[allow(missing_docs)] // documentation missing in model
|
228 - | pub fn build_value(&self) -> ::std::option::Option<&str> {
|
229 - | self.build_value.as_deref()
|
230 - | }
|
167 + | impl StructureNamePunningInput {
|
231 168 | #[allow(missing_docs)] // documentation missing in model
|
232 - | pub fn default_value(&self) -> ::std::option::Option<&str> {
|
233 - | self.default_value.as_deref()
|
169 + | pub fn regular_string(&self) -> ::std::option::Option<&str> {
|
170 + | self.regular_string.as_deref()
|
234 171 | }
|
235 172 | #[allow(missing_docs)] // documentation missing in model
|
236 - | pub fn send(&self) -> ::std::option::Option<&str> {
|
237 - | self.send.as_deref()
|
173 + | pub fn punned_vec(&self) -> ::std::option::Option<&crate::model::Vec> {
|
174 + | self.punned_vec.as_ref()
|
238 175 | }
|
239 176 | }
|
240 177 | #[allow(clippy::new_without_default)]
|
241 178 | #[allow(clippy::too_many_arguments)]
|
242 179 | #[::pyo3::pymethods]
|
243 - | impl MatchInput {
|
180 + | impl StructureNamePunningInput {
|
244 181 | #[new]
|
245 182 | pub fn new(
|
246 - | r#as: ::std::option::Option<i32>,
|
247 - | r#async: ::std::option::Option<bool>,
|
248 - | r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
249 - | self_: ::std::option::Option<bool>,
|
250 - | crate_: ::std::option::Option<bool>,
|
251 - | super_: ::std::option::Option<bool>,
|
252 - | build_value: ::std::option::Option<::std::string::String>,
|
253 - | default_value: ::std::option::Option<::std::string::String>,
|
254 - | send: ::std::option::Option<::std::string::String>,
|
183 + | regular_string: ::std::option::Option<::std::string::String>,
|
184 + | punned_vec: ::std::option::Option<crate::model::Vec>,
|
255 185 | ) -> Self {
|
256 186 | Self {
|
257 - | r#as,
|
258 - | r#async,
|
259 - | r#enum,
|
260 - | self_,
|
261 - | crate_,
|
262 - | super_,
|
263 - | build_value,
|
264 - | default_value,
|
265 - | send,
|
187 + | regular_string,
|
188 + | punned_vec,
|
266 189 | }
|
267 190 | }
|
268 191 | fn __repr__(&self) -> String {
|
269 192 | format!("{self:?}")
|
270 193 | }
|
271 194 | fn __str__(&self) -> String {
|
272 195 | format!("{self:?}")
|
273 196 | }
|
274 197 | }
|
275 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<MatchInput> {
|
198 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructureNamePunningInput> {
|
276 199 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
277 - | ob.extract::<MatchInput>().map(Box::new)
|
200 + | ob.extract::<StructureNamePunningInput>().map(Box::new)
|
278 201 | }
|
279 202 | }
|
280 203 |
|
281 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<MatchInput> {
|
204 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructureNamePunningInput> {
|
282 205 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
283 206 | (*self).into_py(py)
|
284 207 | }
|
285 208 | }
|
286 - | impl crate::constrained::Constrained for crate::input::MatchInput {
|
287 - | type Unconstrained = crate::input::match_input_internal::Builder;
|
209 + | impl crate::constrained::Constrained for crate::input::StructureNamePunningInput {
|
210 + | type Unconstrained = crate::input::structure_name_punning_input_internal::Builder;
|
288 211 | }
|
289 - | impl MatchInput {
|
290 - | /// Creates a new builder-style object to manufacture [`MatchInput`](crate::input::MatchInput).
|
291 - | pub fn builder() -> crate::input::match_input::Builder {
|
292 - | crate::input::match_input::Builder::default()
|
212 + | impl StructureNamePunningInput {
|
213 + | /// Creates a new builder-style object to manufacture [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
214 + | pub fn builder() -> crate::input::structure_name_punning_input::Builder {
|
215 + | crate::input::structure_name_punning_input::Builder::default()
|
293 216 | }
|
294 217 | }
|
295 218 |
|
296 219 | #[::pyo3::pyclass]
|
297 - | /// :param pv_member typing.Optional\[bool\]:
|
298 220 | /// :rtype None:
|
299 221 | #[allow(missing_docs)] // documentation missing in model
|
300 222 | #[derive(
|
301 223 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
302 224 | )]
|
303 - | pub struct OptionInput {
|
304 - | #[pyo3(get, set)]
|
305 - | /// :type typing.Optional\[bool\]:
|
306 - | #[allow(missing_docs)] // documentation missing in model
|
307 - | pub pv_member: ::std::option::Option<bool>,
|
308 - | }
|
309 - | impl OptionInput {
|
310 - | #[allow(missing_docs)] // documentation missing in model
|
311 - | pub fn pv_member(&self) -> ::std::option::Option<bool> {
|
312 - | self.pv_member
|
313 - | }
|
314 - | }
|
225 + | pub struct ErrCollisionsInput {}
|
315 226 | #[allow(clippy::new_without_default)]
|
316 227 | #[allow(clippy::too_many_arguments)]
|
317 228 | #[::pyo3::pymethods]
|
318 - | impl OptionInput {
|
229 + | impl ErrCollisionsInput {
|
319 230 | #[new]
|
320 - | pub fn new(pv_member: ::std::option::Option<bool>) -> Self {
|
321 - | Self { pv_member }
|
231 + | pub fn new() -> Self {
|
232 + | Self {}
|
322 233 | }
|
323 234 | fn __repr__(&self) -> String {
|
324 235 | format!("{self:?}")
|
325 236 | }
|
326 237 | fn __str__(&self) -> String {
|
327 238 | format!("{self:?}")
|
328 239 | }
|
329 240 | }
|
330 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<OptionInput> {
|
241 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ErrCollisionsInput> {
|
331 242 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
332 - | ob.extract::<OptionInput>().map(Box::new)
|
243 + | ob.extract::<ErrCollisionsInput>().map(Box::new)
|
333 244 | }
|
334 245 | }
|
335 246 |
|
336 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<OptionInput> {
|
247 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ErrCollisionsInput> {
|
337 248 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
338 249 | (*self).into_py(py)
|
339 250 | }
|
340 251 | }
|
341 - | impl crate::constrained::Constrained for crate::input::OptionInput {
|
342 - | type Unconstrained = crate::input::option_input_internal::Builder;
|
252 + | impl crate::constrained::Constrained for crate::input::ErrCollisionsInput {
|
253 + | type Unconstrained = crate::input::err_collisions_input_internal::Builder;
|
343 254 | }
|
344 - | impl OptionInput {
|
345 - | /// Creates a new builder-style object to manufacture [`OptionInput`](crate::input::OptionInput).
|
346 - | pub fn builder() -> crate::input::option_input::Builder {
|
347 - | crate::input::option_input::Builder::default()
|
255 + | impl ErrCollisionsInput {
|
256 + | /// Creates a new builder-style object to manufacture [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
257 + | pub fn builder() -> crate::input::err_collisions_input::Builder {
|
258 + | crate::input::err_collisions_input::Builder::default()
|
348 259 | }
|
349 260 | }
|
350 261 |
|
351 262 | #[::pyo3::pyclass]
|
352 263 | /// :param pv_member typing.Optional\[bool\]:
|
353 264 | /// :rtype None:
|
354 265 | #[allow(missing_docs)] // documentation missing in model
|
355 266 | #[derive(
|
356 267 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
357 268 | )]
|
358 269 | pub struct ResultInput {
|
359 270 | #[pyo3(get, set)]
|
360 271 | /// :type typing.Optional\[bool\]:
|
361 272 | #[allow(missing_docs)] // documentation missing in model
|
362 273 | pub pv_member: ::std::option::Option<bool>,
|
363 274 | }
|
364 275 | impl ResultInput {
|
365 276 | #[allow(missing_docs)] // documentation missing in model
|
366 277 | pub fn pv_member(&self) -> ::std::option::Option<bool> {
|
367 278 | self.pv_member
|
368 279 | }
|
369 280 | }
|
370 281 | #[allow(clippy::new_without_default)]
|
371 282 | #[allow(clippy::too_many_arguments)]
|
372 283 | #[::pyo3::pymethods]
|
373 284 | impl ResultInput {
|
374 285 | #[new]
|
375 286 | pub fn new(pv_member: ::std::option::Option<bool>) -> Self {
|
376 287 | Self { pv_member }
|
377 288 | }
|
378 289 | fn __repr__(&self) -> String {
|
379 290 | format!("{self:?}")
|
380 291 | }
|
381 292 | fn __str__(&self) -> String {
|
382 293 | format!("{self:?}")
|
383 294 | }
|
384 295 | }
|
385 296 | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ResultInput> {
|
386 297 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
387 298 | ob.extract::<ResultInput>().map(Box::new)
|
388 299 | }
|
389 300 | }
|
390 301 |
|
391 302 | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResultInput> {
|
392 303 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
393 304 | (*self).into_py(py)
|
394 305 | }
|
395 306 | }
|
396 307 | impl crate::constrained::Constrained for crate::input::ResultInput {
|
397 308 | type Unconstrained = crate::input::result_input_internal::Builder;
|
398 309 | }
|
399 310 | impl ResultInput {
|
400 311 | /// Creates a new builder-style object to manufacture [`ResultInput`](crate::input::ResultInput).
|
401 312 | pub fn builder() -> crate::input::result_input::Builder {
|
402 313 | crate::input::result_input::Builder::default()
|
403 314 | }
|
404 315 | }
|
405 316 |
|
406 317 | #[::pyo3::pyclass]
|
318 + | /// :param pv_member typing.Optional\[bool\]:
|
407 319 | /// :rtype None:
|
408 320 | #[allow(missing_docs)] // documentation missing in model
|
409 321 | #[derive(
|
410 322 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
411 323 | )]
|
412 - | pub struct ErrCollisionsInput {}
|
324 + | pub struct OptionInput {
|
325 + | #[pyo3(get, set)]
|
326 + | /// :type typing.Optional\[bool\]:
|
327 + | #[allow(missing_docs)] // documentation missing in model
|
328 + | pub pv_member: ::std::option::Option<bool>,
|
329 + | }
|
330 + | impl OptionInput {
|
331 + | #[allow(missing_docs)] // documentation missing in model
|
332 + | pub fn pv_member(&self) -> ::std::option::Option<bool> {
|
333 + | self.pv_member
|
334 + | }
|
335 + | }
|
413 336 | #[allow(clippy::new_without_default)]
|
414 337 | #[allow(clippy::too_many_arguments)]
|
415 338 | #[::pyo3::pymethods]
|
416 - | impl ErrCollisionsInput {
|
339 + | impl OptionInput {
|
417 340 | #[new]
|
418 - | pub fn new() -> Self {
|
419 - | Self {}
|
341 + | pub fn new(pv_member: ::std::option::Option<bool>) -> Self {
|
342 + | Self { pv_member }
|
420 343 | }
|
421 344 | fn __repr__(&self) -> String {
|
422 345 | format!("{self:?}")
|
423 346 | }
|
424 347 | fn __str__(&self) -> String {
|
425 348 | format!("{self:?}")
|
426 349 | }
|
427 350 | }
|
428 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ErrCollisionsInput> {
|
351 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<OptionInput> {
|
429 352 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
430 - | ob.extract::<ErrCollisionsInput>().map(Box::new)
|
353 + | ob.extract::<OptionInput>().map(Box::new)
|
431 354 | }
|
432 355 | }
|
433 356 |
|
434 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ErrCollisionsInput> {
|
357 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<OptionInput> {
|
435 358 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
436 359 | (*self).into_py(py)
|
437 360 | }
|
438 361 | }
|
439 - | impl crate::constrained::Constrained for crate::input::ErrCollisionsInput {
|
440 - | type Unconstrained = crate::input::err_collisions_input_internal::Builder;
|
362 + | impl crate::constrained::Constrained for crate::input::OptionInput {
|
363 + | type Unconstrained = crate::input::option_input_internal::Builder;
|
441 364 | }
|
442 - | impl ErrCollisionsInput {
|
443 - | /// Creates a new builder-style object to manufacture [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
444 - | pub fn builder() -> crate::input::err_collisions_input::Builder {
|
445 - | crate::input::err_collisions_input::Builder::default()
|
365 + | impl OptionInput {
|
366 + | /// Creates a new builder-style object to manufacture [`OptionInput`](crate::input::OptionInput).
|
367 + | pub fn builder() -> crate::input::option_input::Builder {
|
368 + | crate::input::option_input::Builder::default()
|
446 369 | }
|
447 370 | }
|
448 371 |
|
449 372 | #[::pyo3::pyclass]
|
450 - | /// :param regular_string typing.Optional\[str\]:
|
451 - | /// :param punned_vec typing.Optional\[naming_test_ops.model.Vec\]:
|
373 + | /// :param r#as typing.Optional\[int\]:
|
374 + | /// :param r#async typing.Optional\[bool\]:
|
375 + | /// :param r#enum typing.Optional\[naming_test_ops.model.UnknownVariantCollidingEnum\]:
|
376 + | /// :param self_ typing.Optional\[bool\]:
|
377 + | /// :param crate_ typing.Optional\[bool\]:
|
378 + | /// :param super_ typing.Optional\[bool\]:
|
379 + | /// :param build_value typing.Optional\[str\]:
|
380 + | /// :param default_value typing.Optional\[str\]:
|
381 + | /// :param send typing.Optional\[str\]:
|
452 382 | /// :rtype None:
|
453 383 | #[allow(missing_docs)] // documentation missing in model
|
454 384 | #[derive(
|
455 385 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
456 386 | )]
|
457 - | pub struct StructureNamePunningInput {
|
387 + | pub struct MatchInput {
|
458 388 | #[pyo3(get, set)]
|
459 - | /// :type typing.Optional\[str\]:
|
389 + | /// :type typing.Optional\[int\]:
|
460 390 | #[allow(missing_docs)] // documentation missing in model
|
461 - | pub regular_string: ::std::option::Option<::std::string::String>,
|
391 + | pub r#as: ::std::option::Option<i32>,
|
462 392 | #[pyo3(get, set)]
|
463 - | /// :type typing.Optional\[naming_test_ops.model.Vec\]:
|
464 - | #[allow(missing_docs)] // documentation missing in model
|
465 - | pub punned_vec: ::std::option::Option<crate::model::Vec>,
|
466 - | }
|
467 - | impl StructureNamePunningInput {
|
393 + | /// :type typing.Optional\[bool\]:
|
468 394 | #[allow(missing_docs)] // documentation missing in model
|
469 - | pub fn regular_string(&self) -> ::std::option::Option<&str> {
|
470 - | self.regular_string.as_deref()
|
471 - | }
|
395 + | pub r#async: ::std::option::Option<bool>,
|
396 + | #[pyo3(get, set)]
|
397 + | /// :type typing.Optional\[naming_test_ops.model.UnknownVariantCollidingEnum\]:
|
472 398 | #[allow(missing_docs)] // documentation missing in model
|
473 - | pub fn punned_vec(&self) -> ::std::option::Option<&crate::model::Vec> {
|
474 - | self.punned_vec.as_ref()
|
399 + | pub r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
400 + | #[pyo3(get, set)]
|
401 + | /// :type typing.Optional\[bool\]:
|
402 + | #[allow(missing_docs)] // documentation missing in model
|
403 + | pub self_: ::std::option::Option<bool>,
|
404 + | #[pyo3(get, set)]
|
405 + | /// :type typing.Optional\[bool\]:
|
406 + | #[allow(missing_docs)] // documentation missing in model
|
407 + | pub crate_: ::std::option::Option<bool>,
|
408 + | #[pyo3(get, set)]
|
409 + | /// :type typing.Optional\[bool\]:
|
410 + | #[allow(missing_docs)] // documentation missing in model
|
411 + | pub super_: ::std::option::Option<bool>,
|
412 + | #[pyo3(get, set)]
|
413 + | /// :type typing.Optional\[str\]:
|
414 + | #[allow(missing_docs)] // documentation missing in model
|
415 + | pub build_value: ::std::option::Option<::std::string::String>,
|
416 + | #[pyo3(get, set)]
|
417 + | /// :type typing.Optional\[str\]:
|
418 + | #[allow(missing_docs)] // documentation missing in model
|
419 + | pub default_value: ::std::option::Option<::std::string::String>,
|
420 + | #[pyo3(get, set)]
|
421 + | /// :type typing.Optional\[str\]:
|
422 + | #[allow(missing_docs)] // documentation missing in model
|
423 + | pub send: ::std::option::Option<::std::string::String>,
|
424 + | }
|
425 + | impl MatchInput {
|
426 + | #[allow(missing_docs)] // documentation missing in model
|
427 + | pub fn r#as(&self) -> ::std::option::Option<i32> {
|
428 + | self.r#as
|
429 + | }
|
430 + | #[allow(missing_docs)] // documentation missing in model
|
431 + | pub fn r#async(&self) -> ::std::option::Option<bool> {
|
432 + | self.r#async
|
433 + | }
|
434 + | #[allow(missing_docs)] // documentation missing in model
|
435 + | pub fn r#enum(&self) -> ::std::option::Option<&crate::model::UnknownVariantCollidingEnum> {
|
436 + | self.r#enum.as_ref()
|
437 + | }
|
438 + | #[allow(missing_docs)] // documentation missing in model
|
439 + | pub fn self_(&self) -> ::std::option::Option<bool> {
|
440 + | self.self_
|
441 + | }
|
442 + | #[allow(missing_docs)] // documentation missing in model
|
443 + | pub fn crate_(&self) -> ::std::option::Option<bool> {
|
444 + | self.crate_
|
445 + | }
|
446 + | #[allow(missing_docs)] // documentation missing in model
|
447 + | pub fn super_(&self) -> ::std::option::Option<bool> {
|
448 + | self.super_
|
449 + | }
|
450 + | #[allow(missing_docs)] // documentation missing in model
|
451 + | pub fn build_value(&self) -> ::std::option::Option<&str> {
|
452 + | self.build_value.as_deref()
|
453 + | }
|
454 + | #[allow(missing_docs)] // documentation missing in model
|
455 + | pub fn default_value(&self) -> ::std::option::Option<&str> {
|
456 + | self.default_value.as_deref()
|
457 + | }
|
458 + | #[allow(missing_docs)] // documentation missing in model
|
459 + | pub fn send(&self) -> ::std::option::Option<&str> {
|
460 + | self.send.as_deref()
|
475 461 | }
|
476 462 | }
|
477 463 | #[allow(clippy::new_without_default)]
|
478 464 | #[allow(clippy::too_many_arguments)]
|
479 465 | #[::pyo3::pymethods]
|
480 - | impl StructureNamePunningInput {
|
466 + | impl MatchInput {
|
481 467 | #[new]
|
482 468 | pub fn new(
|
483 - | regular_string: ::std::option::Option<::std::string::String>,
|
484 - | punned_vec: ::std::option::Option<crate::model::Vec>,
|
469 + | r#as: ::std::option::Option<i32>,
|
470 + | r#async: ::std::option::Option<bool>,
|
471 + | r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
472 + | self_: ::std::option::Option<bool>,
|
473 + | crate_: ::std::option::Option<bool>,
|
474 + | super_: ::std::option::Option<bool>,
|
475 + | build_value: ::std::option::Option<::std::string::String>,
|
476 + | default_value: ::std::option::Option<::std::string::String>,
|
477 + | send: ::std::option::Option<::std::string::String>,
|
485 478 | ) -> Self {
|
486 479 | Self {
|
487 - | regular_string,
|
488 - | punned_vec,
|
480 + | r#as,
|
481 + | r#async,
|
482 + | r#enum,
|
483 + | self_,
|
484 + | crate_,
|
485 + | super_,
|
486 + | build_value,
|
487 + | default_value,
|
488 + | send,
|
489 489 | }
|
490 490 | }
|
491 491 | fn __repr__(&self) -> String {
|
492 492 | format!("{self:?}")
|
493 493 | }
|
494 494 | fn __str__(&self) -> String {
|
495 495 | format!("{self:?}")
|
496 496 | }
|
497 497 | }
|
498 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructureNamePunningInput> {
|
498 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<MatchInput> {
|
499 499 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
500 - | ob.extract::<StructureNamePunningInput>().map(Box::new)
|
500 + | ob.extract::<MatchInput>().map(Box::new)
|
501 501 | }
|
502 502 | }
|
503 503 |
|
504 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructureNamePunningInput> {
|
504 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<MatchInput> {
|
505 505 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
506 506 | (*self).into_py(py)
|
507 507 | }
|
508 508 | }
|
509 - | impl crate::constrained::Constrained for crate::input::StructureNamePunningInput {
|
510 - | type Unconstrained = crate::input::structure_name_punning_input_internal::Builder;
|
509 + | impl crate::constrained::Constrained for crate::input::MatchInput {
|
510 + | type Unconstrained = crate::input::match_input_internal::Builder;
|
511 511 | }
|
512 - | impl StructureNamePunningInput {
|
513 - | /// Creates a new builder-style object to manufacture [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
514 - | pub fn builder() -> crate::input::structure_name_punning_input::Builder {
|
515 - | crate::input::structure_name_punning_input::Builder::default()
|
512 + | impl MatchInput {
|
513 + | /// Creates a new builder-style object to manufacture [`MatchInput`](crate::input::MatchInput).
|
514 + | pub fn builder() -> crate::input::match_input::Builder {
|
515 + | crate::input::match_input::Builder::default()
|
516 516 | }
|
517 517 | }
|
518 518 |
|
519 519 | #[::pyo3::pyclass]
|
520 520 | /// :param r#as typing.Optional\[int\]:
|
521 521 | /// :param r#async typing.Optional\[bool\]:
|
522 522 | /// :param r#enum typing.Optional\[naming_test_ops.model.UnknownVariantCollidingEnum\]:
|
523 523 | /// :param self_ typing.Optional\[bool\]:
|
524 524 | /// :param crate_ typing.Optional\[bool\]:
|
525 525 | /// :param super_ typing.Optional\[bool\]:
|
526 526 | /// :param build_value typing.Optional\[str\]:
|
527 527 | /// :param default_value typing.Optional\[str\]:
|
528 528 | /// :param send typing.Optional\[str\]:
|
529 529 | /// :rtype None:
|
530 530 | #[allow(missing_docs)] // documentation missing in model
|
531 531 | #[derive(
|
532 532 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
533 533 | )]
|
534 - | pub struct ReservedWordsAsMembersInput {
|
534 + | pub struct RpcEchoInput {
|
535 535 | #[pyo3(get, set)]
|
536 536 | /// :type typing.Optional\[int\]:
|
537 537 | #[allow(missing_docs)] // documentation missing in model
|
538 538 | pub r#as: ::std::option::Option<i32>,
|
539 539 | #[pyo3(get, set)]
|
540 540 | /// :type typing.Optional\[bool\]:
|
541 541 | #[allow(missing_docs)] // documentation missing in model
|
542 542 | pub r#async: ::std::option::Option<bool>,
|
543 543 | #[pyo3(get, set)]
|
544 544 | /// :type typing.Optional\[naming_test_ops.model.UnknownVariantCollidingEnum\]:
|
545 545 | #[allow(missing_docs)] // documentation missing in model
|
546 546 | pub r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
547 547 | #[pyo3(get, set)]
|
548 548 | /// :type typing.Optional\[bool\]:
|
549 549 | #[allow(missing_docs)] // documentation missing in model
|
550 550 | pub self_: ::std::option::Option<bool>,
|
551 551 | #[pyo3(get, set)]
|
552 552 | /// :type typing.Optional\[bool\]:
|
553 553 | #[allow(missing_docs)] // documentation missing in model
|
554 554 | pub crate_: ::std::option::Option<bool>,
|
555 555 | #[pyo3(get, set)]
|
556 556 | /// :type typing.Optional\[bool\]:
|
557 557 | #[allow(missing_docs)] // documentation missing in model
|
558 558 | pub super_: ::std::option::Option<bool>,
|
559 559 | #[pyo3(get, set)]
|
560 560 | /// :type typing.Optional\[str\]:
|
561 561 | #[allow(missing_docs)] // documentation missing in model
|
562 562 | pub build_value: ::std::option::Option<::std::string::String>,
|
563 563 | #[pyo3(get, set)]
|
564 564 | /// :type typing.Optional\[str\]:
|
565 565 | #[allow(missing_docs)] // documentation missing in model
|
566 566 | pub default_value: ::std::option::Option<::std::string::String>,
|
567 567 | #[pyo3(get, set)]
|
568 568 | /// :type typing.Optional\[str\]:
|
569 569 | #[allow(missing_docs)] // documentation missing in model
|
570 570 | pub send: ::std::option::Option<::std::string::String>,
|
571 571 | }
|
572 - | impl ReservedWordsAsMembersInput {
|
572 + | impl RpcEchoInput {
|
573 573 | #[allow(missing_docs)] // documentation missing in model
|
574 574 | pub fn r#as(&self) -> ::std::option::Option<i32> {
|
575 575 | self.r#as
|
576 576 | }
|
577 577 | #[allow(missing_docs)] // documentation missing in model
|
578 578 | pub fn r#async(&self) -> ::std::option::Option<bool> {
|
579 579 | self.r#async
|
580 580 | }
|
581 581 | #[allow(missing_docs)] // documentation missing in model
|
582 582 | pub fn r#enum(&self) -> ::std::option::Option<&crate::model::UnknownVariantCollidingEnum> {
|
583 583 | self.r#enum.as_ref()
|
584 584 | }
|
585 585 | #[allow(missing_docs)] // documentation missing in model
|
586 586 | pub fn self_(&self) -> ::std::option::Option<bool> {
|
587 587 | self.self_
|
588 588 | }
|
589 589 | #[allow(missing_docs)] // documentation missing in model
|
590 590 | pub fn crate_(&self) -> ::std::option::Option<bool> {
|
591 591 | self.crate_
|
592 592 | }
|
593 593 | #[allow(missing_docs)] // documentation missing in model
|
594 594 | pub fn super_(&self) -> ::std::option::Option<bool> {
|
595 595 | self.super_
|
596 596 | }
|
597 597 | #[allow(missing_docs)] // documentation missing in model
|
598 598 | pub fn build_value(&self) -> ::std::option::Option<&str> {
|
599 599 | self.build_value.as_deref()
|
600 600 | }
|
601 601 | #[allow(missing_docs)] // documentation missing in model
|
602 602 | pub fn default_value(&self) -> ::std::option::Option<&str> {
|
603 603 | self.default_value.as_deref()
|
604 604 | }
|
605 605 | #[allow(missing_docs)] // documentation missing in model
|
606 606 | pub fn send(&self) -> ::std::option::Option<&str> {
|
607 607 | self.send.as_deref()
|
608 608 | }
|
609 609 | }
|
610 610 | #[allow(clippy::new_without_default)]
|
611 611 | #[allow(clippy::too_many_arguments)]
|
612 612 | #[::pyo3::pymethods]
|
613 - | impl ReservedWordsAsMembersInput {
|
613 + | impl RpcEchoInput {
|
614 614 | #[new]
|
615 615 | pub fn new(
|
616 616 | r#as: ::std::option::Option<i32>,
|
617 617 | r#async: ::std::option::Option<bool>,
|
618 618 | r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
619 619 | self_: ::std::option::Option<bool>,
|
620 620 | crate_: ::std::option::Option<bool>,
|
621 621 | super_: ::std::option::Option<bool>,
|
622 622 | build_value: ::std::option::Option<::std::string::String>,
|
623 623 | default_value: ::std::option::Option<::std::string::String>,
|
624 624 | send: ::std::option::Option<::std::string::String>,
|
625 625 | ) -> Self {
|
626 626 | Self {
|
627 627 | r#as,
|
628 628 | r#async,
|
629 629 | r#enum,
|
630 630 | self_,
|
631 631 | crate_,
|
632 632 | super_,
|
633 633 | build_value,
|
634 634 | default_value,
|
635 635 | send,
|
636 636 | }
|
637 637 | }
|
638 638 | fn __repr__(&self) -> String {
|
639 639 | format!("{self:?}")
|
640 640 | }
|
641 641 | fn __str__(&self) -> String {
|
642 642 | format!("{self:?}")
|
643 643 | }
|
644 644 | }
|
645 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ReservedWordsAsMembersInput> {
|
645 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RpcEchoInput> {
|
646 646 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
647 - | ob.extract::<ReservedWordsAsMembersInput>().map(Box::new)
|
647 + | ob.extract::<RpcEchoInput>().map(Box::new)
|
648 648 | }
|
649 649 | }
|
650 650 |
|
651 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ReservedWordsAsMembersInput> {
|
651 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RpcEchoInput> {
|
652 652 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
653 653 | (*self).into_py(py)
|
654 654 | }
|
655 655 | }
|
656 - | impl crate::constrained::Constrained for crate::input::ReservedWordsAsMembersInput {
|
657 - | type Unconstrained = crate::input::reserved_words_as_members_input_internal::Builder;
|
656 + | impl crate::constrained::Constrained for crate::input::RpcEchoInput {
|
657 + | type Unconstrained = crate::input::rpc_echo_input_internal::Builder;
|
658 658 | }
|
659 - | impl ReservedWordsAsMembersInput {
|
660 - | /// Creates a new builder-style object to manufacture [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
|
661 - | pub fn builder() -> crate::input::reserved_words_as_members_input::Builder {
|
662 - | crate::input::reserved_words_as_members_input::Builder::default()
|
659 + | impl RpcEchoInput {
|
660 + | /// Creates a new builder-style object to manufacture [`RpcEchoInput`](crate::input::RpcEchoInput).
|
661 + | pub fn builder() -> crate::input::rpc_echo_input::Builder {
|
662 + | crate::input::rpc_echo_input::Builder::default()
|
663 663 | }
|
664 664 | }
|
665 - | /// See [`RpcEchoInput`](crate::input::RpcEchoInput).
|
666 - | pub(crate) mod rpc_echo_input_internal {
|
665 + | /// See [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
|
666 + | pub(crate) mod reserved_words_as_members_input_internal {
|
667 667 |
|
668 668 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
669 669 | /// Holds one variant for each of the ways the builder can fail.
|
670 670 | #[non_exhaustive]
|
671 671 | #[allow(clippy::enum_variant_names)]
|
672 672 | pub(crate) enum ConstraintViolation {
|
673 - | /// Constraint violation occurred building member `r#enum` when building `RpcEchoInput`.
|
673 + | /// Constraint violation occurred building member `r#enum` when building `ReservedWordsAsMembersInput`.
|
674 674 | #[doc(hidden)]
|
675 675 | Enum(crate::model::unknown_variant_colliding_enum_internal::ConstraintViolation),
|
676 676 | }
|
677 677 | impl ::std::fmt::Display for ConstraintViolation {
|
678 678 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
679 679 | match self {
|
680 - | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `RpcEchoInput`"),
|
680 + | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `ReservedWordsAsMembersInput`"),
|
681 681 | }
|
682 682 | }
|
683 683 | }
|
684 684 | impl ::std::error::Error for ConstraintViolation {}
|
685 685 | impl ConstraintViolation {
|
686 686 | pub(crate) fn as_validation_exception_field(
|
687 687 | self,
|
688 688 | path: ::std::string::String,
|
689 689 | ) -> crate::model::ValidationExceptionField {
|
690 690 | match self {
|
691 691 | ConstraintViolation::Enum(inner) => {
|
692 692 | inner.as_validation_exception_field(path + "/enum")
|
693 693 | }
|
694 694 | }
|
695 695 | }
|
696 696 | }
|
697 697 | impl ::std::convert::From<ConstraintViolation>
|
698 698 | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
699 699 | {
|
700 700 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
701 701 | let first_validation_exception_field =
|
702 702 | constraint_violation.as_validation_exception_field("".to_owned());
|
703 703 | let validation_exception = crate::error::ValidationException {
|
704 704 | message: format!(
|
705 705 | "1 validation error detected. {}",
|
706 706 | &first_validation_exception_field.message
|
707 707 | ),
|
708 708 | field_list: Some(vec![first_validation_exception_field]),
|
709 709 | };
|
710 710 | Self::ConstraintViolation(
|
711 711 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
712 712 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
713 713 | )
|
714 714 | }
|
715 715 | }
|
716 716 | impl ::std::convert::From<Builder>
|
717 - | for crate::constrained::MaybeConstrained<crate::input::RpcEchoInput>
|
717 + | for crate::constrained::MaybeConstrained<crate::input::ReservedWordsAsMembersInput>
|
718 718 | {
|
719 719 | fn from(builder: Builder) -> Self {
|
720 720 | Self::Unconstrained(builder)
|
721 721 | }
|
722 722 | }
|
723 - | impl ::std::convert::TryFrom<Builder> for crate::input::RpcEchoInput {
|
723 + | impl ::std::convert::TryFrom<Builder> for crate::input::ReservedWordsAsMembersInput {
|
724 724 | type Error = ConstraintViolation;
|
725 725 |
|
726 726 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
727 727 | builder.build()
|
728 728 | }
|
729 729 | }
|
730 - | /// A builder for [`RpcEchoInput`](crate::input::RpcEchoInput).
|
730 + | /// A builder for [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
|
731 731 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
732 732 | pub(crate) struct Builder {
|
733 733 | pub(crate) r#as: ::std::option::Option<i32>,
|
734 734 | pub(crate) r#async: ::std::option::Option<bool>,
|
735 735 | pub(crate) r#enum: ::std::option::Option<
|
736 736 | crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
|
737 737 | >,
|
738 738 | pub(crate) self_: ::std::option::Option<bool>,
|
739 739 | pub(crate) crate_: ::std::option::Option<bool>,
|
740 740 | pub(crate) super_: ::std::option::Option<bool>,
|
901 903 | input: ::std::option::Option<::std::string::String>,
|
902 904 | ) -> Self {
|
903 905 | self.default_value = input;
|
904 906 | self
|
905 907 | }
|
906 908 | #[allow(missing_docs)] // documentation missing in model
|
907 909 | pub fn send(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
908 910 | self.send = input;
|
909 911 | self
|
910 912 | }
|
911 - | /// Consumes the builder and constructs a [`RpcEchoInput`](crate::input::RpcEchoInput).
|
912 - | pub fn build(self) -> crate::input::RpcEchoInput {
|
913 + | /// Consumes the builder and constructs a [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
|
914 + | pub fn build(self) -> crate::input::ReservedWordsAsMembersInput {
|
913 915 | self.build_enforcing_required_and_enum_traits()
|
914 916 | }
|
915 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::RpcEchoInput {
|
916 - | crate::input::RpcEchoInput {
|
917 + | fn build_enforcing_required_and_enum_traits(
|
918 + | self,
|
919 + | ) -> crate::input::ReservedWordsAsMembersInput {
|
920 + | crate::input::ReservedWordsAsMembersInput {
|
917 921 | r#as: self.r#as,
|
918 922 | r#async: self.r#async,
|
919 923 | r#enum: self.r#enum,
|
920 924 | self_: self.self_,
|
921 925 | crate_: self.crate_,
|
922 926 | super_: self.super_,
|
923 927 | build_value: self.build_value,
|
924 928 | default_value: self.default_value,
|
925 929 | send: self.send,
|
926 930 | }
|
927 931 | }
|
928 932 | }
|
929 933 | }
|
930 - | /// See [`MatchInput`](crate::input::MatchInput).
|
931 - | pub(crate) mod match_input_internal {
|
934 + | /// See [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
935 + | pub(crate) mod structure_name_punning_input_internal {
|
932 936 |
|
933 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
934 - | /// Holds one variant for each of the ways the builder can fail.
|
935 - | #[non_exhaustive]
|
936 - | #[allow(clippy::enum_variant_names)]
|
937 - | pub(crate) enum ConstraintViolation {
|
938 - | /// Constraint violation occurred building member `r#enum` when building `MatchInput`.
|
939 - | #[doc(hidden)]
|
940 - | Enum(crate::model::unknown_variant_colliding_enum_internal::ConstraintViolation),
|
941 - | }
|
942 - | impl ::std::fmt::Display for ConstraintViolation {
|
943 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
944 - | match self {
|
945 - | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `MatchInput`"),
|
937 + | impl ::std::convert::From<Builder> for crate::input::StructureNamePunningInput {
|
938 + | fn from(builder: Builder) -> Self {
|
939 + | builder.build()
|
946 940 | }
|
947 941 | }
|
942 + | /// A builder for [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
943 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
944 + | pub(crate) struct Builder {
|
945 + | pub(crate) regular_string: ::std::option::Option<::std::string::String>,
|
946 + | pub(crate) punned_vec: ::std::option::Option<crate::model::Vec>,
|
948 947 | }
|
949 - | impl ::std::error::Error for ConstraintViolation {}
|
950 - | impl ConstraintViolation {
|
951 - | pub(crate) fn as_validation_exception_field(
|
952 - | self,
|
953 - | path: ::std::string::String,
|
954 - | ) -> crate::model::ValidationExceptionField {
|
955 - | match self {
|
956 - | ConstraintViolation::Enum(inner) => {
|
957 - | inner.as_validation_exception_field(path + "/enum")
|
948 + | impl Builder {
|
949 + | #[allow(missing_docs)] // documentation missing in model
|
950 + | pub(crate) fn set_regular_string(
|
951 + | mut self,
|
952 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
953 + | ) -> Self {
|
954 + | self.regular_string = input.map(|v| v.into());
|
955 + | self
|
958 956 | }
|
957 + | #[allow(missing_docs)] // documentation missing in model
|
958 + | pub(crate) fn set_punned_vec(
|
959 + | mut self,
|
960 + | input: Option<impl ::std::convert::Into<crate::model::Vec>>,
|
961 + | ) -> Self {
|
962 + | self.punned_vec = input.map(|v| v.into());
|
963 + | self
|
959 964 | }
|
965 + | /// Consumes the builder and constructs a [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
966 + | pub fn build(self) -> crate::input::StructureNamePunningInput {
|
967 + | self.build_enforcing_all_constraints()
|
960 968 | }
|
969 + | fn build_enforcing_all_constraints(self) -> crate::input::StructureNamePunningInput {
|
970 + | crate::input::StructureNamePunningInput {
|
971 + | regular_string: self.regular_string,
|
972 + | punned_vec: self.punned_vec,
|
961 973 | }
|
962 - | impl ::std::convert::From<ConstraintViolation>
|
963 - | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
964 - | {
|
965 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
966 - | let first_validation_exception_field =
|
967 - | constraint_violation.as_validation_exception_field("".to_owned());
|
968 - | let validation_exception = crate::error::ValidationException {
|
969 - | message: format!(
|
970 - | "1 validation error detected. {}",
|
971 - | &first_validation_exception_field.message
|
972 - | ),
|
973 - | field_list: Some(vec![first_validation_exception_field]),
|
974 - | };
|
975 - | Self::ConstraintViolation(
|
976 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
977 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
978 - | )
|
979 974 | }
|
980 975 | }
|
981 - | impl ::std::convert::From<Builder>
|
982 - | for crate::constrained::MaybeConstrained<crate::input::MatchInput>
|
983 - | {
|
976 + | }
|
977 + | /// See [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
978 + | pub mod structure_name_punning_input {
|
979 + |
|
980 + | impl ::std::convert::From<Builder> for crate::input::StructureNamePunningInput {
|
984 981 | fn from(builder: Builder) -> Self {
|
985 - | Self::Unconstrained(builder)
|
986 - | }
|
987 - | }
|
988 - | impl ::std::convert::TryFrom<Builder> for crate::input::MatchInput {
|
989 - | type Error = ConstraintViolation;
|
990 - |
|
991 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
992 982 | builder.build()
|
993 983 | }
|
994 984 | }
|
995 - | /// A builder for [`MatchInput`](crate::input::MatchInput).
|
985 + | /// A builder for [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
996 986 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
997 - | pub(crate) struct Builder {
|
998 - | pub(crate) r#as: ::std::option::Option<i32>,
|
999 - | pub(crate) r#async: ::std::option::Option<bool>,
|
1000 - | pub(crate) r#enum: ::std::option::Option<
|
1001 - | crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
|
1002 - | >,
|
1003 - | pub(crate) self_: ::std::option::Option<bool>,
|
1004 - | pub(crate) crate_: ::std::option::Option<bool>,
|
1005 - | pub(crate) super_: ::std::option::Option<bool>,
|
1006 - | pub(crate) build_value: ::std::option::Option<::std::string::String>,
|
1007 - | pub(crate) default_value: ::std::option::Option<::std::string::String>,
|
1008 - | pub(crate) send: ::std::option::Option<::std::string::String>,
|
987 + | pub struct Builder {
|
988 + | pub(crate) regular_string: ::std::option::Option<::std::string::String>,
|
989 + | pub(crate) punned_vec: ::std::option::Option<crate::model::Vec>,
|
1009 990 | }
|
1010 991 | impl Builder {
|
1011 992 | #[allow(missing_docs)] // documentation missing in model
|
1012 - | pub(crate) fn set_as(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
1013 - | self.r#as = input.map(|v| v.into());
|
1014 - | self
|
1015 - | }
|
1016 - | #[allow(missing_docs)] // documentation missing in model
|
1017 - | pub(crate) fn set_async(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
|
1018 - | self.r#async = input.map(|v| v.into());
|
1019 - | self
|
1020 - | }
|
1021 - | #[allow(missing_docs)] // documentation missing in model
|
1022 - | pub(crate) fn set_enum(
|
1023 - | mut self,
|
1024 - | input: Option<
|
1025 - | impl ::std::convert::Into<
|
1026 - | crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
|
1027 - | >,
|
1028 - | >,
|
1029 - | ) -> Self {
|
1030 - | self.r#enum = input.map(|v| v.into());
|
1031 - | self
|
1032 - | }
|
1033 - | #[allow(missing_docs)] // documentation missing in model
|
1034 - | pub(crate) fn set_self(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
|
1035 - | self.self_ = input.map(|v| v.into());
|
1036 - | self
|
1037 - | }
|
1038 - | #[allow(missing_docs)] // documentation missing in model
|
1039 - | pub(crate) fn set_crate(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
|
1040 - | self.crate_ = input.map(|v| v.into());
|
1041 - | self
|
1042 - | }
|
1043 - | #[allow(missing_docs)] // documentation missing in model
|
1044 - | pub(crate) fn set_super(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
|
1045 - | self.super_ = input.map(|v| v.into());
|
1046 - | self
|
1047 - | }
|
1048 - | #[allow(missing_docs)] // documentation missing in model
|
1049 - | pub(crate) fn set_build(
|
1050 - | mut self,
|
1051 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1052 - | ) -> Self {
|
1053 - | self.build_value = input.map(|v| v.into());
|
1054 - | self
|
1055 - | }
|
1056 - | #[allow(missing_docs)] // documentation missing in model
|
1057 - | pub(crate) fn set_default(
|
993 + | pub fn regular_string(
|
1058 994 | mut self,
|
1059 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
995 + | input: ::std::option::Option<::std::string::String>,
|
1060 996 | ) -> Self {
|
1061 - | self.default_value = input.map(|v| v.into());
|
997 + | self.regular_string = input;
|
1062 998 | self
|
1063 999 | }
|
1064 1000 | #[allow(missing_docs)] // documentation missing in model
|
1065 - | pub(crate) fn set_send(
|
1066 - | mut self,
|
1067 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1068 - | ) -> Self {
|
1069 - | self.send = input.map(|v| v.into());
|
1001 + | pub fn punned_vec(mut self, input: ::std::option::Option<crate::model::Vec>) -> Self {
|
1002 + | self.punned_vec = input;
|
1070 1003 | self
|
1071 1004 | }
|
1072 - | /// Consumes the builder and constructs a [`MatchInput`](crate::input::MatchInput).
|
1073 - | ///
|
1074 - | /// The builder fails to construct a [`MatchInput`](crate::input::MatchInput) if a [`ConstraintViolation`] occurs.
|
1075 - | ///
|
1076 - | pub fn build(self) -> Result<crate::input::MatchInput, ConstraintViolation> {
|
1077 - | self.build_enforcing_all_constraints()
|
1005 + | /// Consumes the builder and constructs a [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
1006 + | pub fn build(self) -> crate::input::StructureNamePunningInput {
|
1007 + | self.build_enforcing_required_and_enum_traits()
|
1078 1008 | }
|
1079 - | fn build_enforcing_all_constraints(
|
1009 + | fn build_enforcing_required_and_enum_traits(
|
1080 1010 | self,
|
1081 - | ) -> Result<crate::input::MatchInput, ConstraintViolation> {
|
1082 - | Ok(crate::input::MatchInput {
|
1083 - | r#as: self.r#as,
|
1084 - | r#async: self.r#async,
|
1085 - | r#enum: self
|
1086 - | .r#enum
|
1087 - | .map(|v| match v {
|
1088 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1089 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1090 - | })
|
1091 - | .map(|res| res.map_err(ConstraintViolation::Enum))
|
1092 - | .transpose()?,
|
1093 - | self_: self.self_,
|
1094 - | crate_: self.crate_,
|
1095 - | super_: self.super_,
|
1096 - | build_value: self.build_value,
|
1097 - | default_value: self.default_value,
|
1098 - | send: self.send,
|
1099 - | })
|
1011 + | ) -> crate::input::StructureNamePunningInput {
|
1012 + | crate::input::StructureNamePunningInput {
|
1013 + | regular_string: self.regular_string,
|
1014 + | punned_vec: self.punned_vec,
|
1015 + | }
|
1100 1016 | }
|
1101 1017 | }
|
1102 1018 | }
|
1103 - | /// See [`MatchInput`](crate::input::MatchInput).
|
1104 - | pub mod match_input {
|
1019 + | /// See [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1020 + | pub(crate) mod err_collisions_input_internal {
|
1105 1021 |
|
1106 - | impl ::std::convert::From<Builder> for crate::input::MatchInput {
|
1022 + | impl ::std::convert::From<Builder> for crate::input::ErrCollisionsInput {
|
1107 1023 | fn from(builder: Builder) -> Self {
|
1108 1024 | builder.build()
|
1109 1025 | }
|
1110 1026 | }
|
1111 - | /// A builder for [`MatchInput`](crate::input::MatchInput).
|
1027 + | /// A builder for [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1112 1028 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1113 - | pub struct Builder {
|
1114 - | pub(crate) r#as: ::std::option::Option<i32>,
|
1115 - | pub(crate) r#async: ::std::option::Option<bool>,
|
1116 - | pub(crate) r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
1117 - | pub(crate) self_: ::std::option::Option<bool>,
|
1118 - | pub(crate) crate_: ::std::option::Option<bool>,
|
1119 - | pub(crate) super_: ::std::option::Option<bool>,
|
1120 - | pub(crate) build_value: ::std::option::Option<::std::string::String>,
|
1121 - | pub(crate) default_value: ::std::option::Option<::std::string::String>,
|
1122 - | pub(crate) send: ::std::option::Option<::std::string::String>,
|
1123 - | }
|
1029 + | pub(crate) struct Builder {}
|
1124 1030 | impl Builder {
|
1125 - | #[allow(missing_docs)] // documentation missing in model
|
1126 - | pub fn r#as(mut self, input: ::std::option::Option<i32>) -> Self {
|
1127 - | self.r#as = input;
|
1128 - | self
|
1129 - | }
|
1130 - | #[allow(missing_docs)] // documentation missing in model
|
1131 - | pub fn r#async(mut self, input: ::std::option::Option<bool>) -> Self {
|
1132 - | self.r#async = input;
|
1133 - | self
|
1134 - | }
|
1135 - | #[allow(missing_docs)] // documentation missing in model
|
1136 - | pub fn r#enum(
|
1137 - | mut self,
|
1138 - | input: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
1139 - | ) -> Self {
|
1140 - | self.r#enum = input;
|
1141 - | self
|
1142 - | }
|
1143 - | #[allow(missing_docs)] // documentation missing in model
|
1144 - | pub fn self_(mut self, input: ::std::option::Option<bool>) -> Self {
|
1145 - | self.self_ = input;
|
1146 - | self
|
1147 - | }
|
1148 - | #[allow(missing_docs)] // documentation missing in model
|
1149 - | pub fn crate_(mut self, input: ::std::option::Option<bool>) -> Self {
|
1150 - | self.crate_ = input;
|
1151 - | self
|
1031 + | /// Consumes the builder and constructs a [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1032 + | pub fn build(self) -> crate::input::ErrCollisionsInput {
|
1033 + | self.build_enforcing_all_constraints()
|
1152 1034 | }
|
1153 - | #[allow(missing_docs)] // documentation missing in model
|
1154 - | pub fn super_(mut self, input: ::std::option::Option<bool>) -> Self {
|
1155 - | self.super_ = input;
|
1156 - | self
|
1035 + | fn build_enforcing_all_constraints(self) -> crate::input::ErrCollisionsInput {
|
1036 + | crate::input::ErrCollisionsInput {}
|
1157 1037 | }
|
1158 - | #[allow(missing_docs)] // documentation missing in model
|
1159 - | pub fn build_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1160 - | self.build_value = input;
|
1161 - | self
|
1162 1038 | }
|
1163 - | #[allow(missing_docs)] // documentation missing in model
|
1164 - | pub fn default_value(
|
1165 - | mut self,
|
1166 - | input: ::std::option::Option<::std::string::String>,
|
1167 - | ) -> Self {
|
1168 - | self.default_value = input;
|
1169 - | self
|
1039 + | }
|
1040 + | /// See [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1041 + | pub mod err_collisions_input {
|
1042 + |
|
1043 + | impl ::std::convert::From<Builder> for crate::input::ErrCollisionsInput {
|
1044 + | fn from(builder: Builder) -> Self {
|
1045 + | builder.build()
|
1170 1046 | }
|
1171 - | #[allow(missing_docs)] // documentation missing in model
|
1172 - | pub fn send(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1173 - | self.send = input;
|
1174 - | self
|
1175 1047 | }
|
1176 - | /// Consumes the builder and constructs a [`MatchInput`](crate::input::MatchInput).
|
1177 - | pub fn build(self) -> crate::input::MatchInput {
|
1048 + | /// A builder for [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1049 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1050 + | pub struct Builder {}
|
1051 + | impl Builder {
|
1052 + | /// Consumes the builder and constructs a [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1053 + | pub fn build(self) -> crate::input::ErrCollisionsInput {
|
1178 1054 | self.build_enforcing_required_and_enum_traits()
|
1179 1055 | }
|
1180 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::MatchInput {
|
1181 - | crate::input::MatchInput {
|
1182 - | r#as: self.r#as,
|
1183 - | r#async: self.r#async,
|
1184 - | r#enum: self.r#enum,
|
1185 - | self_: self.self_,
|
1186 - | crate_: self.crate_,
|
1187 - | super_: self.super_,
|
1188 - | build_value: self.build_value,
|
1189 - | default_value: self.default_value,
|
1190 - | send: self.send,
|
1191 - | }
|
1056 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::ErrCollisionsInput {
|
1057 + | crate::input::ErrCollisionsInput {}
|
1192 1058 | }
|
1193 1059 | }
|
1194 1060 | }
|
1195 - | /// See [`OptionInput`](crate::input::OptionInput).
|
1196 - | pub(crate) mod option_input_internal {
|
1061 + | /// See [`ResultInput`](crate::input::ResultInput).
|
1062 + | pub(crate) mod result_input_internal {
|
1197 1063 |
|
1198 - | impl ::std::convert::From<Builder> for crate::input::OptionInput {
|
1064 + | impl ::std::convert::From<Builder> for crate::input::ResultInput {
|
1199 1065 | fn from(builder: Builder) -> Self {
|
1200 1066 | builder.build()
|
1201 1067 | }
|
1202 1068 | }
|
1203 - | /// A builder for [`OptionInput`](crate::input::OptionInput).
|
1069 + | /// A builder for [`ResultInput`](crate::input::ResultInput).
|
1204 1070 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1205 1071 | pub(crate) struct Builder {
|
1206 1072 | pub(crate) pv_member: ::std::option::Option<bool>,
|
1207 1073 | }
|
1208 1074 | impl Builder {
|
1209 1075 | #[allow(missing_docs)] // documentation missing in model
|
1210 1076 | pub(crate) fn set_pv_member(
|
1211 1077 | mut self,
|
1212 1078 | input: Option<impl ::std::convert::Into<bool>>,
|
1213 1079 | ) -> Self {
|
1214 1080 | self.pv_member = input.map(|v| v.into());
|
1215 1081 | self
|
1216 1082 | }
|
1217 - | /// Consumes the builder and constructs a [`OptionInput`](crate::input::OptionInput).
|
1218 - | pub fn build(self) -> crate::input::OptionInput {
|
1083 + | /// Consumes the builder and constructs a [`ResultInput`](crate::input::ResultInput).
|
1084 + | pub fn build(self) -> crate::input::ResultInput {
|
1219 1085 | self.build_enforcing_all_constraints()
|
1220 1086 | }
|
1221 - | fn build_enforcing_all_constraints(self) -> crate::input::OptionInput {
|
1222 - | crate::input::OptionInput {
|
1087 + | fn build_enforcing_all_constraints(self) -> crate::input::ResultInput {
|
1088 + | crate::input::ResultInput {
|
1223 1089 | pv_member: self.pv_member,
|
1224 1090 | }
|
1225 1091 | }
|
1226 1092 | }
|
1227 1093 | }
|
1228 - | /// See [`OptionInput`](crate::input::OptionInput).
|
1229 - | pub mod option_input {
|
1094 + | /// See [`ResultInput`](crate::input::ResultInput).
|
1095 + | pub mod result_input {
|
1230 1096 |
|
1231 - | impl ::std::convert::From<Builder> for crate::input::OptionInput {
|
1097 + | impl ::std::convert::From<Builder> for crate::input::ResultInput {
|
1232 1098 | fn from(builder: Builder) -> Self {
|
1233 1099 | builder.build()
|
1234 1100 | }
|
1235 1101 | }
|
1236 - | /// A builder for [`OptionInput`](crate::input::OptionInput).
|
1102 + | /// A builder for [`ResultInput`](crate::input::ResultInput).
|
1237 1103 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1238 1104 | pub struct Builder {
|
1239 1105 | pub(crate) pv_member: ::std::option::Option<bool>,
|
1240 1106 | }
|
1241 1107 | impl Builder {
|
1242 1108 | #[allow(missing_docs)] // documentation missing in model
|
1243 1109 | pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
|
1244 1110 | self.pv_member = input;
|
1245 1111 | self
|
1246 1112 | }
|
1247 - | /// Consumes the builder and constructs a [`OptionInput`](crate::input::OptionInput).
|
1248 - | pub fn build(self) -> crate::input::OptionInput {
|
1113 + | /// Consumes the builder and constructs a [`ResultInput`](crate::input::ResultInput).
|
1114 + | pub fn build(self) -> crate::input::ResultInput {
|
1249 1115 | self.build_enforcing_required_and_enum_traits()
|
1250 1116 | }
|
1251 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::OptionInput {
|
1252 - | crate::input::OptionInput {
|
1117 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::ResultInput {
|
1118 + | crate::input::ResultInput {
|
1253 1119 | pv_member: self.pv_member,
|
1254 1120 | }
|
1255 1121 | }
|
1256 1122 | }
|
1257 1123 | }
|
1258 - | /// See [`ResultInput`](crate::input::ResultInput).
|
1259 - | pub(crate) mod result_input_internal {
|
1124 + | /// See [`OptionInput`](crate::input::OptionInput).
|
1125 + | pub(crate) mod option_input_internal {
|
1260 1126 |
|
1261 - | impl ::std::convert::From<Builder> for crate::input::ResultInput {
|
1127 + | impl ::std::convert::From<Builder> for crate::input::OptionInput {
|
1262 1128 | fn from(builder: Builder) -> Self {
|
1263 1129 | builder.build()
|
1264 1130 | }
|
1265 1131 | }
|
1266 - | /// A builder for [`ResultInput`](crate::input::ResultInput).
|
1132 + | /// A builder for [`OptionInput`](crate::input::OptionInput).
|
1267 1133 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1268 1134 | pub(crate) struct Builder {
|
1269 1135 | pub(crate) pv_member: ::std::option::Option<bool>,
|
1270 1136 | }
|
1271 1137 | impl Builder {
|
1272 1138 | #[allow(missing_docs)] // documentation missing in model
|
1273 1139 | pub(crate) fn set_pv_member(
|
1274 1140 | mut self,
|
1275 1141 | input: Option<impl ::std::convert::Into<bool>>,
|
1276 1142 | ) -> Self {
|
1277 1143 | self.pv_member = input.map(|v| v.into());
|
1278 1144 | self
|
1279 1145 | }
|
1280 - | /// Consumes the builder and constructs a [`ResultInput`](crate::input::ResultInput).
|
1281 - | pub fn build(self) -> crate::input::ResultInput {
|
1146 + | /// Consumes the builder and constructs a [`OptionInput`](crate::input::OptionInput).
|
1147 + | pub fn build(self) -> crate::input::OptionInput {
|
1282 1148 | self.build_enforcing_all_constraints()
|
1283 1149 | }
|
1284 - | fn build_enforcing_all_constraints(self) -> crate::input::ResultInput {
|
1285 - | crate::input::ResultInput {
|
1150 + | fn build_enforcing_all_constraints(self) -> crate::input::OptionInput {
|
1151 + | crate::input::OptionInput {
|
1286 1152 | pv_member: self.pv_member,
|
1287 1153 | }
|
1288 1154 | }
|
1289 1155 | }
|
1290 1156 | }
|
1291 - | /// See [`ResultInput`](crate::input::ResultInput).
|
1292 - | pub mod result_input {
|
1157 + | /// See [`OptionInput`](crate::input::OptionInput).
|
1158 + | pub mod option_input {
|
1293 1159 |
|
1294 - | impl ::std::convert::From<Builder> for crate::input::ResultInput {
|
1160 + | impl ::std::convert::From<Builder> for crate::input::OptionInput {
|
1295 1161 | fn from(builder: Builder) -> Self {
|
1296 1162 | builder.build()
|
1297 1163 | }
|
1298 1164 | }
|
1299 - | /// A builder for [`ResultInput`](crate::input::ResultInput).
|
1165 + | /// A builder for [`OptionInput`](crate::input::OptionInput).
|
1300 1166 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1301 1167 | pub struct Builder {
|
1302 1168 | pub(crate) pv_member: ::std::option::Option<bool>,
|
1303 1169 | }
|
1304 1170 | impl Builder {
|
1305 1171 | #[allow(missing_docs)] // documentation missing in model
|
1306 1172 | pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
|
1307 1173 | self.pv_member = input;
|
1308 1174 | self
|
1309 1175 | }
|
1310 - | /// Consumes the builder and constructs a [`ResultInput`](crate::input::ResultInput).
|
1311 - | pub fn build(self) -> crate::input::ResultInput {
|
1176 + | /// Consumes the builder and constructs a [`OptionInput`](crate::input::OptionInput).
|
1177 + | pub fn build(self) -> crate::input::OptionInput {
|
1312 1178 | self.build_enforcing_required_and_enum_traits()
|
1313 1179 | }
|
1314 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::ResultInput {
|
1315 - | crate::input::ResultInput {
|
1180 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::OptionInput {
|
1181 + | crate::input::OptionInput {
|
1316 1182 | pv_member: self.pv_member,
|
1317 1183 | }
|
1318 1184 | }
|
1319 1185 | }
|
1320 1186 | }
|
1321 - | /// See [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1322 - | pub(crate) mod err_collisions_input_internal {
|
1187 + | /// See [`MatchInput`](crate::input::MatchInput).
|
1188 + | pub(crate) mod match_input_internal {
|
1323 1189 |
|
1324 - | impl ::std::convert::From<Builder> for crate::input::ErrCollisionsInput {
|
1325 - | fn from(builder: Builder) -> Self {
|
1326 - | builder.build()
|
1190 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1191 + | /// Holds one variant for each of the ways the builder can fail.
|
1192 + | #[non_exhaustive]
|
1193 + | #[allow(clippy::enum_variant_names)]
|
1194 + | pub(crate) enum ConstraintViolation {
|
1195 + | /// Constraint violation occurred building member `r#enum` when building `MatchInput`.
|
1196 + | #[doc(hidden)]
|
1197 + | Enum(crate::model::unknown_variant_colliding_enum_internal::ConstraintViolation),
|
1327 1198 | }
|
1199 + | impl ::std::fmt::Display for ConstraintViolation {
|
1200 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1201 + | match self {
|
1202 + | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `MatchInput`"),
|
1328 1203 | }
|
1329 - | /// A builder for [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1330 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1331 - | pub(crate) struct Builder {}
|
1332 - | impl Builder {
|
1333 - | /// Consumes the builder and constructs a [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1334 - | pub fn build(self) -> crate::input::ErrCollisionsInput {
|
1335 - | self.build_enforcing_all_constraints()
|
1336 1204 | }
|
1337 - | fn build_enforcing_all_constraints(self) -> crate::input::ErrCollisionsInput {
|
1338 - | crate::input::ErrCollisionsInput {}
|
1205 + | }
|
1206 + | impl ::std::error::Error for ConstraintViolation {}
|
1207 + | impl ConstraintViolation {
|
1208 + | pub(crate) fn as_validation_exception_field(
|
1209 + | self,
|
1210 + | path: ::std::string::String,
|
1211 + | ) -> crate::model::ValidationExceptionField {
|
1212 + | match self {
|
1213 + | ConstraintViolation::Enum(inner) => {
|
1214 + | inner.as_validation_exception_field(path + "/enum")
|
1215 + | }
|
1216 + | }
|
1217 + | }
|
1218 + | }
|
1219 + | impl ::std::convert::From<ConstraintViolation>
|
1220 + | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
1221 + | {
|
1222 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1223 + | let first_validation_exception_field =
|
1224 + | constraint_violation.as_validation_exception_field("".to_owned());
|
1225 + | let validation_exception = crate::error::ValidationException {
|
1226 + | message: format!(
|
1227 + | "1 validation error detected. {}",
|
1228 + | &first_validation_exception_field.message
|
1229 + | ),
|
1230 + | field_list: Some(vec![first_validation_exception_field]),
|
1231 + | };
|
1232 + | Self::ConstraintViolation(
|
1233 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1234 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1235 + | )
|
1236 + | }
|
1237 + | }
|
1238 + | impl ::std::convert::From<Builder>
|
1239 + | for crate::constrained::MaybeConstrained<crate::input::MatchInput>
|
1240 + | {
|
1241 + | fn from(builder: Builder) -> Self {
|
1242 + | Self::Unconstrained(builder)
|
1339 1243 | }
|
1340 1244 | }
|
1341 - | }
|
1342 - | /// See [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1343 - | pub mod err_collisions_input {
|
1245 + | impl ::std::convert::TryFrom<Builder> for crate::input::MatchInput {
|
1246 + | type Error = ConstraintViolation;
|
1344 1247 |
|
1345 - | impl ::std::convert::From<Builder> for crate::input::ErrCollisionsInput {
|
1346 - | fn from(builder: Builder) -> Self {
|
1248 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1347 1249 | builder.build()
|
1348 1250 | }
|
1349 1251 | }
|
1350 - | /// A builder for [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1252 + | /// A builder for [`MatchInput`](crate::input::MatchInput).
|
1351 1253 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1352 - | pub struct Builder {}
|
1254 + | pub(crate) struct Builder {
|
1255 + | pub(crate) r#as: ::std::option::Option<i32>,
|
1256 + | pub(crate) r#async: ::std::option::Option<bool>,
|
1257 + | pub(crate) r#enum: ::std::option::Option<
|
1258 + | crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
|
1259 + | >,
|
1260 + | pub(crate) self_: ::std::option::Option<bool>,
|
1261 + | pub(crate) crate_: ::std::option::Option<bool>,
|
1262 + | pub(crate) super_: ::std::option::Option<bool>,
|
1263 + | pub(crate) build_value: ::std::option::Option<::std::string::String>,
|
1264 + | pub(crate) default_value: ::std::option::Option<::std::string::String>,
|
1265 + | pub(crate) send: ::std::option::Option<::std::string::String>,
|
1266 + | }
|
1353 1267 | impl Builder {
|
1354 - | /// Consumes the builder and constructs a [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
|
1355 - | pub fn build(self) -> crate::input::ErrCollisionsInput {
|
1356 - | self.build_enforcing_required_and_enum_traits()
|
1268 + | #[allow(missing_docs)] // documentation missing in model
|
1269 + | pub(crate) fn set_as(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
1270 + | self.r#as = input.map(|v| v.into());
|
1271 + | self
|
1357 1272 | }
|
1358 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::ErrCollisionsInput {
|
1359 - | crate::input::ErrCollisionsInput {}
|
1273 + | #[allow(missing_docs)] // documentation missing in model
|
1274 + | pub(crate) fn set_async(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
|
1275 + | self.r#async = input.map(|v| v.into());
|
1276 + | self
|
1277 + | }
|
1278 + | #[allow(missing_docs)] // documentation missing in model
|
1279 + | pub(crate) fn set_enum(
|
1280 + | mut self,
|
1281 + | input: Option<
|
1282 + | impl ::std::convert::Into<
|
1283 + | crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
|
1284 + | >,
|
1285 + | >,
|
1286 + | ) -> Self {
|
1287 + | self.r#enum = input.map(|v| v.into());
|
1288 + | self
|
1360 1289 | }
|
1290 + | #[allow(missing_docs)] // documentation missing in model
|
1291 + | pub(crate) fn set_self(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
|
1292 + | self.self_ = input.map(|v| v.into());
|
1293 + | self
|
1361 1294 | }
|
1362 - | }
|
1363 - | /// See [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
1364 - | pub(crate) mod structure_name_punning_input_internal {
|
1365 - |
|
1366 - | impl ::std::convert::From<Builder> for crate::input::StructureNamePunningInput {
|
1367 - | fn from(builder: Builder) -> Self {
|
1368 - | builder.build()
|
1295 + | #[allow(missing_docs)] // documentation missing in model
|
1296 + | pub(crate) fn set_crate(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
|
1297 + | self.crate_ = input.map(|v| v.into());
|
1298 + | self
|
1369 1299 | }
|
1300 + | #[allow(missing_docs)] // documentation missing in model
|
1301 + | pub(crate) fn set_super(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
|
1302 + | self.super_ = input.map(|v| v.into());
|
1303 + | self
|
1370 1304 | }
|
1371 - | /// A builder for [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
1372 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1373 - | pub(crate) struct Builder {
|
1374 - | pub(crate) regular_string: ::std::option::Option<::std::string::String>,
|
1375 - | pub(crate) punned_vec: ::std::option::Option<crate::model::Vec>,
|
1305 + | #[allow(missing_docs)] // documentation missing in model
|
1306 + | pub(crate) fn set_build(
|
1307 + | mut self,
|
1308 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1309 + | ) -> Self {
|
1310 + | self.build_value = input.map(|v| v.into());
|
1311 + | self
|
1376 1312 | }
|
1377 - | impl Builder {
|
1378 1313 | #[allow(missing_docs)] // documentation missing in model
|
1379 - | pub(crate) fn set_regular_string(
|
1314 + | pub(crate) fn set_default(
|
1380 1315 | mut self,
|
1381 1316 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1382 1317 | ) -> Self {
|
1383 - | self.regular_string = input.map(|v| v.into());
|
1318 + | self.default_value = input.map(|v| v.into());
|
1384 1319 | self
|
1385 1320 | }
|
1386 1321 | #[allow(missing_docs)] // documentation missing in model
|
1387 - | pub(crate) fn set_punned_vec(
|
1322 + | pub(crate) fn set_send(
|
1388 1323 | mut self,
|
1389 - | input: Option<impl ::std::convert::Into<crate::model::Vec>>,
|
1324 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1390 1325 | ) -> Self {
|
1391 - | self.punned_vec = input.map(|v| v.into());
|
1326 + | self.send = input.map(|v| v.into());
|
1392 1327 | self
|
1393 1328 | }
|
1394 - | /// Consumes the builder and constructs a [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
1395 - | pub fn build(self) -> crate::input::StructureNamePunningInput {
|
1329 + | /// Consumes the builder and constructs a [`MatchInput`](crate::input::MatchInput).
|
1330 + | ///
|
1331 + | /// The builder fails to construct a [`MatchInput`](crate::input::MatchInput) if a [`ConstraintViolation`] occurs.
|
1332 + | ///
|
1333 + | pub fn build(self) -> Result<crate::input::MatchInput, ConstraintViolation> {
|
1396 1334 | self.build_enforcing_all_constraints()
|
1397 1335 | }
|
1398 - | fn build_enforcing_all_constraints(self) -> crate::input::StructureNamePunningInput {
|
1399 - | crate::input::StructureNamePunningInput {
|
1400 - | regular_string: self.regular_string,
|
1401 - | punned_vec: self.punned_vec,
|
1402 - | }
|
1336 + | fn build_enforcing_all_constraints(
|
1337 + | self,
|
1338 + | ) -> Result<crate::input::MatchInput, ConstraintViolation> {
|
1339 + | Ok(crate::input::MatchInput {
|
1340 + | r#as: self.r#as,
|
1341 + | r#async: self.r#async,
|
1342 + | r#enum: self
|
1343 + | .r#enum
|
1344 + | .map(|v| match v {
|
1345 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1346 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1347 + | })
|
1348 + | .map(|res| res.map_err(ConstraintViolation::Enum))
|
1349 + | .transpose()?,
|
1350 + | self_: self.self_,
|
1351 + | crate_: self.crate_,
|
1352 + | super_: self.super_,
|
1353 + | build_value: self.build_value,
|
1354 + | default_value: self.default_value,
|
1355 + | send: self.send,
|
1356 + | })
|
1403 1357 | }
|
1404 1358 | }
|
1405 1359 | }
|
1406 - | /// See [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
1407 - | pub mod structure_name_punning_input {
|
1360 + | /// See [`MatchInput`](crate::input::MatchInput).
|
1361 + | pub mod match_input {
|
1408 1362 |
|
1409 - | impl ::std::convert::From<Builder> for crate::input::StructureNamePunningInput {
|
1363 + | impl ::std::convert::From<Builder> for crate::input::MatchInput {
|
1410 1364 | fn from(builder: Builder) -> Self {
|
1411 1365 | builder.build()
|
1412 1366 | }
|
1413 1367 | }
|
1414 - | /// A builder for [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
1368 + | /// A builder for [`MatchInput`](crate::input::MatchInput).
|
1415 1369 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1416 1370 | pub struct Builder {
|
1417 - | pub(crate) regular_string: ::std::option::Option<::std::string::String>,
|
1418 - | pub(crate) punned_vec: ::std::option::Option<crate::model::Vec>,
|
1371 + | pub(crate) r#as: ::std::option::Option<i32>,
|
1372 + | pub(crate) r#async: ::std::option::Option<bool>,
|
1373 + | pub(crate) r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
1374 + | pub(crate) self_: ::std::option::Option<bool>,
|
1375 + | pub(crate) crate_: ::std::option::Option<bool>,
|
1376 + | pub(crate) super_: ::std::option::Option<bool>,
|
1377 + | pub(crate) build_value: ::std::option::Option<::std::string::String>,
|
1378 + | pub(crate) default_value: ::std::option::Option<::std::string::String>,
|
1379 + | pub(crate) send: ::std::option::Option<::std::string::String>,
|
1419 1380 | }
|
1420 1381 | impl Builder {
|
1421 1382 | #[allow(missing_docs)] // documentation missing in model
|
1422 - | pub fn regular_string(
|
1383 + | pub fn r#as(mut self, input: ::std::option::Option<i32>) -> Self {
|
1384 + | self.r#as = input;
|
1385 + | self
|
1386 + | }
|
1387 + | #[allow(missing_docs)] // documentation missing in model
|
1388 + | pub fn r#async(mut self, input: ::std::option::Option<bool>) -> Self {
|
1389 + | self.r#async = input;
|
1390 + | self
|
1391 + | }
|
1392 + | #[allow(missing_docs)] // documentation missing in model
|
1393 + | pub fn r#enum(
|
1394 + | mut self,
|
1395 + | input: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
|
1396 + | ) -> Self {
|
1397 + | self.r#enum = input;
|
1398 + | self
|
1399 + | }
|
1400 + | #[allow(missing_docs)] // documentation missing in model
|
1401 + | pub fn self_(mut self, input: ::std::option::Option<bool>) -> Self {
|
1402 + | self.self_ = input;
|
1403 + | self
|
1404 + | }
|
1405 + | #[allow(missing_docs)] // documentation missing in model
|
1406 + | pub fn crate_(mut self, input: ::std::option::Option<bool>) -> Self {
|
1407 + | self.crate_ = input;
|
1408 + | self
|
1409 + | }
|
1410 + | #[allow(missing_docs)] // documentation missing in model
|
1411 + | pub fn super_(mut self, input: ::std::option::Option<bool>) -> Self {
|
1412 + | self.super_ = input;
|
1413 + | self
|
1414 + | }
|
1415 + | #[allow(missing_docs)] // documentation missing in model
|
1416 + | pub fn build_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1417 + | self.build_value = input;
|
1418 + | self
|
1419 + | }
|
1420 + | #[allow(missing_docs)] // documentation missing in model
|
1421 + | pub fn default_value(
|
1423 1422 | mut self,
|
1424 1423 | input: ::std::option::Option<::std::string::String>,
|
1425 1424 | ) -> Self {
|
1426 - | self.regular_string = input;
|
1425 + | self.default_value = input;
|
1427 1426 | self
|
1428 1427 | }
|
1429 1428 | #[allow(missing_docs)] // documentation missing in model
|
1430 - | pub fn punned_vec(mut self, input: ::std::option::Option<crate::model::Vec>) -> Self {
|
1431 - | self.punned_vec = input;
|
1429 + | pub fn send(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1430 + | self.send = input;
|
1432 1431 | self
|
1433 1432 | }
|
1434 - | /// Consumes the builder and constructs a [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
|
1435 - | pub fn build(self) -> crate::input::StructureNamePunningInput {
|
1433 + | /// Consumes the builder and constructs a [`MatchInput`](crate::input::MatchInput).
|
1434 + | pub fn build(self) -> crate::input::MatchInput {
|
1436 1435 | self.build_enforcing_required_and_enum_traits()
|
1437 1436 | }
|
1438 - | fn build_enforcing_required_and_enum_traits(
|
1439 - | self,
|
1440 - | ) -> crate::input::StructureNamePunningInput {
|
1441 - | crate::input::StructureNamePunningInput {
|
1442 - | regular_string: self.regular_string,
|
1443 - | punned_vec: self.punned_vec,
|
1437 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::MatchInput {
|
1438 + | crate::input::MatchInput {
|
1439 + | r#as: self.r#as,
|
1440 + | r#async: self.r#async,
|
1441 + | r#enum: self.r#enum,
|
1442 + | self_: self.self_,
|
1443 + | crate_: self.crate_,
|
1444 + | super_: self.super_,
|
1445 + | build_value: self.build_value,
|
1446 + | default_value: self.default_value,
|
1447 + | send: self.send,
|
1444 1448 | }
|
1445 1449 | }
|
1446 1450 | }
|
1447 1451 | }
|
1448 - | /// See [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
|
1449 - | pub(crate) mod reserved_words_as_members_input_internal {
|
1452 + | /// See [`RpcEchoInput`](crate::input::RpcEchoInput).
|
1453 + | pub(crate) mod rpc_echo_input_internal {
|
1450 1454 |
|
1451 1455 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1452 1456 | /// Holds one variant for each of the ways the builder can fail.
|
1453 1457 | #[non_exhaustive]
|
1454 1458 | #[allow(clippy::enum_variant_names)]
|
1455 1459 | pub(crate) enum ConstraintViolation {
|
1456 - | /// Constraint violation occurred building member `r#enum` when building `ReservedWordsAsMembersInput`.
|
1460 + | /// Constraint violation occurred building member `r#enum` when building `RpcEchoInput`.
|
1457 1461 | #[doc(hidden)]
|
1458 1462 | Enum(crate::model::unknown_variant_colliding_enum_internal::ConstraintViolation),
|
1459 1463 | }
|
1460 1464 | impl ::std::fmt::Display for ConstraintViolation {
|
1461 1465 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1462 1466 | match self {
|
1463 - | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `ReservedWordsAsMembersInput`"),
|
1467 + | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `RpcEchoInput`"),
|
1464 1468 | }
|
1465 1469 | }
|
1466 1470 | }
|
1467 1471 | impl ::std::error::Error for ConstraintViolation {}
|
1468 1472 | impl ConstraintViolation {
|
1469 1473 | pub(crate) fn as_validation_exception_field(
|
1470 1474 | self,
|
1471 1475 | path: ::std::string::String,
|
1472 1476 | ) -> crate::model::ValidationExceptionField {
|
1473 1477 | match self {
|
1474 1478 | ConstraintViolation::Enum(inner) => {
|
1475 1479 | inner.as_validation_exception_field(path + "/enum")
|
1476 1480 | }
|
1477 1481 | }
|
1478 1482 | }
|
1479 1483 | }
|
1480 1484 | impl ::std::convert::From<ConstraintViolation>
|
1481 1485 | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
1482 1486 | {
|
1483 1487 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1484 1488 | let first_validation_exception_field =
|
1485 1489 | constraint_violation.as_validation_exception_field("".to_owned());
|
1486 1490 | let validation_exception = crate::error::ValidationException {
|
1487 1491 | message: format!(
|
1488 1492 | "1 validation error detected. {}",
|
1489 1493 | &first_validation_exception_field.message
|
1490 1494 | ),
|
1491 1495 | field_list: Some(vec![first_validation_exception_field]),
|
1492 1496 | };
|
1493 1497 | Self::ConstraintViolation(
|
1494 1498 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1495 1499 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1496 1500 | )
|
1497 1501 | }
|
1498 1502 | }
|
1499 1503 | impl ::std::convert::From<Builder>
|
1500 - | for crate::constrained::MaybeConstrained<crate::input::ReservedWordsAsMembersInput>
|
1504 + | for crate::constrained::MaybeConstrained<crate::input::RpcEchoInput>
|
1501 1505 | {
|
1502 1506 | fn from(builder: Builder) -> Self {
|
1503 1507 | Self::Unconstrained(builder)
|
1504 1508 | }
|
1505 1509 | }
|
1506 - | impl ::std::convert::TryFrom<Builder> for crate::input::ReservedWordsAsMembersInput {
|
1510 + | impl ::std::convert::TryFrom<Builder> for crate::input::RpcEchoInput {
|
1507 1511 | type Error = ConstraintViolation;
|
1508 1512 |
|
1509 1513 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1510 1514 | builder.build()
|
1511 1515 | }
|
1512 1516 | }
|
1513 - | /// A builder for [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
|
1517 + | /// A builder for [`RpcEchoInput`](crate::input::RpcEchoInput).
|
1514 1518 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1515 1519 | pub(crate) struct Builder {
|
1516 1520 | pub(crate) r#as: ::std::option::Option<i32>,
|
1517 1521 | pub(crate) r#async: ::std::option::Option<bool>,
|
1518 1522 | pub(crate) r#enum: ::std::option::Option<
|
1519 1523 | crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
|
1520 1524 | >,
|
1521 1525 | pub(crate) self_: ::std::option::Option<bool>,
|
1522 1526 | pub(crate) crate_: ::std::option::Option<bool>,
|
1523 1527 | pub(crate) super_: ::std::option::Option<bool>,
|