1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | #[::pyo3::pyclass]
|
3 - | /// :param query_map typing.Optional\[typing.Dict\[str, str\]\]:
|
3 + | /// :param payload typing.Optional\[str\]:
|
4 4 | /// :rtype None:
|
5 5 | #[allow(missing_docs)] // documentation missing in model
|
6 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
7 - | pub struct HttpQueryParamsOnlyOperationInput {
|
6 + | #[derive(
|
7 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
8 + | )]
|
9 + | pub struct StringPayloadInput {
|
8 10 | #[pyo3(get, set)]
|
9 - | /// :type typing.Optional\[typing.Dict\[str, str\]\]:
|
11 + | /// :type typing.Optional\[str\]:
|
10 12 | #[allow(missing_docs)] // documentation missing in model
|
11 - | pub query_map: ::std::option::Option<
|
12 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
13 - | >,
|
13 + | pub payload: ::std::option::Option<::std::string::String>,
|
14 14 | }
|
15 - | impl HttpQueryParamsOnlyOperationInput {
|
15 + | impl StringPayloadInput {
|
16 16 | #[allow(missing_docs)] // documentation missing in model
|
17 - | pub fn query_map(
|
18 - | &self,
|
19 - | ) -> ::std::option::Option<
|
20 - | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
21 - | > {
|
22 - | self.query_map.as_ref()
|
17 + | pub fn payload(&self) -> ::std::option::Option<&str> {
|
18 + | self.payload.as_deref()
|
23 19 | }
|
24 20 | }
|
25 21 | #[allow(clippy::new_without_default)]
|
26 22 | #[allow(clippy::too_many_arguments)]
|
27 23 | #[::pyo3::pymethods]
|
28 - | impl HttpQueryParamsOnlyOperationInput {
|
24 + | impl StringPayloadInput {
|
29 25 | #[new]
|
30 - | pub fn new(
|
31 - | query_map: ::std::option::Option<
|
32 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
33 - | >,
|
34 - | ) -> Self {
|
35 - | Self { query_map }
|
26 + | pub fn new(payload: ::std::option::Option<::std::string::String>) -> Self {
|
27 + | Self { payload }
|
36 28 | }
|
37 29 | fn __repr__(&self) -> String {
|
38 30 | format!("{self:?}")
|
39 31 | }
|
40 32 | fn __str__(&self) -> String {
|
41 33 | format!("{self:?}")
|
42 34 | }
|
43 35 | }
|
44 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<HttpQueryParamsOnlyOperationInput> {
|
36 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StringPayloadInput> {
|
45 37 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
46 - | ob.extract::<HttpQueryParamsOnlyOperationInput>()
|
47 - | .map(Box::new)
|
38 + | ob.extract::<StringPayloadInput>().map(Box::new)
|
48 39 | }
|
49 40 | }
|
50 41 |
|
51 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<HttpQueryParamsOnlyOperationInput> {
|
42 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StringPayloadInput> {
|
52 43 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
53 44 | (*self).into_py(py)
|
54 45 | }
|
55 46 | }
|
56 - | impl crate::constrained::Constrained for crate::input::HttpQueryParamsOnlyOperationInput {
|
57 - | type Unconstrained = crate::input::http_query_params_only_operation_input_internal::Builder;
|
47 + | impl crate::constrained::Constrained for crate::input::StringPayloadInput {
|
48 + | type Unconstrained = crate::input::string_payload_input_internal::Builder;
|
58 49 | }
|
59 - | impl HttpQueryParamsOnlyOperationInput {
|
60 - | /// Creates a new builder-style object to manufacture [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
61 - | pub fn builder() -> crate::input::http_query_params_only_operation_input::Builder {
|
62 - | crate::input::http_query_params_only_operation_input::Builder::default()
|
50 + | impl StringPayloadInput {
|
51 + | /// Creates a new builder-style object to manufacture [`StringPayloadInput`](crate::input::StringPayloadInput).
|
52 + | pub fn builder() -> crate::input::string_payload_input::Builder {
|
53 + | crate::input::string_payload_input::Builder::default()
|
63 54 | }
|
64 55 | }
|
65 56 |
|
66 57 | #[::pyo3::pyclass]
|
67 - | /// :param foo typing.Optional\[str\]:
|
68 - | /// :param baz typing.Optional\[typing.Dict\[str, str\]\]:
|
69 58 | /// :rtype None:
|
70 59 | #[allow(missing_docs)] // documentation missing in model
|
71 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
72 - | pub struct QueryPrecedenceInput {
|
73 - | #[pyo3(get, set)]
|
74 - | /// :type typing.Optional\[str\]:
|
75 - | #[allow(missing_docs)] // documentation missing in model
|
76 - | pub foo: ::std::option::Option<::std::string::String>,
|
77 - | #[pyo3(get, set)]
|
78 - | /// :type typing.Optional\[typing.Dict\[str, str\]\]:
|
79 - | #[allow(missing_docs)] // documentation missing in model
|
80 - | pub baz: ::std::option::Option<
|
81 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
82 - | >,
|
83 - | }
|
84 - | impl QueryPrecedenceInput {
|
85 - | #[allow(missing_docs)] // documentation missing in model
|
86 - | pub fn foo(&self) -> ::std::option::Option<&str> {
|
87 - | self.foo.as_deref()
|
88 - | }
|
89 - | #[allow(missing_docs)] // documentation missing in model
|
90 - | pub fn baz(
|
91 - | &self,
|
92 - | ) -> ::std::option::Option<
|
93 - | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
94 - | > {
|
95 - | self.baz.as_ref()
|
96 - | }
|
97 - | }
|
60 + | #[derive(
|
61 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
62 + | )]
|
63 + | pub struct PrimitiveIntHeaderInput {}
|
98 64 | #[allow(clippy::new_without_default)]
|
99 65 | #[allow(clippy::too_many_arguments)]
|
100 66 | #[::pyo3::pymethods]
|
101 - | impl QueryPrecedenceInput {
|
67 + | impl PrimitiveIntHeaderInput {
|
102 68 | #[new]
|
103 - | pub fn new(
|
104 - | foo: ::std::option::Option<::std::string::String>,
|
105 - | baz: ::std::option::Option<
|
106 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
107 - | >,
|
108 - | ) -> Self {
|
109 - | Self { foo, baz }
|
69 + | pub fn new() -> Self {
|
70 + | Self {}
|
110 71 | }
|
111 72 | fn __repr__(&self) -> String {
|
112 73 | format!("{self:?}")
|
113 74 | }
|
114 75 | fn __str__(&self) -> String {
|
115 76 | format!("{self:?}")
|
116 77 | }
|
117 78 | }
|
118 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<QueryPrecedenceInput> {
|
79 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<PrimitiveIntHeaderInput> {
|
119 80 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
120 - | ob.extract::<QueryPrecedenceInput>().map(Box::new)
|
81 + | ob.extract::<PrimitiveIntHeaderInput>().map(Box::new)
|
121 82 | }
|
122 83 | }
|
123 84 |
|
124 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<QueryPrecedenceInput> {
|
85 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<PrimitiveIntHeaderInput> {
|
125 86 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
126 87 | (*self).into_py(py)
|
127 88 | }
|
128 89 | }
|
129 - | impl crate::constrained::Constrained for crate::input::QueryPrecedenceInput {
|
130 - | type Unconstrained = crate::input::query_precedence_input_internal::Builder;
|
90 + | impl crate::constrained::Constrained for crate::input::PrimitiveIntHeaderInput {
|
91 + | type Unconstrained = crate::input::primitive_int_header_input_internal::Builder;
|
131 92 | }
|
132 - | impl QueryPrecedenceInput {
|
133 - | /// Creates a new builder-style object to manufacture [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
134 - | pub fn builder() -> crate::input::query_precedence_input::Builder {
|
135 - | crate::input::query_precedence_input::Builder::default()
|
93 + | impl PrimitiveIntHeaderInput {
|
94 + | /// Creates a new builder-style object to manufacture [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
95 + | pub fn builder() -> crate::input::primitive_int_header_input::Builder {
|
96 + | crate::input::primitive_int_header_input::Builder::default()
|
136 97 | }
|
137 98 | }
|
138 99 |
|
139 100 | #[::pyo3::pyclass]
|
101 + | /// :param r#enum rest_json_extras.model.StringEnum:
|
140 102 | /// :rtype None:
|
141 103 | #[allow(missing_docs)] // documentation missing in model
|
142 104 | #[derive(
|
143 105 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
144 106 | )]
|
145 - | pub struct EmptyStructWithContentOnWireOpInput {}
|
107 + | pub struct EnumQueryInput {
|
108 + | #[pyo3(get, set)]
|
109 + | /// :type rest_json_extras.model.StringEnum:
|
110 + | #[allow(missing_docs)] // documentation missing in model
|
111 + | pub r#enum: crate::model::StringEnum,
|
112 + | }
|
113 + | impl EnumQueryInput {
|
114 + | #[allow(missing_docs)] // documentation missing in model
|
115 + | pub fn r#enum(&self) -> &crate::model::StringEnum {
|
116 + | &self.r#enum
|
117 + | }
|
118 + | }
|
146 119 | #[allow(clippy::new_without_default)]
|
147 120 | #[allow(clippy::too_many_arguments)]
|
148 121 | #[::pyo3::pymethods]
|
149 - | impl EmptyStructWithContentOnWireOpInput {
|
122 + | impl EnumQueryInput {
|
150 123 | #[new]
|
151 - | pub fn new() -> Self {
|
152 - | Self {}
|
124 + | pub fn new(r#enum: crate::model::StringEnum) -> Self {
|
125 + | Self { r#enum }
|
153 126 | }
|
154 127 | fn __repr__(&self) -> String {
|
155 128 | format!("{self:?}")
|
156 129 | }
|
157 130 | fn __str__(&self) -> String {
|
158 131 | format!("{self:?}")
|
159 132 | }
|
160 133 | }
|
161 - | impl<'source> ::pyo3::FromPyObject<'source>
|
162 - | for std::boxed::Box<EmptyStructWithContentOnWireOpInput>
|
163 - | {
|
134 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<EnumQueryInput> {
|
164 135 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
165 - | ob.extract::<EmptyStructWithContentOnWireOpInput>()
|
166 - | .map(Box::new)
|
136 + | ob.extract::<EnumQueryInput>().map(Box::new)
|
167 137 | }
|
168 138 | }
|
169 139 |
|
170 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<EmptyStructWithContentOnWireOpInput> {
|
140 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<EnumQueryInput> {
|
171 141 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
172 142 | (*self).into_py(py)
|
173 143 | }
|
174 144 | }
|
175 - | impl crate::constrained::Constrained for crate::input::EmptyStructWithContentOnWireOpInput {
|
176 - | type Unconstrained = crate::input::empty_struct_with_content_on_wire_op_input_internal::Builder;
|
145 + | impl crate::constrained::Constrained for crate::input::EnumQueryInput {
|
146 + | type Unconstrained = crate::input::enum_query_input_internal::Builder;
|
177 147 | }
|
178 - | impl EmptyStructWithContentOnWireOpInput {
|
179 - | /// Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
180 - | pub fn builder() -> crate::input::empty_struct_with_content_on_wire_op_input::Builder {
|
181 - | crate::input::empty_struct_with_content_on_wire_op_input::Builder::default()
|
148 + | impl EnumQueryInput {
|
149 + | /// Creates a new builder-style object to manufacture [`EnumQueryInput`](crate::input::EnumQueryInput).
|
150 + | pub fn builder() -> crate::input::enum_query_input::Builder {
|
151 + | crate::input::enum_query_input::Builder::default()
|
182 152 | }
|
183 153 | }
|
184 154 |
|
185 155 | #[::pyo3::pyclass]
|
186 156 | /// :rtype None:
|
187 157 | #[allow(missing_docs)] // documentation missing in model
|
188 158 | #[derive(
|
189 159 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
190 160 | )]
|
191 - | pub struct CaseInsensitiveErrorOperationInput {}
|
161 + | pub struct StatusResponseInput {}
|
192 162 | #[allow(clippy::new_without_default)]
|
193 163 | #[allow(clippy::too_many_arguments)]
|
194 164 | #[::pyo3::pymethods]
|
195 - | impl CaseInsensitiveErrorOperationInput {
|
165 + | impl StatusResponseInput {
|
196 166 | #[new]
|
197 167 | pub fn new() -> Self {
|
198 168 | Self {}
|
199 169 | }
|
200 170 | fn __repr__(&self) -> String {
|
201 171 | format!("{self:?}")
|
202 172 | }
|
203 173 | fn __str__(&self) -> String {
|
204 174 | format!("{self:?}")
|
205 175 | }
|
206 176 | }
|
207 - | impl<'source> ::pyo3::FromPyObject<'source>
|
208 - | for std::boxed::Box<CaseInsensitiveErrorOperationInput>
|
209 - | {
|
177 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StatusResponseInput> {
|
210 178 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
211 - | ob.extract::<CaseInsensitiveErrorOperationInput>()
|
212 - | .map(Box::new)
|
179 + | ob.extract::<StatusResponseInput>().map(Box::new)
|
213 180 | }
|
214 181 | }
|
215 182 |
|
216 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<CaseInsensitiveErrorOperationInput> {
|
183 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StatusResponseInput> {
|
217 184 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
218 185 | (*self).into_py(py)
|
219 186 | }
|
220 187 | }
|
221 - | impl crate::constrained::Constrained for crate::input::CaseInsensitiveErrorOperationInput {
|
222 - | type Unconstrained = crate::input::case_insensitive_error_operation_input_internal::Builder;
|
188 + | impl crate::constrained::Constrained for crate::input::StatusResponseInput {
|
189 + | type Unconstrained = crate::input::status_response_input_internal::Builder;
|
223 190 | }
|
224 - | impl CaseInsensitiveErrorOperationInput {
|
225 - | /// Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
226 - | pub fn builder() -> crate::input::case_insensitive_error_operation_input::Builder {
|
227 - | crate::input::case_insensitive_error_operation_input::Builder::default()
|
191 + | impl StatusResponseInput {
|
192 + | /// Creates a new builder-style object to manufacture [`StatusResponseInput`](crate::input::StatusResponseInput).
|
193 + | pub fn builder() -> crate::input::status_response_input::Builder {
|
194 + | crate::input::status_response_input::Builder::default()
|
228 195 | }
|
229 196 | }
|
230 197 |
|
231 198 | #[::pyo3::pyclass]
|
199 + | /// :param map typing.Optional\[typing.Dict\[rest_json_extras.model.StringEnum, str\]\]:
|
232 200 | /// :rtype None:
|
233 201 | #[allow(missing_docs)] // documentation missing in model
|
234 - | #[derive(
|
235 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
236 - | )]
|
237 - | pub struct NullInNonSparseInput {}
|
202 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
203 + | pub struct MapWithEnumKeyOpInput {
|
204 + | #[pyo3(get, set)]
|
205 + | /// :type typing.Optional\[typing.Dict\[rest_json_extras.model.StringEnum, str\]\]:
|
206 + | #[allow(missing_docs)] // documentation missing in model
|
207 + | pub map: ::std::option::Option<
|
208 + | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
209 + | >,
|
210 + | }
|
211 + | impl MapWithEnumKeyOpInput {
|
212 + | #[allow(missing_docs)] // documentation missing in model
|
213 + | pub fn map(
|
214 + | &self,
|
215 + | ) -> ::std::option::Option<
|
216 + | &::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
217 + | > {
|
218 + | self.map.as_ref()
|
219 + | }
|
220 + | }
|
238 221 | #[allow(clippy::new_without_default)]
|
239 222 | #[allow(clippy::too_many_arguments)]
|
240 223 | #[::pyo3::pymethods]
|
241 - | impl NullInNonSparseInput {
|
224 + | impl MapWithEnumKeyOpInput {
|
242 225 | #[new]
|
243 - | pub fn new() -> Self {
|
244 - | Self {}
|
226 + | pub fn new(
|
227 + | map: ::std::option::Option<
|
228 + | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
229 + | >,
|
230 + | ) -> Self {
|
231 + | Self { map }
|
245 232 | }
|
246 233 | fn __repr__(&self) -> String {
|
247 234 | format!("{self:?}")
|
248 235 | }
|
249 236 | fn __str__(&self) -> String {
|
250 237 | format!("{self:?}")
|
251 238 | }
|
252 239 | }
|
253 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<NullInNonSparseInput> {
|
240 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<MapWithEnumKeyOpInput> {
|
254 241 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
255 - | ob.extract::<NullInNonSparseInput>().map(Box::new)
|
242 + | ob.extract::<MapWithEnumKeyOpInput>().map(Box::new)
|
256 243 | }
|
257 244 | }
|
258 245 |
|
259 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<NullInNonSparseInput> {
|
246 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<MapWithEnumKeyOpInput> {
|
260 247 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
261 248 | (*self).into_py(py)
|
262 249 | }
|
263 250 | }
|
264 - | impl crate::constrained::Constrained for crate::input::NullInNonSparseInput {
|
265 - | type Unconstrained = crate::input::null_in_non_sparse_input_internal::Builder;
|
251 + | impl crate::constrained::Constrained for crate::input::MapWithEnumKeyOpInput {
|
252 + | type Unconstrained = crate::input::map_with_enum_key_op_input_internal::Builder;
|
266 253 | }
|
267 - | impl NullInNonSparseInput {
|
268 - | /// Creates a new builder-style object to manufacture [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
269 - | pub fn builder() -> crate::input::null_in_non_sparse_input::Builder {
|
270 - | crate::input::null_in_non_sparse_input::Builder::default()
|
254 + | impl MapWithEnumKeyOpInput {
|
255 + | /// Creates a new builder-style object to manufacture [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
256 + | pub fn builder() -> crate::input::map_with_enum_key_op_input::Builder {
|
257 + | crate::input::map_with_enum_key_op_input::Builder::default()
|
271 258 | }
|
272 259 | }
|
273 260 |
|
274 261 | #[::pyo3::pyclass]
|
275 - | /// :param r#enum typing.Optional\[rest_json_extras.model.EnumWithEscapedChars\]:
|
276 - | /// :param some_string typing.Optional\[str\]:
|
262 + | /// :param value int:
|
277 263 | /// :rtype None:
|
278 264 | #[allow(missing_docs)] // documentation missing in model
|
279 265 | #[derive(
|
280 266 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
281 267 | )]
|
282 - | pub struct EscapedStringValuesInput {
|
283 - | #[pyo3(get, set)]
|
284 - | /// :type typing.Optional\[rest_json_extras.model.EnumWithEscapedChars\]:
|
285 - | #[allow(missing_docs)] // documentation missing in model
|
286 - | pub r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
268 + | pub struct PrimitiveIntOpInput {
|
287 269 | #[pyo3(get, set)]
|
288 - | /// :type typing.Optional\[str\]:
|
270 + | /// :type int:
|
289 271 | #[allow(missing_docs)] // documentation missing in model
|
290 - | pub some_string: ::std::option::Option<::std::string::String>,
|
272 + | pub value: i32,
|
291 273 | }
|
292 - | impl EscapedStringValuesInput {
|
293 - | #[allow(missing_docs)] // documentation missing in model
|
294 - | pub fn r#enum(&self) -> ::std::option::Option<&crate::model::EnumWithEscapedChars> {
|
295 - | self.r#enum.as_ref()
|
296 - | }
|
274 + | impl PrimitiveIntOpInput {
|
297 275 | #[allow(missing_docs)] // documentation missing in model
|
298 - | pub fn some_string(&self) -> ::std::option::Option<&str> {
|
299 - | self.some_string.as_deref()
|
276 + | pub fn value(&self) -> i32 {
|
277 + | self.value
|
300 278 | }
|
301 279 | }
|
302 280 | #[allow(clippy::new_without_default)]
|
303 281 | #[allow(clippy::too_many_arguments)]
|
304 282 | #[::pyo3::pymethods]
|
305 - | impl EscapedStringValuesInput {
|
283 + | impl PrimitiveIntOpInput {
|
306 284 | #[new]
|
307 - | pub fn new(
|
308 - | r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
309 - | some_string: ::std::option::Option<::std::string::String>,
|
310 - | ) -> Self {
|
311 - | Self {
|
312 - | r#enum,
|
313 - | some_string,
|
314 - | }
|
285 + | pub fn new(value: i32) -> Self {
|
286 + | Self { value }
|
315 287 | }
|
316 288 | fn __repr__(&self) -> String {
|
317 289 | format!("{self:?}")
|
318 290 | }
|
319 291 | fn __str__(&self) -> String {
|
320 292 | format!("{self:?}")
|
321 293 | }
|
322 294 | }
|
323 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<EscapedStringValuesInput> {
|
295 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<PrimitiveIntOpInput> {
|
324 296 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
325 - | ob.extract::<EscapedStringValuesInput>().map(Box::new)
|
297 + | ob.extract::<PrimitiveIntOpInput>().map(Box::new)
|
326 298 | }
|
327 299 | }
|
328 300 |
|
329 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<EscapedStringValuesInput> {
|
330 - | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
331 - | (*self).into_py(py)
|
332 - | }
|
333 - | }
|
334 - | impl crate::constrained::Constrained for crate::input::EscapedStringValuesInput {
|
335 - | type Unconstrained = crate::input::escaped_string_values_input_internal::Builder;
|
336 - | }
|
337 - | impl EscapedStringValuesInput {
|
338 - | /// Creates a new builder-style object to manufacture [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
339 - | pub fn builder() -> crate::input::escaped_string_values_input::Builder {
|
340 - | crate::input::escaped_string_values_input::Builder::default()
|
341 - | }
|
342 - | }
|
343 - |
|
344 - | #[::pyo3::pyclass]
|
345 - | /// :param value int:
|
346 - | /// :rtype None:
|
347 - | #[allow(missing_docs)] // documentation missing in model
|
348 - | #[derive(
|
349 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
350 - | )]
|
351 - | pub struct PrimitiveIntOpInput {
|
352 - | #[pyo3(get, set)]
|
353 - | /// :type int:
|
354 - | #[allow(missing_docs)] // documentation missing in model
|
355 - | pub value: i32,
|
356 - | }
|
357 - | impl PrimitiveIntOpInput {
|
358 - | #[allow(missing_docs)] // documentation missing in model
|
359 - | pub fn value(&self) -> i32 {
|
360 - | self.value
|
361 - | }
|
362 - | }
|
363 - | #[allow(clippy::new_without_default)]
|
364 - | #[allow(clippy::too_many_arguments)]
|
365 - | #[::pyo3::pymethods]
|
366 - | impl PrimitiveIntOpInput {
|
367 - | #[new]
|
368 - | pub fn new(value: i32) -> Self {
|
369 - | Self { value }
|
370 - | }
|
371 - | fn __repr__(&self) -> String {
|
372 - | format!("{self:?}")
|
373 - | }
|
374 - | fn __str__(&self) -> String {
|
375 - | format!("{self:?}")
|
376 - | }
|
377 - | }
|
378 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<PrimitiveIntOpInput> {
|
379 - | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
380 - | ob.extract::<PrimitiveIntOpInput>().map(Box::new)
|
381 - | }
|
382 - | }
|
383 - |
|
384 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<PrimitiveIntOpInput> {
|
301 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<PrimitiveIntOpInput> {
|
385 302 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
386 303 | (*self).into_py(py)
|
387 304 | }
|
388 305 | }
|
389 306 | impl crate::constrained::Constrained for crate::input::PrimitiveIntOpInput {
|
390 307 | type Unconstrained = crate::input::primitive_int_op_input_internal::Builder;
|
391 308 | }
|
392 309 | impl PrimitiveIntOpInput {
|
393 310 | /// Creates a new builder-style object to manufacture [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
|
394 311 | pub fn builder() -> crate::input::primitive_int_op_input::Builder {
|
395 312 | crate::input::primitive_int_op_input::Builder::default()
|
396 313 | }
|
397 314 | }
|
398 315 |
|
399 316 | #[::pyo3::pyclass]
|
400 - | /// :param map typing.Optional\[typing.Dict\[rest_json_extras.model.StringEnum, str\]\]:
|
317 + | /// :param r#enum typing.Optional\[rest_json_extras.model.EnumWithEscapedChars\]:
|
318 + | /// :param some_string typing.Optional\[str\]:
|
401 319 | /// :rtype None:
|
402 320 | #[allow(missing_docs)] // documentation missing in model
|
403 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
404 - | pub struct MapWithEnumKeyOpInput {
|
321 + | #[derive(
|
322 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
323 + | )]
|
324 + | pub struct EscapedStringValuesInput {
|
405 325 | #[pyo3(get, set)]
|
406 - | /// :type typing.Optional\[typing.Dict\[rest_json_extras.model.StringEnum, str\]\]:
|
326 + | /// :type typing.Optional\[rest_json_extras.model.EnumWithEscapedChars\]:
|
407 327 | #[allow(missing_docs)] // documentation missing in model
|
408 - | pub map: ::std::option::Option<
|
409 - | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
410 - | >,
|
328 + | pub r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
329 + | #[pyo3(get, set)]
|
330 + | /// :type typing.Optional\[str\]:
|
331 + | #[allow(missing_docs)] // documentation missing in model
|
332 + | pub some_string: ::std::option::Option<::std::string::String>,
|
411 333 | }
|
412 - | impl MapWithEnumKeyOpInput {
|
334 + | impl EscapedStringValuesInput {
|
413 335 | #[allow(missing_docs)] // documentation missing in model
|
414 - | pub fn map(
|
415 - | &self,
|
416 - | ) -> ::std::option::Option<
|
417 - | &::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
418 - | > {
|
419 - | self.map.as_ref()
|
336 + | pub fn r#enum(&self) -> ::std::option::Option<&crate::model::EnumWithEscapedChars> {
|
337 + | self.r#enum.as_ref()
|
338 + | }
|
339 + | #[allow(missing_docs)] // documentation missing in model
|
340 + | pub fn some_string(&self) -> ::std::option::Option<&str> {
|
341 + | self.some_string.as_deref()
|
420 342 | }
|
421 343 | }
|
422 344 | #[allow(clippy::new_without_default)]
|
423 345 | #[allow(clippy::too_many_arguments)]
|
424 346 | #[::pyo3::pymethods]
|
425 - | impl MapWithEnumKeyOpInput {
|
347 + | impl EscapedStringValuesInput {
|
426 348 | #[new]
|
427 349 | pub fn new(
|
428 - | map: ::std::option::Option<
|
429 - | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
430 - | >,
|
350 + | r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
351 + | some_string: ::std::option::Option<::std::string::String>,
|
431 352 | ) -> Self {
|
432 - | Self { map }
|
353 + | Self {
|
354 + | r#enum,
|
355 + | some_string,
|
356 + | }
|
433 357 | }
|
434 358 | fn __repr__(&self) -> String {
|
435 359 | format!("{self:?}")
|
436 360 | }
|
437 361 | fn __str__(&self) -> String {
|
438 362 | format!("{self:?}")
|
439 363 | }
|
440 364 | }
|
441 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<MapWithEnumKeyOpInput> {
|
365 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<EscapedStringValuesInput> {
|
442 366 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
443 - | ob.extract::<MapWithEnumKeyOpInput>().map(Box::new)
|
367 + | ob.extract::<EscapedStringValuesInput>().map(Box::new)
|
444 368 | }
|
445 369 | }
|
446 370 |
|
447 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<MapWithEnumKeyOpInput> {
|
371 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<EscapedStringValuesInput> {
|
448 372 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
449 373 | (*self).into_py(py)
|
450 374 | }
|
451 375 | }
|
452 - | impl crate::constrained::Constrained for crate::input::MapWithEnumKeyOpInput {
|
453 - | type Unconstrained = crate::input::map_with_enum_key_op_input_internal::Builder;
|
376 + | impl crate::constrained::Constrained for crate::input::EscapedStringValuesInput {
|
377 + | type Unconstrained = crate::input::escaped_string_values_input_internal::Builder;
|
454 378 | }
|
455 - | impl MapWithEnumKeyOpInput {
|
456 - | /// Creates a new builder-style object to manufacture [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
457 - | pub fn builder() -> crate::input::map_with_enum_key_op_input::Builder {
|
458 - | crate::input::map_with_enum_key_op_input::Builder::default()
|
379 + | impl EscapedStringValuesInput {
|
380 + | /// Creates a new builder-style object to manufacture [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
381 + | pub fn builder() -> crate::input::escaped_string_values_input::Builder {
|
382 + | crate::input::escaped_string_values_input::Builder::default()
|
459 383 | }
|
460 384 | }
|
461 385 |
|
462 386 | #[::pyo3::pyclass]
|
463 387 | /// :rtype None:
|
464 388 | #[allow(missing_docs)] // documentation missing in model
|
465 389 | #[derive(
|
466 390 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
467 391 | )]
|
468 - | pub struct StatusResponseInput {}
|
392 + | pub struct NullInNonSparseInput {}
|
469 393 | #[allow(clippy::new_without_default)]
|
470 394 | #[allow(clippy::too_many_arguments)]
|
471 395 | #[::pyo3::pymethods]
|
472 - | impl StatusResponseInput {
|
396 + | impl NullInNonSparseInput {
|
473 397 | #[new]
|
474 398 | pub fn new() -> Self {
|
475 399 | Self {}
|
476 400 | }
|
477 401 | fn __repr__(&self) -> String {
|
478 402 | format!("{self:?}")
|
479 403 | }
|
480 404 | fn __str__(&self) -> String {
|
481 405 | format!("{self:?}")
|
482 406 | }
|
483 407 | }
|
484 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StatusResponseInput> {
|
408 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<NullInNonSparseInput> {
|
485 409 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
486 - | ob.extract::<StatusResponseInput>().map(Box::new)
|
410 + | ob.extract::<NullInNonSparseInput>().map(Box::new)
|
487 411 | }
|
488 412 | }
|
489 413 |
|
490 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StatusResponseInput> {
|
414 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<NullInNonSparseInput> {
|
491 415 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
492 416 | (*self).into_py(py)
|
493 417 | }
|
494 418 | }
|
495 - | impl crate::constrained::Constrained for crate::input::StatusResponseInput {
|
496 - | type Unconstrained = crate::input::status_response_input_internal::Builder;
|
419 + | impl crate::constrained::Constrained for crate::input::NullInNonSparseInput {
|
420 + | type Unconstrained = crate::input::null_in_non_sparse_input_internal::Builder;
|
497 421 | }
|
498 - | impl StatusResponseInput {
|
499 - | /// Creates a new builder-style object to manufacture [`StatusResponseInput`](crate::input::StatusResponseInput).
|
500 - | pub fn builder() -> crate::input::status_response_input::Builder {
|
501 - | crate::input::status_response_input::Builder::default()
|
422 + | impl NullInNonSparseInput {
|
423 + | /// Creates a new builder-style object to manufacture [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
424 + | pub fn builder() -> crate::input::null_in_non_sparse_input::Builder {
|
425 + | crate::input::null_in_non_sparse_input::Builder::default()
|
502 426 | }
|
503 427 | }
|
504 428 |
|
505 429 | #[::pyo3::pyclass]
|
506 - | /// :param r#enum rest_json_extras.model.StringEnum:
|
507 430 | /// :rtype None:
|
508 431 | #[allow(missing_docs)] // documentation missing in model
|
509 432 | #[derive(
|
510 433 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
511 434 | )]
|
512 - | pub struct EnumQueryInput {
|
513 - | #[pyo3(get, set)]
|
514 - | /// :type rest_json_extras.model.StringEnum:
|
515 - | #[allow(missing_docs)] // documentation missing in model
|
516 - | pub r#enum: crate::model::StringEnum,
|
517 - | }
|
518 - | impl EnumQueryInput {
|
519 - | #[allow(missing_docs)] // documentation missing in model
|
520 - | pub fn r#enum(&self) -> &crate::model::StringEnum {
|
521 - | &self.r#enum
|
522 - | }
|
523 - | }
|
435 + | pub struct CaseInsensitiveErrorOperationInput {}
|
524 436 | #[allow(clippy::new_without_default)]
|
525 437 | #[allow(clippy::too_many_arguments)]
|
526 438 | #[::pyo3::pymethods]
|
527 - | impl EnumQueryInput {
|
439 + | impl CaseInsensitiveErrorOperationInput {
|
528 440 | #[new]
|
529 - | pub fn new(r#enum: crate::model::StringEnum) -> Self {
|
530 - | Self { r#enum }
|
441 + | pub fn new() -> Self {
|
442 + | Self {}
|
531 443 | }
|
532 444 | fn __repr__(&self) -> String {
|
533 445 | format!("{self:?}")
|
534 446 | }
|
535 447 | fn __str__(&self) -> String {
|
536 448 | format!("{self:?}")
|
537 449 | }
|
538 450 | }
|
539 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<EnumQueryInput> {
|
451 + | impl<'source> ::pyo3::FromPyObject<'source>
|
452 + | for std::boxed::Box<CaseInsensitiveErrorOperationInput>
|
453 + | {
|
540 454 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
541 - | ob.extract::<EnumQueryInput>().map(Box::new)
|
455 + | ob.extract::<CaseInsensitiveErrorOperationInput>()
|
456 + | .map(Box::new)
|
542 457 | }
|
543 458 | }
|
544 459 |
|
545 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<EnumQueryInput> {
|
460 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<CaseInsensitiveErrorOperationInput> {
|
546 461 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
547 462 | (*self).into_py(py)
|
548 463 | }
|
549 464 | }
|
550 - | impl crate::constrained::Constrained for crate::input::EnumQueryInput {
|
551 - | type Unconstrained = crate::input::enum_query_input_internal::Builder;
|
465 + | impl crate::constrained::Constrained for crate::input::CaseInsensitiveErrorOperationInput {
|
466 + | type Unconstrained = crate::input::case_insensitive_error_operation_input_internal::Builder;
|
552 467 | }
|
553 - | impl EnumQueryInput {
|
554 - | /// Creates a new builder-style object to manufacture [`EnumQueryInput`](crate::input::EnumQueryInput).
|
555 - | pub fn builder() -> crate::input::enum_query_input::Builder {
|
556 - | crate::input::enum_query_input::Builder::default()
|
468 + | impl CaseInsensitiveErrorOperationInput {
|
469 + | /// Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
470 + | pub fn builder() -> crate::input::case_insensitive_error_operation_input::Builder {
|
471 + | crate::input::case_insensitive_error_operation_input::Builder::default()
|
557 472 | }
|
558 473 | }
|
559 474 |
|
560 475 | #[::pyo3::pyclass]
|
561 476 | /// :rtype None:
|
562 477 | #[allow(missing_docs)] // documentation missing in model
|
563 478 | #[derive(
|
564 479 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
565 480 | )]
|
566 - | pub struct PrimitiveIntHeaderInput {}
|
481 + | pub struct EmptyStructWithContentOnWireOpInput {}
|
567 482 | #[allow(clippy::new_without_default)]
|
568 483 | #[allow(clippy::too_many_arguments)]
|
569 484 | #[::pyo3::pymethods]
|
570 - | impl PrimitiveIntHeaderInput {
|
485 + | impl EmptyStructWithContentOnWireOpInput {
|
571 486 | #[new]
|
572 487 | pub fn new() -> Self {
|
573 488 | Self {}
|
574 489 | }
|
575 490 | fn __repr__(&self) -> String {
|
576 491 | format!("{self:?}")
|
577 492 | }
|
578 493 | fn __str__(&self) -> String {
|
579 494 | format!("{self:?}")
|
580 495 | }
|
581 496 | }
|
582 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<PrimitiveIntHeaderInput> {
|
497 + | impl<'source> ::pyo3::FromPyObject<'source>
|
498 + | for std::boxed::Box<EmptyStructWithContentOnWireOpInput>
|
499 + | {
|
583 500 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
584 - | ob.extract::<PrimitiveIntHeaderInput>().map(Box::new)
|
501 + | ob.extract::<EmptyStructWithContentOnWireOpInput>()
|
502 + | .map(Box::new)
|
585 503 | }
|
586 504 | }
|
587 505 |
|
588 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<PrimitiveIntHeaderInput> {
|
506 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<EmptyStructWithContentOnWireOpInput> {
|
589 507 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
590 508 | (*self).into_py(py)
|
591 509 | }
|
592 510 | }
|
593 - | impl crate::constrained::Constrained for crate::input::PrimitiveIntHeaderInput {
|
594 - | type Unconstrained = crate::input::primitive_int_header_input_internal::Builder;
|
511 + | impl crate::constrained::Constrained for crate::input::EmptyStructWithContentOnWireOpInput {
|
512 + | type Unconstrained = crate::input::empty_struct_with_content_on_wire_op_input_internal::Builder;
|
595 513 | }
|
596 - | impl PrimitiveIntHeaderInput {
|
597 - | /// Creates a new builder-style object to manufacture [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
598 - | pub fn builder() -> crate::input::primitive_int_header_input::Builder {
|
599 - | crate::input::primitive_int_header_input::Builder::default()
|
514 + | impl EmptyStructWithContentOnWireOpInput {
|
515 + | /// Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
516 + | pub fn builder() -> crate::input::empty_struct_with_content_on_wire_op_input::Builder {
|
517 + | crate::input::empty_struct_with_content_on_wire_op_input::Builder::default()
|
600 518 | }
|
601 519 | }
|
602 520 |
|
603 521 | #[::pyo3::pyclass]
|
604 - | /// :param payload typing.Optional\[str\]:
|
522 + | /// :param foo typing.Optional\[str\]:
|
523 + | /// :param baz typing.Optional\[typing.Dict\[str, str\]\]:
|
605 524 | /// :rtype None:
|
606 525 | #[allow(missing_docs)] // documentation missing in model
|
607 - | #[derive(
|
608 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
609 - | )]
|
610 - | pub struct StringPayloadInput {
|
526 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
527 + | pub struct QueryPrecedenceInput {
|
611 528 | #[pyo3(get, set)]
|
612 529 | /// :type typing.Optional\[str\]:
|
613 530 | #[allow(missing_docs)] // documentation missing in model
|
614 - | pub payload: ::std::option::Option<::std::string::String>,
|
531 + | pub foo: ::std::option::Option<::std::string::String>,
|
532 + | #[pyo3(get, set)]
|
533 + | /// :type typing.Optional\[typing.Dict\[str, str\]\]:
|
534 + | #[allow(missing_docs)] // documentation missing in model
|
535 + | pub baz: ::std::option::Option<
|
536 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
537 + | >,
|
615 538 | }
|
616 - | impl StringPayloadInput {
|
539 + | impl QueryPrecedenceInput {
|
617 540 | #[allow(missing_docs)] // documentation missing in model
|
618 - | pub fn payload(&self) -> ::std::option::Option<&str> {
|
619 - | self.payload.as_deref()
|
541 + | pub fn foo(&self) -> ::std::option::Option<&str> {
|
542 + | self.foo.as_deref()
|
543 + | }
|
544 + | #[allow(missing_docs)] // documentation missing in model
|
545 + | pub fn baz(
|
546 + | &self,
|
547 + | ) -> ::std::option::Option<
|
548 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
549 + | > {
|
550 + | self.baz.as_ref()
|
620 551 | }
|
621 552 | }
|
622 553 | #[allow(clippy::new_without_default)]
|
623 554 | #[allow(clippy::too_many_arguments)]
|
624 555 | #[::pyo3::pymethods]
|
625 - | impl StringPayloadInput {
|
556 + | impl QueryPrecedenceInput {
|
626 557 | #[new]
|
627 - | pub fn new(payload: ::std::option::Option<::std::string::String>) -> Self {
|
628 - | Self { payload }
|
558 + | pub fn new(
|
559 + | foo: ::std::option::Option<::std::string::String>,
|
560 + | baz: ::std::option::Option<
|
561 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
562 + | >,
|
563 + | ) -> Self {
|
564 + | Self { foo, baz }
|
629 565 | }
|
630 566 | fn __repr__(&self) -> String {
|
631 567 | format!("{self:?}")
|
632 568 | }
|
633 569 | fn __str__(&self) -> String {
|
634 570 | format!("{self:?}")
|
635 571 | }
|
636 572 | }
|
637 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StringPayloadInput> {
|
573 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<QueryPrecedenceInput> {
|
638 574 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
639 - | ob.extract::<StringPayloadInput>().map(Box::new)
|
575 + | ob.extract::<QueryPrecedenceInput>().map(Box::new)
|
640 576 | }
|
641 577 | }
|
642 578 |
|
643 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StringPayloadInput> {
|
579 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<QueryPrecedenceInput> {
|
644 580 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
645 581 | (*self).into_py(py)
|
646 582 | }
|
647 583 | }
|
648 - | impl crate::constrained::Constrained for crate::input::StringPayloadInput {
|
649 - | type Unconstrained = crate::input::string_payload_input_internal::Builder;
|
584 + | impl crate::constrained::Constrained for crate::input::QueryPrecedenceInput {
|
585 + | type Unconstrained = crate::input::query_precedence_input_internal::Builder;
|
650 586 | }
|
651 - | impl StringPayloadInput {
|
652 - | /// Creates a new builder-style object to manufacture [`StringPayloadInput`](crate::input::StringPayloadInput).
|
653 - | pub fn builder() -> crate::input::string_payload_input::Builder {
|
654 - | crate::input::string_payload_input::Builder::default()
|
587 + | impl QueryPrecedenceInput {
|
588 + | /// Creates a new builder-style object to manufacture [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
589 + | pub fn builder() -> crate::input::query_precedence_input::Builder {
|
590 + | crate::input::query_precedence_input::Builder::default()
|
655 591 | }
|
656 592 | }
|
657 - | /// See [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
658 - | pub(crate) mod http_query_params_only_operation_input_internal {
|
593 + | /// See [`StringPayloadInput`](crate::input::StringPayloadInput).
|
594 + | pub(crate) mod string_payload_input_internal {
|
659 595 |
|
660 - | impl ::std::convert::From<Builder> for crate::input::HttpQueryParamsOnlyOperationInput {
|
596 + | impl ::std::convert::From<Builder> for crate::input::StringPayloadInput {
|
661 597 | fn from(builder: Builder) -> Self {
|
662 598 | builder.build()
|
663 599 | }
|
664 600 | }
|
665 - | /// A builder for [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
601 + | /// A builder for [`StringPayloadInput`](crate::input::StringPayloadInput).
|
666 602 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
667 603 | pub(crate) struct Builder {
|
668 - | pub(crate) query_map: ::std::option::Option<
|
669 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
670 - | >,
|
604 + | pub(crate) payload: ::std::option::Option<::std::string::String>,
|
671 605 | }
|
672 606 | impl Builder {
|
673 607 | #[allow(missing_docs)] // documentation missing in model
|
674 - | pub(crate) fn set_query_map(
|
608 + | pub(crate) fn set_payload(
|
675 609 | mut self,
|
676 - | input: Option<
|
677 - | impl ::std::convert::Into<
|
678 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
679 - | >,
|
680 - | >,
|
610 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
681 611 | ) -> Self {
|
682 - | self.query_map = input.map(|v| v.into());
|
612 + | self.payload = input.map(|v| v.into());
|
683 613 | self
|
684 614 | }
|
685 - | /// Consumes the builder and constructs a [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
686 - | pub fn build(self) -> crate::input::HttpQueryParamsOnlyOperationInput {
|
615 + | /// Consumes the builder and constructs a [`StringPayloadInput`](crate::input::StringPayloadInput).
|
616 + | pub fn build(self) -> crate::input::StringPayloadInput {
|
687 617 | self.build_enforcing_all_constraints()
|
688 618 | }
|
689 - | fn build_enforcing_all_constraints(
|
690 - | self,
|
691 - | ) -> crate::input::HttpQueryParamsOnlyOperationInput {
|
692 - | crate::input::HttpQueryParamsOnlyOperationInput {
|
693 - | query_map: self.query_map,
|
619 + | fn build_enforcing_all_constraints(self) -> crate::input::StringPayloadInput {
|
620 + | crate::input::StringPayloadInput {
|
621 + | payload: self.payload,
|
694 622 | }
|
695 623 | }
|
696 624 | }
|
697 625 | }
|
698 - | /// See [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
699 - | pub mod http_query_params_only_operation_input {
|
626 + | /// See [`StringPayloadInput`](crate::input::StringPayloadInput).
|
627 + | pub mod string_payload_input {
|
700 628 |
|
701 - | impl ::std::convert::From<Builder> for crate::input::HttpQueryParamsOnlyOperationInput {
|
629 + | impl ::std::convert::From<Builder> for crate::input::StringPayloadInput {
|
702 630 | fn from(builder: Builder) -> Self {
|
703 631 | builder.build()
|
704 632 | }
|
705 633 | }
|
706 - | /// A builder for [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
634 + | /// A builder for [`StringPayloadInput`](crate::input::StringPayloadInput).
|
707 635 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
708 636 | pub struct Builder {
|
709 - | pub(crate) query_map: ::std::option::Option<
|
710 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
711 - | >,
|
637 + | pub(crate) payload: ::std::option::Option<::std::string::String>,
|
712 638 | }
|
713 639 | impl Builder {
|
714 640 | #[allow(missing_docs)] // documentation missing in model
|
715 - | pub fn query_map(
|
716 - | mut self,
|
717 - | input: ::std::option::Option<
|
718 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
719 - | >,
|
720 - | ) -> Self {
|
721 - | self.query_map = input;
|
641 + | pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
642 + | self.payload = input;
|
722 643 | self
|
723 644 | }
|
724 - | /// Consumes the builder and constructs a [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
725 - | pub fn build(self) -> crate::input::HttpQueryParamsOnlyOperationInput {
|
645 + | /// Consumes the builder and constructs a [`StringPayloadInput`](crate::input::StringPayloadInput).
|
646 + | pub fn build(self) -> crate::input::StringPayloadInput {
|
726 647 | self.build_enforcing_required_and_enum_traits()
|
727 648 | }
|
728 - | fn build_enforcing_required_and_enum_traits(
|
729 - | self,
|
730 - | ) -> crate::input::HttpQueryParamsOnlyOperationInput {
|
731 - | crate::input::HttpQueryParamsOnlyOperationInput {
|
732 - | query_map: self.query_map,
|
649 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::StringPayloadInput {
|
650 + | crate::input::StringPayloadInput {
|
651 + | payload: self.payload,
|
733 652 | }
|
734 653 | }
|
735 654 | }
|
736 655 | }
|
737 - | /// See [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
738 - | pub(crate) mod query_precedence_input_internal {
|
656 + | /// See [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
657 + | pub(crate) mod primitive_int_header_input_internal {
|
739 658 |
|
740 - | impl ::std::convert::From<Builder> for crate::input::QueryPrecedenceInput {
|
659 + | impl ::std::convert::From<Builder> for crate::input::PrimitiveIntHeaderInput {
|
741 660 | fn from(builder: Builder) -> Self {
|
742 661 | builder.build()
|
743 662 | }
|
744 663 | }
|
745 - | /// A builder for [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
664 + | /// A builder for [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
746 665 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
747 - | pub(crate) struct Builder {
|
748 - | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
749 - | pub(crate) baz: ::std::option::Option<
|
750 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
751 - | >,
|
752 - | }
|
666 + | pub(crate) struct Builder {}
|
753 667 | impl Builder {
|
754 - | #[allow(missing_docs)] // documentation missing in model
|
755 - | pub(crate) fn set_foo(
|
756 - | mut self,
|
757 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
758 - | ) -> Self {
|
759 - | self.foo = input.map(|v| v.into());
|
760 - | self
|
761 - | }
|
762 - | #[allow(missing_docs)] // documentation missing in model
|
763 - | pub(crate) fn set_baz(
|
764 - | mut self,
|
765 - | input: Option<
|
766 - | impl ::std::convert::Into<
|
767 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
768 - | >,
|
769 - | >,
|
770 - | ) -> Self {
|
771 - | self.baz = input.map(|v| v.into());
|
772 - | self
|
773 - | }
|
774 - | /// Consumes the builder and constructs a [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
775 - | pub fn build(self) -> crate::input::QueryPrecedenceInput {
|
668 + | /// Consumes the builder and constructs a [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
669 + | pub fn build(self) -> crate::input::PrimitiveIntHeaderInput {
|
776 670 | self.build_enforcing_all_constraints()
|
777 671 | }
|
778 - | fn build_enforcing_all_constraints(self) -> crate::input::QueryPrecedenceInput {
|
779 - | crate::input::QueryPrecedenceInput {
|
780 - | foo: self.foo,
|
781 - | baz: self.baz,
|
782 - | }
|
672 + | fn build_enforcing_all_constraints(self) -> crate::input::PrimitiveIntHeaderInput {
|
673 + | crate::input::PrimitiveIntHeaderInput {}
|
783 674 | }
|
784 675 | }
|
785 676 | }
|
786 - | /// See [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
787 - | pub mod query_precedence_input {
|
677 + | /// See [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
678 + | pub mod primitive_int_header_input {
|
788 679 |
|
789 - | impl ::std::convert::From<Builder> for crate::input::QueryPrecedenceInput {
|
680 + | impl ::std::convert::From<Builder> for crate::input::PrimitiveIntHeaderInput {
|
790 681 | fn from(builder: Builder) -> Self {
|
791 682 | builder.build()
|
792 683 | }
|
793 684 | }
|
794 - | /// A builder for [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
685 + | /// A builder for [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
795 686 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
796 - | pub struct Builder {
|
797 - | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
798 - | pub(crate) baz: ::std::option::Option<
|
799 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
800 - | >,
|
801 - | }
|
687 + | pub struct Builder {}
|
802 688 | impl Builder {
|
803 - | #[allow(missing_docs)] // documentation missing in model
|
804 - | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
805 - | self.foo = input;
|
806 - | self
|
807 - | }
|
808 - | #[allow(missing_docs)] // documentation missing in model
|
809 - | pub fn baz(
|
810 - | mut self,
|
811 - | input: ::std::option::Option<
|
812 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
813 - | >,
|
814 - | ) -> Self {
|
815 - | self.baz = input;
|
816 - | self
|
817 - | }
|
818 - | /// Consumes the builder and constructs a [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
819 - | pub fn build(self) -> crate::input::QueryPrecedenceInput {
|
689 + | /// Consumes the builder and constructs a [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
690 + | pub fn build(self) -> crate::input::PrimitiveIntHeaderInput {
|
820 691 | self.build_enforcing_required_and_enum_traits()
|
821 692 | }
|
822 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::QueryPrecedenceInput {
|
823 - | crate::input::QueryPrecedenceInput {
|
824 - | foo: self.foo,
|
825 - | baz: self.baz,
|
826 - | }
|
693 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::PrimitiveIntHeaderInput {
|
694 + | crate::input::PrimitiveIntHeaderInput {}
|
827 695 | }
|
828 696 | }
|
829 697 | }
|
830 - | /// See [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
831 - | pub(crate) mod empty_struct_with_content_on_wire_op_input_internal {
|
698 + | /// See [`EnumQueryInput`](crate::input::EnumQueryInput).
|
699 + | pub(crate) mod enum_query_input_internal {
|
832 700 |
|
833 - | impl ::std::convert::From<Builder> for crate::input::EmptyStructWithContentOnWireOpInput {
|
834 - | fn from(builder: Builder) -> Self {
|
835 - | builder.build()
|
701 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
702 + | /// Holds one variant for each of the ways the builder can fail.
|
703 + | #[non_exhaustive]
|
704 + | #[allow(clippy::enum_variant_names)]
|
705 + | pub(crate) enum ConstraintViolation {
|
706 + | /// `r#enum` was not provided but it is required when building `EnumQueryInput`.
|
707 + | MissingEnum,
|
708 + | /// Constraint violation occurred building member `r#enum` when building `EnumQueryInput`.
|
709 + | #[doc(hidden)]
|
710 + | Enum(crate::model::string_enum_internal::ConstraintViolation),
|
836 711 | }
|
712 + | impl ::std::fmt::Display for ConstraintViolation {
|
713 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
714 + | match self {
|
715 + | ConstraintViolation::MissingEnum => write!(f, "`r#enum` was not provided but it is required when building `EnumQueryInput`"),
|
716 + | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EnumQueryInput`"),
|
837 717 | }
|
838 - | /// A builder for [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
839 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
840 - | pub(crate) struct Builder {}
|
841 - | impl Builder {
|
842 - | /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
843 - | pub fn build(self) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
844 - | self.build_enforcing_all_constraints()
|
845 718 | }
|
846 - | fn build_enforcing_all_constraints(
|
719 + | }
|
720 + | impl ::std::error::Error for ConstraintViolation {}
|
721 + | impl ConstraintViolation {
|
722 + | pub(crate) fn as_validation_exception_field(
|
847 723 | self,
|
848 - | ) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
849 - | crate::input::EmptyStructWithContentOnWireOpInput {}
|
724 + | path: ::std::string::String,
|
725 + | ) -> crate::model::ValidationExceptionField {
|
726 + | match self {
|
727 + | ConstraintViolation::MissingEnum => crate::model::ValidationExceptionField {
|
728 + | message: format!(
|
729 + | "Value at '{}/enum' failed to satisfy constraint: Member must not be null",
|
730 + | path
|
731 + | ),
|
732 + | path: path + "/enum",
|
733 + | },
|
734 + | ConstraintViolation::Enum(inner) => {
|
735 + | inner.as_validation_exception_field(path + "/enum")
|
850 736 | }
|
851 737 | }
|
852 - | }
|
853 - | /// See [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
854 - | pub mod empty_struct_with_content_on_wire_op_input {
|
855 - |
|
856 - | impl ::std::convert::From<Builder> for crate::input::EmptyStructWithContentOnWireOpInput {
|
857 - | fn from(builder: Builder) -> Self {
|
858 - | builder.build()
|
859 738 | }
|
860 739 | }
|
861 - | /// A builder for [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
862 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
863 - | pub struct Builder {}
|
864 - | impl Builder {
|
865 - | /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
866 - | pub fn build(self) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
867 - | self.build_enforcing_required_and_enum_traits()
|
740 + | impl ::std::convert::From<ConstraintViolation>
|
741 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
742 + | {
|
743 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
744 + | let first_validation_exception_field =
|
745 + | constraint_violation.as_validation_exception_field("".to_owned());
|
746 + | let validation_exception = crate::error::ValidationException {
|
747 + | message: format!(
|
748 + | "1 validation error detected. {}",
|
749 + | &first_validation_exception_field.message
|
750 + | ),
|
751 + | field_list: Some(vec![first_validation_exception_field]),
|
752 + | };
|
753 + | Self::ConstraintViolation(
|
754 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
755 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
756 + | )
|
868 757 | }
|
869 - | fn build_enforcing_required_and_enum_traits(
|
870 - | self,
|
871 - | ) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
872 - | crate::input::EmptyStructWithContentOnWireOpInput {}
|
873 758 | }
|
759 + | impl ::std::convert::From<Builder>
|
760 + | for crate::constrained::MaybeConstrained<crate::input::EnumQueryInput>
|
761 + | {
|
762 + | fn from(builder: Builder) -> Self {
|
763 + | Self::Unconstrained(builder)
|
874 764 | }
|
875 - | }
|
876 - | /// See [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
877 - | pub(crate) mod case_insensitive_error_operation_input_internal {
|
765 + | }
|
766 + | impl ::std::convert::TryFrom<Builder> for crate::input::EnumQueryInput {
|
767 + | type Error = ConstraintViolation;
|
878 768 |
|
879 - | impl ::std::convert::From<Builder> for crate::input::CaseInsensitiveErrorOperationInput {
|
880 - | fn from(builder: Builder) -> Self {
|
769 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
881 770 | builder.build()
|
882 771 | }
|
883 772 | }
|
884 - | /// A builder for [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
773 + | /// A builder for [`EnumQueryInput`](crate::input::EnumQueryInput).
|
885 774 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
886 - | pub(crate) struct Builder {}
|
775 + | pub(crate) struct Builder {
|
776 + | pub(crate) r#enum:
|
777 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::StringEnum>>,
|
778 + | }
|
887 779 | impl Builder {
|
888 - | /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
889 - | pub fn build(self) -> crate::input::CaseInsensitiveErrorOperationInput {
|
780 + | #[allow(missing_docs)] // documentation missing in model
|
781 + | pub(crate) fn set_enum(
|
782 + | mut self,
|
783 + | input: impl ::std::convert::Into<
|
784 + | crate::constrained::MaybeConstrained<crate::model::StringEnum>,
|
785 + | >,
|
786 + | ) -> Self {
|
787 + | self.r#enum = Some(input.into());
|
788 + | self
|
789 + | }
|
790 + | /// Consumes the builder and constructs a [`EnumQueryInput`](crate::input::EnumQueryInput).
|
791 + | ///
|
792 + | /// The builder fails to construct a [`EnumQueryInput`](crate::input::EnumQueryInput) if a [`ConstraintViolation`] occurs.
|
793 + | ///
|
794 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
795 + | pub fn build(self) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
890 796 | self.build_enforcing_all_constraints()
|
891 797 | }
|
892 798 | fn build_enforcing_all_constraints(
|
893 799 | self,
|
894 - | ) -> crate::input::CaseInsensitiveErrorOperationInput {
|
895 - | crate::input::CaseInsensitiveErrorOperationInput {}
|
800 + | ) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
801 + | Ok(crate::input::EnumQueryInput {
|
802 + | r#enum: self
|
803 + | .r#enum
|
804 + | .map(|v| match v {
|
805 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
806 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
807 + | })
|
808 + | .map(|res| res.map_err(ConstraintViolation::Enum))
|
809 + | .transpose()?
|
810 + | .ok_or(ConstraintViolation::MissingEnum)?,
|
811 + | })
|
896 812 | }
|
897 813 | }
|
898 814 | }
|
899 - | /// See [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
900 - | pub mod case_insensitive_error_operation_input {
|
815 + | /// See [`EnumQueryInput`](crate::input::EnumQueryInput).
|
816 + | pub mod enum_query_input {
|
901 817 |
|
902 - | impl ::std::convert::From<Builder> for crate::input::CaseInsensitiveErrorOperationInput {
|
903 - | fn from(builder: Builder) -> Self {
|
818 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
819 + | /// Holds one variant for each of the ways the builder can fail.
|
820 + | #[allow(clippy::enum_variant_names)]
|
821 + | pub enum ConstraintViolation {
|
822 + | /// `r#enum` was not provided but it is required when building `EnumQueryInput`.
|
823 + | MissingEnum,
|
824 + | }
|
825 + | impl ::std::fmt::Display for ConstraintViolation {
|
826 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
827 + | match self {
|
828 + | ConstraintViolation::MissingEnum => write!(
|
829 + | f,
|
830 + | "`r#enum` was not provided but it is required when building `EnumQueryInput`"
|
831 + | ),
|
832 + | }
|
833 + | }
|
834 + | }
|
835 + | impl ::std::error::Error for ConstraintViolation {}
|
836 + | impl ::std::convert::TryFrom<Builder> for crate::input::EnumQueryInput {
|
837 + | type Error = ConstraintViolation;
|
838 + |
|
839 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
904 840 | builder.build()
|
905 841 | }
|
906 842 | }
|
907 - | /// A builder for [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
843 + | /// A builder for [`EnumQueryInput`](crate::input::EnumQueryInput).
|
908 844 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
909 - | pub struct Builder {}
|
845 + | pub struct Builder {
|
846 + | pub(crate) r#enum: ::std::option::Option<crate::model::StringEnum>,
|
847 + | }
|
910 848 | impl Builder {
|
911 - | /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
912 - | pub fn build(self) -> crate::input::CaseInsensitiveErrorOperationInput {
|
849 + | #[allow(missing_docs)] // documentation missing in model
|
850 + | pub fn r#enum(mut self, input: crate::model::StringEnum) -> Self {
|
851 + | self.r#enum = Some(input);
|
852 + | self
|
853 + | }
|
854 + | /// Consumes the builder and constructs a [`EnumQueryInput`](crate::input::EnumQueryInput).
|
855 + | ///
|
856 + | /// The builder fails to construct a [`EnumQueryInput`](crate::input::EnumQueryInput) if you do not provide a value for all non-`Option`al members.
|
857 + | ///
|
858 + | pub fn build(self) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
913 859 | self.build_enforcing_required_and_enum_traits()
|
914 860 | }
|
915 861 | fn build_enforcing_required_and_enum_traits(
|
916 862 | self,
|
917 - | ) -> crate::input::CaseInsensitiveErrorOperationInput {
|
918 - | crate::input::CaseInsensitiveErrorOperationInput {}
|
863 + | ) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
864 + | Ok(crate::input::EnumQueryInput {
|
865 + | r#enum: self.r#enum.ok_or(ConstraintViolation::MissingEnum)?,
|
866 + | })
|
919 867 | }
|
920 868 | }
|
921 869 | }
|
922 - | /// See [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
923 - | pub(crate) mod null_in_non_sparse_input_internal {
|
870 + | /// See [`StatusResponseInput`](crate::input::StatusResponseInput).
|
871 + | pub(crate) mod status_response_input_internal {
|
924 872 |
|
925 - | impl ::std::convert::From<Builder> for crate::input::NullInNonSparseInput {
|
873 + | impl ::std::convert::From<Builder> for crate::input::StatusResponseInput {
|
926 874 | fn from(builder: Builder) -> Self {
|
927 875 | builder.build()
|
928 876 | }
|
929 877 | }
|
930 - | /// A builder for [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
878 + | /// A builder for [`StatusResponseInput`](crate::input::StatusResponseInput).
|
931 879 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
932 880 | pub(crate) struct Builder {}
|
933 881 | impl Builder {
|
934 - | /// Consumes the builder and constructs a [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
935 - | pub fn build(self) -> crate::input::NullInNonSparseInput {
|
882 + | /// Consumes the builder and constructs a [`StatusResponseInput`](crate::input::StatusResponseInput).
|
883 + | pub fn build(self) -> crate::input::StatusResponseInput {
|
936 884 | self.build_enforcing_all_constraints()
|
937 885 | }
|
938 - | fn build_enforcing_all_constraints(self) -> crate::input::NullInNonSparseInput {
|
939 - | crate::input::NullInNonSparseInput {}
|
886 + | fn build_enforcing_all_constraints(self) -> crate::input::StatusResponseInput {
|
887 + | crate::input::StatusResponseInput {}
|
940 888 | }
|
941 889 | }
|
942 890 | }
|
943 - | /// See [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
944 - | pub mod null_in_non_sparse_input {
|
891 + | /// See [`StatusResponseInput`](crate::input::StatusResponseInput).
|
892 + | pub mod status_response_input {
|
945 893 |
|
946 - | impl ::std::convert::From<Builder> for crate::input::NullInNonSparseInput {
|
894 + | impl ::std::convert::From<Builder> for crate::input::StatusResponseInput {
|
947 895 | fn from(builder: Builder) -> Self {
|
948 896 | builder.build()
|
949 897 | }
|
950 898 | }
|
951 - | /// A builder for [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
899 + | /// A builder for [`StatusResponseInput`](crate::input::StatusResponseInput).
|
952 900 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
953 901 | pub struct Builder {}
|
954 902 | impl Builder {
|
955 - | /// Consumes the builder and constructs a [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
956 - | pub fn build(self) -> crate::input::NullInNonSparseInput {
|
903 + | /// Consumes the builder and constructs a [`StatusResponseInput`](crate::input::StatusResponseInput).
|
904 + | pub fn build(self) -> crate::input::StatusResponseInput {
|
957 905 | self.build_enforcing_required_and_enum_traits()
|
958 906 | }
|
959 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::NullInNonSparseInput {
|
960 - | crate::input::NullInNonSparseInput {}
|
907 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::StatusResponseInput {
|
908 + | crate::input::StatusResponseInput {}
|
961 909 | }
|
962 910 | }
|
963 911 | }
|
964 - | /// See [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
965 - | pub(crate) mod escaped_string_values_input_internal {
|
912 + | /// See [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
913 + | pub(crate) mod map_with_enum_key_op_input_internal {
|
966 914 |
|
967 915 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
968 916 | /// Holds one variant for each of the ways the builder can fail.
|
969 917 | #[non_exhaustive]
|
970 918 | #[allow(clippy::enum_variant_names)]
|
971 919 | pub(crate) enum ConstraintViolation {
|
972 - | /// Constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`.
|
920 + | /// Constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`.
|
973 921 | #[doc(hidden)]
|
974 - | Enum(crate::model::enum_with_escaped_chars_internal::ConstraintViolation),
|
922 + | Map(crate::model::map_with_enum_key_internal::ConstraintViolation),
|
975 923 | }
|
976 924 | impl ::std::fmt::Display for ConstraintViolation {
|
977 925 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
978 926 | match self {
|
979 - | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`"),
|
927 + | ConstraintViolation::Map(_) => write!(f, "constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`"),
|
980 928 | }
|
981 929 | }
|
982 930 | }
|
983 931 | impl ::std::error::Error for ConstraintViolation {}
|
984 932 | impl ConstraintViolation {
|
985 933 | pub(crate) fn as_validation_exception_field(
|
986 934 | self,
|
987 935 | path: ::std::string::String,
|
988 936 | ) -> crate::model::ValidationExceptionField {
|
989 937 | match self {
|
990 - | ConstraintViolation::Enum(inner) => {
|
991 - | inner.as_validation_exception_field(path + "/enum")
|
938 + | ConstraintViolation::Map(inner) => {
|
939 + | inner.as_validation_exception_field(path + "/map")
|
992 940 | }
|
993 941 | }
|
994 942 | }
|
995 943 | }
|
996 944 | impl ::std::convert::From<ConstraintViolation>
|
997 945 | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
998 946 | {
|
999 947 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1000 948 | let first_validation_exception_field =
|
1001 949 | constraint_violation.as_validation_exception_field("".to_owned());
|
1002 950 | let validation_exception = crate::error::ValidationException {
|
1003 951 | message: format!(
|
1004 952 | "1 validation error detected. {}",
|
1005 953 | &first_validation_exception_field.message
|
1006 954 | ),
|
1007 955 | field_list: Some(vec![first_validation_exception_field]),
|
1008 956 | };
|
1009 957 | Self::ConstraintViolation(
|
1010 958 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1011 959 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1012 960 | )
|
1013 961 | }
|
1014 962 | }
|
1015 963 | impl ::std::convert::From<Builder>
|
1016 - | for crate::constrained::MaybeConstrained<crate::input::EscapedStringValuesInput>
|
964 + | for crate::constrained::MaybeConstrained<crate::input::MapWithEnumKeyOpInput>
|
1017 965 | {
|
1018 966 | fn from(builder: Builder) -> Self {
|
1019 967 | Self::Unconstrained(builder)
|
1020 968 | }
|
1021 969 | }
|
1022 - | impl ::std::convert::TryFrom<Builder> for crate::input::EscapedStringValuesInput {
|
970 + | impl ::std::convert::TryFrom<Builder> for crate::input::MapWithEnumKeyOpInput {
|
1023 971 | type Error = ConstraintViolation;
|
1024 972 |
|
1025 973 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1026 974 | builder.build()
|
1027 975 | }
|
1028 976 | }
|
1029 - | /// A builder for [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1030 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1031 - | pub(crate) struct Builder {
|
1032 - | pub(crate) r#enum: ::std::option::Option<
|
1033 - | crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
|
1034 - | >,
|
1035 - | pub(crate) some_string: ::std::option::Option<::std::string::String>,
|
1036 - | }
|
1037 - | impl Builder {
|
1038 - | #[allow(missing_docs)] // documentation missing in model
|
1039 - | pub(crate) fn set_enum(
|
1040 - | mut self,
|
1041 - | input: Option<
|
1042 - | impl ::std::convert::Into<
|
1043 - | crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
|
977 + | /// A builder for [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
978 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
979 + | pub(crate) struct Builder {
|
980 + | pub(crate) map: ::std::option::Option<
|
981 + | crate::constrained::MaybeConstrained<
|
982 + | crate::constrained::map_with_enum_key_constrained::MapWithEnumKeyConstrained,
|
1044 983 | >,
|
1045 984 | >,
|
1046 - | ) -> Self {
|
1047 - | self.r#enum = input.map(|v| v.into());
|
1048 - | self
|
1049 985 | }
|
986 + | impl Builder {
|
1050 987 | #[allow(missing_docs)] // documentation missing in model
|
1051 - | pub(crate) fn set_some_string(
|
988 + | pub(crate) fn set_map(
|
1052 989 | mut self,
|
1053 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
990 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_with_enum_key_constrained::MapWithEnumKeyConstrained>>>,
|
1054 991 | ) -> Self {
|
1055 - | self.some_string = input.map(|v| v.into());
|
992 + | self.map = input.map(|v| v.into());
|
1056 993 | self
|
1057 994 | }
|
1058 - | /// Consumes the builder and constructs a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
995 + | /// Consumes the builder and constructs a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1059 996 | ///
|
1060 - | /// The builder fails to construct a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput) if a [`ConstraintViolation`] occurs.
|
997 + | /// The builder fails to construct a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput) if a [`ConstraintViolation`] occurs.
|
1061 998 | ///
|
1062 - | pub fn build(self) -> Result<crate::input::EscapedStringValuesInput, ConstraintViolation> {
|
999 + | pub fn build(self) -> Result<crate::input::MapWithEnumKeyOpInput, ConstraintViolation> {
|
1063 1000 | self.build_enforcing_all_constraints()
|
1064 1001 | }
|
1065 1002 | fn build_enforcing_all_constraints(
|
1066 1003 | self,
|
1067 - | ) -> Result<crate::input::EscapedStringValuesInput, ConstraintViolation> {
|
1068 - | Ok(crate::input::EscapedStringValuesInput {
|
1069 - | r#enum: self
|
1070 - | .r#enum
|
1004 + | ) -> Result<crate::input::MapWithEnumKeyOpInput, ConstraintViolation> {
|
1005 + | Ok(crate::input::MapWithEnumKeyOpInput {
|
1006 + | map: self
|
1007 + | .map
|
1071 1008 | .map(|v| match v {
|
1072 1009 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1073 1010 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1074 1011 | })
|
1075 - | .map(|res| res.map_err(ConstraintViolation::Enum))
|
1012 + | .map(|res| res.map(|v| v.into()).map_err(ConstraintViolation::Map))
|
1076 1013 | .transpose()?,
|
1077 - | some_string: self.some_string,
|
1078 1014 | })
|
1079 1015 | }
|
1080 1016 | }
|
1081 1017 | }
|
1082 - | /// See [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1083 - | pub mod escaped_string_values_input {
|
1018 + | /// See [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1019 + | pub mod map_with_enum_key_op_input {
|
1084 1020 |
|
1085 - | impl ::std::convert::From<Builder> for crate::input::EscapedStringValuesInput {
|
1021 + | impl ::std::convert::From<Builder> for crate::input::MapWithEnumKeyOpInput {
|
1086 1022 | fn from(builder: Builder) -> Self {
|
1087 1023 | builder.build()
|
1088 1024 | }
|
1089 1025 | }
|
1090 - | /// A builder for [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1026 + | /// A builder for [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1091 1027 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1092 1028 | pub struct Builder {
|
1093 - | pub(crate) r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
1094 - | pub(crate) some_string: ::std::option::Option<::std::string::String>,
|
1029 + | pub(crate) map: ::std::option::Option<
|
1030 + | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
1031 + | >,
|
1095 1032 | }
|
1096 1033 | impl Builder {
|
1097 1034 | #[allow(missing_docs)] // documentation missing in model
|
1098 - | pub fn r#enum(
|
1035 + | pub fn map(
|
1099 1036 | mut self,
|
1100 - | input: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
1037 + | input: ::std::option::Option<
|
1038 + | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
1039 + | >,
|
1101 1040 | ) -> Self {
|
1102 - | self.r#enum = input;
|
1103 - | self
|
1104 - | }
|
1105 - | #[allow(missing_docs)] // documentation missing in model
|
1106 - | pub fn some_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1107 - | self.some_string = input;
|
1041 + | self.map = input;
|
1108 1042 | self
|
1109 1043 | }
|
1110 - | /// Consumes the builder and constructs a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1111 - | pub fn build(self) -> crate::input::EscapedStringValuesInput {
|
1044 + | /// Consumes the builder and constructs a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1045 + | pub fn build(self) -> crate::input::MapWithEnumKeyOpInput {
|
1112 1046 | self.build_enforcing_required_and_enum_traits()
|
1113 1047 | }
|
1114 - | fn build_enforcing_required_and_enum_traits(
|
1115 - | self,
|
1116 - | ) -> crate::input::EscapedStringValuesInput {
|
1117 - | crate::input::EscapedStringValuesInput {
|
1118 - | r#enum: self.r#enum,
|
1119 - | some_string: self.some_string,
|
1120 - | }
|
1048 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::MapWithEnumKeyOpInput {
|
1049 + | crate::input::MapWithEnumKeyOpInput { map: self.map }
|
1121 1050 | }
|
1122 1051 | }
|
1123 1052 | }
|
1124 1053 | /// See [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
|
1125 1054 | pub(crate) mod primitive_int_op_input_internal {
|
1126 1055 |
|
1127 1056 | impl ::std::convert::From<Builder> for crate::input::PrimitiveIntOpInput {
|
1128 1057 | fn from(builder: Builder) -> Self {
|
1129 1058 | builder.build()
|
1130 1059 | }
|
1174 1103 | pub fn build(self) -> crate::input::PrimitiveIntOpInput {
|
1175 1104 | self.build_enforcing_required_and_enum_traits()
|
1176 1105 | }
|
1177 1106 | fn build_enforcing_required_and_enum_traits(self) -> crate::input::PrimitiveIntOpInput {
|
1178 1107 | crate::input::PrimitiveIntOpInput {
|
1179 1108 | value: self.value.unwrap_or(0i32),
|
1180 1109 | }
|
1181 1110 | }
|
1182 1111 | }
|
1183 1112 | }
|
1184 - | /// See [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1185 - | pub(crate) mod map_with_enum_key_op_input_internal {
|
1113 + | /// See [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1114 + | pub(crate) mod escaped_string_values_input_internal {
|
1186 1115 |
|
1187 1116 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1188 1117 | /// Holds one variant for each of the ways the builder can fail.
|
1189 1118 | #[non_exhaustive]
|
1190 1119 | #[allow(clippy::enum_variant_names)]
|
1191 1120 | pub(crate) enum ConstraintViolation {
|
1192 - | /// Constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`.
|
1121 + | /// Constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`.
|
1193 1122 | #[doc(hidden)]
|
1194 - | Map(crate::model::map_with_enum_key_internal::ConstraintViolation),
|
1123 + | Enum(crate::model::enum_with_escaped_chars_internal::ConstraintViolation),
|
1195 1124 | }
|
1196 1125 | impl ::std::fmt::Display for ConstraintViolation {
|
1197 1126 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1198 1127 | match self {
|
1199 - | ConstraintViolation::Map(_) => write!(f, "constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`"),
|
1128 + | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`"),
|
1200 1129 | }
|
1201 1130 | }
|
1202 1131 | }
|
1203 1132 | impl ::std::error::Error for ConstraintViolation {}
|
1204 1133 | impl ConstraintViolation {
|
1205 1134 | pub(crate) fn as_validation_exception_field(
|
1206 1135 | self,
|
1207 1136 | path: ::std::string::String,
|
1208 1137 | ) -> crate::model::ValidationExceptionField {
|
1209 1138 | match self {
|
1210 - | ConstraintViolation::Map(inner) => {
|
1211 - | inner.as_validation_exception_field(path + "/map")
|
1139 + | ConstraintViolation::Enum(inner) => {
|
1140 + | inner.as_validation_exception_field(path + "/enum")
|
1212 1141 | }
|
1213 1142 | }
|
1214 1143 | }
|
1215 1144 | }
|
1216 1145 | impl ::std::convert::From<ConstraintViolation>
|
1217 1146 | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1218 1147 | {
|
1219 1148 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1220 1149 | let first_validation_exception_field =
|
1221 1150 | constraint_violation.as_validation_exception_field("".to_owned());
|
1222 1151 | let validation_exception = crate::error::ValidationException {
|
1223 1152 | message: format!(
|
1224 1153 | "1 validation error detected. {}",
|
1225 1154 | &first_validation_exception_field.message
|
1226 1155 | ),
|
1227 1156 | field_list: Some(vec![first_validation_exception_field]),
|
1228 1157 | };
|
1229 1158 | Self::ConstraintViolation(
|
1230 1159 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1231 1160 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1232 1161 | )
|
1233 1162 | }
|
1234 1163 | }
|
1235 1164 | impl ::std::convert::From<Builder>
|
1236 - | for crate::constrained::MaybeConstrained<crate::input::MapWithEnumKeyOpInput>
|
1165 + | for crate::constrained::MaybeConstrained<crate::input::EscapedStringValuesInput>
|
1237 1166 | {
|
1238 1167 | fn from(builder: Builder) -> Self {
|
1239 1168 | Self::Unconstrained(builder)
|
1240 1169 | }
|
1241 1170 | }
|
1242 - | impl ::std::convert::TryFrom<Builder> for crate::input::MapWithEnumKeyOpInput {
|
1171 + | impl ::std::convert::TryFrom<Builder> for crate::input::EscapedStringValuesInput {
|
1243 1172 | type Error = ConstraintViolation;
|
1244 1173 |
|
1245 1174 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1246 1175 | builder.build()
|
1247 1176 | }
|
1248 1177 | }
|
1249 - | /// A builder for [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1178 + | /// A builder for [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1250 1179 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1251 1180 | pub(crate) struct Builder {
|
1252 - | pub(crate) map: ::std::option::Option<
|
1253 - | crate::constrained::MaybeConstrained<
|
1254 - | crate::constrained::map_with_enum_key_constrained::MapWithEnumKeyConstrained,
|
1255 - | >,
|
1181 + | pub(crate) r#enum: ::std::option::Option<
|
1182 + | crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
|
1256 1183 | >,
|
1184 + | pub(crate) some_string: ::std::option::Option<::std::string::String>,
|
1257 1185 | }
|
1258 1186 | impl Builder {
|
1259 1187 | #[allow(missing_docs)] // documentation missing in model
|
1260 - | pub(crate) fn set_map(
|
1188 + | pub(crate) fn set_enum(
|
1261 1189 | mut self,
|
1262 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_with_enum_key_constrained::MapWithEnumKeyConstrained>>>,
|
1190 + | input: Option<
|
1191 + | impl ::std::convert::Into<
|
1192 + | crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
|
1193 + | >,
|
1194 + | >,
|
1263 1195 | ) -> Self {
|
1264 - | self.map = input.map(|v| v.into());
|
1196 + | self.r#enum = input.map(|v| v.into());
|
1265 1197 | self
|
1266 1198 | }
|
1267 - | /// Consumes the builder and constructs a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1199 + | #[allow(missing_docs)] // documentation missing in model
|
1200 + | pub(crate) fn set_some_string(
|
1201 + | mut self,
|
1202 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1203 + | ) -> Self {
|
1204 + | self.some_string = input.map(|v| v.into());
|
1205 + | self
|
1206 + | }
|
1207 + | /// Consumes the builder and constructs a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1268 1208 | ///
|
1269 - | /// The builder fails to construct a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput) if a [`ConstraintViolation`] occurs.
|
1209 + | /// The builder fails to construct a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput) if a [`ConstraintViolation`] occurs.
|
1270 1210 | ///
|
1271 - | pub fn build(self) -> Result<crate::input::MapWithEnumKeyOpInput, ConstraintViolation> {
|
1211 + | pub fn build(self) -> Result<crate::input::EscapedStringValuesInput, ConstraintViolation> {
|
1272 1212 | self.build_enforcing_all_constraints()
|
1273 1213 | }
|
1274 1214 | fn build_enforcing_all_constraints(
|
1275 1215 | self,
|
1276 - | ) -> Result<crate::input::MapWithEnumKeyOpInput, ConstraintViolation> {
|
1277 - | Ok(crate::input::MapWithEnumKeyOpInput {
|
1278 - | map: self
|
1279 - | .map
|
1216 + | ) -> Result<crate::input::EscapedStringValuesInput, ConstraintViolation> {
|
1217 + | Ok(crate::input::EscapedStringValuesInput {
|
1218 + | r#enum: self
|
1219 + | .r#enum
|
1280 1220 | .map(|v| match v {
|
1281 1221 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1282 1222 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1283 1223 | })
|
1284 - | .map(|res| res.map(|v| v.into()).map_err(ConstraintViolation::Map))
|
1224 + | .map(|res| res.map_err(ConstraintViolation::Enum))
|
1285 1225 | .transpose()?,
|
1226 + | some_string: self.some_string,
|
1286 1227 | })
|
1287 1228 | }
|
1288 1229 | }
|
1289 1230 | }
|
1290 - | /// See [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1291 - | pub mod map_with_enum_key_op_input {
|
1231 + | /// See [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1232 + | pub mod escaped_string_values_input {
|
1292 1233 |
|
1293 - | impl ::std::convert::From<Builder> for crate::input::MapWithEnumKeyOpInput {
|
1234 + | impl ::std::convert::From<Builder> for crate::input::EscapedStringValuesInput {
|
1294 1235 | fn from(builder: Builder) -> Self {
|
1295 1236 | builder.build()
|
1296 1237 | }
|
1297 1238 | }
|
1298 - | /// A builder for [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1239 + | /// A builder for [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1299 1240 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1300 1241 | pub struct Builder {
|
1301 - | pub(crate) map: ::std::option::Option<
|
1302 - | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
1303 - | >,
|
1242 + | pub(crate) r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
1243 + | pub(crate) some_string: ::std::option::Option<::std::string::String>,
|
1304 1244 | }
|
1305 1245 | impl Builder {
|
1306 1246 | #[allow(missing_docs)] // documentation missing in model
|
1307 - | pub fn map(
|
1247 + | pub fn r#enum(
|
1308 1248 | mut self,
|
1309 - | input: ::std::option::Option<
|
1310 - | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
1311 - | >,
|
1249 + | input: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
1312 1250 | ) -> Self {
|
1313 - | self.map = input;
|
1251 + | self.r#enum = input;
|
1314 1252 | self
|
1315 1253 | }
|
1316 - | /// Consumes the builder and constructs a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
1317 - | pub fn build(self) -> crate::input::MapWithEnumKeyOpInput {
|
1318 - | self.build_enforcing_required_and_enum_traits()
|
1319 - | }
|
1320 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::MapWithEnumKeyOpInput {
|
1321 - | crate::input::MapWithEnumKeyOpInput { map: self.map }
|
1322 - | }
|
1323 - | }
|
1324 - | }
|
1325 - | /// See [`StatusResponseInput`](crate::input::StatusResponseInput).
|
1326 - | pub(crate) mod status_response_input_internal {
|
1327 - |
|
1328 - | impl ::std::convert::From<Builder> for crate::input::StatusResponseInput {
|
1329 - | fn from(builder: Builder) -> Self {
|
1330 - | builder.build()
|
1254 + | #[allow(missing_docs)] // documentation missing in model
|
1255 + | pub fn some_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1256 + | self.some_string = input;
|
1257 + | self
|
1331 1258 | }
|
1259 + | /// Consumes the builder and constructs a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
1260 + | pub fn build(self) -> crate::input::EscapedStringValuesInput {
|
1261 + | self.build_enforcing_required_and_enum_traits()
|
1332 1262 | }
|
1333 - | /// A builder for [`StatusResponseInput`](crate::input::StatusResponseInput).
|
1334 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1335 - | pub(crate) struct Builder {}
|
1336 - | impl Builder {
|
1337 - | /// Consumes the builder and constructs a [`StatusResponseInput`](crate::input::StatusResponseInput).
|
1338 - | pub fn build(self) -> crate::input::StatusResponseInput {
|
1339 - | self.build_enforcing_all_constraints()
|
1263 + | fn build_enforcing_required_and_enum_traits(
|
1264 + | self,
|
1265 + | ) -> crate::input::EscapedStringValuesInput {
|
1266 + | crate::input::EscapedStringValuesInput {
|
1267 + | r#enum: self.r#enum,
|
1268 + | some_string: self.some_string,
|
1340 1269 | }
|
1341 - | fn build_enforcing_all_constraints(self) -> crate::input::StatusResponseInput {
|
1342 - | crate::input::StatusResponseInput {}
|
1343 1270 | }
|
1344 1271 | }
|
1345 1272 | }
|
1346 - | /// See [`StatusResponseInput`](crate::input::StatusResponseInput).
|
1347 - | pub mod status_response_input {
|
1273 + | /// See [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
1274 + | pub(crate) mod null_in_non_sparse_input_internal {
|
1348 1275 |
|
1349 - | impl ::std::convert::From<Builder> for crate::input::StatusResponseInput {
|
1276 + | impl ::std::convert::From<Builder> for crate::input::NullInNonSparseInput {
|
1350 1277 | fn from(builder: Builder) -> Self {
|
1351 1278 | builder.build()
|
1352 1279 | }
|
1353 1280 | }
|
1354 - | /// A builder for [`StatusResponseInput`](crate::input::StatusResponseInput).
|
1281 + | /// A builder for [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
1355 1282 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1356 - | pub struct Builder {}
|
1283 + | pub(crate) struct Builder {}
|
1357 1284 | impl Builder {
|
1358 - | /// Consumes the builder and constructs a [`StatusResponseInput`](crate::input::StatusResponseInput).
|
1359 - | pub fn build(self) -> crate::input::StatusResponseInput {
|
1360 - | self.build_enforcing_required_and_enum_traits()
|
1361 - | }
|
1362 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::StatusResponseInput {
|
1363 - | crate::input::StatusResponseInput {}
|
1364 - | }
|
1365 - | }
|
1366 - | }
|
1367 - | /// See [`EnumQueryInput`](crate::input::EnumQueryInput).
|
1368 - | pub(crate) mod enum_query_input_internal {
|
1369 - |
|
1370 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1371 - | /// Holds one variant for each of the ways the builder can fail.
|
1372 - | #[non_exhaustive]
|
1373 - | #[allow(clippy::enum_variant_names)]
|
1374 - | pub(crate) enum ConstraintViolation {
|
1375 - | /// `r#enum` was not provided but it is required when building `EnumQueryInput`.
|
1376 - | MissingEnum,
|
1377 - | /// Constraint violation occurred building member `r#enum` when building `EnumQueryInput`.
|
1378 - | #[doc(hidden)]
|
1379 - | Enum(crate::model::string_enum_internal::ConstraintViolation),
|
1380 - | }
|
1381 - | impl ::std::fmt::Display for ConstraintViolation {
|
1382 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1383 - | match self {
|
1384 - | ConstraintViolation::MissingEnum => write!(f, "`r#enum` was not provided but it is required when building `EnumQueryInput`"),
|
1385 - | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EnumQueryInput`"),
|
1386 - | }
|
1387 - | }
|
1388 - | }
|
1389 - | impl ::std::error::Error for ConstraintViolation {}
|
1390 - | impl ConstraintViolation {
|
1391 - | pub(crate) fn as_validation_exception_field(
|
1392 - | self,
|
1393 - | path: ::std::string::String,
|
1394 - | ) -> crate::model::ValidationExceptionField {
|
1395 - | match self {
|
1396 - | ConstraintViolation::MissingEnum => crate::model::ValidationExceptionField {
|
1397 - | message: format!(
|
1398 - | "Value at '{}/enum' failed to satisfy constraint: Member must not be null",
|
1399 - | path
|
1400 - | ),
|
1401 - | path: path + "/enum",
|
1402 - | },
|
1403 - | ConstraintViolation::Enum(inner) => {
|
1404 - | inner.as_validation_exception_field(path + "/enum")
|
1285 + | /// Consumes the builder and constructs a [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
1286 + | pub fn build(self) -> crate::input::NullInNonSparseInput {
|
1287 + | self.build_enforcing_all_constraints()
|
1405 1288 | }
|
1289 + | fn build_enforcing_all_constraints(self) -> crate::input::NullInNonSparseInput {
|
1290 + | crate::input::NullInNonSparseInput {}
|
1406 1291 | }
|
1407 1292 | }
|
1293 + | }
|
1294 + | /// See [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
1295 + | pub mod null_in_non_sparse_input {
|
1296 + |
|
1297 + | impl ::std::convert::From<Builder> for crate::input::NullInNonSparseInput {
|
1298 + | fn from(builder: Builder) -> Self {
|
1299 + | builder.build()
|
1408 1300 | }
|
1409 - | impl ::std::convert::From<ConstraintViolation>
|
1410 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1411 - | {
|
1412 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1413 - | let first_validation_exception_field =
|
1414 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1415 - | let validation_exception = crate::error::ValidationException {
|
1416 - | message: format!(
|
1417 - | "1 validation error detected. {}",
|
1418 - | &first_validation_exception_field.message
|
1419 - | ),
|
1420 - | field_list: Some(vec![first_validation_exception_field]),
|
1421 - | };
|
1422 - | Self::ConstraintViolation(
|
1423 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1424 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1425 - | )
|
1426 1301 | }
|
1302 + | /// A builder for [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
1303 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1304 + | pub struct Builder {}
|
1305 + | impl Builder {
|
1306 + | /// Consumes the builder and constructs a [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
1307 + | pub fn build(self) -> crate::input::NullInNonSparseInput {
|
1308 + | self.build_enforcing_required_and_enum_traits()
|
1427 1309 | }
|
1428 - | impl ::std::convert::From<Builder>
|
1429 - | for crate::constrained::MaybeConstrained<crate::input::EnumQueryInput>
|
1430 - | {
|
1431 - | fn from(builder: Builder) -> Self {
|
1432 - | Self::Unconstrained(builder)
|
1310 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::NullInNonSparseInput {
|
1311 + | crate::input::NullInNonSparseInput {}
|
1433 1312 | }
|
1434 1313 | }
|
1435 - | impl ::std::convert::TryFrom<Builder> for crate::input::EnumQueryInput {
|
1436 - | type Error = ConstraintViolation;
|
1314 + | }
|
1315 + | /// See [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
1316 + | pub(crate) mod case_insensitive_error_operation_input_internal {
|
1437 1317 |
|
1438 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1318 + | impl ::std::convert::From<Builder> for crate::input::CaseInsensitiveErrorOperationInput {
|
1319 + | fn from(builder: Builder) -> Self {
|
1439 1320 | builder.build()
|
1440 1321 | }
|
1441 1322 | }
|
1442 - | /// A builder for [`EnumQueryInput`](crate::input::EnumQueryInput).
|
1323 + | /// A builder for [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
1443 1324 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1444 - | pub(crate) struct Builder {
|
1445 - | pub(crate) r#enum:
|
1446 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::StringEnum>>,
|
1447 - | }
|
1325 + | pub(crate) struct Builder {}
|
1448 1326 | impl Builder {
|
1449 - | #[allow(missing_docs)] // documentation missing in model
|
1450 - | pub(crate) fn set_enum(
|
1451 - | mut self,
|
1452 - | input: impl ::std::convert::Into<
|
1453 - | crate::constrained::MaybeConstrained<crate::model::StringEnum>,
|
1454 - | >,
|
1455 - | ) -> Self {
|
1456 - | self.r#enum = Some(input.into());
|
1457 - | self
|
1458 - | }
|
1459 - | /// Consumes the builder and constructs a [`EnumQueryInput`](crate::input::EnumQueryInput).
|
1460 - | ///
|
1461 - | /// The builder fails to construct a [`EnumQueryInput`](crate::input::EnumQueryInput) if a [`ConstraintViolation`] occurs.
|
1462 - | ///
|
1463 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1464 - | pub fn build(self) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
1327 + | /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
1328 + | pub fn build(self) -> crate::input::CaseInsensitiveErrorOperationInput {
|
1465 1329 | self.build_enforcing_all_constraints()
|
1466 1330 | }
|
1467 1331 | fn build_enforcing_all_constraints(
|
1468 1332 | self,
|
1469 - | ) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
1470 - | Ok(crate::input::EnumQueryInput {
|
1471 - | r#enum: self
|
1472 - | .r#enum
|
1473 - | .map(|v| match v {
|
1474 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1475 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1476 - | })
|
1477 - | .map(|res| res.map_err(ConstraintViolation::Enum))
|
1478 - | .transpose()?
|
1479 - | .ok_or(ConstraintViolation::MissingEnum)?,
|
1480 - | })
|
1333 + | ) -> crate::input::CaseInsensitiveErrorOperationInput {
|
1334 + | crate::input::CaseInsensitiveErrorOperationInput {}
|
1481 1335 | }
|
1482 1336 | }
|
1483 1337 | }
|
1484 - | /// See [`EnumQueryInput`](crate::input::EnumQueryInput).
|
1485 - | pub mod enum_query_input {
|
1486 - |
|
1487 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1488 - | /// Holds one variant for each of the ways the builder can fail.
|
1489 - | #[allow(clippy::enum_variant_names)]
|
1490 - | pub enum ConstraintViolation {
|
1491 - | /// `r#enum` was not provided but it is required when building `EnumQueryInput`.
|
1492 - | MissingEnum,
|
1493 - | }
|
1494 - | impl ::std::fmt::Display for ConstraintViolation {
|
1495 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1496 - | match self {
|
1497 - | ConstraintViolation::MissingEnum => write!(
|
1498 - | f,
|
1499 - | "`r#enum` was not provided but it is required when building `EnumQueryInput`"
|
1500 - | ),
|
1501 - | }
|
1502 - | }
|
1503 - | }
|
1504 - | impl ::std::error::Error for ConstraintViolation {}
|
1505 - | impl ::std::convert::TryFrom<Builder> for crate::input::EnumQueryInput {
|
1506 - | type Error = ConstraintViolation;
|
1338 + | /// See [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
1339 + | pub mod case_insensitive_error_operation_input {
|
1507 1340 |
|
1508 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1341 + | impl ::std::convert::From<Builder> for crate::input::CaseInsensitiveErrorOperationInput {
|
1342 + | fn from(builder: Builder) -> Self {
|
1509 1343 | builder.build()
|
1510 1344 | }
|
1511 1345 | }
|
1512 - | /// A builder for [`EnumQueryInput`](crate::input::EnumQueryInput).
|
1346 + | /// A builder for [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
1513 1347 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1514 - | pub struct Builder {
|
1515 - | pub(crate) r#enum: ::std::option::Option<crate::model::StringEnum>,
|
1516 - | }
|
1348 + | pub struct Builder {}
|
1517 1349 | impl Builder {
|
1518 - | #[allow(missing_docs)] // documentation missing in model
|
1519 - | pub fn r#enum(mut self, input: crate::model::StringEnum) -> Self {
|
1520 - | self.r#enum = Some(input);
|
1521 - | self
|
1522 - | }
|
1523 - | /// Consumes the builder and constructs a [`EnumQueryInput`](crate::input::EnumQueryInput).
|
1524 - | ///
|
1525 - | /// The builder fails to construct a [`EnumQueryInput`](crate::input::EnumQueryInput) if you do not provide a value for all non-`Option`al members.
|
1526 - | ///
|
1527 - | pub fn build(self) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
1350 + | /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
1351 + | pub fn build(self) -> crate::input::CaseInsensitiveErrorOperationInput {
|
1528 1352 | self.build_enforcing_required_and_enum_traits()
|
1529 1353 | }
|
1530 1354 | fn build_enforcing_required_and_enum_traits(
|
1531 1355 | self,
|
1532 - | ) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
1533 - | Ok(crate::input::EnumQueryInput {
|
1534 - | r#enum: self.r#enum.ok_or(ConstraintViolation::MissingEnum)?,
|
1535 - | })
|
1356 + | ) -> crate::input::CaseInsensitiveErrorOperationInput {
|
1357 + | crate::input::CaseInsensitiveErrorOperationInput {}
|
1536 1358 | }
|
1537 1359 | }
|
1538 1360 | }
|
1539 - | /// See [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
1540 - | pub(crate) mod primitive_int_header_input_internal {
|
1361 + | /// See [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
1362 + | pub(crate) mod empty_struct_with_content_on_wire_op_input_internal {
|
1541 1363 |
|
1542 - | impl ::std::convert::From<Builder> for crate::input::PrimitiveIntHeaderInput {
|
1364 + | impl ::std::convert::From<Builder> for crate::input::EmptyStructWithContentOnWireOpInput {
|
1543 1365 | fn from(builder: Builder) -> Self {
|
1544 1366 | builder.build()
|
1545 1367 | }
|
1546 1368 | }
|
1547 - | /// A builder for [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
1369 + | /// A builder for [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
1548 1370 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1549 1371 | pub(crate) struct Builder {}
|
1550 1372 | impl Builder {
|
1551 - | /// Consumes the builder and constructs a [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
1552 - | pub fn build(self) -> crate::input::PrimitiveIntHeaderInput {
|
1373 + | /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
1374 + | pub fn build(self) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
1553 1375 | self.build_enforcing_all_constraints()
|
1554 1376 | }
|
1555 - | fn build_enforcing_all_constraints(self) -> crate::input::PrimitiveIntHeaderInput {
|
1556 - | crate::input::PrimitiveIntHeaderInput {}
|
1377 + | fn build_enforcing_all_constraints(
|
1378 + | self,
|
1379 + | ) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
1380 + | crate::input::EmptyStructWithContentOnWireOpInput {}
|
1557 1381 | }
|
1558 1382 | }
|
1559 1383 | }
|
1560 - | /// See [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
1561 - | pub mod primitive_int_header_input {
|
1384 + | /// See [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
1385 + | pub mod empty_struct_with_content_on_wire_op_input {
|
1562 1386 |
|
1563 - | impl ::std::convert::From<Builder> for crate::input::PrimitiveIntHeaderInput {
|
1387 + | impl ::std::convert::From<Builder> for crate::input::EmptyStructWithContentOnWireOpInput {
|
1564 1388 | fn from(builder: Builder) -> Self {
|
1565 1389 | builder.build()
|
1566 1390 | }
|
1567 1391 | }
|
1568 - | /// A builder for [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
1392 + | /// A builder for [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
1569 1393 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1570 1394 | pub struct Builder {}
|
1571 1395 | impl Builder {
|
1572 - | /// Consumes the builder and constructs a [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
1573 - | pub fn build(self) -> crate::input::PrimitiveIntHeaderInput {
|
1396 + | /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
1397 + | pub fn build(self) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
1574 1398 | self.build_enforcing_required_and_enum_traits()
|
1575 1399 | }
|
1576 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::PrimitiveIntHeaderInput {
|
1577 - | crate::input::PrimitiveIntHeaderInput {}
|
1400 + | fn build_enforcing_required_and_enum_traits(
|
1401 + | self,
|
1402 + | ) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
1403 + | crate::input::EmptyStructWithContentOnWireOpInput {}
|
1578 1404 | }
|
1579 1405 | }
|
1580 1406 | }
|
1581 - | /// See [`StringPayloadInput`](crate::input::StringPayloadInput).
|
1582 - | pub(crate) mod string_payload_input_internal {
|
1407 + | /// See [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
1408 + | pub(crate) mod query_precedence_input_internal {
|
1583 1409 |
|
1584 - | impl ::std::convert::From<Builder> for crate::input::StringPayloadInput {
|
1410 + | impl ::std::convert::From<Builder> for crate::input::QueryPrecedenceInput {
|
1585 1411 | fn from(builder: Builder) -> Self {
|
1586 1412 | builder.build()
|
1587 1413 | }
|
1588 1414 | }
|
1589 - | /// A builder for [`StringPayloadInput`](crate::input::StringPayloadInput).
|
1415 + | /// A builder for [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
1590 1416 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1591 1417 | pub(crate) struct Builder {
|
1592 - | pub(crate) payload: ::std::option::Option<::std::string::String>,
|
1418 + | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
1419 + | pub(crate) baz: ::std::option::Option<
|
1420 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1421 + | >,
|
1593 1422 | }
|
1594 1423 | impl Builder {
|
1595 1424 | #[allow(missing_docs)] // documentation missing in model
|
1596 - | pub(crate) fn set_payload(
|
1425 + | pub(crate) fn set_foo(
|
1597 1426 | mut self,
|
1598 1427 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1599 1428 | ) -> Self {
|
1600 - | self.payload = input.map(|v| v.into());
|
1429 + | self.foo = input.map(|v| v.into());
|
1601 1430 | self
|
1602 1431 | }
|
1603 - | /// Consumes the builder and constructs a [`StringPayloadInput`](crate::input::StringPayloadInput).
|
1604 - | pub fn build(self) -> crate::input::StringPayloadInput {
|
1432 + | #[allow(missing_docs)] // documentation missing in model
|
1433 + | pub(crate) fn set_baz(
|
1434 + | mut self,
|
1435 + | input: Option<
|
1436 + | impl ::std::convert::Into<
|
1437 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1438 + | >,
|
1439 + | >,
|
1440 + | ) -> Self {
|
1441 + | self.baz = input.map(|v| v.into());
|
1442 + | self
|
1443 + | }
|
1444 + | /// Consumes the builder and constructs a [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
1445 + | pub fn build(self) -> crate::input::QueryPrecedenceInput {
|
1605 1446 | self.build_enforcing_all_constraints()
|
1606 1447 | }
|
1607 - | fn build_enforcing_all_constraints(self) -> crate::input::StringPayloadInput {
|
1608 - | crate::input::StringPayloadInput {
|
1609 - | payload: self.payload,
|
1448 + | fn build_enforcing_all_constraints(self) -> crate::input::QueryPrecedenceInput {
|
1449 + | crate::input::QueryPrecedenceInput {
|
1450 + | foo: self.foo,
|
1451 + | baz: self.baz,
|
1610 1452 | }
|
1611 1453 | }
|
1612 1454 | }
|
1613 1455 | }
|
1614 - | /// See [`StringPayloadInput`](crate::input::StringPayloadInput).
|
1615 - | pub mod string_payload_input {
|
1456 + | /// See [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
1457 + | pub mod query_precedence_input {
|
1616 1458 |
|
1617 - | impl ::std::convert::From<Builder> for crate::input::StringPayloadInput {
|
1459 + | impl ::std::convert::From<Builder> for crate::input::QueryPrecedenceInput {
|
1618 1460 | fn from(builder: Builder) -> Self {
|
1619 1461 | builder.build()
|
1620 1462 | }
|
1621 1463 | }
|
1622 - | /// A builder for [`StringPayloadInput`](crate::input::StringPayloadInput).
|
1464 + | /// A builder for [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
1623 1465 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1624 1466 | pub struct Builder {
|
1625 - | pub(crate) payload: ::std::option::Option<::std::string::String>,
|
1467 + | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
1468 + | pub(crate) baz: ::std::option::Option<
|
1469 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1470 + | >,
|
1626 1471 | }
|
1627 1472 | impl Builder {
|
1628 1473 | #[allow(missing_docs)] // documentation missing in model
|
1629 - | pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1630 - | self.payload = input;
|
1474 + | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1475 + | self.foo = input;
|
1631 1476 | self
|
1632 1477 | }
|
1633 - | /// Consumes the builder and constructs a [`StringPayloadInput`](crate::input::StringPayloadInput).
|
1634 - | pub fn build(self) -> crate::input::StringPayloadInput {
|
1478 + | #[allow(missing_docs)] // documentation missing in model
|
1479 + | pub fn baz(
|
1480 + | mut self,
|
1481 + | input: ::std::option::Option<
|
1482 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1483 + | >,
|
1484 + | ) -> Self {
|
1485 + | self.baz = input;
|
1486 + | self
|
1487 + | }
|
1488 + | /// Consumes the builder and constructs a [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
1489 + | pub fn build(self) -> crate::input::QueryPrecedenceInput {
|
1635 1490 | self.build_enforcing_required_and_enum_traits()
|
1636 1491 | }
|
1637 - | fn build_enforcing_required_and_enum_traits(self) -> crate::input::StringPayloadInput {
|
1638 - | crate::input::StringPayloadInput {
|
1639 - | payload: self.payload,
|
1492 + | fn build_enforcing_required_and_enum_traits(self) -> crate::input::QueryPrecedenceInput {
|
1493 + | crate::input::QueryPrecedenceInput {
|
1494 + | foo: self.foo,
|
1495 + | baz: self.baz,
|
1640 1496 | }
|
1641 1497 | }
|
1642 1498 | }
|
1643 1499 | }
|