1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | #[allow(missing_docs)] // documentation missing in model
|
3 - | #[derive(
|
4 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
5 - | )]
|
6 - | pub struct ResponseCodeDefaultOperationInput {}
|
7 - | impl ResponseCodeDefaultOperationInput {
|
8 - | /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
|
9 - | pub fn builder() -> crate::input::response_code_default_operation_input::Builder {
|
10 - | crate::input::response_code_default_operation_input::Builder::default()
|
11 - | }
|
3 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4 + | pub struct TypeComplexityOperationInput {
|
5 + | #[allow(missing_docs)] // documentation missing in model
|
6 + | pub list: ::std::option::Option<
|
7 + | ::std::vec::Vec<
|
8 + | ::std::vec::Vec<
|
9 + | ::std::vec::Vec<
|
10 + | ::std::collections::HashMap<
|
11 + | ::std::string::String,
|
12 + | crate::model::EmptyStructure,
|
13 + | >,
|
14 + | >,
|
15 + | >,
|
16 + | >,
|
17 + | >,
|
12 18 | }
|
13 - | impl crate::constrained::Constrained for crate::input::ResponseCodeDefaultOperationInput {
|
14 - | type Unconstrained = crate::input::response_code_default_operation_input::Builder;
|
19 + | impl TypeComplexityOperationInput {
|
20 + | #[allow(missing_docs)] // documentation missing in model
|
21 + | pub fn list(
|
22 + | &self,
|
23 + | ) -> ::std::option::Option<
|
24 + | &[::std::vec::Vec<
|
25 + | ::std::vec::Vec<
|
26 + | ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
|
27 + | >,
|
28 + | >],
|
29 + | > {
|
30 + | self.list.as_deref()
|
31 + | }
|
15 32 | }
|
16 - |
|
17 - | #[allow(missing_docs)] // documentation missing in model
|
18 - | #[derive(
|
19 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
20 - | )]
|
21 - | pub struct ResponseCodeHttpFallbackOperationInput {}
|
22 - | impl ResponseCodeHttpFallbackOperationInput {
|
23 - | /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
|
24 - | pub fn builder() -> crate::input::response_code_http_fallback_operation_input::Builder {
|
25 - | crate::input::response_code_http_fallback_operation_input::Builder::default()
|
33 + | impl TypeComplexityOperationInput {
|
34 + | /// Creates a new builder-style object to manufacture [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
|
35 + | pub fn builder() -> crate::input::type_complexity_operation_input::Builder {
|
36 + | crate::input::type_complexity_operation_input::Builder::default()
|
26 37 | }
|
27 38 | }
|
28 - | impl crate::constrained::Constrained for crate::input::ResponseCodeHttpFallbackOperationInput {
|
29 - | type Unconstrained = crate::input::response_code_http_fallback_operation_input::Builder;
|
39 + | impl crate::constrained::Constrained for crate::input::TypeComplexityOperationInput {
|
40 + | type Unconstrained = crate::input::type_complexity_operation_input::Builder;
|
30 41 | }
|
31 42 |
|
32 43 | #[allow(missing_docs)] // documentation missing in model
|
33 - | #[derive(
|
34 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
35 - | )]
|
36 - | pub struct ResponseCodeRequiredOperationInput {}
|
37 - | impl ResponseCodeRequiredOperationInput {
|
38 - | /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
|
39 - | pub fn builder() -> crate::input::response_code_required_operation_input::Builder {
|
40 - | crate::input::response_code_required_operation_input::Builder::default()
|
44 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
45 + | pub struct RequiredInnerShapeOperationInput {
|
46 + | #[allow(missing_docs)] // documentation missing in model
|
47 + | pub inner: ::std::option::Option<crate::model::InnerShape>,
|
48 + | }
|
49 + | impl RequiredInnerShapeOperationInput {
|
50 + | #[allow(missing_docs)] // documentation missing in model
|
51 + | pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
|
52 + | self.inner.as_ref()
|
41 53 | }
|
42 54 | }
|
43 - | impl crate::constrained::Constrained for crate::input::ResponseCodeRequiredOperationInput {
|
44 - | type Unconstrained = crate::input::response_code_required_operation_input::Builder;
|
55 + | impl RequiredInnerShapeOperationInput {
|
56 + | /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
|
57 + | pub fn builder() -> crate::input::required_inner_shape_operation_input::Builder {
|
58 + | crate::input::required_inner_shape_operation_input::Builder::default()
|
59 + | }
|
60 + | }
|
61 + | impl crate::constrained::Constrained for crate::input::RequiredInnerShapeOperationInput {
|
62 + | type Unconstrained = crate::input::required_inner_shape_operation_input::Builder;
|
45 63 | }
|
46 64 |
|
47 65 | #[allow(missing_docs)] // documentation missing in model
|
48 66 | #[derive(
|
49 67 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
50 68 | )]
|
51 69 | pub struct RequiredHeaderCollectionOperationInput {
|
52 70 | #[allow(missing_docs)] // documentation missing in model
|
53 71 | pub required_header_list: ::std::vec::Vec<::std::string::String>,
|
54 72 | #[allow(missing_docs)] // documentation missing in model
|
55 73 | pub required_header_set: crate::model::HeaderSet,
|
56 74 | }
|
57 75 | impl RequiredHeaderCollectionOperationInput {
|
58 76 | #[allow(missing_docs)] // documentation missing in model
|
59 77 | pub fn required_header_list(&self) -> &[::std::string::String] {
|
60 78 | use std::ops::Deref;
|
61 79 | self.required_header_list.deref()
|
62 80 | }
|
63 81 | #[allow(missing_docs)] // documentation missing in model
|
64 82 | pub fn required_header_set(&self) -> &crate::model::HeaderSet {
|
65 83 | &self.required_header_set
|
66 84 | }
|
67 85 | }
|
68 86 | impl RequiredHeaderCollectionOperationInput {
|
69 87 | /// Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
|
70 88 | pub fn builder() -> crate::input::required_header_collection_operation_input::Builder {
|
71 89 | crate::input::required_header_collection_operation_input::Builder::default()
|
72 90 | }
|
73 91 | }
|
74 92 | impl crate::constrained::Constrained for crate::input::RequiredHeaderCollectionOperationInput {
|
75 93 | type Unconstrained = crate::input::required_header_collection_operation_input::Builder;
|
76 94 | }
|
77 95 |
|
78 96 | #[allow(missing_docs)] // documentation missing in model
|
79 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
80 - | pub struct RequiredInnerShapeOperationInput {
|
81 - | #[allow(missing_docs)] // documentation missing in model
|
82 - | pub inner: ::std::option::Option<crate::model::InnerShape>,
|
83 - | }
|
84 - | impl RequiredInnerShapeOperationInput {
|
85 - | #[allow(missing_docs)] // documentation missing in model
|
86 - | pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
|
87 - | self.inner.as_ref()
|
88 - | }
|
89 - | }
|
90 - | impl RequiredInnerShapeOperationInput {
|
91 - | /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
|
92 - | pub fn builder() -> crate::input::required_inner_shape_operation_input::Builder {
|
93 - | crate::input::required_inner_shape_operation_input::Builder::default()
|
97 + | #[derive(
|
98 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
99 + | )]
|
100 + | pub struct ResponseCodeRequiredOperationInput {}
|
101 + | impl ResponseCodeRequiredOperationInput {
|
102 + | /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
|
103 + | pub fn builder() -> crate::input::response_code_required_operation_input::Builder {
|
104 + | crate::input::response_code_required_operation_input::Builder::default()
|
94 105 | }
|
95 106 | }
|
96 - | impl crate::constrained::Constrained for crate::input::RequiredInnerShapeOperationInput {
|
97 - | type Unconstrained = crate::input::required_inner_shape_operation_input::Builder;
|
107 + | impl crate::constrained::Constrained for crate::input::ResponseCodeRequiredOperationInput {
|
108 + | type Unconstrained = crate::input::response_code_required_operation_input::Builder;
|
98 109 | }
|
99 110 |
|
100 111 | #[allow(missing_docs)] // documentation missing in model
|
101 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
102 - | pub struct TypeComplexityOperationInput {
|
103 - | #[allow(missing_docs)] // documentation missing in model
|
104 - | pub list: ::std::option::Option<
|
105 - | ::std::vec::Vec<
|
106 - | ::std::vec::Vec<
|
107 - | ::std::vec::Vec<
|
108 - | ::std::collections::HashMap<
|
109 - | ::std::string::String,
|
110 - | crate::model::EmptyStructure,
|
111 - | >,
|
112 - | >,
|
113 - | >,
|
114 - | >,
|
115 - | >,
|
116 - | }
|
117 - | impl TypeComplexityOperationInput {
|
118 - | #[allow(missing_docs)] // documentation missing in model
|
119 - | pub fn list(
|
120 - | &self,
|
121 - | ) -> ::std::option::Option<
|
122 - | &[::std::vec::Vec<
|
123 - | ::std::vec::Vec<
|
124 - | ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
|
125 - | >,
|
126 - | >],
|
127 - | > {
|
128 - | self.list.as_deref()
|
112 + | #[derive(
|
113 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
114 + | )]
|
115 + | pub struct ResponseCodeHttpFallbackOperationInput {}
|
116 + | impl ResponseCodeHttpFallbackOperationInput {
|
117 + | /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
|
118 + | pub fn builder() -> crate::input::response_code_http_fallback_operation_input::Builder {
|
119 + | crate::input::response_code_http_fallback_operation_input::Builder::default()
|
129 120 | }
|
130 121 | }
|
131 - | impl TypeComplexityOperationInput {
|
132 - | /// Creates a new builder-style object to manufacture [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
|
133 - | pub fn builder() -> crate::input::type_complexity_operation_input::Builder {
|
134 - | crate::input::type_complexity_operation_input::Builder::default()
|
122 + | impl crate::constrained::Constrained for crate::input::ResponseCodeHttpFallbackOperationInput {
|
123 + | type Unconstrained = crate::input::response_code_http_fallback_operation_input::Builder;
|
124 + | }
|
125 + |
|
126 + | #[allow(missing_docs)] // documentation missing in model
|
127 + | #[derive(
|
128 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
129 + | )]
|
130 + | pub struct ResponseCodeDefaultOperationInput {}
|
131 + | impl ResponseCodeDefaultOperationInput {
|
132 + | /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
|
133 + | pub fn builder() -> crate::input::response_code_default_operation_input::Builder {
|
134 + | crate::input::response_code_default_operation_input::Builder::default()
|
135 135 | }
|
136 136 | }
|
137 - | impl crate::constrained::Constrained for crate::input::TypeComplexityOperationInput {
|
138 - | type Unconstrained = crate::input::type_complexity_operation_input::Builder;
|
137 + | impl crate::constrained::Constrained for crate::input::ResponseCodeDefaultOperationInput {
|
138 + | type Unconstrained = crate::input::response_code_default_operation_input::Builder;
|
139 139 | }
|
140 - | /// See [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
|
141 - | pub mod response_code_default_operation_input {
|
140 + | /// See [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
|
141 + | pub mod type_complexity_operation_input {
|
142 142 |
|
143 - | impl ::std::convert::From<Builder> for crate::input::ResponseCodeDefaultOperationInput {
|
143 + | impl ::std::convert::From<Builder> for crate::input::TypeComplexityOperationInput {
|
144 144 | fn from(builder: Builder) -> Self {
|
145 145 | builder.build()
|
146 146 | }
|
147 147 | }
|
148 - | /// A builder for [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
|
148 + | /// A builder for [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
|
149 149 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
150 - | pub struct Builder {}
|
150 + | pub struct Builder {
|
151 + | pub(crate) list: ::std::option::Option<
|
152 + | ::std::vec::Vec<
|
153 + | ::std::vec::Vec<
|
154 + | ::std::vec::Vec<
|
155 + | ::std::collections::HashMap<
|
156 + | ::std::string::String,
|
157 + | crate::model::EmptyStructure,
|
158 + | >,
|
159 + | >,
|
160 + | >,
|
161 + | >,
|
162 + | >,
|
163 + | }
|
151 164 | impl Builder {
|
152 - | /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
|
153 - | pub fn build(self) -> crate::input::ResponseCodeDefaultOperationInput {
|
165 + | #[allow(missing_docs)] // documentation missing in model
|
166 + | pub fn list(
|
167 + | mut self,
|
168 + | input: ::std::option::Option<
|
169 + | ::std::vec::Vec<
|
170 + | ::std::vec::Vec<
|
171 + | ::std::vec::Vec<
|
172 + | ::std::collections::HashMap<
|
173 + | ::std::string::String,
|
174 + | crate::model::EmptyStructure,
|
175 + | >,
|
176 + | >,
|
177 + | >,
|
178 + | >,
|
179 + | >,
|
180 + | ) -> Self {
|
181 + | self.list = input;
|
182 + | self
|
183 + | }
|
184 + | #[allow(missing_docs)] // documentation missing in model
|
185 + | pub(crate) fn set_list(
|
186 + | mut self,
|
187 + | input: Option<
|
188 + | impl ::std::convert::Into<
|
189 + | ::std::vec::Vec<
|
190 + | ::std::vec::Vec<
|
191 + | ::std::vec::Vec<
|
192 + | ::std::collections::HashMap<
|
193 + | ::std::string::String,
|
194 + | crate::model::EmptyStructure,
|
195 + | >,
|
196 + | >,
|
197 + | >,
|
198 + | >,
|
199 + | >,
|
200 + | >,
|
201 + | ) -> Self {
|
202 + | self.list = input.map(|v| v.into());
|
203 + | self
|
204 + | }
|
205 + | /// Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
|
206 + | pub fn build(self) -> crate::input::TypeComplexityOperationInput {
|
154 207 | self.build_enforcing_all_constraints()
|
155 208 | }
|
156 - | fn build_enforcing_all_constraints(
|
157 - | self,
|
158 - | ) -> crate::input::ResponseCodeDefaultOperationInput {
|
159 - | crate::input::ResponseCodeDefaultOperationInput {}
|
209 + | fn build_enforcing_all_constraints(self) -> crate::input::TypeComplexityOperationInput {
|
210 + | crate::input::TypeComplexityOperationInput { list: self.list }
|
160 211 | }
|
161 212 | }
|
162 213 | }
|
163 - | /// See [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
|
164 - | pub mod response_code_http_fallback_operation_input {
|
214 + | /// See [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
|
215 + | pub mod required_inner_shape_operation_input {
|
165 216 |
|
166 - | impl ::std::convert::From<Builder> for crate::input::ResponseCodeHttpFallbackOperationInput {
|
167 - | fn from(builder: Builder) -> Self {
|
168 - | builder.build()
|
169 - | }
|
217 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
218 + | /// Holds one variant for each of the ways the builder can fail.
|
219 + | #[non_exhaustive]
|
220 + | #[allow(clippy::enum_variant_names)]
|
221 + | pub enum ConstraintViolation {
|
222 + | /// Constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`.
|
223 + | #[doc(hidden)]
|
224 + | Inner(crate::model::inner_shape::ConstraintViolation),
|
170 225 | }
|
171 - | /// A builder for [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
|
172 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
173 - | pub struct Builder {}
|
174 - | impl Builder {
|
175 - | /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
|
176 - | pub fn build(self) -> crate::input::ResponseCodeHttpFallbackOperationInput {
|
177 - | self.build_enforcing_all_constraints()
|
226 + | impl ::std::fmt::Display for ConstraintViolation {
|
227 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
228 + | match self {
|
229 + | ConstraintViolation::Inner(_) => write!(f, "constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`"),
|
230 + | }
|
178 231 | }
|
179 - | fn build_enforcing_all_constraints(
|
232 + | }
|
233 + | impl ::std::error::Error for ConstraintViolation {}
|
234 + | impl ConstraintViolation {
|
235 + | pub(crate) fn as_validation_exception_field(
|
180 236 | self,
|
181 - | ) -> crate::input::ResponseCodeHttpFallbackOperationInput {
|
182 - | crate::input::ResponseCodeHttpFallbackOperationInput {}
|
237 + | path: ::std::string::String,
|
238 + | ) -> crate::model::ValidationExceptionField {
|
239 + | match self {
|
240 + | ConstraintViolation::Inner(inner) => {
|
241 + | inner.as_validation_exception_field(path + "/inner")
|
242 + | }
|
243 + | }
|
244 + | }
|
245 + | }
|
246 + | impl ::std::convert::From<ConstraintViolation>
|
247 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
248 + | {
|
249 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
250 + | let first_validation_exception_field =
|
251 + | constraint_violation.as_validation_exception_field("".to_owned());
|
252 + | let validation_exception = crate::error::ValidationException {
|
253 + | message: format!(
|
254 + | "1 validation error detected. {}",
|
255 + | &first_validation_exception_field.message
|
256 + | ),
|
257 + | field_list: Some(vec![first_validation_exception_field]),
|
258 + | };
|
259 + | Self::ConstraintViolation(
|
260 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
261 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
262 + | )
|
183 263 | }
|
184 264 | }
|
185 - | }
|
186 - | /// See [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
|
187 - | pub mod response_code_required_operation_input {
|
188 - |
|
189 - | impl ::std::convert::From<Builder> for crate::input::ResponseCodeRequiredOperationInput {
|
265 + | impl ::std::convert::From<Builder>
|
266 + | for crate::constrained::MaybeConstrained<crate::input::RequiredInnerShapeOperationInput>
|
267 + | {
|
190 268 | fn from(builder: Builder) -> Self {
|
269 + | Self::Unconstrained(builder)
|
270 + | }
|
271 + | }
|
272 + | impl ::std::convert::TryFrom<Builder> for crate::input::RequiredInnerShapeOperationInput {
|
273 + | type Error = ConstraintViolation;
|
274 + |
|
275 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
191 276 | builder.build()
|
192 277 | }
|
193 278 | }
|
194 - | /// A builder for [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
|
279 + | /// A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
|
195 280 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
196 - | pub struct Builder {}
|
281 + | pub struct Builder {
|
282 + | pub(crate) inner:
|
283 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::InnerShape>>,
|
284 + | }
|
197 285 | impl Builder {
|
198 - | /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
|
199 - | pub fn build(self) -> crate::input::ResponseCodeRequiredOperationInput {
|
286 + | #[allow(missing_docs)] // documentation missing in model
|
287 + | pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
|
288 + | self.inner = input.map(crate::constrained::MaybeConstrained::Constrained);
|
289 + | self
|
290 + | }
|
291 + | #[allow(missing_docs)] // documentation missing in model
|
292 + | pub(crate) fn set_inner(
|
293 + | mut self,
|
294 + | input: Option<
|
295 + | impl ::std::convert::Into<
|
296 + | crate::constrained::MaybeConstrained<crate::model::InnerShape>,
|
297 + | >,
|
298 + | >,
|
299 + | ) -> Self {
|
300 + | self.inner = input.map(|v| v.into());
|
301 + | self
|
302 + | }
|
303 + | /// Consumes the builder and constructs a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
|
304 + | ///
|
305 + | /// The builder fails to construct a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) if a [`ConstraintViolation`] occurs.
|
306 + | ///
|
307 + | pub fn build(
|
308 + | self,
|
309 + | ) -> Result<crate::input::RequiredInnerShapeOperationInput, ConstraintViolation> {
|
200 310 | self.build_enforcing_all_constraints()
|
201 311 | }
|
202 312 | fn build_enforcing_all_constraints(
|
203 313 | self,
|
204 - | ) -> crate::input::ResponseCodeRequiredOperationInput {
|
205 - | crate::input::ResponseCodeRequiredOperationInput {}
|
314 + | ) -> Result<crate::input::RequiredInnerShapeOperationInput, ConstraintViolation> {
|
315 + | Ok(crate::input::RequiredInnerShapeOperationInput {
|
316 + | inner: self
|
317 + | .inner
|
318 + | .map(|v| match v {
|
319 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
320 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
321 + | })
|
322 + | .map(|res| res.map_err(ConstraintViolation::Inner))
|
323 + | .transpose()?,
|
324 + | })
|
206 325 | }
|
207 326 | }
|
208 327 | }
|
209 328 | /// See [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
|
210 329 | pub mod required_header_collection_operation_input {
|
211 330 |
|
212 331 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
213 332 | /// Holds one variant for each of the ways the builder can fail.
|
214 333 | #[non_exhaustive]
|
215 334 | #[allow(clippy::enum_variant_names)]
|
351 470 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
352 471 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
353 472 | })
|
354 473 | .map(|res| res.map_err(ConstraintViolation::RequiredHeaderSet))
|
355 474 | .transpose()?
|
356 475 | .ok_or(ConstraintViolation::MissingRequiredHeaderSet)?,
|
357 476 | })
|
358 477 | }
|
359 478 | }
|
360 479 | }
|
361 - | /// See [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
|
362 - | pub mod required_inner_shape_operation_input {
|
480 + | /// See [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
|
481 + | pub mod response_code_required_operation_input {
|
363 482 |
|
364 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
365 - | /// Holds one variant for each of the ways the builder can fail.
|
366 - | #[non_exhaustive]
|
367 - | #[allow(clippy::enum_variant_names)]
|
368 - | pub enum ConstraintViolation {
|
369 - | /// Constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`.
|
370 - | #[doc(hidden)]
|
371 - | Inner(crate::model::inner_shape::ConstraintViolation),
|
372 - | }
|
373 - | impl ::std::fmt::Display for ConstraintViolation {
|
374 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
375 - | match self {
|
376 - | ConstraintViolation::Inner(_) => write!(f, "constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`"),
|
377 - | }
|
378 - | }
|
379 - | }
|
380 - | impl ::std::error::Error for ConstraintViolation {}
|
381 - | impl ConstraintViolation {
|
382 - | pub(crate) fn as_validation_exception_field(
|
383 - | self,
|
384 - | path: ::std::string::String,
|
385 - | ) -> crate::model::ValidationExceptionField {
|
386 - | match self {
|
387 - | ConstraintViolation::Inner(inner) => {
|
388 - | inner.as_validation_exception_field(path + "/inner")
|
389 - | }
|
390 - | }
|
483 + | impl ::std::convert::From<Builder> for crate::input::ResponseCodeRequiredOperationInput {
|
484 + | fn from(builder: Builder) -> Self {
|
485 + | builder.build()
|
391 486 | }
|
392 487 | }
|
393 - | impl ::std::convert::From<ConstraintViolation>
|
394 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
395 - | {
|
396 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
397 - | let first_validation_exception_field =
|
398 - | constraint_violation.as_validation_exception_field("".to_owned());
|
399 - | let validation_exception = crate::error::ValidationException {
|
400 - | message: format!(
|
401 - | "1 validation error detected. {}",
|
402 - | &first_validation_exception_field.message
|
403 - | ),
|
404 - | field_list: Some(vec![first_validation_exception_field]),
|
405 - | };
|
406 - | Self::ConstraintViolation(
|
407 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
408 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
409 - | )
|
488 + | /// A builder for [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
|
489 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
490 + | pub struct Builder {}
|
491 + | impl Builder {
|
492 + | /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
|
493 + | pub fn build(self) -> crate::input::ResponseCodeRequiredOperationInput {
|
494 + | self.build_enforcing_all_constraints()
|
410 495 | }
|
411 - | }
|
412 - | impl ::std::convert::From<Builder>
|
413 - | for crate::constrained::MaybeConstrained<crate::input::RequiredInnerShapeOperationInput>
|
414 - | {
|
415 - | fn from(builder: Builder) -> Self {
|
416 - | Self::Unconstrained(builder)
|
496 + | fn build_enforcing_all_constraints(
|
497 + | self,
|
498 + | ) -> crate::input::ResponseCodeRequiredOperationInput {
|
499 + | crate::input::ResponseCodeRequiredOperationInput {}
|
417 500 | }
|
418 501 | }
|
419 - | impl ::std::convert::TryFrom<Builder> for crate::input::RequiredInnerShapeOperationInput {
|
420 - | type Error = ConstraintViolation;
|
502 + | }
|
503 + | /// See [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
|
504 + | pub mod response_code_http_fallback_operation_input {
|
421 505 |
|
422 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
506 + | impl ::std::convert::From<Builder> for crate::input::ResponseCodeHttpFallbackOperationInput {
|
507 + | fn from(builder: Builder) -> Self {
|
423 508 | builder.build()
|
424 509 | }
|
425 510 | }
|
426 - | /// A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
|
511 + | /// A builder for [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
|
427 512 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
428 - | pub struct Builder {
|
429 - | pub(crate) inner:
|
430 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::InnerShape>>,
|
431 - | }
|
513 + | pub struct Builder {}
|
432 514 | impl Builder {
|
433 - | #[allow(missing_docs)] // documentation missing in model
|
434 - | pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
|
435 - | self.inner = input.map(crate::constrained::MaybeConstrained::Constrained);
|
436 - | self
|
437 - | }
|
438 - | #[allow(missing_docs)] // documentation missing in model
|
439 - | pub(crate) fn set_inner(
|
440 - | mut self,
|
441 - | input: Option<
|
442 - | impl ::std::convert::Into<
|
443 - | crate::constrained::MaybeConstrained<crate::model::InnerShape>,
|
444 - | >,
|
445 - | >,
|
446 - | ) -> Self {
|
447 - | self.inner = input.map(|v| v.into());
|
448 - | self
|
449 - | }
|
450 - | /// Consumes the builder and constructs a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
|
451 - | ///
|
452 - | /// The builder fails to construct a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) if a [`ConstraintViolation`] occurs.
|
453 - | ///
|
454 - | pub fn build(
|
455 - | self,
|
456 - | ) -> Result<crate::input::RequiredInnerShapeOperationInput, ConstraintViolation> {
|
515 + | /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
|
516 + | pub fn build(self) -> crate::input::ResponseCodeHttpFallbackOperationInput {
|
457 517 | self.build_enforcing_all_constraints()
|
458 518 | }
|
459 519 | fn build_enforcing_all_constraints(
|
460 520 | self,
|
461 - | ) -> Result<crate::input::RequiredInnerShapeOperationInput, ConstraintViolation> {
|
462 - | Ok(crate::input::RequiredInnerShapeOperationInput {
|
463 - | inner: self
|
464 - | .inner
|
465 - | .map(|v| match v {
|
466 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
467 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
468 - | })
|
469 - | .map(|res| res.map_err(ConstraintViolation::Inner))
|
470 - | .transpose()?,
|
471 - | })
|
521 + | ) -> crate::input::ResponseCodeHttpFallbackOperationInput {
|
522 + | crate::input::ResponseCodeHttpFallbackOperationInput {}
|
472 523 | }
|
473 524 | }
|
474 525 | }
|
475 - | /// See [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
|
476 - | pub mod type_complexity_operation_input {
|
526 + | /// See [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
|
527 + | pub mod response_code_default_operation_input {
|
477 528 |
|
478 - | impl ::std::convert::From<Builder> for crate::input::TypeComplexityOperationInput {
|
529 + | impl ::std::convert::From<Builder> for crate::input::ResponseCodeDefaultOperationInput {
|
479 530 | fn from(builder: Builder) -> Self {
|
480 531 | builder.build()
|
481 532 | }
|
482 533 | }
|
483 - | /// A builder for [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
|
534 + | /// A builder for [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
|
484 535 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
485 - | pub struct Builder {
|
486 - | pub(crate) list: ::std::option::Option<
|
487 - | ::std::vec::Vec<
|
488 - | ::std::vec::Vec<
|
489 - | ::std::vec::Vec<
|
490 - | ::std::collections::HashMap<
|
491 - | ::std::string::String,
|
492 - | crate::model::EmptyStructure,
|
493 - | >,
|
494 - | >,
|
495 - | >,
|
496 - | >,
|
497 - | >,
|
498 - | }
|
536 + | pub struct Builder {}
|
499 537 | impl Builder {
|
500 - | #[allow(missing_docs)] // documentation missing in model
|
501 - | pub fn list(
|
502 - | mut self,
|
503 - | input: ::std::option::Option<
|
504 - | ::std::vec::Vec<
|
505 - | ::std::vec::Vec<
|
506 - | ::std::vec::Vec<
|
507 - | ::std::collections::HashMap<
|
508 - | ::std::string::String,
|
509 - | crate::model::EmptyStructure,
|
510 - | >,
|
511 - | >,
|
512 - | >,
|
513 - | >,
|
514 - | >,
|
515 - | ) -> Self {
|
516 - | self.list = input;
|
517 - | self
|
518 - | }
|
519 - | #[allow(missing_docs)] // documentation missing in model
|
520 - | pub(crate) fn set_list(
|
521 - | mut self,
|
522 - | input: Option<
|
523 - | impl ::std::convert::Into<
|
524 - | ::std::vec::Vec<
|
525 - | ::std::vec::Vec<
|
526 - | ::std::vec::Vec<
|
527 - | ::std::collections::HashMap<
|
528 - | ::std::string::String,
|
529 - | crate::model::EmptyStructure,
|
530 - | >,
|
531 - | >,
|
532 - | >,
|
533 - | >,
|
534 - | >,
|
535 - | >,
|
536 - | ) -> Self {
|
537 - | self.list = input.map(|v| v.into());
|
538 - | self
|
539 - | }
|
540 - | /// Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
|
541 - | pub fn build(self) -> crate::input::TypeComplexityOperationInput {
|
538 + | /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
|
539 + | pub fn build(self) -> crate::input::ResponseCodeDefaultOperationInput {
|
542 540 | self.build_enforcing_all_constraints()
|
543 541 | }
|
544 - | fn build_enforcing_all_constraints(self) -> crate::input::TypeComplexityOperationInput {
|
545 - | crate::input::TypeComplexityOperationInput { list: self.list }
|
542 + | fn build_enforcing_all_constraints(
|
543 + | self,
|
544 + | ) -> crate::input::ResponseCodeDefaultOperationInput {
|
545 + | crate::input::ResponseCodeDefaultOperationInput {}
|
546 546 | }
|
547 547 | }
|
548 548 | }
|