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(::std::fmt::Debug)]
|
4 - | pub struct EventStreamsOperationInput {
|
5 - | #[allow(missing_docs)] // documentation missing in model
|
6 - | pub events:
|
7 - | ::aws_smithy_http::event_stream::Receiver<crate::model::Event, crate::error::EventError>,
|
8 - | }
|
9 - | impl EventStreamsOperationInput {
|
10 - | #[allow(missing_docs)] // documentation missing in model
|
11 - | pub fn events(
|
12 - | &self,
|
13 - | ) -> &::aws_smithy_http::event_stream::Receiver<crate::model::Event, crate::error::EventError>
|
14 - | {
|
15 - | &self.events
|
16 - | }
|
17 - | }
|
18 - | impl EventStreamsOperationInput {
|
19 - | /// Creates a new builder-style object to manufacture [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
20 - | pub fn builder() -> crate::input::event_streams_operation_input::Builder {
|
21 - | crate::input::event_streams_operation_input::Builder::default()
|
22 - | }
|
23 - | }
|
24 - | impl crate::constrained::Constrained for crate::input::EventStreamsOperationInput {
|
25 - | type Unconstrained = crate::input::event_streams_operation_input::Builder;
|
26 - | }
|
27 - |
|
28 - | #[allow(missing_docs)] // documentation missing in model
|
29 - | #[derive(::std::fmt::Debug)]
|
30 - | pub struct StreamingBlobOperationInput {
|
3 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4 + | pub struct ConstrainedShapesOperationInput {
|
31 5 | #[allow(missing_docs)] // documentation missing in model
|
32 - | pub streaming_blob: ::aws_smithy_types::byte_stream::ByteStream,
|
6 + | pub con_a: crate::model::ConA,
|
33 7 | }
|
34 - | impl StreamingBlobOperationInput {
|
8 + | impl ConstrainedShapesOperationInput {
|
35 9 | #[allow(missing_docs)] // documentation missing in model
|
36 - | pub fn streaming_blob(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
|
37 - | &self.streaming_blob
|
10 + | pub fn con_a(&self) -> &crate::model::ConA {
|
11 + | &self.con_a
|
38 12 | }
|
39 13 | }
|
40 - | impl StreamingBlobOperationInput {
|
41 - | /// Creates a new builder-style object to manufacture [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
42 - | pub fn builder() -> crate::input::streaming_blob_operation_input::Builder {
|
43 - | crate::input::streaming_blob_operation_input::Builder::default()
|
14 + | impl ConstrainedShapesOperationInput {
|
15 + | /// Creates a new builder-style object to manufacture [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
16 + | pub fn builder() -> crate::input::constrained_shapes_operation_input::Builder {
|
17 + | crate::input::constrained_shapes_operation_input::Builder::default()
|
44 18 | }
|
45 19 | }
|
46 - | impl crate::constrained::Constrained for crate::input::StreamingBlobOperationInput {
|
47 - | type Unconstrained = crate::input::streaming_blob_operation_input::Builder;
|
20 + | impl crate::constrained::Constrained for crate::input::ConstrainedShapesOperationInput {
|
21 + | type Unconstrained = crate::input::constrained_shapes_operation_input::Builder;
|
48 22 | }
|
49 23 |
|
50 24 | #[allow(missing_docs)] // documentation missing in model
|
51 25 | #[derive(
|
52 26 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
53 27 | )]
|
54 - | pub struct NonStreamingBlobOperationInput {
|
55 - | #[allow(missing_docs)] // documentation missing in model
|
56 - | pub non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
57 - | }
|
58 - | impl NonStreamingBlobOperationInput {
|
59 - | #[allow(missing_docs)] // documentation missing in model
|
60 - | pub fn non_streaming_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
|
61 - | self.non_streaming_blob.as_ref()
|
62 - | }
|
63 - | }
|
64 - | impl NonStreamingBlobOperationInput {
|
65 - | /// Creates a new builder-style object to manufacture [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
66 - | pub fn builder() -> crate::input::non_streaming_blob_operation_input::Builder {
|
67 - | crate::input::non_streaming_blob_operation_input::Builder::default()
|
28 + | pub struct ConstrainedShapesOnlyInOutputOperationInput {}
|
29 + | impl ConstrainedShapesOnlyInOutputOperationInput {
|
30 + | /// Creates a new builder-style object to manufacture [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
31 + | pub fn builder() -> crate::input::constrained_shapes_only_in_output_operation_input::Builder {
|
32 + | crate::input::constrained_shapes_only_in_output_operation_input::Builder::default()
|
68 33 | }
|
69 34 | }
|
70 - | impl crate::constrained::Constrained for crate::input::NonStreamingBlobOperationInput {
|
71 - | type Unconstrained = crate::input::non_streaming_blob_operation_input::Builder;
|
35 + | impl crate::constrained::Constrained for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
36 + | type Unconstrained = crate::input::constrained_shapes_only_in_output_operation_input::Builder;
|
72 37 | }
|
73 38 |
|
74 39 | #[allow(missing_docs)] // documentation missing in model
|
75 40 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
76 - | pub struct QueryParamsTargetingMapOfEnumStringOperationInput {
|
41 + | pub struct ConstrainedHttpBoundShapesOperationInput {
|
77 42 | #[allow(missing_docs)] // documentation missing in model
|
78 - | pub map_of_enum_string: ::std::option::Option<
|
79 - | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
80 - | >,
|
43 + | pub length_string_label: crate::model::LengthString,
|
44 + | #[allow(missing_docs)] // documentation missing in model
|
45 + | pub range_integer_label: crate::model::RangeInteger,
|
46 + | #[allow(missing_docs)] // documentation missing in model
|
47 + | pub range_short_label: crate::model::RangeShort,
|
48 + | #[allow(missing_docs)] // documentation missing in model
|
49 + | pub range_long_label: crate::model::RangeLong,
|
50 + | #[allow(missing_docs)] // documentation missing in model
|
51 + | pub range_byte_label: crate::model::RangeByte,
|
52 + | #[allow(missing_docs)] // documentation missing in model
|
53 + | pub enum_string_label: crate::model::EnumString,
|
54 + | #[allow(missing_docs)] // documentation missing in model
|
55 + | pub length_string_header_map:
|
56 + | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
57 + | #[allow(missing_docs)] // documentation missing in model
|
58 + | pub length_string_header: ::std::option::Option<crate::model::LengthString>,
|
59 + | #[allow(missing_docs)] // documentation missing in model
|
60 + | pub range_integer_header: crate::model::RangeInteger,
|
61 + | #[allow(missing_docs)] // documentation missing in model
|
62 + | pub range_short_header: crate::model::RangeShort,
|
63 + | #[allow(missing_docs)] // documentation missing in model
|
64 + | pub range_long_header: crate::model::RangeLong,
|
65 + | #[allow(missing_docs)] // documentation missing in model
|
66 + | pub range_byte_header: crate::model::RangeByte,
|
67 + | #[allow(missing_docs)] // documentation missing in model
|
68 + | pub length_string_set_header: ::std::option::Option<crate::model::SetOfLengthString>,
|
69 + | #[allow(missing_docs)] // documentation missing in model
|
70 + | pub list_length_string_header:
|
71 + | ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
|
72 + | #[allow(missing_docs)] // documentation missing in model
|
73 + | pub length_list_pattern_string_header:
|
74 + | ::std::option::Option<crate::model::LengthListOfPatternString>,
|
75 + | #[allow(missing_docs)] // documentation missing in model
|
76 + | pub length_set_pattern_string_header:
|
77 + | ::std::option::Option<crate::model::LengthSetOfPatternString>,
|
78 + | #[allow(missing_docs)] // documentation missing in model
|
79 + | pub range_byte_set_header: ::std::option::Option<crate::model::SetOfRangeByte>,
|
80 + | #[allow(missing_docs)] // documentation missing in model
|
81 + | pub range_short_set_header: ::std::option::Option<crate::model::SetOfRangeShort>,
|
82 + | #[allow(missing_docs)] // documentation missing in model
|
83 + | pub range_integer_set_header: ::std::option::Option<crate::model::SetOfRangeInteger>,
|
84 + | #[allow(missing_docs)] // documentation missing in model
|
85 + | pub range_long_set_header: ::std::option::Option<crate::model::SetOfRangeLong>,
|
86 + | #[allow(missing_docs)] // documentation missing in model
|
87 + | pub range_byte_list_header: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
|
88 + | #[allow(missing_docs)] // documentation missing in model
|
89 + | pub range_short_list_header: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
|
90 + | #[allow(missing_docs)] // documentation missing in model
|
91 + | pub range_integer_list_header:
|
92 + | ::std::option::Option<::std::vec::Vec<crate::model::RangeInteger>>,
|
93 + | #[allow(missing_docs)] // documentation missing in model
|
94 + | pub range_long_list_header: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
|
95 + | #[allow(missing_docs)] // documentation missing in model
|
96 + | pub length_string_query: ::std::option::Option<crate::model::LengthString>,
|
97 + | #[allow(missing_docs)] // documentation missing in model
|
98 + | pub range_byte_query: crate::model::RangeByte,
|
99 + | #[allow(missing_docs)] // documentation missing in model
|
100 + | pub range_short_query: crate::model::RangeShort,
|
101 + | #[allow(missing_docs)] // documentation missing in model
|
102 + | pub range_integer_query: crate::model::RangeInteger,
|
103 + | #[allow(missing_docs)] // documentation missing in model
|
104 + | pub range_long_query: crate::model::RangeLong,
|
105 + | #[allow(missing_docs)] // documentation missing in model
|
106 + | pub enum_string_query: ::std::option::Option<crate::model::EnumString>,
|
107 + | #[allow(missing_docs)] // documentation missing in model
|
108 + | pub length_string_list_query:
|
109 + | ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
|
110 + | #[allow(missing_docs)] // documentation missing in model
|
111 + | pub length_list_pattern_string_query:
|
112 + | ::std::option::Option<crate::model::LengthListOfPatternString>,
|
113 + | #[allow(missing_docs)] // documentation missing in model
|
114 + | pub length_string_set_query: ::std::option::Option<crate::model::SetOfLengthString>,
|
115 + | #[allow(missing_docs)] // documentation missing in model
|
116 + | pub range_byte_list_query: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
|
117 + | #[allow(missing_docs)] // documentation missing in model
|
118 + | pub range_short_list_query: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
|
119 + | #[allow(missing_docs)] // documentation missing in model
|
120 + | pub range_integer_list_query:
|
121 + | ::std::option::Option<::std::vec::Vec<crate::model::RangeInteger>>,
|
122 + | #[allow(missing_docs)] // documentation missing in model
|
123 + | pub range_long_list_query: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
|
124 + | #[allow(missing_docs)] // documentation missing in model
|
125 + | pub range_byte_set_query: ::std::option::Option<crate::model::SetOfRangeByte>,
|
126 + | #[allow(missing_docs)] // documentation missing in model
|
127 + | pub range_short_set_query: ::std::option::Option<crate::model::SetOfRangeShort>,
|
128 + | #[allow(missing_docs)] // documentation missing in model
|
129 + | pub range_integer_set_query: ::std::option::Option<crate::model::SetOfRangeInteger>,
|
130 + | #[allow(missing_docs)] // documentation missing in model
|
131 + | pub range_long_set_query: ::std::option::Option<crate::model::SetOfRangeLong>,
|
132 + | #[allow(missing_docs)] // documentation missing in model
|
133 + | pub enum_string_list_query: ::std::option::Option<::std::vec::Vec<crate::model::EnumString>>,
|
81 134 | }
|
82 - | impl QueryParamsTargetingMapOfEnumStringOperationInput {
|
135 + | impl ConstrainedHttpBoundShapesOperationInput {
|
83 136 | #[allow(missing_docs)] // documentation missing in model
|
84 - | pub fn map_of_enum_string(
|
85 - | &self,
|
86 - | ) -> ::std::option::Option<
|
87 - | &::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
88 - | > {
|
89 - | self.map_of_enum_string.as_ref()
|
137 + | pub fn length_string_label(&self) -> &crate::model::LengthString {
|
138 + | &self.length_string_label
|
90 139 | }
|
91 - | }
|
92 - | impl QueryParamsTargetingMapOfEnumStringOperationInput {
|
93 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
94 - | pub fn builder(
|
95 - | ) -> crate::input::query_params_targeting_map_of_enum_string_operation_input::Builder {
|
96 - | crate::input::query_params_targeting_map_of_enum_string_operation_input::Builder::default()
|
140 + | #[allow(missing_docs)] // documentation missing in model
|
141 + | pub fn range_integer_label(&self) -> &crate::model::RangeInteger {
|
142 + | &self.range_integer_label
|
97 143 | }
|
98 - | }
|
99 - | impl crate::constrained::Constrained
|
100 - | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
101 - | {
|
102 - | type Unconstrained =
|
103 - | crate::input::query_params_targeting_map_of_enum_string_operation_input::Builder;
|
104 - | }
|
105 - |
|
106 - | #[allow(missing_docs)] // documentation missing in model
|
107 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
108 - | pub struct HttpPrefixHeadersTargetingLengthMapOperationInput {
|
109 144 | #[allow(missing_docs)] // documentation missing in model
|
110 - | pub length_map: ::std::option::Option<crate::model::ConBMap>,
|
111 - | }
|
112 - | impl HttpPrefixHeadersTargetingLengthMapOperationInput {
|
145 + | pub fn range_short_label(&self) -> &crate::model::RangeShort {
|
146 + | &self.range_short_label
|
147 + | }
|
113 148 | #[allow(missing_docs)] // documentation missing in model
|
114 - | pub fn length_map(&self) -> ::std::option::Option<&crate::model::ConBMap> {
|
115 - | self.length_map.as_ref()
|
149 + | pub fn range_long_label(&self) -> &crate::model::RangeLong {
|
150 + | &self.range_long_label
|
116 151 | }
|
117 - | }
|
118 - | impl HttpPrefixHeadersTargetingLengthMapOperationInput {
|
119 - | /// Creates a new builder-style object to manufacture [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
120 - | pub fn builder(
|
121 - | ) -> crate::input::http_prefix_headers_targeting_length_map_operation_input::Builder {
|
122 - | crate::input::http_prefix_headers_targeting_length_map_operation_input::Builder::default()
|
152 + | #[allow(missing_docs)] // documentation missing in model
|
153 + | pub fn range_byte_label(&self) -> &crate::model::RangeByte {
|
154 + | &self.range_byte_label
|
123 155 | }
|
124 - | }
|
125 - | impl crate::constrained::Constrained
|
126 - | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
127 - | {
|
128 - | type Unconstrained =
|
129 - | crate::input::http_prefix_headers_targeting_length_map_operation_input::Builder;
|
130 - | }
|
131 - |
|
132 - | #[allow(missing_docs)] // documentation missing in model
|
133 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
134 - | pub struct QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
135 156 | #[allow(missing_docs)] // documentation missing in model
|
136 - | pub map_of_length_pattern_string: ::std::option::Option<
|
137 - | ::std::collections::HashMap<
|
138 - | crate::model::LengthPatternString,
|
139 - | ::std::vec::Vec<crate::model::LengthPatternString>,
|
140 - | >,
|
141 - | >,
|
142 - | }
|
143 - | impl QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
157 + | pub fn enum_string_label(&self) -> &crate::model::EnumString {
|
158 + | &self.enum_string_label
|
159 + | }
|
144 160 | #[allow(missing_docs)] // documentation missing in model
|
145 - | pub fn map_of_length_pattern_string(
|
161 + | pub fn length_string_header_map(
|
146 162 | &self,
|
147 - | ) -> ::std::option::Option<
|
148 - | &::std::collections::HashMap<
|
149 - | crate::model::LengthPatternString,
|
150 - | ::std::vec::Vec<crate::model::LengthPatternString>,
|
151 - | >,
|
152 - | > {
|
153 - | self.map_of_length_pattern_string.as_ref()
|
163 + | ) -> &::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString> {
|
164 + | &self.length_string_header_map
|
154 165 | }
|
155 - | }
|
156 - | impl QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
157 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
158 - | pub fn builder() -> crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input::Builder{
|
159 - | crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input::Builder::default()
|
166 + | #[allow(missing_docs)] // documentation missing in model
|
167 + | pub fn length_string_header(&self) -> ::std::option::Option<&crate::model::LengthString> {
|
168 + | self.length_string_header.as_ref()
|
169 + | }
|
170 + | #[allow(missing_docs)] // documentation missing in model
|
171 + | pub fn range_integer_header(&self) -> &crate::model::RangeInteger {
|
172 + | &self.range_integer_header
|
173 + | }
|
174 + | #[allow(missing_docs)] // documentation missing in model
|
175 + | pub fn range_short_header(&self) -> &crate::model::RangeShort {
|
176 + | &self.range_short_header
|
177 + | }
|
178 + | #[allow(missing_docs)] // documentation missing in model
|
179 + | pub fn range_long_header(&self) -> &crate::model::RangeLong {
|
180 + | &self.range_long_header
|
181 + | }
|
182 + | #[allow(missing_docs)] // documentation missing in model
|
183 + | pub fn range_byte_header(&self) -> &crate::model::RangeByte {
|
184 + | &self.range_byte_header
|
185 + | }
|
186 + | #[allow(missing_docs)] // documentation missing in model
|
187 + | pub fn length_string_set_header(
|
188 + | &self,
|
189 + | ) -> ::std::option::Option<&crate::model::SetOfLengthString> {
|
190 + | self.length_string_set_header.as_ref()
|
191 + | }
|
192 + | #[allow(missing_docs)] // documentation missing in model
|
193 + | pub fn list_length_string_header(
|
194 + | &self,
|
195 + | ) -> ::std::option::Option<&[crate::model::LengthString]> {
|
196 + | self.list_length_string_header.as_deref()
|
197 + | }
|
198 + | #[allow(missing_docs)] // documentation missing in model
|
199 + | pub fn length_list_pattern_string_header(
|
200 + | &self,
|
201 + | ) -> ::std::option::Option<&crate::model::LengthListOfPatternString> {
|
202 + | self.length_list_pattern_string_header.as_ref()
|
203 + | }
|
204 + | #[allow(missing_docs)] // documentation missing in model
|
205 + | pub fn length_set_pattern_string_header(
|
206 + | &self,
|
207 + | ) -> ::std::option::Option<&crate::model::LengthSetOfPatternString> {
|
208 + | self.length_set_pattern_string_header.as_ref()
|
209 + | }
|
210 + | #[allow(missing_docs)] // documentation missing in model
|
211 + | pub fn range_byte_set_header(&self) -> ::std::option::Option<&crate::model::SetOfRangeByte> {
|
212 + | self.range_byte_set_header.as_ref()
|
213 + | }
|
214 + | #[allow(missing_docs)] // documentation missing in model
|
215 + | pub fn range_short_set_header(&self) -> ::std::option::Option<&crate::model::SetOfRangeShort> {
|
216 + | self.range_short_set_header.as_ref()
|
217 + | }
|
218 + | #[allow(missing_docs)] // documentation missing in model
|
219 + | pub fn range_integer_set_header(
|
220 + | &self,
|
221 + | ) -> ::std::option::Option<&crate::model::SetOfRangeInteger> {
|
222 + | self.range_integer_set_header.as_ref()
|
223 + | }
|
224 + | #[allow(missing_docs)] // documentation missing in model
|
225 + | pub fn range_long_set_header(&self) -> ::std::option::Option<&crate::model::SetOfRangeLong> {
|
226 + | self.range_long_set_header.as_ref()
|
227 + | }
|
228 + | #[allow(missing_docs)] // documentation missing in model
|
229 + | pub fn range_byte_list_header(&self) -> ::std::option::Option<&[crate::model::RangeByte]> {
|
230 + | self.range_byte_list_header.as_deref()
|
231 + | }
|
232 + | #[allow(missing_docs)] // documentation missing in model
|
233 + | pub fn range_short_list_header(&self) -> ::std::option::Option<&[crate::model::RangeShort]> {
|
234 + | self.range_short_list_header.as_deref()
|
235 + | }
|
236 + | #[allow(missing_docs)] // documentation missing in model
|
237 + | pub fn range_integer_list_header(
|
238 + | &self,
|
239 + | ) -> ::std::option::Option<&[crate::model::RangeInteger]> {
|
240 + | self.range_integer_list_header.as_deref()
|
241 + | }
|
242 + | #[allow(missing_docs)] // documentation missing in model
|
243 + | pub fn range_long_list_header(&self) -> ::std::option::Option<&[crate::model::RangeLong]> {
|
244 + | self.range_long_list_header.as_deref()
|
245 + | }
|
246 + | #[allow(missing_docs)] // documentation missing in model
|
247 + | pub fn length_string_query(&self) -> ::std::option::Option<&crate::model::LengthString> {
|
248 + | self.length_string_query.as_ref()
|
249 + | }
|
250 + | #[allow(missing_docs)] // documentation missing in model
|
251 + | pub fn range_byte_query(&self) -> &crate::model::RangeByte {
|
252 + | &self.range_byte_query
|
253 + | }
|
254 + | #[allow(missing_docs)] // documentation missing in model
|
255 + | pub fn range_short_query(&self) -> &crate::model::RangeShort {
|
256 + | &self.range_short_query
|
257 + | }
|
258 + | #[allow(missing_docs)] // documentation missing in model
|
259 + | pub fn range_integer_query(&self) -> &crate::model::RangeInteger {
|
260 + | &self.range_integer_query
|
261 + | }
|
262 + | #[allow(missing_docs)] // documentation missing in model
|
263 + | pub fn range_long_query(&self) -> &crate::model::RangeLong {
|
264 + | &self.range_long_query
|
265 + | }
|
266 + | #[allow(missing_docs)] // documentation missing in model
|
267 + | pub fn enum_string_query(&self) -> ::std::option::Option<&crate::model::EnumString> {
|
268 + | self.enum_string_query.as_ref()
|
269 + | }
|
270 + | #[allow(missing_docs)] // documentation missing in model
|
271 + | pub fn length_string_list_query(&self) -> ::std::option::Option<&[crate::model::LengthString]> {
|
272 + | self.length_string_list_query.as_deref()
|
273 + | }
|
274 + | #[allow(missing_docs)] // documentation missing in model
|
275 + | pub fn length_list_pattern_string_query(
|
276 + | &self,
|
277 + | ) -> ::std::option::Option<&crate::model::LengthListOfPatternString> {
|
278 + | self.length_list_pattern_string_query.as_ref()
|
279 + | }
|
280 + | #[allow(missing_docs)] // documentation missing in model
|
281 + | pub fn length_string_set_query(
|
282 + | &self,
|
283 + | ) -> ::std::option::Option<&crate::model::SetOfLengthString> {
|
284 + | self.length_string_set_query.as_ref()
|
285 + | }
|
286 + | #[allow(missing_docs)] // documentation missing in model
|
287 + | pub fn range_byte_list_query(&self) -> ::std::option::Option<&[crate::model::RangeByte]> {
|
288 + | self.range_byte_list_query.as_deref()
|
289 + | }
|
290 + | #[allow(missing_docs)] // documentation missing in model
|
291 + | pub fn range_short_list_query(&self) -> ::std::option::Option<&[crate::model::RangeShort]> {
|
292 + | self.range_short_list_query.as_deref()
|
293 + | }
|
294 + | #[allow(missing_docs)] // documentation missing in model
|
295 + | pub fn range_integer_list_query(&self) -> ::std::option::Option<&[crate::model::RangeInteger]> {
|
296 + | self.range_integer_list_query.as_deref()
|
297 + | }
|
298 + | #[allow(missing_docs)] // documentation missing in model
|
299 + | pub fn range_long_list_query(&self) -> ::std::option::Option<&[crate::model::RangeLong]> {
|
300 + | self.range_long_list_query.as_deref()
|
301 + | }
|
302 + | #[allow(missing_docs)] // documentation missing in model
|
303 + | pub fn range_byte_set_query(&self) -> ::std::option::Option<&crate::model::SetOfRangeByte> {
|
304 + | self.range_byte_set_query.as_ref()
|
305 + | }
|
306 + | #[allow(missing_docs)] // documentation missing in model
|
307 + | pub fn range_short_set_query(&self) -> ::std::option::Option<&crate::model::SetOfRangeShort> {
|
308 + | self.range_short_set_query.as_ref()
|
309 + | }
|
310 + | #[allow(missing_docs)] // documentation missing in model
|
311 + | pub fn range_integer_set_query(
|
312 + | &self,
|
313 + | ) -> ::std::option::Option<&crate::model::SetOfRangeInteger> {
|
314 + | self.range_integer_set_query.as_ref()
|
315 + | }
|
316 + | #[allow(missing_docs)] // documentation missing in model
|
317 + | pub fn range_long_set_query(&self) -> ::std::option::Option<&crate::model::SetOfRangeLong> {
|
318 + | self.range_long_set_query.as_ref()
|
319 + | }
|
320 + | #[allow(missing_docs)] // documentation missing in model
|
321 + | pub fn enum_string_list_query(&self) -> ::std::option::Option<&[crate::model::EnumString]> {
|
322 + | self.enum_string_list_query.as_deref()
|
160 323 | }
|
161 324 | }
|
162 - | impl crate::constrained::Constrained
|
163 - | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
164 - | {
|
165 - | type Unconstrained = crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input::Builder;
|
325 + | impl ConstrainedHttpBoundShapesOperationInput {
|
326 + | /// Creates a new builder-style object to manufacture [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
327 + | pub fn builder() -> crate::input::constrained_http_bound_shapes_operation_input::Builder {
|
328 + | crate::input::constrained_http_bound_shapes_operation_input::Builder::default()
|
329 + | }
|
330 + | }
|
331 + | impl crate::constrained::Constrained for crate::input::ConstrainedHttpBoundShapesOperationInput {
|
332 + | type Unconstrained = crate::input::constrained_http_bound_shapes_operation_input::Builder;
|
166 333 | }
|
167 334 |
|
168 335 | #[allow(missing_docs)] // documentation missing in model
|
169 336 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
170 - | pub struct QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
337 + | pub struct ConstrainedHttpPayloadBoundShapeOperationInput {
|
171 338 | #[allow(missing_docs)] // documentation missing in model
|
172 - | pub map_of_length_pattern_string: ::std::option::Option<
|
173 - | ::std::collections::HashMap<
|
174 - | crate::model::LengthPatternString,
|
175 - | crate::model::LengthPatternString,
|
176 - | >,
|
177 - | >,
|
339 + | pub http_payload_bound_constrained_shape: crate::model::ConA,
|
178 340 | }
|
179 - | impl QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
341 + | impl ConstrainedHttpPayloadBoundShapeOperationInput {
|
180 342 | #[allow(missing_docs)] // documentation missing in model
|
181 - | pub fn map_of_length_pattern_string(
|
182 - | &self,
|
183 - | ) -> ::std::option::Option<
|
184 - | &::std::collections::HashMap<
|
185 - | crate::model::LengthPatternString,
|
186 - | crate::model::LengthPatternString,
|
187 - | >,
|
188 - | > {
|
189 - | self.map_of_length_pattern_string.as_ref()
|
343 + | pub fn http_payload_bound_constrained_shape(&self) -> &crate::model::ConA {
|
344 + | &self.http_payload_bound_constrained_shape
|
190 345 | }
|
191 346 | }
|
192 - | impl QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
193 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
194 - | pub fn builder(
|
195 - | ) -> crate::input::query_params_targeting_map_of_length_pattern_string_operation_input::Builder
|
347 + | impl ConstrainedHttpPayloadBoundShapeOperationInput {
|
348 + | /// Creates a new builder-style object to manufacture [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
349 + | pub fn builder() -> crate::input::constrained_http_payload_bound_shape_operation_input::Builder
|
196 350 | {
|
197 - | crate::input::query_params_targeting_map_of_length_pattern_string_operation_input::Builder::default()
|
351 + | crate::input::constrained_http_payload_bound_shape_operation_input::Builder::default()
|
198 352 | }
|
199 353 | }
|
200 354 | impl crate::constrained::Constrained
|
201 - | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
355 + | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
202 356 | {
|
203 357 | type Unconstrained =
|
204 - | crate::input::query_params_targeting_map_of_length_pattern_string_operation_input::Builder;
|
358 + | crate::input::constrained_http_payload_bound_shape_operation_input::Builder;
|
205 359 | }
|
206 360 |
|
207 361 | #[allow(missing_docs)] // documentation missing in model
|
208 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
209 - | pub struct QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
362 + | #[derive(
|
363 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
364 + | )]
|
365 + | pub struct ConstrainedRecursiveShapesOperationInput {
|
210 366 | #[allow(missing_docs)] // documentation missing in model
|
211 - | pub map_of_list_of_pattern_string: ::std::option::Option<
|
212 - | ::std::collections::HashMap<
|
213 - | crate::model::PatternString,
|
214 - | ::std::vec::Vec<crate::model::PatternString>,
|
215 - | >,
|
216 - | >,
|
367 + | pub nested: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
368 + | #[allow(missing_docs)] // documentation missing in model
|
369 + | pub recursive_list: ::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
|
217 370 | }
|
218 - | impl QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
371 + | impl ConstrainedRecursiveShapesOperationInput {
|
219 372 | #[allow(missing_docs)] // documentation missing in model
|
220 - | pub fn map_of_list_of_pattern_string(
|
373 + | pub fn nested(
|
221 374 | &self,
|
222 - | ) -> ::std::option::Option<
|
223 - | &::std::collections::HashMap<
|
224 - | crate::model::PatternString,
|
225 - | ::std::vec::Vec<crate::model::PatternString>,
|
226 - | >,
|
227 - | > {
|
228 - | self.map_of_list_of_pattern_string.as_ref()
|
375 + | ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
|
376 + | self.nested.as_ref()
|
377 + | }
|
378 + | #[allow(missing_docs)] // documentation missing in model
|
379 + | pub fn recursive_list(&self) -> &[crate::model::RecursiveShapesInputOutputNested1] {
|
380 + | use std::ops::Deref;
|
381 + | self.recursive_list.deref()
|
229 382 | }
|
230 383 | }
|
231 - | impl QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
232 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
233 - | pub fn builder(
|
234 - | ) -> crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input::Builder
|
235 - | {
|
236 - | crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input::Builder::default()
|
384 + | impl ConstrainedRecursiveShapesOperationInput {
|
385 + | /// Creates a new builder-style object to manufacture [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
386 + | pub fn builder() -> crate::input::constrained_recursive_shapes_operation_input::Builder {
|
387 + | crate::input::constrained_recursive_shapes_operation_input::Builder::default()
|
237 388 | }
|
238 389 | }
|
239 - | impl crate::constrained::Constrained
|
240 - | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
241 - | {
|
242 - | type Unconstrained =
|
243 - | crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input::Builder;
|
390 + | impl crate::constrained::Constrained for crate::input::ConstrainedRecursiveShapesOperationInput {
|
391 + | type Unconstrained = crate::input::constrained_recursive_shapes_operation_input::Builder;
|
244 392 | }
|
245 393 |
|
246 394 | #[allow(missing_docs)] // documentation missing in model
|
247 395 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
248 - | pub struct QueryParamsTargetingMapOfPatternStringOperationInput {
|
396 + | pub struct QueryParamsTargetingLengthMapOperationInput {
|
249 397 | #[allow(missing_docs)] // documentation missing in model
|
250 - | pub map_of_pattern_string: ::std::option::Option<
|
251 - | ::std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>,
|
398 + | pub length_map: ::std::option::Option<crate::model::ConBMap>,
|
399 + | }
|
400 + | impl QueryParamsTargetingLengthMapOperationInput {
|
401 + | #[allow(missing_docs)] // documentation missing in model
|
402 + | pub fn length_map(&self) -> ::std::option::Option<&crate::model::ConBMap> {
|
403 + | self.length_map.as_ref()
|
404 + | }
|
405 + | }
|
406 + | impl QueryParamsTargetingLengthMapOperationInput {
|
407 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
408 + | pub fn builder() -> crate::input::query_params_targeting_length_map_operation_input::Builder {
|
409 + | crate::input::query_params_targeting_length_map_operation_input::Builder::default()
|
410 + | }
|
411 + | }
|
412 + | impl crate::constrained::Constrained for crate::input::QueryParamsTargetingLengthMapOperationInput {
|
413 + | type Unconstrained = crate::input::query_params_targeting_length_map_operation_input::Builder;
|
414 + | }
|
415 + |
|
416 + | #[allow(missing_docs)] // documentation missing in model
|
417 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
418 + | pub struct QueryParamsTargetingMapOfLengthStringOperationInput {
|
419 + | #[allow(missing_docs)] // documentation missing in model
|
420 + | pub map_of_length_string: ::std::option::Option<
|
421 + | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
252 422 | >,
|
253 423 | }
|
254 - | impl QueryParamsTargetingMapOfPatternStringOperationInput {
|
424 + | impl QueryParamsTargetingMapOfLengthStringOperationInput {
|
255 425 | #[allow(missing_docs)] // documentation missing in model
|
256 - | pub fn map_of_pattern_string(
|
426 + | pub fn map_of_length_string(
|
257 427 | &self,
|
258 428 | ) -> ::std::option::Option<
|
259 - | &::std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>,
|
429 + | &::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
260 430 | > {
|
261 - | self.map_of_pattern_string.as_ref()
|
431 + | self.map_of_length_string.as_ref()
|
262 432 | }
|
263 433 | }
|
264 - | impl QueryParamsTargetingMapOfPatternStringOperationInput {
|
265 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
434 + | impl QueryParamsTargetingMapOfLengthStringOperationInput {
|
435 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
266 436 | pub fn builder(
|
267 - | ) -> crate::input::query_params_targeting_map_of_pattern_string_operation_input::Builder {
|
268 - | crate::input::query_params_targeting_map_of_pattern_string_operation_input::Builder::default(
|
437 + | ) -> crate::input::query_params_targeting_map_of_length_string_operation_input::Builder {
|
438 + | crate::input::query_params_targeting_map_of_length_string_operation_input::Builder::default(
|
269 439 | )
|
270 440 | }
|
271 441 | }
|
272 442 | impl crate::constrained::Constrained
|
273 - | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
443 + | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
274 444 | {
|
275 445 | type Unconstrained =
|
276 - | crate::input::query_params_targeting_map_of_pattern_string_operation_input::Builder;
|
446 + | crate::input::query_params_targeting_map_of_length_string_operation_input::Builder;
|
277 447 | }
|
278 448 |
|
279 449 | #[allow(missing_docs)] // documentation missing in model
|
280 450 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
281 - | pub struct QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
451 + | pub struct QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
282 452 | #[allow(missing_docs)] // documentation missing in model
|
283 - | pub map_of_list_of_enum_string: ::std::option::Option<
|
453 + | pub map_of_list_of_length_string: ::std::option::Option<
|
284 454 | ::std::collections::HashMap<
|
285 - | crate::model::EnumString,
|
286 - | ::std::vec::Vec<crate::model::EnumString>,
|
455 + | crate::model::LengthString,
|
456 + | ::std::vec::Vec<crate::model::LengthString>,
|
287 457 | >,
|
288 458 | >,
|
289 459 | }
|
290 - | impl QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
460 + | impl QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
291 461 | #[allow(missing_docs)] // documentation missing in model
|
292 - | pub fn map_of_list_of_enum_string(
|
462 + | pub fn map_of_list_of_length_string(
|
293 463 | &self,
|
294 464 | ) -> ::std::option::Option<
|
295 465 | &::std::collections::HashMap<
|
296 - | crate::model::EnumString,
|
297 - | ::std::vec::Vec<crate::model::EnumString>,
|
466 + | crate::model::LengthString,
|
467 + | ::std::vec::Vec<crate::model::LengthString>,
|
298 468 | >,
|
299 469 | > {
|
300 - | self.map_of_list_of_enum_string.as_ref()
|
470 + | self.map_of_list_of_length_string.as_ref()
|
301 471 | }
|
302 472 | }
|
303 - | impl QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
304 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
473 + | impl QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
474 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
305 475 | pub fn builder(
|
306 - | ) -> crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input::Builder
|
476 + | ) -> crate::input::query_params_targeting_map_of_list_of_length_string_operation_input::Builder
|
307 477 | {
|
308 - | crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input::Builder::default()
|
478 + | crate::input::query_params_targeting_map_of_list_of_length_string_operation_input::Builder::default()
|
309 479 | }
|
310 480 | }
|
311 481 | impl crate::constrained::Constrained
|
312 - | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
482 + | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
313 483 | {
|
314 484 | type Unconstrained =
|
315 - | crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input::Builder;
|
485 + | crate::input::query_params_targeting_map_of_list_of_length_string_operation_input::Builder;
|
486 + | }
|
487 + |
|
488 + | #[allow(missing_docs)] // documentation missing in model
|
489 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
490 + | pub struct QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
491 + | #[allow(missing_docs)] // documentation missing in model
|
492 + | pub map_of_set_of_length_string: ::std::option::Option<
|
493 + | ::std::collections::HashMap<crate::model::LengthString, crate::model::SetOfLengthString>,
|
494 + | >,
|
495 + | }
|
496 + | impl QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
497 + | #[allow(missing_docs)] // documentation missing in model
|
498 + | pub fn map_of_set_of_length_string(
|
499 + | &self,
|
500 + | ) -> ::std::option::Option<
|
501 + | &::std::collections::HashMap<crate::model::LengthString, crate::model::SetOfLengthString>,
|
502 + | > {
|
503 + | self.map_of_set_of_length_string.as_ref()
|
504 + | }
|
505 + | }
|
506 + | impl QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
507 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
508 + | pub fn builder(
|
509 + | ) -> crate::input::query_params_targeting_map_of_set_of_length_string_operation_input::Builder
|
510 + | {
|
511 + | crate::input::query_params_targeting_map_of_set_of_length_string_operation_input::Builder::default()
|
512 + | }
|
513 + | }
|
514 + | impl crate::constrained::Constrained
|
515 + | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
516 + | {
|
517 + | type Unconstrained =
|
518 + | crate::input::query_params_targeting_map_of_set_of_length_string_operation_input::Builder;
|
316 519 | }
|
317 520 |
|
318 521 | #[allow(missing_docs)] // documentation missing in model
|
319 522 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
320 523 | pub struct QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
321 524 | #[allow(missing_docs)] // documentation missing in model
|
322 525 | pub map_of_length_list_of_pattern_string: ::std::option::Option<
|
323 526 | ::std::collections::HashMap<
|
324 527 | crate::model::PatternString,
|
325 528 | crate::model::LengthListOfPatternString,
|
326 529 | >,
|
327 530 | >,
|
328 531 | }
|
329 532 | impl QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
330 533 | #[allow(missing_docs)] // documentation missing in model
|
331 534 | pub fn map_of_length_list_of_pattern_string(
|
332 535 | &self,
|
333 536 | ) -> ::std::option::Option<
|
334 537 | &::std::collections::HashMap<
|
335 538 | crate::model::PatternString,
|
336 539 | crate::model::LengthListOfPatternString,
|
337 540 | >,
|
338 541 | > {
|
339 542 | self.map_of_length_list_of_pattern_string.as_ref()
|
340 543 | }
|
341 544 | }
|
342 545 | impl QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
343 546 | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
344 547 | pub fn builder() -> crate::input::query_params_targeting_map_of_length_list_of_pattern_string_operation_input::Builder{
|
345 548 | crate::input::query_params_targeting_map_of_length_list_of_pattern_string_operation_input::Builder::default()
|
346 549 | }
|
347 550 | }
|
348 551 | impl crate::constrained::Constrained
|
349 552 | for crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
350 553 | {
|
351 554 | type Unconstrained = crate::input::query_params_targeting_map_of_length_list_of_pattern_string_operation_input::Builder;
|
352 555 | }
|
353 556 |
|
354 557 | #[allow(missing_docs)] // documentation missing in model
|
355 558 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
356 - | pub struct QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
559 + | pub struct QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
357 560 | #[allow(missing_docs)] // documentation missing in model
|
358 - | pub map_of_set_of_length_string: ::std::option::Option<
|
359 - | ::std::collections::HashMap<crate::model::LengthString, crate::model::SetOfLengthString>,
|
561 + | pub map_of_list_of_enum_string: ::std::option::Option<
|
562 + | ::std::collections::HashMap<
|
563 + | crate::model::EnumString,
|
564 + | ::std::vec::Vec<crate::model::EnumString>,
|
565 + | >,
|
360 566 | >,
|
361 567 | }
|
362 - | impl QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
568 + | impl QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
363 569 | #[allow(missing_docs)] // documentation missing in model
|
364 - | pub fn map_of_set_of_length_string(
|
570 + | pub fn map_of_list_of_enum_string(
|
365 571 | &self,
|
366 572 | ) -> ::std::option::Option<
|
367 - | &::std::collections::HashMap<crate::model::LengthString, crate::model::SetOfLengthString>,
|
573 + | &::std::collections::HashMap<
|
574 + | crate::model::EnumString,
|
575 + | ::std::vec::Vec<crate::model::EnumString>,
|
576 + | >,
|
368 577 | > {
|
369 - | self.map_of_set_of_length_string.as_ref()
|
578 + | self.map_of_list_of_enum_string.as_ref()
|
370 579 | }
|
371 580 | }
|
372 - | impl QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
373 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
581 + | impl QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
582 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
374 583 | pub fn builder(
|
375 - | ) -> crate::input::query_params_targeting_map_of_set_of_length_string_operation_input::Builder
|
584 + | ) -> crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input::Builder
|
376 585 | {
|
377 - | crate::input::query_params_targeting_map_of_set_of_length_string_operation_input::Builder::default()
|
586 + | crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input::Builder::default()
|
378 587 | }
|
379 588 | }
|
380 589 | impl crate::constrained::Constrained
|
381 - | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
590 + | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
382 591 | {
|
383 592 | type Unconstrained =
|
384 - | crate::input::query_params_targeting_map_of_set_of_length_string_operation_input::Builder;
|
593 + | crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input::Builder;
|
385 594 | }
|
386 595 |
|
387 596 | #[allow(missing_docs)] // documentation missing in model
|
388 597 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
389 - | pub struct QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
598 + | pub struct QueryParamsTargetingMapOfPatternStringOperationInput {
|
390 599 | #[allow(missing_docs)] // documentation missing in model
|
391 - | pub map_of_list_of_length_string: ::std::option::Option<
|
392 - | ::std::collections::HashMap<
|
393 - | crate::model::LengthString,
|
394 - | ::std::vec::Vec<crate::model::LengthString>,
|
395 - | >,
|
600 + | pub map_of_pattern_string: ::std::option::Option<
|
601 + | ::std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>,
|
396 602 | >,
|
397 603 | }
|
398 - | impl QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
604 + | impl QueryParamsTargetingMapOfPatternStringOperationInput {
|
399 605 | #[allow(missing_docs)] // documentation missing in model
|
400 - | pub fn map_of_list_of_length_string(
|
606 + | pub fn map_of_pattern_string(
|
401 607 | &self,
|
402 608 | ) -> ::std::option::Option<
|
403 - | &::std::collections::HashMap<
|
404 - | crate::model::LengthString,
|
405 - | ::std::vec::Vec<crate::model::LengthString>,
|
406 - | >,
|
609 + | &::std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>,
|
407 610 | > {
|
408 - | self.map_of_list_of_length_string.as_ref()
|
611 + | self.map_of_pattern_string.as_ref()
|
409 612 | }
|
410 613 | }
|
411 - | impl QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
412 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
614 + | impl QueryParamsTargetingMapOfPatternStringOperationInput {
|
615 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
413 616 | pub fn builder(
|
414 - | ) -> crate::input::query_params_targeting_map_of_list_of_length_string_operation_input::Builder
|
415 - | {
|
416 - | crate::input::query_params_targeting_map_of_list_of_length_string_operation_input::Builder::default()
|
617 + | ) -> crate::input::query_params_targeting_map_of_pattern_string_operation_input::Builder {
|
618 + | crate::input::query_params_targeting_map_of_pattern_string_operation_input::Builder::default(
|
619 + | )
|
417 620 | }
|
418 621 | }
|
419 622 | impl crate::constrained::Constrained
|
420 - | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
623 + | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
421 624 | {
|
422 625 | type Unconstrained =
|
423 - | crate::input::query_params_targeting_map_of_list_of_length_string_operation_input::Builder;
|
626 + | crate::input::query_params_targeting_map_of_pattern_string_operation_input::Builder;
|
424 627 | }
|
425 628 |
|
426 629 | #[allow(missing_docs)] // documentation missing in model
|
427 630 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
428 - | pub struct QueryParamsTargetingMapOfLengthStringOperationInput {
|
631 + | pub struct QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
429 632 | #[allow(missing_docs)] // documentation missing in model
|
430 - | pub map_of_length_string: ::std::option::Option<
|
431 - | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
633 + | pub map_of_list_of_pattern_string: ::std::option::Option<
|
634 + | ::std::collections::HashMap<
|
635 + | crate::model::PatternString,
|
636 + | ::std::vec::Vec<crate::model::PatternString>,
|
637 + | >,
|
432 638 | >,
|
433 639 | }
|
434 - | impl QueryParamsTargetingMapOfLengthStringOperationInput {
|
640 + | impl QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
435 641 | #[allow(missing_docs)] // documentation missing in model
|
436 - | pub fn map_of_length_string(
|
642 + | pub fn map_of_list_of_pattern_string(
|
437 643 | &self,
|
438 644 | ) -> ::std::option::Option<
|
439 - | &::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
645 + | &::std::collections::HashMap<
|
646 + | crate::model::PatternString,
|
647 + | ::std::vec::Vec<crate::model::PatternString>,
|
648 + | >,
|
440 649 | > {
|
441 - | self.map_of_length_string.as_ref()
|
650 + | self.map_of_list_of_pattern_string.as_ref()
|
442 651 | }
|
443 652 | }
|
444 - | impl QueryParamsTargetingMapOfLengthStringOperationInput {
|
445 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
653 + | impl QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
654 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
446 655 | pub fn builder(
|
447 - | ) -> crate::input::query_params_targeting_map_of_length_string_operation_input::Builder {
|
448 - | crate::input::query_params_targeting_map_of_length_string_operation_input::Builder::default(
|
449 - | )
|
656 + | ) -> crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input::Builder
|
657 + | {
|
658 + | crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input::Builder::default()
|
450 659 | }
|
451 660 | }
|
452 661 | impl crate::constrained::Constrained
|
453 - | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
662 + | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
454 663 | {
|
455 664 | type Unconstrained =
|
456 - | crate::input::query_params_targeting_map_of_length_string_operation_input::Builder;
|
665 + | crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input::Builder;
|
457 666 | }
|
458 667 |
|
459 668 | #[allow(missing_docs)] // documentation missing in model
|
460 669 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
461 - | pub struct QueryParamsTargetingLengthMapOperationInput {
|
670 + | pub struct QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
462 671 | #[allow(missing_docs)] // documentation missing in model
|
463 - | pub length_map: ::std::option::Option<crate::model::ConBMap>,
|
672 + | pub map_of_length_pattern_string: ::std::option::Option<
|
673 + | ::std::collections::HashMap<
|
674 + | crate::model::LengthPatternString,
|
675 + | crate::model::LengthPatternString,
|
676 + | >,
|
677 + | >,
|
464 678 | }
|
465 - | impl QueryParamsTargetingLengthMapOperationInput {
|
679 + | impl QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
466 680 | #[allow(missing_docs)] // documentation missing in model
|
467 - | pub fn length_map(&self) -> ::std::option::Option<&crate::model::ConBMap> {
|
468 - | self.length_map.as_ref()
|
681 + | pub fn map_of_length_pattern_string(
|
682 + | &self,
|
683 + | ) -> ::std::option::Option<
|
684 + | &::std::collections::HashMap<
|
685 + | crate::model::LengthPatternString,
|
686 + | crate::model::LengthPatternString,
|
687 + | >,
|
688 + | > {
|
689 + | self.map_of_length_pattern_string.as_ref()
|
469 690 | }
|
470 691 | }
|
471 - | impl QueryParamsTargetingLengthMapOperationInput {
|
472 - | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
473 - | pub fn builder() -> crate::input::query_params_targeting_length_map_operation_input::Builder {
|
474 - | crate::input::query_params_targeting_length_map_operation_input::Builder::default()
|
692 + | impl QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
693 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
694 + | pub fn builder(
|
695 + | ) -> crate::input::query_params_targeting_map_of_length_pattern_string_operation_input::Builder
|
696 + | {
|
697 + | crate::input::query_params_targeting_map_of_length_pattern_string_operation_input::Builder::default()
|
475 698 | }
|
476 699 | }
|
477 - | impl crate::constrained::Constrained for crate::input::QueryParamsTargetingLengthMapOperationInput {
|
478 - | type Unconstrained = crate::input::query_params_targeting_length_map_operation_input::Builder;
|
700 + | impl crate::constrained::Constrained
|
701 + | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
702 + | {
|
703 + | type Unconstrained =
|
704 + | crate::input::query_params_targeting_map_of_length_pattern_string_operation_input::Builder;
|
479 705 | }
|
480 706 |
|
481 707 | #[allow(missing_docs)] // documentation missing in model
|
482 - | #[derive(
|
483 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
484 - | )]
|
485 - | pub struct ConstrainedRecursiveShapesOperationInput {
|
486 - | #[allow(missing_docs)] // documentation missing in model
|
487 - | pub nested: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
708 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
709 + | pub struct QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
488 710 | #[allow(missing_docs)] // documentation missing in model
|
489 - | pub recursive_list: ::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
|
711 + | pub map_of_length_pattern_string: ::std::option::Option<
|
712 + | ::std::collections::HashMap<
|
713 + | crate::model::LengthPatternString,
|
714 + | ::std::vec::Vec<crate::model::LengthPatternString>,
|
715 + | >,
|
716 + | >,
|
490 717 | }
|
491 - | impl ConstrainedRecursiveShapesOperationInput {
|
718 + | impl QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
492 719 | #[allow(missing_docs)] // documentation missing in model
|
493 - | pub fn nested(
|
720 + | pub fn map_of_length_pattern_string(
|
494 721 | &self,
|
495 - | ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
|
496 - | self.nested.as_ref()
|
497 - | }
|
498 - | #[allow(missing_docs)] // documentation missing in model
|
499 - | pub fn recursive_list(&self) -> &[crate::model::RecursiveShapesInputOutputNested1] {
|
500 - | use std::ops::Deref;
|
501 - | self.recursive_list.deref()
|
722 + | ) -> ::std::option::Option<
|
723 + | &::std::collections::HashMap<
|
724 + | crate::model::LengthPatternString,
|
725 + | ::std::vec::Vec<crate::model::LengthPatternString>,
|
726 + | >,
|
727 + | > {
|
728 + | self.map_of_length_pattern_string.as_ref()
|
502 729 | }
|
503 730 | }
|
504 - | impl ConstrainedRecursiveShapesOperationInput {
|
505 - | /// Creates a new builder-style object to manufacture [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
506 - | pub fn builder() -> crate::input::constrained_recursive_shapes_operation_input::Builder {
|
507 - | crate::input::constrained_recursive_shapes_operation_input::Builder::default()
|
731 + | impl QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
732 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
733 + | pub fn builder() -> crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input::Builder{
|
734 + | crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input::Builder::default()
|
508 735 | }
|
509 736 | }
|
510 - | impl crate::constrained::Constrained for crate::input::ConstrainedRecursiveShapesOperationInput {
|
511 - | type Unconstrained = crate::input::constrained_recursive_shapes_operation_input::Builder;
|
737 + | impl crate::constrained::Constrained
|
738 + | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
739 + | {
|
740 + | type Unconstrained = crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input::Builder;
|
512 741 | }
|
513 742 |
|
514 743 | #[allow(missing_docs)] // documentation missing in model
|
515 744 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
516 - | pub struct ConstrainedHttpPayloadBoundShapeOperationInput {
|
745 + | pub struct HttpPrefixHeadersTargetingLengthMapOperationInput {
|
517 746 | #[allow(missing_docs)] // documentation missing in model
|
518 - | pub http_payload_bound_constrained_shape: crate::model::ConA,
|
747 + | pub length_map: ::std::option::Option<crate::model::ConBMap>,
|
519 748 | }
|
520 - | impl ConstrainedHttpPayloadBoundShapeOperationInput {
|
749 + | impl HttpPrefixHeadersTargetingLengthMapOperationInput {
|
521 750 | #[allow(missing_docs)] // documentation missing in model
|
522 - | pub fn http_payload_bound_constrained_shape(&self) -> &crate::model::ConA {
|
523 - | &self.http_payload_bound_constrained_shape
|
751 + | pub fn length_map(&self) -> ::std::option::Option<&crate::model::ConBMap> {
|
752 + | self.length_map.as_ref()
|
524 753 | }
|
525 754 | }
|
526 - | impl ConstrainedHttpPayloadBoundShapeOperationInput {
|
527 - | /// Creates a new builder-style object to manufacture [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
528 - | pub fn builder() -> crate::input::constrained_http_payload_bound_shape_operation_input::Builder
|
529 - | {
|
530 - | crate::input::constrained_http_payload_bound_shape_operation_input::Builder::default()
|
755 + | impl HttpPrefixHeadersTargetingLengthMapOperationInput {
|
756 + | /// Creates a new builder-style object to manufacture [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
757 + | pub fn builder(
|
758 + | ) -> crate::input::http_prefix_headers_targeting_length_map_operation_input::Builder {
|
759 + | crate::input::http_prefix_headers_targeting_length_map_operation_input::Builder::default()
|
531 760 | }
|
532 761 | }
|
533 762 | impl crate::constrained::Constrained
|
534 - | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
763 + | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
535 764 | {
|
536 765 | type Unconstrained =
|
537 - | crate::input::constrained_http_payload_bound_shape_operation_input::Builder;
|
766 + | crate::input::http_prefix_headers_targeting_length_map_operation_input::Builder;
|
538 767 | }
|
539 768 |
|
540 769 | #[allow(missing_docs)] // documentation missing in model
|
541 770 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
542 - | pub struct ConstrainedHttpBoundShapesOperationInput {
|
543 - | #[allow(missing_docs)] // documentation missing in model
|
544 - | pub length_string_label: crate::model::LengthString,
|
545 - | #[allow(missing_docs)] // documentation missing in model
|
546 - | pub range_integer_label: crate::model::RangeInteger,
|
547 - | #[allow(missing_docs)] // documentation missing in model
|
548 - | pub range_short_label: crate::model::RangeShort,
|
549 - | #[allow(missing_docs)] // documentation missing in model
|
550 - | pub range_long_label: crate::model::RangeLong,
|
551 - | #[allow(missing_docs)] // documentation missing in model
|
552 - | pub range_byte_label: crate::model::RangeByte,
|
553 - | #[allow(missing_docs)] // documentation missing in model
|
554 - | pub enum_string_label: crate::model::EnumString,
|
555 - | #[allow(missing_docs)] // documentation missing in model
|
556 - | pub length_string_header_map:
|
557 - | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
558 - | #[allow(missing_docs)] // documentation missing in model
|
559 - | pub length_string_header: ::std::option::Option<crate::model::LengthString>,
|
560 - | #[allow(missing_docs)] // documentation missing in model
|
561 - | pub range_integer_header: crate::model::RangeInteger,
|
562 - | #[allow(missing_docs)] // documentation missing in model
|
563 - | pub range_short_header: crate::model::RangeShort,
|
564 - | #[allow(missing_docs)] // documentation missing in model
|
565 - | pub range_long_header: crate::model::RangeLong,
|
566 - | #[allow(missing_docs)] // documentation missing in model
|
567 - | pub range_byte_header: crate::model::RangeByte,
|
568 - | #[allow(missing_docs)] // documentation missing in model
|
569 - | pub length_string_set_header: ::std::option::Option<crate::model::SetOfLengthString>,
|
570 - | #[allow(missing_docs)] // documentation missing in model
|
571 - | pub list_length_string_header:
|
572 - | ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
|
573 - | #[allow(missing_docs)] // documentation missing in model
|
574 - | pub length_list_pattern_string_header:
|
575 - | ::std::option::Option<crate::model::LengthListOfPatternString>,
|
576 - | #[allow(missing_docs)] // documentation missing in model
|
577 - | pub length_set_pattern_string_header:
|
578 - | ::std::option::Option<crate::model::LengthSetOfPatternString>,
|
579 - | #[allow(missing_docs)] // documentation missing in model
|
580 - | pub range_byte_set_header: ::std::option::Option<crate::model::SetOfRangeByte>,
|
581 - | #[allow(missing_docs)] // documentation missing in model
|
582 - | pub range_short_set_header: ::std::option::Option<crate::model::SetOfRangeShort>,
|
583 - | #[allow(missing_docs)] // documentation missing in model
|
584 - | pub range_integer_set_header: ::std::option::Option<crate::model::SetOfRangeInteger>,
|
585 - | #[allow(missing_docs)] // documentation missing in model
|
586 - | pub range_long_set_header: ::std::option::Option<crate::model::SetOfRangeLong>,
|
587 - | #[allow(missing_docs)] // documentation missing in model
|
588 - | pub range_byte_list_header: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
|
589 - | #[allow(missing_docs)] // documentation missing in model
|
590 - | pub range_short_list_header: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
|
591 - | #[allow(missing_docs)] // documentation missing in model
|
592 - | pub range_integer_list_header:
|
593 - | ::std::option::Option<::std::vec::Vec<crate::model::RangeInteger>>,
|
594 - | #[allow(missing_docs)] // documentation missing in model
|
595 - | pub range_long_list_header: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
|
596 - | #[allow(missing_docs)] // documentation missing in model
|
597 - | pub length_string_query: ::std::option::Option<crate::model::LengthString>,
|
598 - | #[allow(missing_docs)] // documentation missing in model
|
599 - | pub range_byte_query: crate::model::RangeByte,
|
600 - | #[allow(missing_docs)] // documentation missing in model
|
601 - | pub range_short_query: crate::model::RangeShort,
|
602 - | #[allow(missing_docs)] // documentation missing in model
|
603 - | pub range_integer_query: crate::model::RangeInteger,
|
604 - | #[allow(missing_docs)] // documentation missing in model
|
605 - | pub range_long_query: crate::model::RangeLong,
|
606 - | #[allow(missing_docs)] // documentation missing in model
|
607 - | pub enum_string_query: ::std::option::Option<crate::model::EnumString>,
|
608 - | #[allow(missing_docs)] // documentation missing in model
|
609 - | pub length_string_list_query:
|
610 - | ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
|
611 - | #[allow(missing_docs)] // documentation missing in model
|
612 - | pub length_list_pattern_string_query:
|
613 - | ::std::option::Option<crate::model::LengthListOfPatternString>,
|
614 - | #[allow(missing_docs)] // documentation missing in model
|
615 - | pub length_string_set_query: ::std::option::Option<crate::model::SetOfLengthString>,
|
616 - | #[allow(missing_docs)] // documentation missing in model
|
617 - | pub range_byte_list_query: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
|
618 - | #[allow(missing_docs)] // documentation missing in model
|
619 - | pub range_short_list_query: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
|
620 - | #[allow(missing_docs)] // documentation missing in model
|
621 - | pub range_integer_list_query:
|
622 - | ::std::option::Option<::std::vec::Vec<crate::model::RangeInteger>>,
|
623 - | #[allow(missing_docs)] // documentation missing in model
|
624 - | pub range_long_list_query: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
|
625 - | #[allow(missing_docs)] // documentation missing in model
|
626 - | pub range_byte_set_query: ::std::option::Option<crate::model::SetOfRangeByte>,
|
627 - | #[allow(missing_docs)] // documentation missing in model
|
628 - | pub range_short_set_query: ::std::option::Option<crate::model::SetOfRangeShort>,
|
629 - | #[allow(missing_docs)] // documentation missing in model
|
630 - | pub range_integer_set_query: ::std::option::Option<crate::model::SetOfRangeInteger>,
|
631 - | #[allow(missing_docs)] // documentation missing in model
|
632 - | pub range_long_set_query: ::std::option::Option<crate::model::SetOfRangeLong>,
|
771 + | pub struct QueryParamsTargetingMapOfEnumStringOperationInput {
|
633 772 | #[allow(missing_docs)] // documentation missing in model
|
634 - | pub enum_string_list_query: ::std::option::Option<::std::vec::Vec<crate::model::EnumString>>,
|
773 + | pub map_of_enum_string: ::std::option::Option<
|
774 + | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
775 + | >,
|
635 776 | }
|
636 - | impl ConstrainedHttpBoundShapesOperationInput {
|
637 - | #[allow(missing_docs)] // documentation missing in model
|
638 - | pub fn length_string_label(&self) -> &crate::model::LengthString {
|
639 - | &self.length_string_label
|
640 - | }
|
777 + | impl QueryParamsTargetingMapOfEnumStringOperationInput {
|
641 778 | #[allow(missing_docs)] // documentation missing in model
|
642 - | pub fn range_integer_label(&self) -> &crate::model::RangeInteger {
|
643 - | &self.range_integer_label
|
779 + | pub fn map_of_enum_string(
|
780 + | &self,
|
781 + | ) -> ::std::option::Option<
|
782 + | &::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
783 + | > {
|
784 + | self.map_of_enum_string.as_ref()
|
644 785 | }
|
645 - | #[allow(missing_docs)] // documentation missing in model
|
646 - | pub fn range_short_label(&self) -> &crate::model::RangeShort {
|
647 - | &self.range_short_label
|
786 + | }
|
787 + | impl QueryParamsTargetingMapOfEnumStringOperationInput {
|
788 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
789 + | pub fn builder(
|
790 + | ) -> crate::input::query_params_targeting_map_of_enum_string_operation_input::Builder {
|
791 + | crate::input::query_params_targeting_map_of_enum_string_operation_input::Builder::default()
|
648 792 | }
|
793 + | }
|
794 + | impl crate::constrained::Constrained
|
795 + | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
796 + | {
|
797 + | type Unconstrained =
|
798 + | crate::input::query_params_targeting_map_of_enum_string_operation_input::Builder;
|
799 + | }
|
800 + |
|
801 + | #[allow(missing_docs)] // documentation missing in model
|
802 + | #[derive(
|
803 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
804 + | )]
|
805 + | pub struct NonStreamingBlobOperationInput {
|
649 806 | #[allow(missing_docs)] // documentation missing in model
|
650 - | pub fn range_long_label(&self) -> &crate::model::RangeLong {
|
651 - | &self.range_long_label
|
652 - | }
|
807 + | pub non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
808 + | }
|
809 + | impl NonStreamingBlobOperationInput {
|
653 810 | #[allow(missing_docs)] // documentation missing in model
|
654 - | pub fn range_byte_label(&self) -> &crate::model::RangeByte {
|
655 - | &self.range_byte_label
|
811 + | pub fn non_streaming_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
|
812 + | self.non_streaming_blob.as_ref()
|
656 813 | }
|
657 - | #[allow(missing_docs)] // documentation missing in model
|
658 - | pub fn enum_string_label(&self) -> &crate::model::EnumString {
|
659 - | &self.enum_string_label
|
814 + | }
|
815 + | impl NonStreamingBlobOperationInput {
|
816 + | /// Creates a new builder-style object to manufacture [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
817 + | pub fn builder() -> crate::input::non_streaming_blob_operation_input::Builder {
|
818 + | crate::input::non_streaming_blob_operation_input::Builder::default()
|
660 819 | }
|
820 + | }
|
821 + | impl crate::constrained::Constrained for crate::input::NonStreamingBlobOperationInput {
|
822 + | type Unconstrained = crate::input::non_streaming_blob_operation_input::Builder;
|
823 + | }
|
824 + |
|
825 + | #[allow(missing_docs)] // documentation missing in model
|
826 + | #[derive(::std::fmt::Debug)]
|
827 + | pub struct StreamingBlobOperationInput {
|
661 828 | #[allow(missing_docs)] // documentation missing in model
|
662 - | pub fn length_string_header_map(
|
663 - | &self,
|
664 - | ) -> &::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString> {
|
665 - | &self.length_string_header_map
|
666 - | }
|
829 + | pub streaming_blob: ::aws_smithy_types::byte_stream::ByteStream,
|
830 + | }
|
831 + | impl StreamingBlobOperationInput {
|
667 832 | #[allow(missing_docs)] // documentation missing in model
|
668 - | pub fn length_string_header(&self) -> ::std::option::Option<&crate::model::LengthString> {
|
669 - | self.length_string_header.as_ref()
|
833 + | pub fn streaming_blob(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
|
834 + | &self.streaming_blob
|
670 835 | }
|
671 - | #[allow(missing_docs)] // documentation missing in model
|
672 - | pub fn range_integer_header(&self) -> &crate::model::RangeInteger {
|
673 - | &self.range_integer_header
|
836 + | }
|
837 + | impl StreamingBlobOperationInput {
|
838 + | /// Creates a new builder-style object to manufacture [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
839 + | pub fn builder() -> crate::input::streaming_blob_operation_input::Builder {
|
840 + | crate::input::streaming_blob_operation_input::Builder::default()
|
674 841 | }
|
842 + | }
|
843 + | impl crate::constrained::Constrained for crate::input::StreamingBlobOperationInput {
|
844 + | type Unconstrained = crate::input::streaming_blob_operation_input::Builder;
|
845 + | }
|
846 + |
|
847 + | #[allow(missing_docs)] // documentation missing in model
|
848 + | #[derive(::std::fmt::Debug)]
|
849 + | pub struct EventStreamsOperationInput {
|
675 850 | #[allow(missing_docs)] // documentation missing in model
|
676 - | pub fn range_short_header(&self) -> &crate::model::RangeShort {
|
677 - | &self.range_short_header
|
678 - | }
|
851 + | pub events:
|
852 + | ::aws_smithy_http::event_stream::Receiver<crate::model::Event, crate::error::EventError>,
|
853 + | }
|
854 + | impl EventStreamsOperationInput {
|
679 855 | #[allow(missing_docs)] // documentation missing in model
|
680 - | pub fn range_long_header(&self) -> &crate::model::RangeLong {
|
681 - | &self.range_long_header
|
682 - | }
|
683 - | #[allow(missing_docs)] // documentation missing in model
|
684 - | pub fn range_byte_header(&self) -> &crate::model::RangeByte {
|
685 - | &self.range_byte_header
|
686 - | }
|
687 - | #[allow(missing_docs)] // documentation missing in model
|
688 - | pub fn length_string_set_header(
|
689 - | &self,
|
690 - | ) -> ::std::option::Option<&crate::model::SetOfLengthString> {
|
691 - | self.length_string_set_header.as_ref()
|
692 - | }
|
693 - | #[allow(missing_docs)] // documentation missing in model
|
694 - | pub fn list_length_string_header(
|
695 - | &self,
|
696 - | ) -> ::std::option::Option<&[crate::model::LengthString]> {
|
697 - | self.list_length_string_header.as_deref()
|
698 - | }
|
699 - | #[allow(missing_docs)] // documentation missing in model
|
700 - | pub fn length_list_pattern_string_header(
|
701 - | &self,
|
702 - | ) -> ::std::option::Option<&crate::model::LengthListOfPatternString> {
|
703 - | self.length_list_pattern_string_header.as_ref()
|
704 - | }
|
705 - | #[allow(missing_docs)] // documentation missing in model
|
706 - | pub fn length_set_pattern_string_header(
|
707 - | &self,
|
708 - | ) -> ::std::option::Option<&crate::model::LengthSetOfPatternString> {
|
709 - | self.length_set_pattern_string_header.as_ref()
|
710 - | }
|
711 - | #[allow(missing_docs)] // documentation missing in model
|
712 - | pub fn range_byte_set_header(&self) -> ::std::option::Option<&crate::model::SetOfRangeByte> {
|
713 - | self.range_byte_set_header.as_ref()
|
714 - | }
|
715 - | #[allow(missing_docs)] // documentation missing in model
|
716 - | pub fn range_short_set_header(&self) -> ::std::option::Option<&crate::model::SetOfRangeShort> {
|
717 - | self.range_short_set_header.as_ref()
|
718 - | }
|
719 - | #[allow(missing_docs)] // documentation missing in model
|
720 - | pub fn range_integer_set_header(
|
721 - | &self,
|
722 - | ) -> ::std::option::Option<&crate::model::SetOfRangeInteger> {
|
723 - | self.range_integer_set_header.as_ref()
|
724 - | }
|
725 - | #[allow(missing_docs)] // documentation missing in model
|
726 - | pub fn range_long_set_header(&self) -> ::std::option::Option<&crate::model::SetOfRangeLong> {
|
727 - | self.range_long_set_header.as_ref()
|
728 - | }
|
729 - | #[allow(missing_docs)] // documentation missing in model
|
730 - | pub fn range_byte_list_header(&self) -> ::std::option::Option<&[crate::model::RangeByte]> {
|
731 - | self.range_byte_list_header.as_deref()
|
732 - | }
|
733 - | #[allow(missing_docs)] // documentation missing in model
|
734 - | pub fn range_short_list_header(&self) -> ::std::option::Option<&[crate::model::RangeShort]> {
|
735 - | self.range_short_list_header.as_deref()
|
736 - | }
|
737 - | #[allow(missing_docs)] // documentation missing in model
|
738 - | pub fn range_integer_list_header(
|
739 - | &self,
|
740 - | ) -> ::std::option::Option<&[crate::model::RangeInteger]> {
|
741 - | self.range_integer_list_header.as_deref()
|
742 - | }
|
743 - | #[allow(missing_docs)] // documentation missing in model
|
744 - | pub fn range_long_list_header(&self) -> ::std::option::Option<&[crate::model::RangeLong]> {
|
745 - | self.range_long_list_header.as_deref()
|
746 - | }
|
747 - | #[allow(missing_docs)] // documentation missing in model
|
748 - | pub fn length_string_query(&self) -> ::std::option::Option<&crate::model::LengthString> {
|
749 - | self.length_string_query.as_ref()
|
750 - | }
|
751 - | #[allow(missing_docs)] // documentation missing in model
|
752 - | pub fn range_byte_query(&self) -> &crate::model::RangeByte {
|
753 - | &self.range_byte_query
|
754 - | }
|
755 - | #[allow(missing_docs)] // documentation missing in model
|
756 - | pub fn range_short_query(&self) -> &crate::model::RangeShort {
|
757 - | &self.range_short_query
|
758 - | }
|
759 - | #[allow(missing_docs)] // documentation missing in model
|
760 - | pub fn range_integer_query(&self) -> &crate::model::RangeInteger {
|
761 - | &self.range_integer_query
|
762 - | }
|
763 - | #[allow(missing_docs)] // documentation missing in model
|
764 - | pub fn range_long_query(&self) -> &crate::model::RangeLong {
|
765 - | &self.range_long_query
|
766 - | }
|
767 - | #[allow(missing_docs)] // documentation missing in model
|
768 - | pub fn enum_string_query(&self) -> ::std::option::Option<&crate::model::EnumString> {
|
769 - | self.enum_string_query.as_ref()
|
770 - | }
|
771 - | #[allow(missing_docs)] // documentation missing in model
|
772 - | pub fn length_string_list_query(&self) -> ::std::option::Option<&[crate::model::LengthString]> {
|
773 - | self.length_string_list_query.as_deref()
|
774 - | }
|
775 - | #[allow(missing_docs)] // documentation missing in model
|
776 - | pub fn length_list_pattern_string_query(
|
777 - | &self,
|
778 - | ) -> ::std::option::Option<&crate::model::LengthListOfPatternString> {
|
779 - | self.length_list_pattern_string_query.as_ref()
|
780 - | }
|
781 - | #[allow(missing_docs)] // documentation missing in model
|
782 - | pub fn length_string_set_query(
|
783 - | &self,
|
784 - | ) -> ::std::option::Option<&crate::model::SetOfLengthString> {
|
785 - | self.length_string_set_query.as_ref()
|
786 - | }
|
787 - | #[allow(missing_docs)] // documentation missing in model
|
788 - | pub fn range_byte_list_query(&self) -> ::std::option::Option<&[crate::model::RangeByte]> {
|
789 - | self.range_byte_list_query.as_deref()
|
790 - | }
|
791 - | #[allow(missing_docs)] // documentation missing in model
|
792 - | pub fn range_short_list_query(&self) -> ::std::option::Option<&[crate::model::RangeShort]> {
|
793 - | self.range_short_list_query.as_deref()
|
794 - | }
|
795 - | #[allow(missing_docs)] // documentation missing in model
|
796 - | pub fn range_integer_list_query(&self) -> ::std::option::Option<&[crate::model::RangeInteger]> {
|
797 - | self.range_integer_list_query.as_deref()
|
798 - | }
|
799 - | #[allow(missing_docs)] // documentation missing in model
|
800 - | pub fn range_long_list_query(&self) -> ::std::option::Option<&[crate::model::RangeLong]> {
|
801 - | self.range_long_list_query.as_deref()
|
802 - | }
|
803 - | #[allow(missing_docs)] // documentation missing in model
|
804 - | pub fn range_byte_set_query(&self) -> ::std::option::Option<&crate::model::SetOfRangeByte> {
|
805 - | self.range_byte_set_query.as_ref()
|
806 - | }
|
807 - | #[allow(missing_docs)] // documentation missing in model
|
808 - | pub fn range_short_set_query(&self) -> ::std::option::Option<&crate::model::SetOfRangeShort> {
|
809 - | self.range_short_set_query.as_ref()
|
810 - | }
|
811 - | #[allow(missing_docs)] // documentation missing in model
|
812 - | pub fn range_integer_set_query(
|
856 + | pub fn events(
|
813 857 | &self,
|
814 - | ) -> ::std::option::Option<&crate::model::SetOfRangeInteger> {
|
815 - | self.range_integer_set_query.as_ref()
|
816 - | }
|
817 - | #[allow(missing_docs)] // documentation missing in model
|
818 - | pub fn range_long_set_query(&self) -> ::std::option::Option<&crate::model::SetOfRangeLong> {
|
819 - | self.range_long_set_query.as_ref()
|
820 - | }
|
821 - | #[allow(missing_docs)] // documentation missing in model
|
822 - | pub fn enum_string_list_query(&self) -> ::std::option::Option<&[crate::model::EnumString]> {
|
823 - | self.enum_string_list_query.as_deref()
|
824 - | }
|
825 - | }
|
826 - | impl ConstrainedHttpBoundShapesOperationInput {
|
827 - | /// Creates a new builder-style object to manufacture [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
828 - | pub fn builder() -> crate::input::constrained_http_bound_shapes_operation_input::Builder {
|
829 - | crate::input::constrained_http_bound_shapes_operation_input::Builder::default()
|
830 - | }
|
831 - | }
|
832 - | impl crate::constrained::Constrained for crate::input::ConstrainedHttpBoundShapesOperationInput {
|
833 - | type Unconstrained = crate::input::constrained_http_bound_shapes_operation_input::Builder;
|
834 - | }
|
835 - |
|
836 - | #[allow(missing_docs)] // documentation missing in model
|
837 - | #[derive(
|
838 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
839 - | )]
|
840 - | pub struct ConstrainedShapesOnlyInOutputOperationInput {}
|
841 - | impl ConstrainedShapesOnlyInOutputOperationInput {
|
842 - | /// Creates a new builder-style object to manufacture [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
843 - | pub fn builder() -> crate::input::constrained_shapes_only_in_output_operation_input::Builder {
|
844 - | crate::input::constrained_shapes_only_in_output_operation_input::Builder::default()
|
845 - | }
|
846 - | }
|
847 - | impl crate::constrained::Constrained for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
848 - | type Unconstrained = crate::input::constrained_shapes_only_in_output_operation_input::Builder;
|
849 - | }
|
850 - |
|
851 - | #[allow(missing_docs)] // documentation missing in model
|
852 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
853 - | pub struct ConstrainedShapesOperationInput {
|
854 - | #[allow(missing_docs)] // documentation missing in model
|
855 - | pub con_a: crate::model::ConA,
|
856 - | }
|
857 - | impl ConstrainedShapesOperationInput {
|
858 - | #[allow(missing_docs)] // documentation missing in model
|
859 - | pub fn con_a(&self) -> &crate::model::ConA {
|
860 - | &self.con_a
|
858 + | ) -> &::aws_smithy_http::event_stream::Receiver<crate::model::Event, crate::error::EventError>
|
859 + | {
|
860 + | &self.events
|
861 861 | }
|
862 862 | }
|
863 - | impl ConstrainedShapesOperationInput {
|
864 - | /// Creates a new builder-style object to manufacture [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
865 - | pub fn builder() -> crate::input::constrained_shapes_operation_input::Builder {
|
866 - | crate::input::constrained_shapes_operation_input::Builder::default()
|
863 + | impl EventStreamsOperationInput {
|
864 + | /// Creates a new builder-style object to manufacture [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
865 + | pub fn builder() -> crate::input::event_streams_operation_input::Builder {
|
866 + | crate::input::event_streams_operation_input::Builder::default()
|
867 867 | }
|
868 868 | }
|
869 - | impl crate::constrained::Constrained for crate::input::ConstrainedShapesOperationInput {
|
870 - | type Unconstrained = crate::input::constrained_shapes_operation_input::Builder;
|
869 + | impl crate::constrained::Constrained for crate::input::EventStreamsOperationInput {
|
870 + | type Unconstrained = crate::input::event_streams_operation_input::Builder;
|
871 871 | }
|
872 - | /// See [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
873 - | pub mod event_streams_operation_input {
|
872 + | /// See [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
873 + | pub mod constrained_shapes_operation_input {
|
874 874 |
|
875 875 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
876 876 | /// Holds one variant for each of the ways the builder can fail.
|
877 877 | #[non_exhaustive]
|
878 878 | #[allow(clippy::enum_variant_names)]
|
879 879 | pub enum ConstraintViolation {
|
880 - | /// `events` was not provided but it is required when building `EventStreamsOperationInput`.
|
881 - | MissingEvents,
|
880 + | /// `con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`.
|
881 + | MissingConA,
|
882 + | /// Constraint violation occurred building member `con_a` when building `ConstrainedShapesOperationInput`.
|
883 + | #[doc(hidden)]
|
884 + | ConA(crate::model::con_a::ConstraintViolation),
|
882 885 | }
|
883 886 | impl ::std::fmt::Display for ConstraintViolation {
|
884 887 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
885 888 | match self {
|
886 - | ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `EventStreamsOperationInput`"),
|
889 + | ConstraintViolation::MissingConA => write!(f, "`con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`"),
|
890 + | ConstraintViolation::ConA(_) => write!(f, "constraint violation occurred building member `con_a` when building `ConstrainedShapesOperationInput`"),
|
887 891 | }
|
888 892 | }
|
889 893 | }
|
890 894 | impl ::std::error::Error for ConstraintViolation {}
|
891 895 | impl ConstraintViolation {
|
892 896 | pub(crate) fn as_validation_exception_field(
|
893 897 | self,
|
894 898 | path: ::std::string::String,
|
895 899 | ) -> crate::model::ValidationExceptionField {
|
896 900 | match self {
|
897 - | ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
|
898 - | message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
|
899 - | path: path + "/events",
|
901 + | ConstraintViolation::MissingConA => crate::model::ValidationExceptionField {
|
902 + | message: format!(
|
903 + | "Value at '{}/conA' failed to satisfy constraint: Member must not be null",
|
904 + | path
|
905 + | ),
|
906 + | path: path + "/conA",
|
900 907 | },
|
908 + | ConstraintViolation::ConA(inner) => {
|
909 + | inner.as_validation_exception_field(path + "/conA")
|
910 + | }
|
901 911 | }
|
902 912 | }
|
903 913 | }
|
904 914 | impl ::std::convert::From<ConstraintViolation>
|
905 915 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
906 916 | {
|
907 917 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
908 918 | let first_validation_exception_field =
|
909 919 | constraint_violation.as_validation_exception_field("".to_owned());
|
910 920 | let validation_exception = crate::error::ValidationException {
|
911 921 | message: format!(
|
912 922 | "1 validation error detected. {}",
|
913 923 | &first_validation_exception_field.message
|
914 924 | ),
|
915 925 | field_list: Some(vec![first_validation_exception_field]),
|
916 926 | };
|
917 927 | Self::ConstraintViolation(
|
918 928 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
919 929 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
920 930 | )
|
921 931 | }
|
922 932 | }
|
923 933 | impl ::std::convert::From<Builder>
|
924 - | for crate::constrained::MaybeConstrained<crate::input::EventStreamsOperationInput>
|
934 + | for crate::constrained::MaybeConstrained<crate::input::ConstrainedShapesOperationInput>
|
925 935 | {
|
926 936 | fn from(builder: Builder) -> Self {
|
927 937 | Self::Unconstrained(builder)
|
928 938 | }
|
929 939 | }
|
930 - | impl ::std::convert::TryFrom<Builder> for crate::input::EventStreamsOperationInput {
|
940 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedShapesOperationInput {
|
931 941 | type Error = ConstraintViolation;
|
932 942 |
|
933 943 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
934 944 | builder.build()
|
935 945 | }
|
936 946 | }
|
937 - | /// A builder for [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
938 - | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
947 + | /// A builder for [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
948 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
939 949 | pub struct Builder {
|
940 - | pub(crate) events: ::std::option::Option<
|
941 - | ::aws_smithy_http::event_stream::Receiver<
|
942 - | crate::model::Event,
|
943 - | crate::error::EventError,
|
944 - | >,
|
945 - | >,
|
950 + | pub(crate) con_a:
|
951 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
946 952 | }
|
947 953 | impl Builder {
|
948 954 | #[allow(missing_docs)] // documentation missing in model
|
949 - | pub fn events(
|
950 - | mut self,
|
951 - | input: ::aws_smithy_http::event_stream::Receiver<
|
952 - | crate::model::Event,
|
953 - | crate::error::EventError,
|
954 - | >,
|
955 - | ) -> Self {
|
956 - | self.events = Some(input);
|
955 + | pub fn con_a(mut self, input: crate::model::ConA) -> Self {
|
956 + | self.con_a = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
957 957 | self
|
958 958 | }
|
959 959 | #[allow(missing_docs)] // documentation missing in model
|
960 - | pub(crate) fn set_events(
|
960 + | pub(crate) fn set_con_a(
|
961 961 | mut self,
|
962 - | input: impl ::std::convert::Into<
|
963 - | ::aws_smithy_http::event_stream::Receiver<
|
964 - | crate::model::Event,
|
965 - | crate::error::EventError,
|
966 - | >,
|
967 - | >,
|
962 + | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
968 963 | ) -> Self {
|
969 - | self.events = Some(input.into());
|
964 + | self.con_a = Some(input.into());
|
970 965 | self
|
971 966 | }
|
972 - | /// Consumes the builder and constructs a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
967 + | /// Consumes the builder and constructs a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
973 968 | ///
|
974 - | /// The builder fails to construct a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput) if a [`ConstraintViolation`] occurs.
|
969 + | /// The builder fails to construct a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
975 970 | ///
|
971 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
976 972 | pub fn build(
|
977 973 | self,
|
978 - | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
974 + | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
979 975 | self.build_enforcing_all_constraints()
|
980 976 | }
|
981 977 | fn build_enforcing_all_constraints(
|
982 978 | self,
|
983 - | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
984 - | Ok(crate::input::EventStreamsOperationInput {
|
985 - | events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
|
979 + | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
980 + | Ok(crate::input::ConstrainedShapesOperationInput {
|
981 + | con_a: self
|
982 + | .con_a
|
983 + | .map(|v| match v {
|
984 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
985 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
986 + | })
|
987 + | .map(|res| res.map_err(ConstraintViolation::ConA))
|
988 + | .transpose()?
|
989 + | .ok_or(ConstraintViolation::MissingConA)?,
|
986 990 | })
|
987 991 | }
|
988 992 | }
|
989 993 | }
|
990 - | /// See [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
991 - | pub mod streaming_blob_operation_input {
|
992 - |
|
993 - | impl ::std::convert::From<Builder> for crate::input::StreamingBlobOperationInput {
|
994 - | fn from(builder: Builder) -> Self {
|
995 - | builder.build()
|
996 - | }
|
997 - | }
|
998 - | /// A builder for [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
999 - | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
1000 - | pub struct Builder {
|
1001 - | pub(crate) streaming_blob:
|
1002 - | ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
1003 - | }
|
1004 - | impl Builder {
|
1005 - | #[allow(missing_docs)] // documentation missing in model
|
1006 - | pub fn streaming_blob(
|
1007 - | mut self,
|
1008 - | input: ::aws_smithy_types::byte_stream::ByteStream,
|
1009 - | ) -> Self {
|
1010 - | self.streaming_blob = Some(input);
|
1011 - | self
|
1012 - | }
|
1013 - | #[allow(missing_docs)] // documentation missing in model
|
1014 - | pub(crate) fn set_streaming_blob(
|
1015 - | mut self,
|
1016 - | input: impl ::std::convert::Into<::aws_smithy_types::byte_stream::ByteStream>,
|
1017 - | ) -> Self {
|
1018 - | self.streaming_blob = Some(input.into());
|
1019 - | self
|
1020 - | }
|
1021 - | /// Consumes the builder and constructs a [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
1022 - | pub fn build(self) -> crate::input::StreamingBlobOperationInput {
|
1023 - | self.build_enforcing_all_constraints()
|
1024 - | }
|
1025 - | fn build_enforcing_all_constraints(self) -> crate::input::StreamingBlobOperationInput {
|
1026 - | crate::input::StreamingBlobOperationInput {
|
1027 - | streaming_blob: self.streaming_blob.unwrap_or_default(),
|
1028 - | }
|
1029 - | }
|
1030 - | }
|
1031 - | }
|
1032 - | /// See [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1033 - | pub mod non_streaming_blob_operation_input {
|
994 + | /// See [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
995 + | pub mod constrained_shapes_only_in_output_operation_input {
|
1034 996 |
|
1035 - | impl ::std::convert::From<Builder> for crate::input::NonStreamingBlobOperationInput {
|
997 + | impl ::std::convert::From<Builder> for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1036 998 | fn from(builder: Builder) -> Self {
|
1037 999 | builder.build()
|
1038 1000 | }
|
1039 1001 | }
|
1040 - | /// A builder for [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1002 + | /// A builder for [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
1041 1003 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1042 - | pub struct Builder {
|
1043 - | pub(crate) non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
1044 - | }
|
1004 + | pub struct Builder {}
|
1045 1005 | impl Builder {
|
1046 - | #[allow(missing_docs)] // documentation missing in model
|
1047 - | pub fn non_streaming_blob(
|
1048 - | mut self,
|
1049 - | input: ::std::option::Option<::aws_smithy_types::Blob>,
|
1050 - | ) -> Self {
|
1051 - | self.non_streaming_blob = input;
|
1052 - | self
|
1053 - | }
|
1054 - | #[allow(missing_docs)] // documentation missing in model
|
1055 - | pub(crate) fn set_non_streaming_blob(
|
1056 - | mut self,
|
1057 - | input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
|
1058 - | ) -> Self {
|
1059 - | self.non_streaming_blob = input.map(|v| v.into());
|
1060 - | self
|
1061 - | }
|
1062 - | /// Consumes the builder and constructs a [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1063 - | pub fn build(self) -> crate::input::NonStreamingBlobOperationInput {
|
1006 + | /// Consumes the builder and constructs a [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
1007 + | pub fn build(self) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1064 1008 | self.build_enforcing_all_constraints()
|
1065 1009 | }
|
1066 - | fn build_enforcing_all_constraints(self) -> crate::input::NonStreamingBlobOperationInput {
|
1067 - | crate::input::NonStreamingBlobOperationInput {
|
1068 - | non_streaming_blob: self.non_streaming_blob,
|
1069 - | }
|
1010 + | fn build_enforcing_all_constraints(
|
1011 + | self,
|
1012 + | ) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1013 + | crate::input::ConstrainedShapesOnlyInOutputOperationInput {}
|
1070 1014 | }
|
1071 1015 | }
|
1072 1016 | }
|
1073 - | /// See [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1074 - | pub mod query_params_targeting_map_of_enum_string_operation_input {
|
1017 + | /// See [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
1018 + | pub mod constrained_http_bound_shapes_operation_input {
|
1075 1019 |
|
1076 1020 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1077 1021 | /// Holds one variant for each of the ways the builder can fail.
|
1078 1022 | #[non_exhaustive]
|
1079 1023 | #[allow(clippy::enum_variant_names)]
|
1080 1024 | pub enum ConstraintViolation {
|
1081 - | /// Constraint violation occurred building member `map_of_enum_string` when building `QueryParamsTargetingMapOfEnumStringOperationInput`.
|
1025 + | /// `length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
1026 + | MissingLengthStringLabel,
|
1027 + | /// Constraint violation occurred building member `length_string_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1082 1028 | #[doc(hidden)]
|
1083 - | MapOfEnumString(crate::model::map_of_enum_string::ConstraintViolation),
|
1029 + | LengthStringLabel(crate::model::length_string::ConstraintViolation),
|
1030 + | /// Constraint violation occurred building member `range_integer_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1031 + | #[doc(hidden)]
|
1032 + | RangeIntegerLabel(crate::model::range_integer::ConstraintViolation),
|
1033 + | /// Constraint violation occurred building member `range_short_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1034 + | #[doc(hidden)]
|
1035 + | RangeShortLabel(crate::model::range_short::ConstraintViolation),
|
1036 + | /// Constraint violation occurred building member `range_long_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1037 + | #[doc(hidden)]
|
1038 + | RangeLongLabel(crate::model::range_long::ConstraintViolation),
|
1039 + | /// Constraint violation occurred building member `range_byte_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1040 + | #[doc(hidden)]
|
1041 + | RangeByteLabel(crate::model::range_byte::ConstraintViolation),
|
1042 + | /// `enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
1043 + | MissingEnumStringLabel,
|
1044 + | /// Constraint violation occurred building member `enum_string_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1045 + | #[doc(hidden)]
|
1046 + | EnumStringLabel(crate::model::enum_string::ConstraintViolation),
|
1047 + | /// `length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
1048 + | MissingLengthStringHeaderMap,
|
1049 + | /// Constraint violation occurred building member `length_string_header_map` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1050 + | #[doc(hidden)]
|
1051 + | LengthStringHeaderMap(crate::model::map_of_length_string::ConstraintViolation),
|
1052 + | /// Constraint violation occurred building member `length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1053 + | #[doc(hidden)]
|
1054 + | LengthStringHeader(crate::model::length_string::ConstraintViolation),
|
1055 + | /// Constraint violation occurred building member `range_integer_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1056 + | #[doc(hidden)]
|
1057 + | RangeIntegerHeader(crate::model::range_integer::ConstraintViolation),
|
1058 + | /// Constraint violation occurred building member `range_short_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1059 + | #[doc(hidden)]
|
1060 + | RangeShortHeader(crate::model::range_short::ConstraintViolation),
|
1061 + | /// Constraint violation occurred building member `range_long_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1062 + | #[doc(hidden)]
|
1063 + | RangeLongHeader(crate::model::range_long::ConstraintViolation),
|
1064 + | /// Constraint violation occurred building member `range_byte_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1065 + | #[doc(hidden)]
|
1066 + | RangeByteHeader(crate::model::range_byte::ConstraintViolation),
|
1067 + | /// Constraint violation occurred building member `length_string_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1068 + | #[doc(hidden)]
|
1069 + | LengthStringSetHeader(crate::model::set_of_length_string::ConstraintViolation),
|
1070 + | /// Constraint violation occurred building member `list_length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1071 + | #[doc(hidden)]
|
1072 + | ListLengthStringHeader(crate::model::list_of_length_string::ConstraintViolation),
|
1073 + | /// Constraint violation occurred building member `length_list_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1074 + | #[doc(hidden)]
|
1075 + | LengthListPatternStringHeader(
|
1076 + | crate::model::length_list_of_pattern_string::ConstraintViolation,
|
1077 + | ),
|
1078 + | /// Constraint violation occurred building member `length_set_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1079 + | #[doc(hidden)]
|
1080 + | LengthSetPatternStringHeader(
|
1081 + | crate::model::length_set_of_pattern_string::ConstraintViolation,
|
1082 + | ),
|
1083 + | /// Constraint violation occurred building member `range_byte_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1084 + | #[doc(hidden)]
|
1085 + | RangeByteSetHeader(crate::model::set_of_range_byte::ConstraintViolation),
|
1086 + | /// Constraint violation occurred building member `range_short_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1087 + | #[doc(hidden)]
|
1088 + | RangeShortSetHeader(crate::model::set_of_range_short::ConstraintViolation),
|
1089 + | /// Constraint violation occurred building member `range_integer_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1090 + | #[doc(hidden)]
|
1091 + | RangeIntegerSetHeader(crate::model::set_of_range_integer::ConstraintViolation),
|
1092 + | /// Constraint violation occurred building member `range_long_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1093 + | #[doc(hidden)]
|
1094 + | RangeLongSetHeader(crate::model::set_of_range_long::ConstraintViolation),
|
1095 + | /// Constraint violation occurred building member `range_byte_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1096 + | #[doc(hidden)]
|
1097 + | RangeByteListHeader(crate::model::list_of_range_byte::ConstraintViolation),
|
1098 + | /// Constraint violation occurred building member `range_short_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1099 + | #[doc(hidden)]
|
1100 + | RangeShortListHeader(crate::model::list_of_range_short::ConstraintViolation),
|
1101 + | /// Constraint violation occurred building member `range_integer_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1102 + | #[doc(hidden)]
|
1103 + | RangeIntegerListHeader(crate::model::list_of_range_integer::ConstraintViolation),
|
1104 + | /// Constraint violation occurred building member `range_long_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1105 + | #[doc(hidden)]
|
1106 + | RangeLongListHeader(crate::model::list_of_range_long::ConstraintViolation),
|
1107 + | /// Constraint violation occurred building member `length_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1108 + | #[doc(hidden)]
|
1109 + | LengthStringQuery(crate::model::length_string::ConstraintViolation),
|
1110 + | /// Constraint violation occurred building member `range_byte_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1111 + | #[doc(hidden)]
|
1112 + | RangeByteQuery(crate::model::range_byte::ConstraintViolation),
|
1113 + | /// Constraint violation occurred building member `range_short_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1114 + | #[doc(hidden)]
|
1115 + | RangeShortQuery(crate::model::range_short::ConstraintViolation),
|
1116 + | /// Constraint violation occurred building member `range_integer_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1117 + | #[doc(hidden)]
|
1118 + | RangeIntegerQuery(crate::model::range_integer::ConstraintViolation),
|
1119 + | /// Constraint violation occurred building member `range_long_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1120 + | #[doc(hidden)]
|
1121 + | RangeLongQuery(crate::model::range_long::ConstraintViolation),
|
1122 + | /// Constraint violation occurred building member `enum_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1123 + | #[doc(hidden)]
|
1124 + | EnumStringQuery(crate::model::enum_string::ConstraintViolation),
|
1125 + | /// Constraint violation occurred building member `length_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1126 + | #[doc(hidden)]
|
1127 + | LengthStringListQuery(crate::model::list_of_length_string::ConstraintViolation),
|
1128 + | /// Constraint violation occurred building member `length_list_pattern_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1129 + | #[doc(hidden)]
|
1130 + | LengthListPatternStringQuery(
|
1131 + | crate::model::length_list_of_pattern_string::ConstraintViolation,
|
1132 + | ),
|
1133 + | /// Constraint violation occurred building member `length_string_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1134 + | #[doc(hidden)]
|
1135 + | LengthStringSetQuery(crate::model::set_of_length_string::ConstraintViolation),
|
1136 + | /// Constraint violation occurred building member `range_byte_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1137 + | #[doc(hidden)]
|
1138 + | RangeByteListQuery(crate::model::list_of_range_byte::ConstraintViolation),
|
1139 + | /// Constraint violation occurred building member `range_short_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1140 + | #[doc(hidden)]
|
1141 + | RangeShortListQuery(crate::model::list_of_range_short::ConstraintViolation),
|
1142 + | /// Constraint violation occurred building member `range_integer_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1143 + | #[doc(hidden)]
|
1144 + | RangeIntegerListQuery(crate::model::list_of_range_integer::ConstraintViolation),
|
1145 + | /// Constraint violation occurred building member `range_long_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1146 + | #[doc(hidden)]
|
1147 + | RangeLongListQuery(crate::model::list_of_range_long::ConstraintViolation),
|
1148 + | /// Constraint violation occurred building member `range_byte_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1149 + | #[doc(hidden)]
|
1150 + | RangeByteSetQuery(crate::model::set_of_range_byte::ConstraintViolation),
|
1151 + | /// Constraint violation occurred building member `range_short_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1152 + | #[doc(hidden)]
|
1153 + | RangeShortSetQuery(crate::model::set_of_range_short::ConstraintViolation),
|
1154 + | /// Constraint violation occurred building member `range_integer_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1155 + | #[doc(hidden)]
|
1156 + | RangeIntegerSetQuery(crate::model::set_of_range_integer::ConstraintViolation),
|
1157 + | /// Constraint violation occurred building member `range_long_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1158 + | #[doc(hidden)]
|
1159 + | RangeLongSetQuery(crate::model::set_of_range_long::ConstraintViolation),
|
1160 + | /// Constraint violation occurred building member `enum_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1161 + | #[doc(hidden)]
|
1162 + | EnumStringListQuery(crate::model::list_of_enum_string::ConstraintViolation),
|
1084 1163 | }
|
1085 1164 | impl ::std::fmt::Display for ConstraintViolation {
|
1086 1165 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1087 1166 | match self {
|
1088 - | ConstraintViolation::MapOfEnumString(_) => write!(f, "constraint violation occurred building member `map_of_enum_string` when building `QueryParamsTargetingMapOfEnumStringOperationInput`"),
|
1089 - | }
|
1090 - | }
|
1091 - | }
|
1092 - | impl ::std::error::Error for ConstraintViolation {}
|
1093 - | impl ConstraintViolation {
|
1094 - | pub(crate) fn as_validation_exception_field(
|
1167 + | ConstraintViolation::MissingLengthStringLabel => write!(f, "`length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1168 + | ConstraintViolation::LengthStringLabel(_) => write!(f, "constraint violation occurred building member `length_string_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1169 + | ConstraintViolation::RangeIntegerLabel(_) => write!(f, "constraint violation occurred building member `range_integer_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1170 + | ConstraintViolation::RangeShortLabel(_) => write!(f, "constraint violation occurred building member `range_short_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1171 + | ConstraintViolation::RangeLongLabel(_) => write!(f, "constraint violation occurred building member `range_long_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1172 + | ConstraintViolation::RangeByteLabel(_) => write!(f, "constraint violation occurred building member `range_byte_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1173 + | ConstraintViolation::MissingEnumStringLabel => write!(f, "`enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1174 + | ConstraintViolation::EnumStringLabel(_) => write!(f, "constraint violation occurred building member `enum_string_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1175 + | ConstraintViolation::MissingLengthStringHeaderMap => write!(f, "`length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1176 + | ConstraintViolation::LengthStringHeaderMap(_) => write!(f, "constraint violation occurred building member `length_string_header_map` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1177 + | ConstraintViolation::LengthStringHeader(_) => write!(f, "constraint violation occurred building member `length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1178 + | ConstraintViolation::RangeIntegerHeader(_) => write!(f, "constraint violation occurred building member `range_integer_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1179 + | ConstraintViolation::RangeShortHeader(_) => write!(f, "constraint violation occurred building member `range_short_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1180 + | ConstraintViolation::RangeLongHeader(_) => write!(f, "constraint violation occurred building member `range_long_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1181 + | ConstraintViolation::RangeByteHeader(_) => write!(f, "constraint violation occurred building member `range_byte_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1182 + | ConstraintViolation::LengthStringSetHeader(_) => write!(f, "constraint violation occurred building member `length_string_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1183 + | ConstraintViolation::ListLengthStringHeader(_) => write!(f, "constraint violation occurred building member `list_length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1184 + | ConstraintViolation::LengthListPatternStringHeader(_) => write!(f, "constraint violation occurred building member `length_list_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1185 + | ConstraintViolation::LengthSetPatternStringHeader(_) => write!(f, "constraint violation occurred building member `length_set_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1186 + | ConstraintViolation::RangeByteSetHeader(_) => write!(f, "constraint violation occurred building member `range_byte_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1187 + | ConstraintViolation::RangeShortSetHeader(_) => write!(f, "constraint violation occurred building member `range_short_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1188 + | ConstraintViolation::RangeIntegerSetHeader(_) => write!(f, "constraint violation occurred building member `range_integer_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1189 + | ConstraintViolation::RangeLongSetHeader(_) => write!(f, "constraint violation occurred building member `range_long_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1190 + | ConstraintViolation::RangeByteListHeader(_) => write!(f, "constraint violation occurred building member `range_byte_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1191 + | ConstraintViolation::RangeShortListHeader(_) => write!(f, "constraint violation occurred building member `range_short_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1192 + | ConstraintViolation::RangeIntegerListHeader(_) => write!(f, "constraint violation occurred building member `range_integer_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1193 + | ConstraintViolation::RangeLongListHeader(_) => write!(f, "constraint violation occurred building member `range_long_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1194 + | ConstraintViolation::LengthStringQuery(_) => write!(f, "constraint violation occurred building member `length_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1195 + | ConstraintViolation::RangeByteQuery(_) => write!(f, "constraint violation occurred building member `range_byte_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1196 + | ConstraintViolation::RangeShortQuery(_) => write!(f, "constraint violation occurred building member `range_short_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1197 + | ConstraintViolation::RangeIntegerQuery(_) => write!(f, "constraint violation occurred building member `range_integer_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1198 + | ConstraintViolation::RangeLongQuery(_) => write!(f, "constraint violation occurred building member `range_long_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1199 + | ConstraintViolation::EnumStringQuery(_) => write!(f, "constraint violation occurred building member `enum_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1200 + | ConstraintViolation::LengthStringListQuery(_) => write!(f, "constraint violation occurred building member `length_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1201 + | ConstraintViolation::LengthListPatternStringQuery(_) => write!(f, "constraint violation occurred building member `length_list_pattern_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1202 + | ConstraintViolation::LengthStringSetQuery(_) => write!(f, "constraint violation occurred building member `length_string_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1203 + | ConstraintViolation::RangeByteListQuery(_) => write!(f, "constraint violation occurred building member `range_byte_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1204 + | ConstraintViolation::RangeShortListQuery(_) => write!(f, "constraint violation occurred building member `range_short_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1205 + | ConstraintViolation::RangeIntegerListQuery(_) => write!(f, "constraint violation occurred building member `range_integer_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1206 + | ConstraintViolation::RangeLongListQuery(_) => write!(f, "constraint violation occurred building member `range_long_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1207 + | ConstraintViolation::RangeByteSetQuery(_) => write!(f, "constraint violation occurred building member `range_byte_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1208 + | ConstraintViolation::RangeShortSetQuery(_) => write!(f, "constraint violation occurred building member `range_short_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1209 + | ConstraintViolation::RangeIntegerSetQuery(_) => write!(f, "constraint violation occurred building member `range_integer_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1210 + | ConstraintViolation::RangeLongSetQuery(_) => write!(f, "constraint violation occurred building member `range_long_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1211 + | ConstraintViolation::EnumStringListQuery(_) => write!(f, "constraint violation occurred building member `enum_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1212 + | }
|
1213 + | }
|
1214 + | }
|
1215 + | impl ::std::error::Error for ConstraintViolation {}
|
1216 + | impl ConstraintViolation {
|
1217 + | pub(crate) fn as_validation_exception_field(
|
1095 1218 | self,
|
1096 1219 | path: ::std::string::String,
|
1097 1220 | ) -> crate::model::ValidationExceptionField {
|
1098 1221 | match self {
|
1099 - | ConstraintViolation::MapOfEnumString(inner) => {
|
1100 - | inner.as_validation_exception_field(path + "/mapOfEnumString")
|
1101 - | }
|
1222 + | ConstraintViolation::MissingLengthStringLabel => crate::model::ValidationExceptionField {
|
1223 + | message: format!("Value at '{}/lengthStringLabel' failed to satisfy constraint: Member must not be null", path),
|
1224 + | path: path + "/lengthStringLabel",
|
1225 + | },
|
1226 + | ConstraintViolation::LengthStringLabel(inner) => inner.as_validation_exception_field(path + "/lengthStringLabel"),
|
1227 + | ConstraintViolation::RangeIntegerLabel(inner) => inner.as_validation_exception_field(path + "/rangeIntegerLabel"),
|
1228 + | ConstraintViolation::RangeShortLabel(inner) => inner.as_validation_exception_field(path + "/rangeShortLabel"),
|
1229 + | ConstraintViolation::RangeLongLabel(inner) => inner.as_validation_exception_field(path + "/rangeLongLabel"),
|
1230 + | ConstraintViolation::RangeByteLabel(inner) => inner.as_validation_exception_field(path + "/rangeByteLabel"),
|
1231 + | ConstraintViolation::MissingEnumStringLabel => crate::model::ValidationExceptionField {
|
1232 + | message: format!("Value at '{}/enumStringLabel' failed to satisfy constraint: Member must not be null", path),
|
1233 + | path: path + "/enumStringLabel",
|
1234 + | },
|
1235 + | ConstraintViolation::EnumStringLabel(inner) => inner.as_validation_exception_field(path + "/enumStringLabel"),
|
1236 + | ConstraintViolation::MissingLengthStringHeaderMap => crate::model::ValidationExceptionField {
|
1237 + | message: format!("Value at '{}/lengthStringHeaderMap' failed to satisfy constraint: Member must not be null", path),
|
1238 + | path: path + "/lengthStringHeaderMap",
|
1239 + | },
|
1240 + | ConstraintViolation::LengthStringHeaderMap(inner) => inner.as_validation_exception_field(path + "/lengthStringHeaderMap"),
|
1241 + | ConstraintViolation::LengthStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthStringHeader"),
|
1242 + | ConstraintViolation::RangeIntegerHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerHeader"),
|
1243 + | ConstraintViolation::RangeShortHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortHeader"),
|
1244 + | ConstraintViolation::RangeLongHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongHeader"),
|
1245 + | ConstraintViolation::RangeByteHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteHeader"),
|
1246 + | ConstraintViolation::LengthStringSetHeader(inner) => inner.as_validation_exception_field(path + "/lengthStringSetHeader"),
|
1247 + | ConstraintViolation::ListLengthStringHeader(inner) => inner.as_validation_exception_field(path + "/listLengthStringHeader"),
|
1248 + | ConstraintViolation::LengthListPatternStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthListPatternStringHeader"),
|
1249 + | ConstraintViolation::LengthSetPatternStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthSetPatternStringHeader"),
|
1250 + | ConstraintViolation::RangeByteSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteSetHeader"),
|
1251 + | ConstraintViolation::RangeShortSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortSetHeader"),
|
1252 + | ConstraintViolation::RangeIntegerSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerSetHeader"),
|
1253 + | ConstraintViolation::RangeLongSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongSetHeader"),
|
1254 + | ConstraintViolation::RangeByteListHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteListHeader"),
|
1255 + | ConstraintViolation::RangeShortListHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortListHeader"),
|
1256 + | ConstraintViolation::RangeIntegerListHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerListHeader"),
|
1257 + | ConstraintViolation::RangeLongListHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongListHeader"),
|
1258 + | ConstraintViolation::LengthStringQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringQuery"),
|
1259 + | ConstraintViolation::RangeByteQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteQuery"),
|
1260 + | ConstraintViolation::RangeShortQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortQuery"),
|
1261 + | ConstraintViolation::RangeIntegerQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerQuery"),
|
1262 + | ConstraintViolation::RangeLongQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongQuery"),
|
1263 + | ConstraintViolation::EnumStringQuery(inner) => inner.as_validation_exception_field(path + "/enumStringQuery"),
|
1264 + | ConstraintViolation::LengthStringListQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringListQuery"),
|
1265 + | ConstraintViolation::LengthListPatternStringQuery(inner) => inner.as_validation_exception_field(path + "/lengthListPatternStringQuery"),
|
1266 + | ConstraintViolation::LengthStringSetQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringSetQuery"),
|
1267 + | ConstraintViolation::RangeByteListQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteListQuery"),
|
1268 + | ConstraintViolation::RangeShortListQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortListQuery"),
|
1269 + | ConstraintViolation::RangeIntegerListQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerListQuery"),
|
1270 + | ConstraintViolation::RangeLongListQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongListQuery"),
|
1271 + | ConstraintViolation::RangeByteSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteSetQuery"),
|
1272 + | ConstraintViolation::RangeShortSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortSetQuery"),
|
1273 + | ConstraintViolation::RangeIntegerSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerSetQuery"),
|
1274 + | ConstraintViolation::RangeLongSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongSetQuery"),
|
1275 + | ConstraintViolation::EnumStringListQuery(inner) => inner.as_validation_exception_field(path + "/enumStringListQuery"),
|
1102 1276 | }
|
1103 1277 | }
|
1104 1278 | }
|
1105 1279 | impl ::std::convert::From<ConstraintViolation>
|
1106 1280 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1107 1281 | {
|
1108 1282 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1109 1283 | let first_validation_exception_field =
|
1110 1284 | constraint_violation.as_validation_exception_field("".to_owned());
|
1111 1285 | let validation_exception = crate::error::ValidationException {
|
1112 1286 | message: format!(
|
1113 1287 | "1 validation error detected. {}",
|
1114 1288 | &first_validation_exception_field.message
|
1115 1289 | ),
|
1116 1290 | field_list: Some(vec![first_validation_exception_field]),
|
1117 1291 | };
|
1118 1292 | Self::ConstraintViolation(
|
1119 1293 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1120 1294 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1121 1295 | )
|
1122 1296 | }
|
1123 1297 | }
|
1124 1298 | impl ::std::convert::From<Builder>
|
1125 1299 | for crate::constrained::MaybeConstrained<
|
1126 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
1300 + | crate::input::ConstrainedHttpBoundShapesOperationInput,
|
1127 1301 | >
|
1128 1302 | {
|
1129 1303 | fn from(builder: Builder) -> Self {
|
1130 1304 | Self::Unconstrained(builder)
|
1131 1305 | }
|
1132 1306 | }
|
1133 - | impl ::std::convert::TryFrom<Builder>
|
1134 - | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
1135 - | {
|
1307 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedHttpBoundShapesOperationInput {
|
1136 1308 | type Error = ConstraintViolation;
|
1137 1309 |
|
1138 1310 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1139 1311 | builder.build()
|
1140 1312 | }
|
1141 1313 | }
|
1142 - | /// A builder for [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1314 + | /// A builder for [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
1143 1315 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1144 1316 | pub struct Builder {
|
1145 - | pub(crate) map_of_enum_string: ::std::option::Option<
|
1146 - | crate::constrained::MaybeConstrained<
|
1147 - | crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained,
|
1148 - | >,
|
1149 - | >,
|
1317 + | pub(crate) length_string_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
1318 + | pub(crate) range_integer_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
1319 + | pub(crate) range_short_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
1320 + | pub(crate) range_long_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
1321 + | pub(crate) range_byte_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
1322 + | pub(crate) enum_string_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EnumString>>,
|
1323 + | pub(crate) length_string_header_map: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
|
1324 + | pub(crate) length_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
1325 + | pub(crate) range_integer_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
1326 + | pub(crate) range_short_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
1327 + | pub(crate) range_long_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
1328 + | pub(crate) range_byte_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
1329 + | pub(crate) length_string_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>>,
|
1330 + | pub(crate) list_length_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>,
|
1331 + | pub(crate) length_list_pattern_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>>,
|
1332 + | pub(crate) length_set_pattern_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>>,
|
1333 + | pub(crate) range_byte_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>>,
|
1334 + | pub(crate) range_short_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>>,
|
1335 + | pub(crate) range_integer_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>>,
|
1336 + | pub(crate) range_long_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>>,
|
1337 + | pub(crate) range_byte_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>,
|
1338 + | pub(crate) range_short_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>,
|
1339 + | pub(crate) range_integer_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>,
|
1340 + | pub(crate) range_long_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>,
|
1341 + | pub(crate) length_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
1342 + | pub(crate) range_byte_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
1343 + | pub(crate) range_short_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
1344 + | pub(crate) range_integer_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
1345 + | pub(crate) range_long_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
1346 + | pub(crate) enum_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EnumString>>,
|
1347 + | pub(crate) length_string_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>,
|
1348 + | pub(crate) length_list_pattern_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>>,
|
1349 + | pub(crate) length_string_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>>,
|
1350 + | pub(crate) range_byte_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>,
|
1351 + | pub(crate) range_short_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>,
|
1352 + | pub(crate) range_integer_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>,
|
1353 + | pub(crate) range_long_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>,
|
1354 + | pub(crate) range_byte_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>>,
|
1355 + | pub(crate) range_short_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>>,
|
1356 + | pub(crate) range_integer_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>>,
|
1357 + | pub(crate) range_long_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>>,
|
1358 + | pub(crate) enum_string_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>>,
|
1150 1359 | }
|
1151 1360 | impl Builder {
|
1152 1361 | #[allow(missing_docs)] // documentation missing in model
|
1153 - | pub fn map_of_enum_string(
|
1362 + | pub fn length_string_label(mut self, input: crate::model::LengthString) -> Self {
|
1363 + | self.length_string_label =
|
1364 + | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1365 + | self
|
1366 + | }
|
1367 + | #[allow(missing_docs)] // documentation missing in model
|
1368 + | pub(crate) fn set_length_string_label(
|
1154 1369 | mut self,
|
1155 - | input: ::std::option::Option<
|
1156 - | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
1370 + | input: impl ::std::convert::Into<
|
1371 + | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
1157 1372 | >,
|
1158 1373 | ) -> Self {
|
1159 - | self.map_of_enum_string =
|
1160 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1374 + | self.length_string_label = Some(input.into());
|
1161 1375 | self
|
1162 1376 | }
|
1163 1377 | #[allow(missing_docs)] // documentation missing in model
|
1164 - | pub(crate) fn set_map_of_enum_string(
|
1378 + | pub fn range_integer_label(mut self, input: crate::model::RangeInteger) -> Self {
|
1379 + | self.range_integer_label =
|
1380 + | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1381 + | self
|
1382 + | }
|
1383 + | #[allow(missing_docs)] // documentation missing in model
|
1384 + | pub(crate) fn set_range_integer_label(
|
1165 1385 | mut self,
|
1166 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained>>>,
|
1386 + | input: impl ::std::convert::Into<
|
1387 + | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
1388 + | >,
|
1167 1389 | ) -> Self {
|
1168 - | self.map_of_enum_string = input.map(|v| v.into());
|
1390 + | self.range_integer_label = Some(input.into());
|
1169 1391 | self
|
1170 1392 | }
|
1171 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1172 - | ///
|
1173 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1174 - | ///
|
1175 - | pub fn build(
|
1176 - | self,
|
1177 - | ) -> Result<
|
1178 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
1179 - | ConstraintViolation,
|
1180 - | > {
|
1181 - | self.build_enforcing_all_constraints()
|
1182 - | }
|
1183 - | fn build_enforcing_all_constraints(
|
1184 - | self,
|
1185 - | ) -> Result<
|
1186 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
1187 - | ConstraintViolation,
|
1188 - | > {
|
1189 - | Ok(
|
1190 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
1191 - | map_of_enum_string: self
|
1192 - | .map_of_enum_string
|
1193 - | .map(|v| match v {
|
1194 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1195 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1196 - | })
|
1197 - | .map(|res| {
|
1198 - | res.map(|v| v.into())
|
1199 - | .map_err(ConstraintViolation::MapOfEnumString)
|
1200 - | })
|
1201 - | .transpose()?,
|
1202 - | },
|
1203 - | )
|
1393 + | #[allow(missing_docs)] // documentation missing in model
|
1394 + | pub fn range_short_label(mut self, input: crate::model::RangeShort) -> Self {
|
1395 + | self.range_short_label = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1396 + | self
|
1204 1397 | }
|
1398 + | #[allow(missing_docs)] // documentation missing in model
|
1399 + | pub(crate) fn set_range_short_label(
|
1400 + | mut self,
|
1401 + | input: impl ::std::convert::Into<
|
1402 + | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
1403 + | >,
|
1404 + | ) -> Self {
|
1405 + | self.range_short_label = Some(input.into());
|
1406 + | self
|
1205 1407 | }
|
1206 - | }
|
1207 - | /// See [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
1208 - | pub mod http_prefix_headers_targeting_length_map_operation_input {
|
1209 - |
|
1210 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1211 - | /// Holds one variant for each of the ways the builder can fail.
|
1212 - | #[non_exhaustive]
|
1213 - | #[allow(clippy::enum_variant_names)]
|
1214 - | pub enum ConstraintViolation {
|
1215 - | /// Constraint violation occurred building member `length_map` when building `HttpPrefixHeadersTargetingLengthMapOperationInput`.
|
1216 - | #[doc(hidden)]
|
1217 - | LengthMap(crate::model::con_b_map::ConstraintViolation),
|
1218 - | }
|
1219 - | impl ::std::fmt::Display for ConstraintViolation {
|
1220 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1221 - | match self {
|
1222 - | ConstraintViolation::LengthMap(_) => write!(f, "constraint violation occurred building member `length_map` when building `HttpPrefixHeadersTargetingLengthMapOperationInput`"),
|
1408 + | #[allow(missing_docs)] // documentation missing in model
|
1409 + | pub fn range_long_label(mut self, input: crate::model::RangeLong) -> Self {
|
1410 + | self.range_long_label = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1411 + | self
|
1223 1412 | }
|
1413 + | #[allow(missing_docs)] // documentation missing in model
|
1414 + | pub(crate) fn set_range_long_label(
|
1415 + | mut self,
|
1416 + | input: impl ::std::convert::Into<
|
1417 + | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
1418 + | >,
|
1419 + | ) -> Self {
|
1420 + | self.range_long_label = Some(input.into());
|
1421 + | self
|
1224 1422 | }
|
1423 + | #[allow(missing_docs)] // documentation missing in model
|
1424 + | pub fn range_byte_label(mut self, input: crate::model::RangeByte) -> Self {
|
1425 + | self.range_byte_label = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1426 + | self
|
1225 1427 | }
|
1226 - | impl ::std::error::Error for ConstraintViolation {}
|
1227 - | impl ConstraintViolation {
|
1228 - | pub(crate) fn as_validation_exception_field(
|
1229 - | self,
|
1230 - | path: ::std::string::String,
|
1231 - | ) -> crate::model::ValidationExceptionField {
|
1232 - | match self {
|
1233 - | ConstraintViolation::LengthMap(inner) => {
|
1234 - | inner.as_validation_exception_field(path + "/lengthMap")
|
1428 + | #[allow(missing_docs)] // documentation missing in model
|
1429 + | pub(crate) fn set_range_byte_label(
|
1430 + | mut self,
|
1431 + | input: impl ::std::convert::Into<
|
1432 + | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
1433 + | >,
|
1434 + | ) -> Self {
|
1435 + | self.range_byte_label = Some(input.into());
|
1436 + | self
|
1235 1437 | }
|
1438 + | #[allow(missing_docs)] // documentation missing in model
|
1439 + | pub fn enum_string_label(mut self, input: crate::model::EnumString) -> Self {
|
1440 + | self.enum_string_label = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1441 + | self
|
1236 1442 | }
|
1443 + | #[allow(missing_docs)] // documentation missing in model
|
1444 + | pub(crate) fn set_enum_string_label(
|
1445 + | mut self,
|
1446 + | input: impl ::std::convert::Into<
|
1447 + | crate::constrained::MaybeConstrained<crate::model::EnumString>,
|
1448 + | >,
|
1449 + | ) -> Self {
|
1450 + | self.enum_string_label = Some(input.into());
|
1451 + | self
|
1237 1452 | }
|
1453 + | #[allow(missing_docs)] // documentation missing in model
|
1454 + | pub fn length_string_header_map(
|
1455 + | mut self,
|
1456 + | input: ::std::collections::HashMap<
|
1457 + | crate::model::LengthString,
|
1458 + | crate::model::LengthString,
|
1459 + | >,
|
1460 + | ) -> Self {
|
1461 + | self.length_string_header_map = Some(
|
1462 + | crate::constrained::MaybeConstrained::Constrained((input).into()),
|
1463 + | );
|
1464 + | self
|
1238 1465 | }
|
1239 - | impl ::std::convert::From<ConstraintViolation>
|
1240 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1241 - | {
|
1242 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1243 - | let first_validation_exception_field =
|
1244 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1245 - | let validation_exception = crate::error::ValidationException {
|
1246 - | message: format!(
|
1247 - | "1 validation error detected. {}",
|
1248 - | &first_validation_exception_field.message
|
1249 - | ),
|
1250 - | field_list: Some(vec![first_validation_exception_field]),
|
1251 - | };
|
1252 - | Self::ConstraintViolation(
|
1253 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1254 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1255 - | )
|
1466 + | #[allow(missing_docs)] // documentation missing in model
|
1467 + | pub(crate) fn set_length_string_header_map(
|
1468 + | mut self,
|
1469 + | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
|
1470 + | ) -> Self {
|
1471 + | self.length_string_header_map = Some(input.into());
|
1472 + | self
|
1256 1473 | }
|
1474 + | #[allow(missing_docs)] // documentation missing in model
|
1475 + | pub fn length_string_header(
|
1476 + | mut self,
|
1477 + | input: ::std::option::Option<crate::model::LengthString>,
|
1478 + | ) -> Self {
|
1479 + | self.length_string_header =
|
1480 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1481 + | self
|
1257 1482 | }
|
1258 - | impl ::std::convert::From<Builder>
|
1259 - | for crate::constrained::MaybeConstrained<
|
1260 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
1261 - | >
|
1262 - | {
|
1263 - | fn from(builder: Builder) -> Self {
|
1264 - | Self::Unconstrained(builder)
|
1483 + | #[allow(missing_docs)] // documentation missing in model
|
1484 + | pub(crate) fn set_length_string_header(
|
1485 + | mut self,
|
1486 + | input: Option<
|
1487 + | impl ::std::convert::Into<
|
1488 + | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
1489 + | >,
|
1490 + | >,
|
1491 + | ) -> Self {
|
1492 + | self.length_string_header = input.map(|v| v.into());
|
1493 + | self
|
1265 1494 | }
|
1495 + | #[allow(missing_docs)] // documentation missing in model
|
1496 + | pub fn range_integer_header(mut self, input: crate::model::RangeInteger) -> Self {
|
1497 + | self.range_integer_header =
|
1498 + | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1499 + | self
|
1266 1500 | }
|
1267 - | impl ::std::convert::TryFrom<Builder>
|
1268 - | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
1269 - | {
|
1270 - | type Error = ConstraintViolation;
|
1271 - |
|
1272 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1273 - | builder.build()
|
1501 + | #[allow(missing_docs)] // documentation missing in model
|
1502 + | pub(crate) fn set_range_integer_header(
|
1503 + | mut self,
|
1504 + | input: impl ::std::convert::Into<
|
1505 + | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
1506 + | >,
|
1507 + | ) -> Self {
|
1508 + | self.range_integer_header = Some(input.into());
|
1509 + | self
|
1274 1510 | }
|
1511 + | #[allow(missing_docs)] // documentation missing in model
|
1512 + | pub fn range_short_header(mut self, input: crate::model::RangeShort) -> Self {
|
1513 + | self.range_short_header =
|
1514 + | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1515 + | self
|
1275 1516 | }
|
1276 - | /// A builder for [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
1277 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1278 - | pub struct Builder {
|
1279 - | pub(crate) length_map:
|
1280 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
1517 + | #[allow(missing_docs)] // documentation missing in model
|
1518 + | pub(crate) fn set_range_short_header(
|
1519 + | mut self,
|
1520 + | input: impl ::std::convert::Into<
|
1521 + | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
1522 + | >,
|
1523 + | ) -> Self {
|
1524 + | self.range_short_header = Some(input.into());
|
1525 + | self
|
1281 1526 | }
|
1282 - | impl Builder {
|
1283 1527 | #[allow(missing_docs)] // documentation missing in model
|
1284 - | pub fn length_map(mut self, input: ::std::option::Option<crate::model::ConBMap>) -> Self {
|
1285 - | self.length_map = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1528 + | pub fn range_long_header(mut self, input: crate::model::RangeLong) -> Self {
|
1529 + | self.range_long_header = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1286 1530 | self
|
1287 1531 | }
|
1288 1532 | #[allow(missing_docs)] // documentation missing in model
|
1289 - | pub(crate) fn set_length_map(
|
1533 + | pub(crate) fn set_range_long_header(
|
1290 1534 | mut self,
|
1291 - | input: Option<
|
1292 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
1535 + | input: impl ::std::convert::Into<
|
1536 + | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
1293 1537 | >,
|
1294 1538 | ) -> Self {
|
1295 - | self.length_map = input.map(|v| v.into());
|
1539 + | self.range_long_header = Some(input.into());
|
1296 1540 | self
|
1297 1541 | }
|
1298 - | /// Consumes the builder and constructs a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
1299 - | ///
|
1300 - | /// The builder fails to construct a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput) if a [`ConstraintViolation`] occurs.
|
1301 - | ///
|
1302 - | pub fn build(
|
1303 - | self,
|
1304 - | ) -> Result<
|
1305 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
1306 - | ConstraintViolation,
|
1307 - | > {
|
1308 - | self.build_enforcing_all_constraints()
|
1542 + | #[allow(missing_docs)] // documentation missing in model
|
1543 + | pub fn range_byte_header(mut self, input: crate::model::RangeByte) -> Self {
|
1544 + | self.range_byte_header = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1545 + | self
|
1309 1546 | }
|
1310 - | fn build_enforcing_all_constraints(
|
1311 - | self,
|
1312 - | ) -> Result<
|
1313 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
1314 - | ConstraintViolation,
|
1315 - | > {
|
1316 - | Ok(
|
1317 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
1318 - | length_map: self
|
1319 - | .length_map
|
1320 - | .map(|v| match v {
|
1321 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1322 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1323 - | })
|
1324 - | .map(|res| res.map_err(ConstraintViolation::LengthMap))
|
1325 - | .transpose()?,
|
1326 - | },
|
1327 - | )
|
1547 + | #[allow(missing_docs)] // documentation missing in model
|
1548 + | pub(crate) fn set_range_byte_header(
|
1549 + | mut self,
|
1550 + | input: impl ::std::convert::Into<
|
1551 + | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
1552 + | >,
|
1553 + | ) -> Self {
|
1554 + | self.range_byte_header = Some(input.into());
|
1555 + | self
|
1328 1556 | }
|
1557 + | #[allow(missing_docs)] // documentation missing in model
|
1558 + | pub fn length_string_set_header(
|
1559 + | mut self,
|
1560 + | input: ::std::option::Option<crate::model::SetOfLengthString>,
|
1561 + | ) -> Self {
|
1562 + | self.length_string_set_header =
|
1563 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1564 + | self
|
1329 1565 | }
|
1330 - | }
|
1331 - | /// See [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1332 - | pub mod query_params_targeting_map_of_list_of_length_pattern_string_operation_input {
|
1333 - |
|
1334 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1335 - | /// Holds one variant for each of the ways the builder can fail.
|
1336 - | #[non_exhaustive]
|
1337 - | #[allow(clippy::enum_variant_names)]
|
1338 - | pub enum ConstraintViolation {
|
1339 - | /// Constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`.
|
1340 - | #[doc(hidden)]
|
1341 - | MapOfLengthPatternString(
|
1342 - | crate::model::map_of_list_of_length_pattern_string::ConstraintViolation,
|
1343 - | ),
|
1566 + | #[allow(missing_docs)] // documentation missing in model
|
1567 + | pub(crate) fn set_length_string_set_header(
|
1568 + | mut self,
|
1569 + | input: Option<
|
1570 + | impl ::std::convert::Into<
|
1571 + | crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
|
1572 + | >,
|
1573 + | >,
|
1574 + | ) -> Self {
|
1575 + | self.length_string_set_header = input.map(|v| v.into());
|
1576 + | self
|
1344 1577 | }
|
1345 - | impl ::std::fmt::Display for ConstraintViolation {
|
1346 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1347 - | match self {
|
1348 - | ConstraintViolation::MapOfLengthPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`"),
|
1578 + | #[allow(missing_docs)] // documentation missing in model
|
1579 + | pub fn list_length_string_header(
|
1580 + | mut self,
|
1581 + | input: ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
|
1582 + | ) -> Self {
|
1583 + | self.list_length_string_header =
|
1584 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1585 + | self
|
1349 1586 | }
|
1587 + | #[allow(missing_docs)] // documentation missing in model
|
1588 + | pub(crate) fn set_list_length_string_header(
|
1589 + | mut self,
|
1590 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
|
1591 + | ) -> Self {
|
1592 + | self.list_length_string_header = input.map(|v| v.into());
|
1593 + | self
|
1350 1594 | }
|
1595 + | #[allow(missing_docs)] // documentation missing in model
|
1596 + | pub fn length_list_pattern_string_header(
|
1597 + | mut self,
|
1598 + | input: ::std::option::Option<crate::model::LengthListOfPatternString>,
|
1599 + | ) -> Self {
|
1600 + | self.length_list_pattern_string_header =
|
1601 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1602 + | self
|
1351 1603 | }
|
1352 - | impl ::std::error::Error for ConstraintViolation {}
|
1353 - | impl ConstraintViolation {
|
1354 - | pub(crate) fn as_validation_exception_field(
|
1355 - | self,
|
1356 - | path: ::std::string::String,
|
1357 - | ) -> crate::model::ValidationExceptionField {
|
1358 - | match self {
|
1359 - | ConstraintViolation::MapOfLengthPatternString(inner) => {
|
1360 - | inner.as_validation_exception_field(path + "/mapOfLengthPatternString")
|
1361 - | }
|
1362 - | }
|
1363 - | }
|
1364 - | }
|
1365 - | impl ::std::convert::From<ConstraintViolation>
|
1366 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1367 - | {
|
1368 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1369 - | let first_validation_exception_field =
|
1370 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1371 - | let validation_exception = crate::error::ValidationException {
|
1372 - | message: format!(
|
1373 - | "1 validation error detected. {}",
|
1374 - | &first_validation_exception_field.message
|
1375 - | ),
|
1376 - | field_list: Some(vec![first_validation_exception_field]),
|
1377 - | };
|
1378 - | Self::ConstraintViolation(
|
1379 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1380 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1381 - | )
|
1382 - | }
|
1383 - | }
|
1384 - | impl ::std::convert::From<Builder>
|
1385 - | for crate::constrained::MaybeConstrained<
|
1386 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
1387 - | >
|
1388 - | {
|
1389 - | fn from(builder: Builder) -> Self {
|
1390 - | Self::Unconstrained(builder)
|
1391 - | }
|
1392 - | }
|
1393 - | impl ::std::convert::TryFrom<Builder>
|
1394 - | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
1395 - | {
|
1396 - | type Error = ConstraintViolation;
|
1397 - |
|
1398 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1399 - | builder.build()
|
1400 - | }
|
1401 - | }
|
1402 - | /// A builder for [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1403 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1404 - | pub struct Builder {
|
1405 - | pub(crate) map_of_length_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained>>,
|
1406 - | }
|
1407 - | impl Builder {
|
1408 1604 | #[allow(missing_docs)] // documentation missing in model
|
1409 - | pub fn map_of_length_pattern_string(
|
1605 + | pub(crate) fn set_length_list_pattern_string_header(
|
1410 1606 | mut self,
|
1411 - | input: ::std::option::Option<
|
1412 - | ::std::collections::HashMap<
|
1413 - | crate::model::LengthPatternString,
|
1414 - | ::std::vec::Vec<crate::model::LengthPatternString>,
|
1607 + | input: Option<
|
1608 + | impl ::std::convert::Into<
|
1609 + | crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
|
1415 1610 | >,
|
1416 1611 | >,
|
1417 1612 | ) -> Self {
|
1418 - | self.map_of_length_pattern_string =
|
1419 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1613 + | self.length_list_pattern_string_header = input.map(|v| v.into());
|
1420 1614 | self
|
1421 1615 | }
|
1422 1616 | #[allow(missing_docs)] // documentation missing in model
|
1423 - | pub(crate) fn set_map_of_length_pattern_string(
|
1617 + | pub fn length_set_pattern_string_header(
|
1424 1618 | mut self,
|
1425 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained>>>,
|
1619 + | input: ::std::option::Option<crate::model::LengthSetOfPatternString>,
|
1426 1620 | ) -> Self {
|
1427 - | self.map_of_length_pattern_string = input.map(|v| v.into());
|
1621 + | self.length_set_pattern_string_header =
|
1622 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1428 1623 | self
|
1429 1624 | }
|
1430 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1431 - | ///
|
1432 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1433 - | ///
|
1434 - | pub fn build(
|
1435 - | self,
|
1436 - | ) -> Result<
|
1437 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
1438 - | ConstraintViolation,
|
1439 - | > {
|
1440 - | self.build_enforcing_all_constraints()
|
1441 - | }
|
1442 - | fn build_enforcing_all_constraints(
|
1443 - | self,
|
1444 - | ) -> Result<
|
1445 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
1446 - | ConstraintViolation,
|
1447 - | > {
|
1448 - | Ok(
|
1449 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
1450 - | map_of_length_pattern_string: self
|
1451 - | .map_of_length_pattern_string
|
1452 - | .map(|v| match v {
|
1453 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1454 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1455 - | })
|
1456 - | .map(|res| {
|
1457 - | res.map(|v| v.into())
|
1458 - | .map_err(ConstraintViolation::MapOfLengthPatternString)
|
1459 - | })
|
1460 - | .transpose()?,
|
1461 - | },
|
1462 - | )
|
1463 - | }
|
1464 - | }
|
1465 - | }
|
1466 - | /// See [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1467 - | pub mod query_params_targeting_map_of_length_pattern_string_operation_input {
|
1468 - |
|
1469 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1470 - | /// Holds one variant for each of the ways the builder can fail.
|
1471 - | #[non_exhaustive]
|
1472 - | #[allow(clippy::enum_variant_names)]
|
1473 - | pub enum ConstraintViolation {
|
1474 - | /// Constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfLengthPatternStringOperationInput`.
|
1475 - | #[doc(hidden)]
|
1476 - | MapOfLengthPatternString(crate::model::map_of_length_pattern_string::ConstraintViolation),
|
1477 - | }
|
1478 - | impl ::std::fmt::Display for ConstraintViolation {
|
1479 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1480 - | match self {
|
1481 - | ConstraintViolation::MapOfLengthPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfLengthPatternStringOperationInput`"),
|
1482 - | }
|
1483 - | }
|
1484 - | }
|
1485 - | impl ::std::error::Error for ConstraintViolation {}
|
1486 - | impl ConstraintViolation {
|
1487 - | pub(crate) fn as_validation_exception_field(
|
1488 - | self,
|
1489 - | path: ::std::string::String,
|
1490 - | ) -> crate::model::ValidationExceptionField {
|
1491 - | match self {
|
1492 - | ConstraintViolation::MapOfLengthPatternString(inner) => {
|
1493 - | inner.as_validation_exception_field(path + "/mapOfLengthPatternString")
|
1494 - | }
|
1495 - | }
|
1496 - | }
|
1497 - | }
|
1498 - | impl ::std::convert::From<ConstraintViolation>
|
1499 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1500 - | {
|
1501 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1502 - | let first_validation_exception_field =
|
1503 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1504 - | let validation_exception = crate::error::ValidationException {
|
1505 - | message: format!(
|
1506 - | "1 validation error detected. {}",
|
1507 - | &first_validation_exception_field.message
|
1508 - | ),
|
1509 - | field_list: Some(vec![first_validation_exception_field]),
|
1510 - | };
|
1511 - | Self::ConstraintViolation(
|
1512 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1513 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1514 - | )
|
1515 - | }
|
1516 - | }
|
1517 - | impl ::std::convert::From<Builder>
|
1518 - | for crate::constrained::MaybeConstrained<
|
1519 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
1520 - | >
|
1521 - | {
|
1522 - | fn from(builder: Builder) -> Self {
|
1523 - | Self::Unconstrained(builder)
|
1524 - | }
|
1625 + | #[allow(missing_docs)] // documentation missing in model
|
1626 + | pub(crate) fn set_length_set_pattern_string_header(
|
1627 + | mut self,
|
1628 + | input: Option<
|
1629 + | impl ::std::convert::Into<
|
1630 + | crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>,
|
1631 + | >,
|
1632 + | >,
|
1633 + | ) -> Self {
|
1634 + | self.length_set_pattern_string_header = input.map(|v| v.into());
|
1635 + | self
|
1525 1636 | }
|
1526 - | impl ::std::convert::TryFrom<Builder>
|
1527 - | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
1528 - | {
|
1529 - | type Error = ConstraintViolation;
|
1530 - |
|
1531 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1532 - | builder.build()
|
1637 + | #[allow(missing_docs)] // documentation missing in model
|
1638 + | pub fn range_byte_set_header(
|
1639 + | mut self,
|
1640 + | input: ::std::option::Option<crate::model::SetOfRangeByte>,
|
1641 + | ) -> Self {
|
1642 + | self.range_byte_set_header =
|
1643 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1644 + | self
|
1533 1645 | }
|
1646 + | #[allow(missing_docs)] // documentation missing in model
|
1647 + | pub(crate) fn set_range_byte_set_header(
|
1648 + | mut self,
|
1649 + | input: Option<
|
1650 + | impl ::std::convert::Into<
|
1651 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
|
1652 + | >,
|
1653 + | >,
|
1654 + | ) -> Self {
|
1655 + | self.range_byte_set_header = input.map(|v| v.into());
|
1656 + | self
|
1534 1657 | }
|
1535 - | /// A builder for [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1536 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1537 - | pub struct Builder {
|
1538 - | pub(crate) map_of_length_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained>>,
|
1658 + | #[allow(missing_docs)] // documentation missing in model
|
1659 + | pub fn range_short_set_header(
|
1660 + | mut self,
|
1661 + | input: ::std::option::Option<crate::model::SetOfRangeShort>,
|
1662 + | ) -> Self {
|
1663 + | self.range_short_set_header =
|
1664 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1665 + | self
|
1539 1666 | }
|
1540 - | impl Builder {
|
1541 1667 | #[allow(missing_docs)] // documentation missing in model
|
1542 - | pub fn map_of_length_pattern_string(
|
1668 + | pub(crate) fn set_range_short_set_header(
|
1543 1669 | mut self,
|
1544 - | input: ::std::option::Option<
|
1545 - | ::std::collections::HashMap<
|
1546 - | crate::model::LengthPatternString,
|
1547 - | crate::model::LengthPatternString,
|
1670 + | input: Option<
|
1671 + | impl ::std::convert::Into<
|
1672 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
|
1548 1673 | >,
|
1549 1674 | >,
|
1550 1675 | ) -> Self {
|
1551 - | self.map_of_length_pattern_string =
|
1552 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1676 + | self.range_short_set_header = input.map(|v| v.into());
|
1553 1677 | self
|
1554 1678 | }
|
1555 1679 | #[allow(missing_docs)] // documentation missing in model
|
1556 - | pub(crate) fn set_map_of_length_pattern_string(
|
1680 + | pub fn range_integer_set_header(
|
1557 1681 | mut self,
|
1558 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained>>>,
|
1682 + | input: ::std::option::Option<crate::model::SetOfRangeInteger>,
|
1559 1683 | ) -> Self {
|
1560 - | self.map_of_length_pattern_string = input.map(|v| v.into());
|
1684 + | self.range_integer_set_header =
|
1685 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1561 1686 | self
|
1562 1687 | }
|
1563 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1564 - | ///
|
1565 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1566 - | ///
|
1567 - | pub fn build(
|
1568 - | self,
|
1569 - | ) -> Result<
|
1570 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
1571 - | ConstraintViolation,
|
1572 - | > {
|
1573 - | self.build_enforcing_all_constraints()
|
1688 + | #[allow(missing_docs)] // documentation missing in model
|
1689 + | pub(crate) fn set_range_integer_set_header(
|
1690 + | mut self,
|
1691 + | input: Option<
|
1692 + | impl ::std::convert::Into<
|
1693 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
|
1694 + | >,
|
1695 + | >,
|
1696 + | ) -> Self {
|
1697 + | self.range_integer_set_header = input.map(|v| v.into());
|
1698 + | self
|
1574 1699 | }
|
1575 - | fn build_enforcing_all_constraints(
|
1576 - | self,
|
1577 - | ) -> Result<
|
1578 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
1579 - | ConstraintViolation,
|
1580 - | > {
|
1581 - | Ok(
|
1582 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
1583 - | map_of_length_pattern_string: self
|
1584 - | .map_of_length_pattern_string
|
1585 - | .map(|v| match v {
|
1586 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1587 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1588 - | })
|
1589 - | .map(|res| {
|
1590 - | res.map(|v| v.into())
|
1591 - | .map_err(ConstraintViolation::MapOfLengthPatternString)
|
1592 - | })
|
1593 - | .transpose()?,
|
1594 - | },
|
1595 - | )
|
1700 + | #[allow(missing_docs)] // documentation missing in model
|
1701 + | pub fn range_long_set_header(
|
1702 + | mut self,
|
1703 + | input: ::std::option::Option<crate::model::SetOfRangeLong>,
|
1704 + | ) -> Self {
|
1705 + | self.range_long_set_header =
|
1706 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1707 + | self
|
1596 1708 | }
|
1709 + | #[allow(missing_docs)] // documentation missing in model
|
1710 + | pub(crate) fn set_range_long_set_header(
|
1711 + | mut self,
|
1712 + | input: Option<
|
1713 + | impl ::std::convert::Into<
|
1714 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
|
1715 + | >,
|
1716 + | >,
|
1717 + | ) -> Self {
|
1718 + | self.range_long_set_header = input.map(|v| v.into());
|
1719 + | self
|
1597 1720 | }
|
1598 - | }
|
1599 - | /// See [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1600 - | pub mod query_params_targeting_map_of_list_of_pattern_string_operation_input {
|
1601 - |
|
1602 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1603 - | /// Holds one variant for each of the ways the builder can fail.
|
1604 - | #[non_exhaustive]
|
1605 - | #[allow(clippy::enum_variant_names)]
|
1606 - | pub enum ConstraintViolation {
|
1607 - | /// Constraint violation occurred building member `map_of_list_of_pattern_string` when building `QueryParamsTargetingMapOfListOfPatternStringOperationInput`.
|
1608 - | #[doc(hidden)]
|
1609 - | MapOfListOfPatternString(crate::model::map_of_list_of_pattern_string::ConstraintViolation),
|
1721 + | #[allow(missing_docs)] // documentation missing in model
|
1722 + | pub fn range_byte_list_header(
|
1723 + | mut self,
|
1724 + | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
|
1725 + | ) -> Self {
|
1726 + | self.range_byte_list_header =
|
1727 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1728 + | self
|
1610 1729 | }
|
1611 - | impl ::std::fmt::Display for ConstraintViolation {
|
1612 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1613 - | match self {
|
1614 - | ConstraintViolation::MapOfListOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_pattern_string` when building `QueryParamsTargetingMapOfListOfPatternStringOperationInput`"),
|
1730 + | #[allow(missing_docs)] // documentation missing in model
|
1731 + | pub(crate) fn set_range_byte_list_header(
|
1732 + | mut self,
|
1733 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
|
1734 + | ) -> Self {
|
1735 + | self.range_byte_list_header = input.map(|v| v.into());
|
1736 + | self
|
1615 1737 | }
|
1738 + | #[allow(missing_docs)] // documentation missing in model
|
1739 + | pub fn range_short_list_header(
|
1740 + | mut self,
|
1741 + | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
|
1742 + | ) -> Self {
|
1743 + | self.range_short_list_header =
|
1744 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1745 + | self
|
1616 1746 | }
|
1747 + | #[allow(missing_docs)] // documentation missing in model
|
1748 + | pub(crate) fn set_range_short_list_header(
|
1749 + | mut self,
|
1750 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
|
1751 + | ) -> Self {
|
1752 + | self.range_short_list_header = input.map(|v| v.into());
|
1753 + | self
|
1617 1754 | }
|
1618 - | impl ::std::error::Error for ConstraintViolation {}
|
1619 - | impl ConstraintViolation {
|
1620 - | pub(crate) fn as_validation_exception_field(
|
1621 - | self,
|
1622 - | path: ::std::string::String,
|
1623 - | ) -> crate::model::ValidationExceptionField {
|
1624 - | match self {
|
1625 - | ConstraintViolation::MapOfListOfPatternString(inner) => {
|
1626 - | inner.as_validation_exception_field(path + "/mapOfListOfPatternString")
|
1755 + | #[allow(missing_docs)] // documentation missing in model
|
1756 + | pub fn range_integer_list_header(
|
1757 + | mut self,
|
1758 + | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeInteger>>,
|
1759 + | ) -> Self {
|
1760 + | self.range_integer_list_header =
|
1761 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1762 + | self
|
1627 1763 | }
|
1764 + | #[allow(missing_docs)] // documentation missing in model
|
1765 + | pub(crate) fn set_range_integer_list_header(
|
1766 + | mut self,
|
1767 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
|
1768 + | ) -> Self {
|
1769 + | self.range_integer_list_header = input.map(|v| v.into());
|
1770 + | self
|
1628 1771 | }
|
1772 + | #[allow(missing_docs)] // documentation missing in model
|
1773 + | pub fn range_long_list_header(
|
1774 + | mut self,
|
1775 + | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
|
1776 + | ) -> Self {
|
1777 + | self.range_long_list_header =
|
1778 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1779 + | self
|
1629 1780 | }
|
1781 + | #[allow(missing_docs)] // documentation missing in model
|
1782 + | pub(crate) fn set_range_long_list_header(
|
1783 + | mut self,
|
1784 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
|
1785 + | ) -> Self {
|
1786 + | self.range_long_list_header = input.map(|v| v.into());
|
1787 + | self
|
1630 1788 | }
|
1631 - | impl ::std::convert::From<ConstraintViolation>
|
1632 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1633 - | {
|
1634 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1635 - | let first_validation_exception_field =
|
1636 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1637 - | let validation_exception = crate::error::ValidationException {
|
1638 - | message: format!(
|
1639 - | "1 validation error detected. {}",
|
1640 - | &first_validation_exception_field.message
|
1641 - | ),
|
1642 - | field_list: Some(vec![first_validation_exception_field]),
|
1643 - | };
|
1644 - | Self::ConstraintViolation(
|
1645 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1646 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1647 - | )
|
1789 + | #[allow(missing_docs)] // documentation missing in model
|
1790 + | pub fn length_string_query(
|
1791 + | mut self,
|
1792 + | input: ::std::option::Option<crate::model::LengthString>,
|
1793 + | ) -> Self {
|
1794 + | self.length_string_query = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1795 + | self
|
1648 1796 | }
|
1797 + | #[allow(missing_docs)] // documentation missing in model
|
1798 + | pub(crate) fn set_length_string_query(
|
1799 + | mut self,
|
1800 + | input: Option<
|
1801 + | impl ::std::convert::Into<
|
1802 + | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
1803 + | >,
|
1804 + | >,
|
1805 + | ) -> Self {
|
1806 + | self.length_string_query = input.map(|v| v.into());
|
1807 + | self
|
1649 1808 | }
|
1650 - | impl ::std::convert::From<Builder>
|
1651 - | for crate::constrained::MaybeConstrained<
|
1652 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
1653 - | >
|
1654 - | {
|
1655 - | fn from(builder: Builder) -> Self {
|
1656 - | Self::Unconstrained(builder)
|
1809 + | #[allow(missing_docs)] // documentation missing in model
|
1810 + | pub fn range_byte_query(mut self, input: crate::model::RangeByte) -> Self {
|
1811 + | self.range_byte_query = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1812 + | self
|
1657 1813 | }
|
1814 + | #[allow(missing_docs)] // documentation missing in model
|
1815 + | pub(crate) fn set_range_byte_query(
|
1816 + | mut self,
|
1817 + | input: impl ::std::convert::Into<
|
1818 + | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
1819 + | >,
|
1820 + | ) -> Self {
|
1821 + | self.range_byte_query = Some(input.into());
|
1822 + | self
|
1658 1823 | }
|
1659 - | impl ::std::convert::TryFrom<Builder>
|
1660 - | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
1661 - | {
|
1662 - | type Error = ConstraintViolation;
|
1663 - |
|
1664 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1665 - | builder.build()
|
1824 + | #[allow(missing_docs)] // documentation missing in model
|
1825 + | pub fn range_short_query(mut self, input: crate::model::RangeShort) -> Self {
|
1826 + | self.range_short_query = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1827 + | self
|
1666 1828 | }
|
1829 + | #[allow(missing_docs)] // documentation missing in model
|
1830 + | pub(crate) fn set_range_short_query(
|
1831 + | mut self,
|
1832 + | input: impl ::std::convert::Into<
|
1833 + | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
1834 + | >,
|
1835 + | ) -> Self {
|
1836 + | self.range_short_query = Some(input.into());
|
1837 + | self
|
1667 1838 | }
|
1668 - | /// A builder for [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1669 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1670 - | pub struct Builder {
|
1671 - | pub(crate) map_of_list_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained>>,
|
1839 + | #[allow(missing_docs)] // documentation missing in model
|
1840 + | pub fn range_integer_query(mut self, input: crate::model::RangeInteger) -> Self {
|
1841 + | self.range_integer_query =
|
1842 + | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1843 + | self
|
1672 1844 | }
|
1673 - | impl Builder {
|
1674 1845 | #[allow(missing_docs)] // documentation missing in model
|
1675 - | pub fn map_of_list_of_pattern_string(
|
1846 + | pub(crate) fn set_range_integer_query(
|
1676 1847 | mut self,
|
1677 - | input: ::std::option::Option<
|
1678 - | ::std::collections::HashMap<
|
1679 - | crate::model::PatternString,
|
1680 - | ::std::vec::Vec<crate::model::PatternString>,
|
1848 + | input: impl ::std::convert::Into<
|
1849 + | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
1681 1850 | >,
|
1851 + | ) -> Self {
|
1852 + | self.range_integer_query = Some(input.into());
|
1853 + | self
|
1854 + | }
|
1855 + | #[allow(missing_docs)] // documentation missing in model
|
1856 + | pub fn range_long_query(mut self, input: crate::model::RangeLong) -> Self {
|
1857 + | self.range_long_query = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1858 + | self
|
1859 + | }
|
1860 + | #[allow(missing_docs)] // documentation missing in model
|
1861 + | pub(crate) fn set_range_long_query(
|
1862 + | mut self,
|
1863 + | input: impl ::std::convert::Into<
|
1864 + | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
1682 1865 | >,
|
1683 1866 | ) -> Self {
|
1684 - | self.map_of_list_of_pattern_string =
|
1685 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1867 + | self.range_long_query = Some(input.into());
|
1686 1868 | self
|
1687 1869 | }
|
1688 1870 | #[allow(missing_docs)] // documentation missing in model
|
1689 - | pub(crate) fn set_map_of_list_of_pattern_string(
|
1871 + | pub fn enum_string_query(
|
1690 1872 | mut self,
|
1691 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained>>>,
|
1873 + | input: ::std::option::Option<crate::model::EnumString>,
|
1692 1874 | ) -> Self {
|
1693 - | self.map_of_list_of_pattern_string = input.map(|v| v.into());
|
1875 + | self.enum_string_query = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1694 1876 | self
|
1695 1877 | }
|
1696 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1697 - | ///
|
1698 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1699 - | ///
|
1700 - | pub fn build(
|
1701 - | self,
|
1702 - | ) -> Result<
|
1703 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
1704 - | ConstraintViolation,
|
1705 - | > {
|
1706 - | self.build_enforcing_all_constraints()
|
1707 - | }
|
1708 - | fn build_enforcing_all_constraints(
|
1709 - | self,
|
1710 - | ) -> Result<
|
1711 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
1712 - | ConstraintViolation,
|
1713 - | > {
|
1714 - | Ok(
|
1715 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
1716 - | map_of_list_of_pattern_string: self
|
1717 - | .map_of_list_of_pattern_string
|
1718 - | .map(|v| match v {
|
1719 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1720 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1721 - | })
|
1722 - | .map(|res| {
|
1723 - | res.map(|v| v.into())
|
1724 - | .map_err(ConstraintViolation::MapOfListOfPatternString)
|
1725 - | })
|
1726 - | .transpose()?,
|
1727 - | },
|
1728 - | )
|
1729 - | }
|
1878 + | #[allow(missing_docs)] // documentation missing in model
|
1879 + | pub(crate) fn set_enum_string_query(
|
1880 + | mut self,
|
1881 + | input: Option<
|
1882 + | impl ::std::convert::Into<
|
1883 + | crate::constrained::MaybeConstrained<crate::model::EnumString>,
|
1884 + | >,
|
1885 + | >,
|
1886 + | ) -> Self {
|
1887 + | self.enum_string_query = input.map(|v| v.into());
|
1888 + | self
|
1730 1889 | }
|
1731 - | }
|
1732 - | /// See [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
1733 - | pub mod query_params_targeting_map_of_pattern_string_operation_input {
|
1734 - |
|
1735 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1736 - | /// Holds one variant for each of the ways the builder can fail.
|
1737 - | #[non_exhaustive]
|
1738 - | #[allow(clippy::enum_variant_names)]
|
1739 - | pub enum ConstraintViolation {
|
1740 - | /// Constraint violation occurred building member `map_of_pattern_string` when building `QueryParamsTargetingMapOfPatternStringOperationInput`.
|
1741 - | #[doc(hidden)]
|
1742 - | MapOfPatternString(crate::model::map_of_pattern_string::ConstraintViolation),
|
1890 + | #[allow(missing_docs)] // documentation missing in model
|
1891 + | pub fn length_string_list_query(
|
1892 + | mut self,
|
1893 + | input: ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
|
1894 + | ) -> Self {
|
1895 + | self.length_string_list_query =
|
1896 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1897 + | self
|
1743 1898 | }
|
1744 - | impl ::std::fmt::Display for ConstraintViolation {
|
1745 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1746 - | match self {
|
1747 - | ConstraintViolation::MapOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_pattern_string` when building `QueryParamsTargetingMapOfPatternStringOperationInput`"),
|
1899 + | #[allow(missing_docs)] // documentation missing in model
|
1900 + | pub(crate) fn set_length_string_list_query(
|
1901 + | mut self,
|
1902 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
|
1903 + | ) -> Self {
|
1904 + | self.length_string_list_query = input.map(|v| v.into());
|
1905 + | self
|
1748 1906 | }
|
1907 + | #[allow(missing_docs)] // documentation missing in model
|
1908 + | pub fn length_list_pattern_string_query(
|
1909 + | mut self,
|
1910 + | input: ::std::option::Option<crate::model::LengthListOfPatternString>,
|
1911 + | ) -> Self {
|
1912 + | self.length_list_pattern_string_query =
|
1913 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1914 + | self
|
1749 1915 | }
|
1916 + | #[allow(missing_docs)] // documentation missing in model
|
1917 + | pub(crate) fn set_length_list_pattern_string_query(
|
1918 + | mut self,
|
1919 + | input: Option<
|
1920 + | impl ::std::convert::Into<
|
1921 + | crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
|
1922 + | >,
|
1923 + | >,
|
1924 + | ) -> Self {
|
1925 + | self.length_list_pattern_string_query = input.map(|v| v.into());
|
1926 + | self
|
1750 1927 | }
|
1751 - | impl ::std::error::Error for ConstraintViolation {}
|
1752 - | impl ConstraintViolation {
|
1753 - | pub(crate) fn as_validation_exception_field(
|
1754 - | self,
|
1755 - | path: ::std::string::String,
|
1756 - | ) -> crate::model::ValidationExceptionField {
|
1757 - | match self {
|
1758 - | ConstraintViolation::MapOfPatternString(inner) => {
|
1759 - | inner.as_validation_exception_field(path + "/mapOfPatternString")
|
1928 + | #[allow(missing_docs)] // documentation missing in model
|
1929 + | pub fn length_string_set_query(
|
1930 + | mut self,
|
1931 + | input: ::std::option::Option<crate::model::SetOfLengthString>,
|
1932 + | ) -> Self {
|
1933 + | self.length_string_set_query =
|
1934 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1935 + | self
|
1760 1936 | }
|
1937 + | #[allow(missing_docs)] // documentation missing in model
|
1938 + | pub(crate) fn set_length_string_set_query(
|
1939 + | mut self,
|
1940 + | input: Option<
|
1941 + | impl ::std::convert::Into<
|
1942 + | crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
|
1943 + | >,
|
1944 + | >,
|
1945 + | ) -> Self {
|
1946 + | self.length_string_set_query = input.map(|v| v.into());
|
1947 + | self
|
1761 1948 | }
|
1949 + | #[allow(missing_docs)] // documentation missing in model
|
1950 + | pub fn range_byte_list_query(
|
1951 + | mut self,
|
1952 + | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
|
1953 + | ) -> Self {
|
1954 + | self.range_byte_list_query =
|
1955 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1956 + | self
|
1762 1957 | }
|
1958 + | #[allow(missing_docs)] // documentation missing in model
|
1959 + | pub(crate) fn set_range_byte_list_query(
|
1960 + | mut self,
|
1961 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
|
1962 + | ) -> Self {
|
1963 + | self.range_byte_list_query = input.map(|v| v.into());
|
1964 + | self
|
1763 1965 | }
|
1764 - | impl ::std::convert::From<ConstraintViolation>
|
1765 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1766 - | {
|
1767 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1768 - | let first_validation_exception_field =
|
1769 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1770 - | let validation_exception = crate::error::ValidationException {
|
1771 - | message: format!(
|
1772 - | "1 validation error detected. {}",
|
1773 - | &first_validation_exception_field.message
|
1774 - | ),
|
1775 - | field_list: Some(vec![first_validation_exception_field]),
|
1776 - | };
|
1777 - | Self::ConstraintViolation(
|
1778 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1779 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1780 - | )
|
1966 + | #[allow(missing_docs)] // documentation missing in model
|
1967 + | pub fn range_short_list_query(
|
1968 + | mut self,
|
1969 + | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
|
1970 + | ) -> Self {
|
1971 + | self.range_short_list_query =
|
1972 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1973 + | self
|
1781 1974 | }
|
1975 + | #[allow(missing_docs)] // documentation missing in model
|
1976 + | pub(crate) fn set_range_short_list_query(
|
1977 + | mut self,
|
1978 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
|
1979 + | ) -> Self {
|
1980 + | self.range_short_list_query = input.map(|v| v.into());
|
1981 + | self
|
1782 1982 | }
|
1783 - | impl ::std::convert::From<Builder>
|
1784 - | for crate::constrained::MaybeConstrained<
|
1785 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
1786 - | >
|
1787 - | {
|
1788 - | fn from(builder: Builder) -> Self {
|
1789 - | Self::Unconstrained(builder)
|
1983 + | #[allow(missing_docs)] // documentation missing in model
|
1984 + | pub fn range_integer_list_query(
|
1985 + | mut self,
|
1986 + | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeInteger>>,
|
1987 + | ) -> Self {
|
1988 + | self.range_integer_list_query =
|
1989 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1990 + | self
|
1790 1991 | }
|
1992 + | #[allow(missing_docs)] // documentation missing in model
|
1993 + | pub(crate) fn set_range_integer_list_query(
|
1994 + | mut self,
|
1995 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
|
1996 + | ) -> Self {
|
1997 + | self.range_integer_list_query = input.map(|v| v.into());
|
1998 + | self
|
1791 1999 | }
|
1792 - | impl ::std::convert::TryFrom<Builder>
|
1793 - | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
1794 - | {
|
1795 - | type Error = ConstraintViolation;
|
1796 - |
|
1797 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1798 - | builder.build()
|
2000 + | #[allow(missing_docs)] // documentation missing in model
|
2001 + | pub fn range_long_list_query(
|
2002 + | mut self,
|
2003 + | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
|
2004 + | ) -> Self {
|
2005 + | self.range_long_list_query =
|
2006 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
2007 + | self
|
1799 2008 | }
|
2009 + | #[allow(missing_docs)] // documentation missing in model
|
2010 + | pub(crate) fn set_range_long_list_query(
|
2011 + | mut self,
|
2012 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
|
2013 + | ) -> Self {
|
2014 + | self.range_long_list_query = input.map(|v| v.into());
|
2015 + | self
|
1800 2016 | }
|
1801 - | /// A builder for [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
1802 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1803 - | pub struct Builder {
|
1804 - | pub(crate) map_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained>>,
|
2017 + | #[allow(missing_docs)] // documentation missing in model
|
2018 + | pub fn range_byte_set_query(
|
2019 + | mut self,
|
2020 + | input: ::std::option::Option<crate::model::SetOfRangeByte>,
|
2021 + | ) -> Self {
|
2022 + | self.range_byte_set_query =
|
2023 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
2024 + | self
|
1805 2025 | }
|
1806 - | impl Builder {
|
1807 2026 | #[allow(missing_docs)] // documentation missing in model
|
1808 - | pub fn map_of_pattern_string(
|
2027 + | pub(crate) fn set_range_byte_set_query(
|
1809 2028 | mut self,
|
1810 - | input: ::std::option::Option<
|
1811 - | ::std::collections::HashMap<
|
1812 - | crate::model::PatternString,
|
1813 - | crate::model::PatternString,
|
2029 + | input: Option<
|
2030 + | impl ::std::convert::Into<
|
2031 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
|
1814 2032 | >,
|
1815 2033 | >,
|
1816 2034 | ) -> Self {
|
1817 - | self.map_of_pattern_string =
|
1818 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
2035 + | self.range_byte_set_query = input.map(|v| v.into());
|
1819 2036 | self
|
1820 2037 | }
|
1821 2038 | #[allow(missing_docs)] // documentation missing in model
|
1822 - | pub(crate) fn set_map_of_pattern_string(
|
2039 + | pub fn range_short_set_query(
|
1823 2040 | mut self,
|
1824 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained>>>,
|
2041 + | input: ::std::option::Option<crate::model::SetOfRangeShort>,
|
1825 2042 | ) -> Self {
|
1826 - | self.map_of_pattern_string = input.map(|v| v.into());
|
2043 + | self.range_short_set_query =
|
2044 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
1827 2045 | self
|
1828 2046 | }
|
1829 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
1830 - | ///
|
1831 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1832 - | ///
|
1833 - | pub fn build(
|
1834 - | self,
|
1835 - | ) -> Result<
|
1836 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
1837 - | ConstraintViolation,
|
1838 - | > {
|
1839 - | self.build_enforcing_all_constraints()
|
1840 - | }
|
1841 - | fn build_enforcing_all_constraints(
|
1842 - | self,
|
1843 - | ) -> Result<
|
1844 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
1845 - | ConstraintViolation,
|
1846 - | > {
|
1847 - | Ok(
|
1848 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
1849 - | map_of_pattern_string: self
|
1850 - | .map_of_pattern_string
|
1851 - | .map(|v| match v {
|
1852 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1853 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1854 - | })
|
1855 - | .map(|res| {
|
1856 - | res.map(|v| v.into())
|
1857 - | .map_err(ConstraintViolation::MapOfPatternString)
|
1858 - | })
|
1859 - | .transpose()?,
|
1860 - | },
|
1861 - | )
|
1862 - | }
|
1863 - | }
|
1864 - | }
|
1865 - | /// See [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
1866 - | pub mod query_params_targeting_map_of_list_of_enum_string_operation_input {
|
1867 - |
|
1868 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1869 - | /// Holds one variant for each of the ways the builder can fail.
|
1870 - | #[non_exhaustive]
|
1871 - | #[allow(clippy::enum_variant_names)]
|
1872 - | pub enum ConstraintViolation {
|
1873 - | /// Constraint violation occurred building member `map_of_list_of_enum_string` when building `QueryParamsTargetingMapOfListOfEnumStringOperationInput`.
|
1874 - | #[doc(hidden)]
|
1875 - | MapOfListOfEnumString(crate::model::map_of_list_of_enum_string::ConstraintViolation),
|
1876 - | }
|
1877 - | impl ::std::fmt::Display for ConstraintViolation {
|
1878 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1879 - | match self {
|
1880 - | ConstraintViolation::MapOfListOfEnumString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_enum_string` when building `QueryParamsTargetingMapOfListOfEnumStringOperationInput`"),
|
1881 - | }
|
1882 - | }
|
1883 - | }
|
1884 - | impl ::std::error::Error for ConstraintViolation {}
|
1885 - | impl ConstraintViolation {
|
1886 - | pub(crate) fn as_validation_exception_field(
|
1887 - | self,
|
1888 - | path: ::std::string::String,
|
1889 - | ) -> crate::model::ValidationExceptionField {
|
1890 - | match self {
|
1891 - | ConstraintViolation::MapOfListOfEnumString(inner) => {
|
1892 - | inner.as_validation_exception_field(path + "/mapOfListOfEnumString")
|
1893 - | }
|
1894 - | }
|
1895 - | }
|
1896 - | }
|
1897 - | impl ::std::convert::From<ConstraintViolation>
|
1898 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1899 - | {
|
1900 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1901 - | let first_validation_exception_field =
|
1902 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1903 - | let validation_exception = crate::error::ValidationException {
|
1904 - | message: format!(
|
1905 - | "1 validation error detected. {}",
|
1906 - | &first_validation_exception_field.message
|
1907 - | ),
|
1908 - | field_list: Some(vec![first_validation_exception_field]),
|
1909 - | };
|
1910 - | Self::ConstraintViolation(
|
1911 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1912 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1913 - | )
|
1914 - | }
|
1915 - | }
|
1916 - | impl ::std::convert::From<Builder>
|
1917 - | for crate::constrained::MaybeConstrained<
|
1918 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
1919 - | >
|
1920 - | {
|
1921 - | fn from(builder: Builder) -> Self {
|
1922 - | Self::Unconstrained(builder)
|
1923 - | }
|
2047 + | #[allow(missing_docs)] // documentation missing in model
|
2048 + | pub(crate) fn set_range_short_set_query(
|
2049 + | mut self,
|
2050 + | input: Option<
|
2051 + | impl ::std::convert::Into<
|
2052 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
|
2053 + | >,
|
2054 + | >,
|
2055 + | ) -> Self {
|
2056 + | self.range_short_set_query = input.map(|v| v.into());
|
2057 + | self
|
1924 2058 | }
|
1925 - | impl ::std::convert::TryFrom<Builder>
|
1926 - | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
1927 - | {
|
1928 - | type Error = ConstraintViolation;
|
1929 - |
|
1930 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1931 - | builder.build()
|
2059 + | #[allow(missing_docs)] // documentation missing in model
|
2060 + | pub fn range_integer_set_query(
|
2061 + | mut self,
|
2062 + | input: ::std::option::Option<crate::model::SetOfRangeInteger>,
|
2063 + | ) -> Self {
|
2064 + | self.range_integer_set_query =
|
2065 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
2066 + | self
|
1932 2067 | }
|
2068 + | #[allow(missing_docs)] // documentation missing in model
|
2069 + | pub(crate) fn set_range_integer_set_query(
|
2070 + | mut self,
|
2071 + | input: Option<
|
2072 + | impl ::std::convert::Into<
|
2073 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
|
2074 + | >,
|
2075 + | >,
|
2076 + | ) -> Self {
|
2077 + | self.range_integer_set_query = input.map(|v| v.into());
|
2078 + | self
|
1933 2079 | }
|
1934 - | /// A builder for [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
1935 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1936 - | pub struct Builder {
|
1937 - | pub(crate) map_of_list_of_enum_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained>>,
|
2080 + | #[allow(missing_docs)] // documentation missing in model
|
2081 + | pub fn range_long_set_query(
|
2082 + | mut self,
|
2083 + | input: ::std::option::Option<crate::model::SetOfRangeLong>,
|
2084 + | ) -> Self {
|
2085 + | self.range_long_set_query =
|
2086 + | input.map(crate::constrained::MaybeConstrained::Constrained);
|
2087 + | self
|
1938 2088 | }
|
1939 - | impl Builder {
|
1940 2089 | #[allow(missing_docs)] // documentation missing in model
|
1941 - | pub fn map_of_list_of_enum_string(
|
2090 + | pub(crate) fn set_range_long_set_query(
|
1942 2091 | mut self,
|
1943 - | input: ::std::option::Option<
|
1944 - | ::std::collections::HashMap<
|
1945 - | crate::model::EnumString,
|
1946 - | ::std::vec::Vec<crate::model::EnumString>,
|
2092 + | input: Option<
|
2093 + | impl ::std::convert::Into<
|
2094 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
|
1947 2095 | >,
|
1948 2096 | >,
|
1949 2097 | ) -> Self {
|
1950 - | self.map_of_list_of_enum_string =
|
2098 + | self.range_long_set_query = input.map(|v| v.into());
|
2099 + | self
|
2100 + | }
|
2101 + | #[allow(missing_docs)] // documentation missing in model
|
2102 + | pub fn enum_string_list_query(
|
2103 + | mut self,
|
2104 + | input: ::std::option::Option<::std::vec::Vec<crate::model::EnumString>>,
|
2105 + | ) -> Self {
|
2106 + | self.enum_string_list_query =
|
1951 2107 | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1952 2108 | self
|
1953 2109 | }
|
1954 2110 | #[allow(missing_docs)] // documentation missing in model
|
1955 - | pub(crate) fn set_map_of_list_of_enum_string(
|
2111 + | pub(crate) fn set_enum_string_list_query(
|
1956 2112 | mut self,
|
1957 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained>>>,
|
2113 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>>>,
|
1958 2114 | ) -> Self {
|
1959 - | self.map_of_list_of_enum_string = input.map(|v| v.into());
|
2115 + | self.enum_string_list_query = input.map(|v| v.into());
|
1960 2116 | self
|
1961 2117 | }
|
1962 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
2118 + | /// Consumes the builder and constructs a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
1963 2119 | ///
|
1964 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2120 + | /// The builder fails to construct a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
1965 2121 | ///
|
2122 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1966 2123 | pub fn build(
|
1967 2124 | self,
|
1968 - | ) -> Result<
|
1969 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
1970 - | ConstraintViolation,
|
1971 - | > {
|
2125 + | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
2126 + | {
|
1972 2127 | self.build_enforcing_all_constraints()
|
1973 2128 | }
|
1974 2129 | fn build_enforcing_all_constraints(
|
1975 2130 | self,
|
1976 - | ) -> Result<
|
1977 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
1978 - | ConstraintViolation,
|
1979 - | > {
|
2131 + | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
2132 + | {
|
1980 2133 | Ok(
|
1981 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
1982 - | map_of_list_of_enum_string: self
|
1983 - | .map_of_list_of_enum_string
|
2134 + | crate::input::ConstrainedHttpBoundShapesOperationInput {
|
2135 + | length_string_label: self.length_string_label
|
1984 2136 | .map(|v| match v {
|
1985 2137 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1986 2138 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1987 2139 | })
|
1988 - | .map(|res| {
|
1989 - | res.map(|v| v.into())
|
1990 - | .map_err(ConstraintViolation::MapOfListOfEnumString)
|
2140 + | .map(|res|
|
2141 + | res.map_err(ConstraintViolation::LengthStringLabel)
|
2142 + | )
|
2143 + | .transpose()?
|
2144 + | .ok_or(ConstraintViolation::MissingLengthStringLabel)?
|
2145 + | ,
|
2146 + | range_integer_label: self.range_integer_label
|
2147 + | .map(|v| match v {
|
2148 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2149 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1991 2150 | })
|
1992 - | .transpose()?,
|
1993 - | },
|
2151 + | .map(|res|
|
2152 + | res.map_err(ConstraintViolation::RangeIntegerLabel)
|
1994 2153 | )
|
1995 - | }
|
1996 - | }
|
1997 - | }
|
1998 - | /// See [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
1999 - | pub mod query_params_targeting_map_of_length_list_of_pattern_string_operation_input {
|
2000 - |
|
2001 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2002 - | /// Holds one variant for each of the ways the builder can fail.
|
2003 - | #[non_exhaustive]
|
2004 - | #[allow(clippy::enum_variant_names)]
|
2005 - | pub enum ConstraintViolation {
|
2006 - | /// Constraint violation occurred building member `map_of_length_list_of_pattern_string` when building `QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`.
|
2007 - | #[doc(hidden)]
|
2008 - | MapOfLengthListOfPatternString(
|
2009 - | crate::model::map_of_length_list_of_pattern_string::ConstraintViolation,
|
2010 - | ),
|
2011 - | }
|
2012 - | impl ::std::fmt::Display for ConstraintViolation {
|
2013 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2014 - | match self {
|
2015 - | ConstraintViolation::MapOfLengthListOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_list_of_pattern_string` when building `QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`"),
|
2016 - | }
|
2017 - | }
|
2018 - | }
|
2019 - | impl ::std::error::Error for ConstraintViolation {}
|
2020 - | impl ConstraintViolation {
|
2021 - | pub(crate) fn as_validation_exception_field(
|
2022 - | self,
|
2023 - | path: ::std::string::String,
|
2024 - | ) -> crate::model::ValidationExceptionField {
|
2025 - | match self {
|
2026 - | ConstraintViolation::MapOfLengthListOfPatternString(inner) => {
|
2027 - | inner.as_validation_exception_field(path + "/mapOfLengthListOfPatternString")
|
2028 - | }
|
2029 - | }
|
2030 - | }
|
2031 - | }
|
2032 - | impl ::std::convert::From<ConstraintViolation>
|
2033 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2034 - | {
|
2035 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2036 - | let first_validation_exception_field =
|
2037 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2038 - | let validation_exception = crate::error::ValidationException {
|
2039 - | message: format!(
|
2040 - | "1 validation error detected. {}",
|
2041 - | &first_validation_exception_field.message
|
2042 - | ),
|
2043 - | field_list: Some(vec![first_validation_exception_field]),
|
2044 - | };
|
2045 - | Self::ConstraintViolation(
|
2046 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2047 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2154 + | .transpose()?
|
2155 + | .unwrap_or_else(||
|
2156 + | 0i32
|
2157 + | .try_into()
|
2158 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2048 2159 | )
|
2049 - | }
|
2050 - | }
|
2051 - | impl ::std::convert::From<Builder>
|
2052 - | for crate::constrained::MaybeConstrained<
|
2053 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
2054 - | >
|
2055 - | {
|
2056 - | fn from(builder: Builder) -> Self {
|
2057 - | Self::Unconstrained(builder)
|
2058 - | }
|
2059 - | }
|
2060 - | impl ::std::convert::TryFrom<Builder>
|
2061 - | for crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
2062 - | {
|
2063 - | type Error = ConstraintViolation;
|
2064 - |
|
2065 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2066 - | builder.build()
|
2067 - | }
|
2068 - | }
|
2069 - | /// A builder for [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
2070 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2071 - | pub struct Builder {
|
2072 - | pub(crate) map_of_length_list_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained>>,
|
2073 - | }
|
2074 - | impl Builder {
|
2075 - | #[allow(missing_docs)] // documentation missing in model
|
2076 - | pub fn map_of_length_list_of_pattern_string(
|
2077 - | mut self,
|
2078 - | input: ::std::option::Option<
|
2079 - | ::std::collections::HashMap<
|
2080 - | crate::model::PatternString,
|
2081 - | crate::model::LengthListOfPatternString,
|
2082 - | >,
|
2083 - | >,
|
2084 - | ) -> Self {
|
2085 - | self.map_of_length_list_of_pattern_string =
|
2086 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
2087 - | self
|
2088 - | }
|
2089 - | #[allow(missing_docs)] // documentation missing in model
|
2090 - | pub(crate) fn set_map_of_length_list_of_pattern_string(
|
2091 - | mut self,
|
2092 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained>>>,
|
2093 - | ) -> Self {
|
2094 - | self.map_of_length_list_of_pattern_string = input.map(|v| v.into());
|
2095 - | self
|
2096 - | }
|
2097 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
2098 - | ///
|
2099 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2100 - | ///
|
2101 - | pub fn build(
|
2102 - | self,
|
2103 - | ) -> Result<
|
2104 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
2105 - | ConstraintViolation,
|
2106 - | > {
|
2107 - | self.build_enforcing_all_constraints()
|
2108 - | }
|
2109 - | fn build_enforcing_all_constraints(
|
2110 - | self,
|
2111 - | ) -> Result<
|
2112 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
2113 - | ConstraintViolation,
|
2114 - | > {
|
2115 - | Ok(
|
2116 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
2117 - | map_of_length_list_of_pattern_string: self
|
2118 - | .map_of_length_list_of_pattern_string
|
2160 + | ,
|
2161 + | range_short_label: self.range_short_label
|
2119 2162 | .map(|v| match v {
|
2120 2163 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2121 2164 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2122 2165 | })
|
2123 - | .map(|res| {
|
2124 - | res.map(|v| v.into())
|
2125 - | .map_err(ConstraintViolation::MapOfLengthListOfPatternString)
|
2166 + | .map(|res|
|
2167 + | res.map_err(ConstraintViolation::RangeShortLabel)
|
2168 + | )
|
2169 + | .transpose()?
|
2170 + | .unwrap_or_else(||
|
2171 + | 0i16
|
2172 + | .try_into()
|
2173 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2174 + | )
|
2175 + | ,
|
2176 + | range_long_label: self.range_long_label
|
2177 + | .map(|v| match v {
|
2178 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2179 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2126 2180 | })
|
2127 - | .transpose()?,
|
2128 - | },
|
2181 + | .map(|res|
|
2182 + | res.map_err(ConstraintViolation::RangeLongLabel)
|
2129 2183 | )
|
2130 - | }
|
2131 - | }
|
2132 - | }
|
2133 - | /// See [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2134 - | pub mod query_params_targeting_map_of_set_of_length_string_operation_input {
|
2135 - |
|
2136 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2137 - | /// Holds one variant for each of the ways the builder can fail.
|
2138 - | #[non_exhaustive]
|
2139 - | #[allow(clippy::enum_variant_names)]
|
2140 - | pub enum ConstraintViolation {
|
2141 - | /// Constraint violation occurred building member `map_of_set_of_length_string` when building `QueryParamsTargetingMapOfSetOfLengthStringOperationInput`.
|
2142 - | #[doc(hidden)]
|
2143 - | MapOfSetOfLengthString(crate::model::map_of_set_of_length_string::ConstraintViolation),
|
2144 - | }
|
2145 - | impl ::std::fmt::Display for ConstraintViolation {
|
2146 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2147 - | match self {
|
2148 - | ConstraintViolation::MapOfSetOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_set_of_length_string` when building `QueryParamsTargetingMapOfSetOfLengthStringOperationInput`"),
|
2149 - | }
|
2150 - | }
|
2151 - | }
|
2152 - | impl ::std::error::Error for ConstraintViolation {}
|
2153 - | impl ConstraintViolation {
|
2154 - | pub(crate) fn as_validation_exception_field(
|
2155 - | self,
|
2156 - | path: ::std::string::String,
|
2157 - | ) -> crate::model::ValidationExceptionField {
|
2158 - | match self {
|
2159 - | ConstraintViolation::MapOfSetOfLengthString(inner) => {
|
2160 - | inner.as_validation_exception_field(path + "/mapOfSetOfLengthString")
|
2161 - | }
|
2162 - | }
|
2163 - | }
|
2164 - | }
|
2165 - | impl ::std::convert::From<ConstraintViolation>
|
2166 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2167 - | {
|
2168 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2169 - | let first_validation_exception_field =
|
2170 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2171 - | let validation_exception = crate::error::ValidationException {
|
2172 - | message: format!(
|
2173 - | "1 validation error detected. {}",
|
2174 - | &first_validation_exception_field.message
|
2175 - | ),
|
2176 - | field_list: Some(vec![first_validation_exception_field]),
|
2177 - | };
|
2178 - | Self::ConstraintViolation(
|
2179 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2180 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2184 + | .transpose()?
|
2185 + | .unwrap_or_else(||
|
2186 + | 0i64
|
2187 + | .try_into()
|
2188 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2181 2189 | )
|
2182 - | }
|
2183 - | }
|
2184 - | impl ::std::convert::From<Builder>
|
2185 - | for crate::constrained::MaybeConstrained<
|
2186 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
2187 - | >
|
2188 - | {
|
2189 - | fn from(builder: Builder) -> Self {
|
2190 - | Self::Unconstrained(builder)
|
2191 - | }
|
2192 - | }
|
2193 - | impl ::std::convert::TryFrom<Builder>
|
2194 - | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
2195 - | {
|
2196 - | type Error = ConstraintViolation;
|
2197 - |
|
2198 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2199 - | builder.build()
|
2200 - | }
|
2201 - | }
|
2202 - | /// A builder for [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2203 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2204 - | pub struct Builder {
|
2205 - | pub(crate) map_of_set_of_length_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained>>,
|
2206 - | }
|
2207 - | impl Builder {
|
2208 - | #[allow(missing_docs)] // documentation missing in model
|
2209 - | pub fn map_of_set_of_length_string(
|
2210 - | mut self,
|
2211 - | input: ::std::option::Option<
|
2212 - | ::std::collections::HashMap<
|
2213 - | crate::model::LengthString,
|
2214 - | crate::model::SetOfLengthString,
|
2215 - | >,
|
2216 - | >,
|
2217 - | ) -> Self {
|
2218 - | self.map_of_set_of_length_string =
|
2219 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
2220 - | self
|
2221 - | }
|
2222 - | #[allow(missing_docs)] // documentation missing in model
|
2223 - | pub(crate) fn set_map_of_set_of_length_string(
|
2224 - | mut self,
|
2225 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained>>>,
|
2226 - | ) -> Self {
|
2227 - | self.map_of_set_of_length_string = input.map(|v| v.into());
|
2228 - | self
|
2229 - | }
|
2230 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2231 - | ///
|
2232 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2233 - | ///
|
2234 - | pub fn build(
|
2235 - | self,
|
2236 - | ) -> Result<
|
2237 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
2238 - | ConstraintViolation,
|
2239 - | > {
|
2240 - | self.build_enforcing_all_constraints()
|
2241 - | }
|
2242 - | fn build_enforcing_all_constraints(
|
2243 - | self,
|
2244 - | ) -> Result<
|
2245 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
2246 - | ConstraintViolation,
|
2247 - | > {
|
2248 - | Ok(
|
2249 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
2250 - | map_of_set_of_length_string: self
|
2251 - | .map_of_set_of_length_string
|
2190 + | ,
|
2191 + | range_byte_label: self.range_byte_label
|
2252 2192 | .map(|v| match v {
|
2253 2193 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2254 2194 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2255 2195 | })
|
2256 - | .map(|res| {
|
2257 - | res.map(|v| v.into())
|
2258 - | .map_err(ConstraintViolation::MapOfSetOfLengthString)
|
2196 + | .map(|res|
|
2197 + | res.map_err(ConstraintViolation::RangeByteLabel)
|
2198 + | )
|
2199 + | .transpose()?
|
2200 + | .unwrap_or_else(||
|
2201 + | 0i8
|
2202 + | .try_into()
|
2203 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2204 + | )
|
2205 + | ,
|
2206 + | enum_string_label: self.enum_string_label
|
2207 + | .map(|v| match v {
|
2208 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2209 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2259 2210 | })
|
2260 - | .transpose()?,
|
2261 - | },
|
2211 + | .map(|res|
|
2212 + | res.map_err(ConstraintViolation::EnumStringLabel)
|
2262 2213 | )
|
2263 - | }
|
2264 - | }
|
2265 - | }
|
2266 - | /// See [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2267 - | pub mod query_params_targeting_map_of_list_of_length_string_operation_input {
|
2268 - |
|
2269 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2270 - | /// Holds one variant for each of the ways the builder can fail.
|
2271 - | #[non_exhaustive]
|
2272 - | #[allow(clippy::enum_variant_names)]
|
2273 - | pub enum ConstraintViolation {
|
2274 - | /// Constraint violation occurred building member `map_of_list_of_length_string` when building `QueryParamsTargetingMapOfListOfLengthStringOperationInput`.
|
2275 - | #[doc(hidden)]
|
2276 - | MapOfListOfLengthString(crate::model::map_of_list_of_length_string::ConstraintViolation),
|
2277 - | }
|
2278 - | impl ::std::fmt::Display for ConstraintViolation {
|
2279 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2280 - | match self {
|
2281 - | ConstraintViolation::MapOfListOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_length_string` when building `QueryParamsTargetingMapOfListOfLengthStringOperationInput`"),
|
2282 - | }
|
2283 - | }
|
2284 - | }
|
2285 - | impl ::std::error::Error for ConstraintViolation {}
|
2286 - | impl ConstraintViolation {
|
2287 - | pub(crate) fn as_validation_exception_field(
|
2288 - | self,
|
2289 - | path: ::std::string::String,
|
2290 - | ) -> crate::model::ValidationExceptionField {
|
2291 - | match self {
|
2292 - | ConstraintViolation::MapOfListOfLengthString(inner) => {
|
2293 - | inner.as_validation_exception_field(path + "/mapOfListOfLengthString")
|
2294 - | }
|
2295 - | }
|
2296 - | }
|
2297 - | }
|
2298 - | impl ::std::convert::From<ConstraintViolation>
|
2299 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2300 - | {
|
2301 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2302 - | let first_validation_exception_field =
|
2303 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2304 - | let validation_exception = crate::error::ValidationException {
|
2305 - | message: format!(
|
2306 - | "1 validation error detected. {}",
|
2307 - | &first_validation_exception_field.message
|
2308 - | ),
|
2309 - | field_list: Some(vec![first_validation_exception_field]),
|
2310 - | };
|
2311 - | Self::ConstraintViolation(
|
2312 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2313 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2314 - | )
|
2315 - | }
|
2316 - | }
|
2317 - | impl ::std::convert::From<Builder>
|
2318 - | for crate::constrained::MaybeConstrained<
|
2319 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
2320 - | >
|
2321 - | {
|
2322 - | fn from(builder: Builder) -> Self {
|
2323 - | Self::Unconstrained(builder)
|
2324 - | }
|
2325 - | }
|
2326 - | impl ::std::convert::TryFrom<Builder>
|
2327 - | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
2328 - | {
|
2329 - | type Error = ConstraintViolation;
|
2330 - |
|
2331 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2332 - | builder.build()
|
2333 - | }
|
2334 - | }
|
2335 - | /// A builder for [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2336 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2337 - | pub struct Builder {
|
2338 - | pub(crate) map_of_list_of_length_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained>>,
|
2339 - | }
|
2340 - | impl Builder {
|
2341 - | #[allow(missing_docs)] // documentation missing in model
|
2342 - | pub fn map_of_list_of_length_string(
|
2343 - | mut self,
|
2344 - | input: ::std::option::Option<
|
2345 - | ::std::collections::HashMap<
|
2346 - | crate::model::LengthString,
|
2347 - | ::std::vec::Vec<crate::model::LengthString>,
|
2348 - | >,
|
2349 - | >,
|
2350 - | ) -> Self {
|
2351 - | self.map_of_list_of_length_string =
|
2352 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
2353 - | self
|
2354 - | }
|
2355 - | #[allow(missing_docs)] // documentation missing in model
|
2356 - | pub(crate) fn set_map_of_list_of_length_string(
|
2357 - | mut self,
|
2358 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained>>>,
|
2359 - | ) -> Self {
|
2360 - | self.map_of_list_of_length_string = input.map(|v| v.into());
|
2361 - | self
|
2362 - | }
|
2363 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2364 - | ///
|
2365 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2366 - | ///
|
2367 - | pub fn build(
|
2368 - | self,
|
2369 - | ) -> Result<
|
2370 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
2371 - | ConstraintViolation,
|
2372 - | > {
|
2373 - | self.build_enforcing_all_constraints()
|
2374 - | }
|
2375 - | fn build_enforcing_all_constraints(
|
2376 - | self,
|
2377 - | ) -> Result<
|
2378 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
2379 - | ConstraintViolation,
|
2380 - | > {
|
2381 - | Ok(
|
2382 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
2383 - | map_of_list_of_length_string: self
|
2384 - | .map_of_list_of_length_string
|
2214 + | .transpose()?
|
2215 + | .ok_or(ConstraintViolation::MissingEnumStringLabel)?
|
2216 + | ,
|
2217 + | length_string_header_map: self.length_string_header_map
|
2385 2218 | .map(|v| match v {
|
2386 2219 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2387 2220 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2388 2221 | })
|
2389 - | .map(|res| {
|
2390 - | res.map(|v| v.into())
|
2391 - | .map_err(ConstraintViolation::MapOfListOfLengthString)
|
2392 - | })
|
2393 - | .transpose()?,
|
2394 - | },
|
2395 - | )
|
2396 - | }
|
2397 - | }
|
2398 - | }
|
2399 - | /// See [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2400 - | pub mod query_params_targeting_map_of_length_string_operation_input {
|
2401 - |
|
2402 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2403 - | /// Holds one variant for each of the ways the builder can fail.
|
2404 - | #[non_exhaustive]
|
2405 - | #[allow(clippy::enum_variant_names)]
|
2406 - | pub enum ConstraintViolation {
|
2407 - | /// Constraint violation occurred building member `map_of_length_string` when building `QueryParamsTargetingMapOfLengthStringOperationInput`.
|
2408 - | #[doc(hidden)]
|
2409 - | MapOfLengthString(crate::model::map_of_length_string::ConstraintViolation),
|
2410 - | }
|
2411 - | impl ::std::fmt::Display for ConstraintViolation {
|
2412 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2413 - | match self {
|
2414 - | ConstraintViolation::MapOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_length_string` when building `QueryParamsTargetingMapOfLengthStringOperationInput`"),
|
2415 - | }
|
2416 - | }
|
2417 - | }
|
2418 - | impl ::std::error::Error for ConstraintViolation {}
|
2419 - | impl ConstraintViolation {
|
2420 - | pub(crate) fn as_validation_exception_field(
|
2421 - | self,
|
2422 - | path: ::std::string::String,
|
2423 - | ) -> crate::model::ValidationExceptionField {
|
2424 - | match self {
|
2425 - | ConstraintViolation::MapOfLengthString(inner) => {
|
2426 - | inner.as_validation_exception_field(path + "/mapOfLengthString")
|
2427 - | }
|
2428 - | }
|
2429 - | }
|
2430 - | }
|
2431 - | impl ::std::convert::From<ConstraintViolation>
|
2432 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2433 - | {
|
2434 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2435 - | let first_validation_exception_field =
|
2436 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2437 - | let validation_exception = crate::error::ValidationException {
|
2438 - | message: format!(
|
2439 - | "1 validation error detected. {}",
|
2440 - | &first_validation_exception_field.message
|
2441 - | ),
|
2442 - | field_list: Some(vec![first_validation_exception_field]),
|
2443 - | };
|
2444 - | Self::ConstraintViolation(
|
2445 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2446 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2222 + | .map(|res|
|
2223 + | res.map(|v| v.into()).map_err(ConstraintViolation::LengthStringHeaderMap)
|
2447 2224 | )
|
2448 - | }
|
2449 - | }
|
2450 - | impl ::std::convert::From<Builder>
|
2451 - | for crate::constrained::MaybeConstrained<
|
2452 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
2453 - | >
|
2454 - | {
|
2455 - | fn from(builder: Builder) -> Self {
|
2456 - | Self::Unconstrained(builder)
|
2457 - | }
|
2458 - | }
|
2459 - | impl ::std::convert::TryFrom<Builder>
|
2460 - | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
2461 - | {
|
2462 - | type Error = ConstraintViolation;
|
2463 - |
|
2464 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2465 - | builder.build()
|
2466 - | }
|
2467 - | }
|
2468 - | /// A builder for [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2469 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2470 - | pub struct Builder {
|
2471 - | pub(crate) map_of_length_string: ::std::option::Option<
|
2472 - | crate::constrained::MaybeConstrained<
|
2473 - | crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained,
|
2474 - | >,
|
2475 - | >,
|
2476 - | }
|
2477 - | impl Builder {
|
2478 - | #[allow(missing_docs)] // documentation missing in model
|
2479 - | pub fn map_of_length_string(
|
2480 - | mut self,
|
2481 - | input: ::std::option::Option<
|
2482 - | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
2483 - | >,
|
2484 - | ) -> Self {
|
2485 - | self.map_of_length_string =
|
2486 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
2487 - | self
|
2488 - | }
|
2489 - | #[allow(missing_docs)] // documentation missing in model
|
2490 - | pub(crate) fn set_map_of_length_string(
|
2491 - | mut self,
|
2492 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>>,
|
2493 - | ) -> Self {
|
2494 - | self.map_of_length_string = input.map(|v| v.into());
|
2495 - | self
|
2496 - | }
|
2497 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2498 - | ///
|
2499 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2500 - | ///
|
2501 - | pub fn build(
|
2502 - | self,
|
2503 - | ) -> Result<
|
2504 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
2505 - | ConstraintViolation,
|
2506 - | > {
|
2507 - | self.build_enforcing_all_constraints()
|
2508 - | }
|
2509 - | fn build_enforcing_all_constraints(
|
2510 - | self,
|
2511 - | ) -> Result<
|
2512 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
2513 - | ConstraintViolation,
|
2514 - | > {
|
2515 - | Ok(
|
2516 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
2517 - | map_of_length_string: self
|
2518 - | .map_of_length_string
|
2225 + | .transpose()?
|
2226 + | .ok_or(ConstraintViolation::MissingLengthStringHeaderMap)?
|
2227 + | ,
|
2228 + | length_string_header: self.length_string_header
|
2519 2229 | .map(|v| match v {
|
2520 2230 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2521 2231 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2522 2232 | })
|
2523 - | .map(|res| {
|
2524 - | res.map(|v| v.into())
|
2525 - | .map_err(ConstraintViolation::MapOfLengthString)
|
2526 - | })
|
2527 - | .transpose()?,
|
2528 - | },
|
2233 + | .map(|res|
|
2234 + | res.map_err(ConstraintViolation::LengthStringHeader)
|
2529 2235 | )
|
2530 - | }
|
2531 - | }
|
2532 - | }
|
2533 - | /// See [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
2534 - | pub mod query_params_targeting_length_map_operation_input {
|
2535 - |
|
2536 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2537 - | /// Holds one variant for each of the ways the builder can fail.
|
2538 - | #[non_exhaustive]
|
2539 - | #[allow(clippy::enum_variant_names)]
|
2540 - | pub enum ConstraintViolation {
|
2541 - | /// Constraint violation occurred building member `length_map` when building `QueryParamsTargetingLengthMapOperationInput`.
|
2542 - | #[doc(hidden)]
|
2543 - | LengthMap(crate::model::con_b_map::ConstraintViolation),
|
2544 - | }
|
2545 - | impl ::std::fmt::Display for ConstraintViolation {
|
2546 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2547 - | match self {
|
2548 - | ConstraintViolation::LengthMap(_) => write!(f, "constraint violation occurred building member `length_map` when building `QueryParamsTargetingLengthMapOperationInput`"),
|
2549 - | }
|
2550 - | }
|
2551 - | }
|
2552 - | impl ::std::error::Error for ConstraintViolation {}
|
2553 - | impl ConstraintViolation {
|
2554 - | pub(crate) fn as_validation_exception_field(
|
2555 - | self,
|
2556 - | path: ::std::string::String,
|
2557 - | ) -> crate::model::ValidationExceptionField {
|
2558 - | match self {
|
2559 - | ConstraintViolation::LengthMap(inner) => {
|
2560 - | inner.as_validation_exception_field(path + "/lengthMap")
|
2561 - | }
|
2562 - | }
|
2563 - | }
|
2564 - | }
|
2565 - | impl ::std::convert::From<ConstraintViolation>
|
2566 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2567 - | {
|
2568 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2569 - | let first_validation_exception_field =
|
2570 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2571 - | let validation_exception = crate::error::ValidationException {
|
2572 - | message: format!(
|
2573 - | "1 validation error detected. {}",
|
2574 - | &first_validation_exception_field.message
|
2575 - | ),
|
2576 - | field_list: Some(vec![first_validation_exception_field]),
|
2577 - | };
|
2578 - | Self::ConstraintViolation(
|
2579 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2580 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2236 + | .transpose()?
|
2237 + | ,
|
2238 + | range_integer_header: self.range_integer_header
|
2239 + | .map(|v| match v {
|
2240 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2241 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2242 + | })
|
2243 + | .map(|res|
|
2244 + | res.map_err(ConstraintViolation::RangeIntegerHeader)
|
2581 2245 | )
|
2582 - | }
|
2583 - | }
|
2584 - | impl ::std::convert::From<Builder>
|
2585 - | for crate::constrained::MaybeConstrained<
|
2586 - | crate::input::QueryParamsTargetingLengthMapOperationInput,
|
2587 - | >
|
2588 - | {
|
2589 - | fn from(builder: Builder) -> Self {
|
2590 - | Self::Unconstrained(builder)
|
2591 - | }
|
2592 - | }
|
2593 - | impl ::std::convert::TryFrom<Builder>
|
2594 - | for crate::input::QueryParamsTargetingLengthMapOperationInput
|
2595 - | {
|
2596 - | type Error = ConstraintViolation;
|
2597 - |
|
2598 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2599 - | builder.build()
|
2600 - | }
|
2601 - | }
|
2602 - | /// A builder for [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
2603 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2604 - | pub struct Builder {
|
2605 - | pub(crate) length_map:
|
2606 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
2607 - | }
|
2608 - | impl Builder {
|
2609 - | #[allow(missing_docs)] // documentation missing in model
|
2610 - | pub fn length_map(mut self, input: ::std::option::Option<crate::model::ConBMap>) -> Self {
|
2611 - | self.length_map = input.map(crate::constrained::MaybeConstrained::Constrained);
|
2612 - | self
|
2613 - | }
|
2614 - | #[allow(missing_docs)] // documentation missing in model
|
2615 - | pub(crate) fn set_length_map(
|
2616 - | mut self,
|
2617 - | input: Option<
|
2618 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
2619 - | >,
|
2620 - | ) -> Self {
|
2621 - | self.length_map = input.map(|v| v.into());
|
2622 - | self
|
2623 - | }
|
2624 - | /// Consumes the builder and constructs a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
2625 - | ///
|
2626 - | /// The builder fails to construct a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput) if a [`ConstraintViolation`] occurs.
|
2627 - | ///
|
2628 - | pub fn build(
|
2629 - | self,
|
2630 - | ) -> Result<crate::input::QueryParamsTargetingLengthMapOperationInput, ConstraintViolation>
|
2631 - | {
|
2632 - | self.build_enforcing_all_constraints()
|
2633 - | }
|
2634 - | fn build_enforcing_all_constraints(
|
2635 - | self,
|
2636 - | ) -> Result<crate::input::QueryParamsTargetingLengthMapOperationInput, ConstraintViolation>
|
2637 - | {
|
2638 - | Ok(crate::input::QueryParamsTargetingLengthMapOperationInput {
|
2639 - | length_map: self
|
2640 - | .length_map
|
2246 + | .transpose()?
|
2247 + | .unwrap_or_else(||
|
2248 + | 0i32
|
2249 + | .try_into()
|
2250 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2251 + | )
|
2252 + | ,
|
2253 + | range_short_header: self.range_short_header
|
2641 2254 | .map(|v| match v {
|
2642 2255 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2643 2256 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2644 2257 | })
|
2645 - | .map(|res| res.map_err(ConstraintViolation::LengthMap))
|
2646 - | .transpose()?,
|
2258 + | .map(|res|
|
2259 + | res.map_err(ConstraintViolation::RangeShortHeader)
|
2260 + | )
|
2261 + | .transpose()?
|
2262 + | .unwrap_or_else(||
|
2263 + | 0i16
|
2264 + | .try_into()
|
2265 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2266 + | )
|
2267 + | ,
|
2268 + | range_long_header: self.range_long_header
|
2269 + | .map(|v| match v {
|
2270 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2271 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2647 2272 | })
|
2648 - | }
|
2649 - | }
|
2650 - | }
|
2651 - | /// See [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
2652 - | pub mod constrained_recursive_shapes_operation_input {
|
2653 - |
|
2654 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2655 - | /// Holds one variant for each of the ways the builder can fail.
|
2656 - | #[non_exhaustive]
|
2657 - | #[allow(clippy::enum_variant_names)]
|
2658 - | pub enum ConstraintViolation {
|
2659 - | /// Constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`.
|
2660 - | #[doc(hidden)]
|
2661 - | Nested(crate::model::recursive_shapes_input_output_nested1::ConstraintViolation),
|
2662 - | /// `recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`.
|
2663 - | MissingRecursiveList,
|
2664 - | /// Constraint violation occurred building member `recursive_list` when building `ConstrainedRecursiveShapesOperationInput`.
|
2665 - | #[doc(hidden)]
|
2666 - | RecursiveList(crate::model::recursive_list::ConstraintViolation),
|
2667 - | }
|
2668 - | impl ::std::fmt::Display for ConstraintViolation {
|
2669 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2670 - | match self {
|
2671 - | ConstraintViolation::Nested(_) => write!(f, "constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`"),
|
2672 - | ConstraintViolation::MissingRecursiveList => write!(f, "`recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`"),
|
2673 - | ConstraintViolation::RecursiveList(_) => write!(f, "constraint violation occurred building member `recursive_list` when building `ConstrainedRecursiveShapesOperationInput`"),
|
2674 - | }
|
2675 - | }
|
2676 - | }
|
2677 - | impl ::std::error::Error for ConstraintViolation {}
|
2678 - | impl ConstraintViolation {
|
2679 - | pub(crate) fn as_validation_exception_field(
|
2680 - | self,
|
2681 - | path: ::std::string::String,
|
2682 - | ) -> crate::model::ValidationExceptionField {
|
2683 - | match self {
|
2684 - | ConstraintViolation::Nested(inner) => inner.as_validation_exception_field(path + "/nested"),
|
2685 - | ConstraintViolation::MissingRecursiveList => crate::model::ValidationExceptionField {
|
2686 - | message: format!("Value at '{}/recursiveList' failed to satisfy constraint: Member must not be null", path),
|
2687 - | path: path + "/recursiveList",
|
2688 - | },
|
2689 - | ConstraintViolation::RecursiveList(inner) => inner.as_validation_exception_field(path + "/recursiveList"),
|
2690 - | }
|
2691 - | }
|
2692 - | }
|
2693 - | impl ::std::convert::From<ConstraintViolation>
|
2694 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2695 - | {
|
2696 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2697 - | let first_validation_exception_field =
|
2698 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2699 - | let validation_exception = crate::error::ValidationException {
|
2700 - | message: format!(
|
2701 - | "1 validation error detected. {}",
|
2702 - | &first_validation_exception_field.message
|
2703 - | ),
|
2704 - | field_list: Some(vec![first_validation_exception_field]),
|
2705 - | };
|
2706 - | Self::ConstraintViolation(
|
2707 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2708 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2273 + | .map(|res|
|
2274 + | res.map_err(ConstraintViolation::RangeLongHeader)
|
2709 2275 | )
|
2710 - | }
|
2711 - | }
|
2712 - | impl ::std::convert::From<Builder>
|
2713 - | for crate::constrained::MaybeConstrained<
|
2714 - | crate::input::ConstrainedRecursiveShapesOperationInput,
|
2715 - | >
|
2716 - | {
|
2717 - | fn from(builder: Builder) -> Self {
|
2718 - | Self::Unconstrained(builder)
|
2719 - | }
|
2720 - | }
|
2721 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedRecursiveShapesOperationInput {
|
2722 - | type Error = ConstraintViolation;
|
2723 - |
|
2724 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2725 - | builder.build()
|
2726 - | }
|
2727 - | }
|
2728 - | /// A builder for [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
2729 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2730 - | pub struct Builder {
|
2731 - | pub(crate) nested: ::std::option::Option<
|
2732 - | crate::constrained::MaybeConstrained<crate::model::RecursiveShapesInputOutputNested1>,
|
2733 - | >,
|
2734 - | pub(crate) recursive_list: ::std::option::Option<
|
2735 - | crate::constrained::MaybeConstrained<
|
2736 - | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
2737 - | >,
|
2738 - | >,
|
2739 - | }
|
2740 - | impl Builder {
|
2741 - | #[allow(missing_docs)] // documentation missing in model
|
2742 - | pub fn nested(
|
2743 - | mut self,
|
2744 - | input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
2745 - | ) -> Self {
|
2746 - | self.nested = input.map(crate::constrained::MaybeConstrained::Constrained);
|
2747 - | self
|
2748 - | }
|
2749 - | #[allow(missing_docs)] // documentation missing in model
|
2750 - | pub(crate) fn set_nested(
|
2751 - | mut self,
|
2752 - | input: Option<
|
2753 - | impl ::std::convert::Into<
|
2754 - | crate::constrained::MaybeConstrained<
|
2755 - | crate::model::RecursiveShapesInputOutputNested1,
|
2756 - | >,
|
2757 - | >,
|
2758 - | >,
|
2759 - | ) -> Self {
|
2760 - | self.nested = input.map(|v| v.into());
|
2761 - | self
|
2762 - | }
|
2763 - | #[allow(missing_docs)] // documentation missing in model
|
2764 - | pub fn recursive_list(
|
2765 - | mut self,
|
2766 - | input: ::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
|
2767 - | ) -> Self {
|
2768 - | self.recursive_list = Some(crate::constrained::MaybeConstrained::Constrained(
|
2769 - | (input).into(),
|
2770 - | ));
|
2771 - | self
|
2772 - | }
|
2773 - | #[allow(missing_docs)] // documentation missing in model
|
2774 - | pub(crate) fn set_recursive_list(
|
2775 - | mut self,
|
2776 - | input: impl ::std::convert::Into<
|
2777 - | crate::constrained::MaybeConstrained<
|
2778 - | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
2779 - | >,
|
2780 - | >,
|
2781 - | ) -> Self {
|
2782 - | self.recursive_list = Some(input.into());
|
2783 - | self
|
2784 - | }
|
2785 - | /// Consumes the builder and constructs a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
2786 - | ///
|
2787 - | /// The builder fails to construct a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
2788 - | ///
|
2789 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2790 - | pub fn build(
|
2791 - | self,
|
2792 - | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
2793 - | {
|
2794 - | self.build_enforcing_all_constraints()
|
2795 - | }
|
2796 - | fn build_enforcing_all_constraints(
|
2797 - | self,
|
2798 - | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
2799 - | {
|
2800 - | Ok(crate::input::ConstrainedRecursiveShapesOperationInput {
|
2801 - | nested: self
|
2802 - | .nested
|
2276 + | .transpose()?
|
2277 + | .unwrap_or_else(||
|
2278 + | 0i64
|
2279 + | .try_into()
|
2280 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2281 + | )
|
2282 + | ,
|
2283 + | range_byte_header: self.range_byte_header
|
2803 2284 | .map(|v| match v {
|
2804 2285 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2805 2286 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2806 2287 | })
|
2807 - | .map(|res| res.map_err(ConstraintViolation::Nested))
|
2808 - | .transpose()?,
|
2809 - | recursive_list: self
|
2810 - | .recursive_list
|
2288 + | .map(|res|
|
2289 + | res.map_err(ConstraintViolation::RangeByteHeader)
|
2290 + | )
|
2291 + | .transpose()?
|
2292 + | .unwrap_or_else(||
|
2293 + | 0i8
|
2294 + | .try_into()
|
2295 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2296 + | )
|
2297 + | ,
|
2298 + | length_string_set_header: self.length_string_set_header
|
2811 2299 | .map(|v| match v {
|
2812 2300 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2813 2301 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2814 2302 | })
|
2815 - | .map(|res| {
|
2816 - | res.map(|v| v.into())
|
2817 - | .map_err(ConstraintViolation::RecursiveList)
|
2303 + | .map(|res|
|
2304 + | res.map_err(ConstraintViolation::LengthStringSetHeader)
|
2305 + | )
|
2306 + | .transpose()?
|
2307 + | ,
|
2308 + | list_length_string_header: self.list_length_string_header
|
2309 + | .map(|v| match v {
|
2310 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2311 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2818 2312 | })
|
2313 + | .map(|res|
|
2314 + | res.map(|v| v.into()).map_err(ConstraintViolation::ListLengthStringHeader)
|
2315 + | )
|
2819 2316 | .transpose()?
|
2820 - | .ok_or(ConstraintViolation::MissingRecursiveList)?,
|
2317 + | ,
|
2318 + | length_list_pattern_string_header: self.length_list_pattern_string_header
|
2319 + | .map(|v| match v {
|
2320 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2321 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2821 2322 | })
|
2822 - | }
|
2823 - | }
|
2824 - | }
|
2825 - | /// See [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2826 - | pub mod constrained_http_payload_bound_shape_operation_input {
|
2827 - |
|
2828 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2829 - | /// Holds one variant for each of the ways the builder can fail.
|
2830 - | #[non_exhaustive]
|
2831 - | #[allow(clippy::enum_variant_names)]
|
2832 - | pub enum ConstraintViolation {
|
2833 - | /// `http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
2834 - | MissingHttpPayloadBoundConstrainedShape,
|
2835 - | /// Constraint violation occurred building member `http_payload_bound_constrained_shape` when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
2836 - | #[doc(hidden)]
|
2837 - | HttpPayloadBoundConstrainedShape(crate::model::con_a::ConstraintViolation),
|
2838 - | }
|
2839 - | impl ::std::fmt::Display for ConstraintViolation {
|
2840 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2841 - | match self {
|
2842 - | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => write!(f, "`http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
2843 - | ConstraintViolation::HttpPayloadBoundConstrainedShape(_) => write!(f, "constraint violation occurred building member `http_payload_bound_constrained_shape` when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
2844 - | }
|
2845 - | }
|
2846 - | }
|
2847 - | impl ::std::error::Error for ConstraintViolation {}
|
2848 - | impl ConstraintViolation {
|
2849 - | pub(crate) fn as_validation_exception_field(
|
2850 - | self,
|
2851 - | path: ::std::string::String,
|
2852 - | ) -> crate::model::ValidationExceptionField {
|
2853 - | match self {
|
2854 - | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => crate::model::ValidationExceptionField {
|
2855 - | message: format!("Value at '{}/httpPayloadBoundConstrainedShape' failed to satisfy constraint: Member must not be null", path),
|
2856 - | path: path + "/httpPayloadBoundConstrainedShape",
|
2857 - | },
|
2858 - | ConstraintViolation::HttpPayloadBoundConstrainedShape(inner) => inner.as_validation_exception_field(path + "/httpPayloadBoundConstrainedShape"),
|
2859 - | }
|
2860 - | }
|
2861 - | }
|
2862 - | impl ::std::convert::From<ConstraintViolation>
|
2863 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2864 - | {
|
2865 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2866 - | let first_validation_exception_field =
|
2867 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2868 - | let validation_exception = crate::error::ValidationException {
|
2869 - | message: format!(
|
2870 - | "1 validation error detected. {}",
|
2871 - | &first_validation_exception_field.message
|
2872 - | ),
|
2873 - | field_list: Some(vec![first_validation_exception_field]),
|
2874 - | };
|
2875 - | Self::ConstraintViolation(
|
2876 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2877 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2323 + | .map(|res|
|
2324 + | res.map_err(ConstraintViolation::LengthListPatternStringHeader)
|
2878 2325 | )
|
2879 - | }
|
2880 - | }
|
2881 - | impl ::std::convert::From<Builder>
|
2882 - | for crate::constrained::MaybeConstrained<
|
2883 - | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput,
|
2884 - | >
|
2885 - | {
|
2886 - | fn from(builder: Builder) -> Self {
|
2887 - | Self::Unconstrained(builder)
|
2888 - | }
|
2889 - | }
|
2890 - | impl ::std::convert::TryFrom<Builder>
|
2891 - | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
2892 - | {
|
2893 - | type Error = ConstraintViolation;
|
2894 - |
|
2895 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2896 - | builder.build()
|
2897 - | }
|
2898 - | }
|
2899 - | /// A builder for [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2900 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2901 - | pub struct Builder {
|
2902 - | pub(crate) http_payload_bound_constrained_shape:
|
2903 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
2904 - | }
|
2905 - | impl Builder {
|
2906 - | #[allow(missing_docs)] // documentation missing in model
|
2907 - | pub fn http_payload_bound_constrained_shape(mut self, input: crate::model::ConA) -> Self {
|
2908 - | self.http_payload_bound_constrained_shape =
|
2909 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
2910 - | self
|
2911 - | }
|
2912 - | #[allow(missing_docs)] // documentation missing in model
|
2913 - | pub(crate) fn set_http_payload_bound_constrained_shape(
|
2914 - | mut self,
|
2915 - | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
2916 - | ) -> Self {
|
2917 - | self.http_payload_bound_constrained_shape = Some(input.into());
|
2918 - | self
|
2919 - | }
|
2920 - | /// Consumes the builder and constructs a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2921 - | ///
|
2922 - | /// The builder fails to construct a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput) if a [`ConstraintViolation`] occurs.
|
2923 - | ///
|
2924 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2925 - | pub fn build(
|
2926 - | self,
|
2927 - | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
2928 - | {
|
2929 - | self.build_enforcing_all_constraints()
|
2930 - | }
|
2931 - | fn build_enforcing_all_constraints(
|
2932 - | self,
|
2933 - | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
2934 - | {
|
2935 - | Ok(
|
2936 - | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput {
|
2937 - | http_payload_bound_constrained_shape: self
|
2938 - | .http_payload_bound_constrained_shape
|
2326 + | .transpose()?
|
2327 + | ,
|
2328 + | length_set_pattern_string_header: self.length_set_pattern_string_header
|
2939 2329 | .map(|v| match v {
|
2940 2330 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2941 2331 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2942 2332 | })
|
2943 - | .map(|res| {
|
2944 - | res.map_err(ConstraintViolation::HttpPayloadBoundConstrainedShape)
|
2333 + | .map(|res|
|
2334 + | res.map_err(ConstraintViolation::LengthSetPatternStringHeader)
|
2335 + | )
|
2336 + | .transpose()?
|
2337 + | ,
|
2338 + | range_byte_set_header: self.range_byte_set_header
|
2339 + | .map(|v| match v {
|
2340 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2341 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2945 2342 | })
|
2343 + | .map(|res|
|
2344 + | res.map_err(ConstraintViolation::RangeByteSetHeader)
|
2345 + | )
|
2946 2346 | .transpose()?
|
2947 - | .ok_or(ConstraintViolation::MissingHttpPayloadBoundConstrainedShape)?,
|
2948 - | },
|
2347 + | ,
|
2348 + | range_short_set_header: self.range_short_set_header
|
2349 + | .map(|v| match v {
|
2350 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2351 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2352 + | })
|
2353 + | .map(|res|
|
2354 + | res.map_err(ConstraintViolation::RangeShortSetHeader)
|
2949 2355 | )
|
2356 + | .transpose()?
|
2357 + | ,
|
2358 + | range_integer_set_header: self.range_integer_set_header
|
2359 + | .map(|v| match v {
|
2360 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2361 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2362 + | })
|
2363 + | .map(|res|
|
2364 + | res.map_err(ConstraintViolation::RangeIntegerSetHeader)
|
2365 + | )
|
2366 + | .transpose()?
|
2367 + | ,
|
2368 + | range_long_set_header: self.range_long_set_header
|
2369 + | .map(|v| match v {
|
2370 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2371 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2372 + | })
|
2373 + | .map(|res|
|
2374 + | res.map_err(ConstraintViolation::RangeLongSetHeader)
|
2375 + | )
|
2376 + | .transpose()?
|
2377 + | ,
|
2378 + | range_byte_list_header: self.range_byte_list_header
|
2379 + | .map(|v| match v {
|
2380 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2381 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2382 + | })
|
2383 + | .map(|res|
|
2384 + | res.map(|v| v.into()).map_err(ConstraintViolation::RangeByteListHeader)
|
2385 + | )
|
2386 + | .transpose()?
|
2387 + | ,
|
2388 + | range_short_list_header: self.range_short_list_header
|
2389 + | .map(|v| match v {
|
2390 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2391 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2392 + | })
|
2393 + | .map(|res|
|
2394 + | res.map(|v| v.into()).map_err(ConstraintViolation::RangeShortListHeader)
|
2395 + | )
|
2396 + | .transpose()?
|
2397 + | ,
|
2398 + | range_integer_list_header: self.range_integer_list_header
|
2399 + | .map(|v| match v {
|
2400 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2401 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2402 + | })
|
2403 + | .map(|res|
|
2404 + | res.map(|v| v.into()).map_err(ConstraintViolation::RangeIntegerListHeader)
|
2405 + | )
|
2406 + | .transpose()?
|
2407 + | ,
|
2408 + | range_long_list_header: self.range_long_list_header
|
2409 + | .map(|v| match v {
|
2410 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2411 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2412 + | })
|
2413 + | .map(|res|
|
2414 + | res.map(|v| v.into()).map_err(ConstraintViolation::RangeLongListHeader)
|
2415 + | )
|
2416 + | .transpose()?
|
2417 + | ,
|
2418 + | length_string_query: self.length_string_query
|
2419 + | .map(|v| match v {
|
2420 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2421 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2422 + | })
|
2423 + | .map(|res|
|
2424 + | res.map_err(ConstraintViolation::LengthStringQuery)
|
2425 + | )
|
2426 + | .transpose()?
|
2427 + | ,
|
2428 + | range_byte_query: self.range_byte_query
|
2429 + | .map(|v| match v {
|
2430 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2431 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2432 + | })
|
2433 + | .map(|res|
|
2434 + | res.map_err(ConstraintViolation::RangeByteQuery)
|
2435 + | )
|
2436 + | .transpose()?
|
2437 + | .unwrap_or_else(||
|
2438 + | 0i8
|
2439 + | .try_into()
|
2440 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2441 + | )
|
2442 + | ,
|
2443 + | range_short_query: self.range_short_query
|
2444 + | .map(|v| match v {
|
2445 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2446 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2447 + | })
|
2448 + | .map(|res|
|
2449 + | res.map_err(ConstraintViolation::RangeShortQuery)
|
2450 + | )
|
2451 + | .transpose()?
|
2452 + | .unwrap_or_else(||
|
2453 + | 0i16
|
2454 + | .try_into()
|
2455 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2456 + | )
|
2457 + | ,
|
2458 + | range_integer_query: self.range_integer_query
|
2459 + | .map(|v| match v {
|
2460 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2461 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2462 + | })
|
2463 + | .map(|res|
|
2464 + | res.map_err(ConstraintViolation::RangeIntegerQuery)
|
2465 + | )
|
2466 + | .transpose()?
|
2467 + | .unwrap_or_else(||
|
2468 + | 0i32
|
2469 + | .try_into()
|
2470 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2471 + | )
|
2472 + | ,
|
2473 + | range_long_query: self.range_long_query
|
2474 + | .map(|v| match v {
|
2475 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2476 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2477 + | })
|
2478 + | .map(|res|
|
2479 + | res.map_err(ConstraintViolation::RangeLongQuery)
|
2480 + | )
|
2481 + | .transpose()?
|
2482 + | .unwrap_or_else(||
|
2483 + | 0i64
|
2484 + | .try_into()
|
2485 + | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2486 + | )
|
2487 + | ,
|
2488 + | enum_string_query: self.enum_string_query
|
2489 + | .map(|v| match v {
|
2490 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2491 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2492 + | })
|
2493 + | .map(|res|
|
2494 + | res.map_err(ConstraintViolation::EnumStringQuery)
|
2495 + | )
|
2496 + | .transpose()?
|
2497 + | ,
|
2498 + | length_string_list_query: self.length_string_list_query
|
2499 + | .map(|v| match v {
|
2500 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2501 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2502 + | })
|
2503 + | .map(|res|
|
2504 + | res.map(|v| v.into()).map_err(ConstraintViolation::LengthStringListQuery)
|
2505 + | )
|
2506 + | .transpose()?
|
2507 + | ,
|
2508 + | length_list_pattern_string_query: self.length_list_pattern_string_query
|
2509 + | .map(|v| match v {
|
2510 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2511 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2512 + | })
|
2513 + | .map(|res|
|
2514 + | res.map_err(ConstraintViolation::LengthListPatternStringQuery)
|
2515 + | )
|
2516 + | .transpose()?
|
2517 + | ,
|
2518 + | length_string_set_query: self.length_string_set_query
|
2519 + | .map(|v| match v {
|
2520 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2521 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2522 + | })
|
2523 + | .map(|res|
|
2524 + | res.map_err(ConstraintViolation::LengthStringSetQuery)
|
2525 + | )
|
2526 + | .transpose()?
|
2527 + | ,
|
2528 + | range_byte_list_query: self.range_byte_list_query
|
2529 + | .map(|v| match v {
|
2530 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2531 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2532 + | })
|
2533 + | .map(|res|
|
2534 + | res.map(|v| v.into()).map_err(ConstraintViolation::RangeByteListQuery)
|
2535 + | )
|
2536 + | .transpose()?
|
2537 + | ,
|
2538 + | range_short_list_query: self.range_short_list_query
|
2539 + | .map(|v| match v {
|
2540 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2541 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2542 + | })
|
2543 + | .map(|res|
|
2544 + | res.map(|v| v.into()).map_err(ConstraintViolation::RangeShortListQuery)
|
2545 + | )
|
2546 + | .transpose()?
|
2547 + | ,
|
2548 + | range_integer_list_query: self.range_integer_list_query
|
2549 + | .map(|v| match v {
|
2550 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2551 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2552 + | })
|
2553 + | .map(|res|
|
2554 + | res.map(|v| v.into()).map_err(ConstraintViolation::RangeIntegerListQuery)
|
2555 + | )
|
2556 + | .transpose()?
|
2557 + | ,
|
2558 + | range_long_list_query: self.range_long_list_query
|
2559 + | .map(|v| match v {
|
2560 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2561 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2562 + | })
|
2563 + | .map(|res|
|
2564 + | res.map(|v| v.into()).map_err(ConstraintViolation::RangeLongListQuery)
|
2565 + | )
|
2566 + | .transpose()?
|
2567 + | ,
|
2568 + | range_byte_set_query: self.range_byte_set_query
|
2569 + | .map(|v| match v {
|
2570 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2571 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2572 + | })
|
2573 + | .map(|res|
|
2574 + | res.map_err(ConstraintViolation::RangeByteSetQuery)
|
2575 + | )
|
2576 + | .transpose()?
|
2577 + | ,
|
2578 + | range_short_set_query: self.range_short_set_query
|
2579 + | .map(|v| match v {
|
2580 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2581 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2582 + | })
|
2583 + | .map(|res|
|
2584 + | res.map_err(ConstraintViolation::RangeShortSetQuery)
|
2585 + | )
|
2586 + | .transpose()?
|
2587 + | ,
|
2588 + | range_integer_set_query: self.range_integer_set_query
|
2589 + | .map(|v| match v {
|
2590 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2591 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2592 + | })
|
2593 + | .map(|res|
|
2594 + | res.map_err(ConstraintViolation::RangeIntegerSetQuery)
|
2595 + | )
|
2596 + | .transpose()?
|
2597 + | ,
|
2598 + | range_long_set_query: self.range_long_set_query
|
2599 + | .map(|v| match v {
|
2600 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2601 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2602 + | })
|
2603 + | .map(|res|
|
2604 + | res.map_err(ConstraintViolation::RangeLongSetQuery)
|
2605 + | )
|
2606 + | .transpose()?
|
2607 + | ,
|
2608 + | enum_string_list_query: self.enum_string_list_query
|
2609 + | .map(|v| match v {
|
2610 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2611 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2612 + | })
|
2613 + | .map(|res|
|
2614 + | res.map(|v| v.into()).map_err(ConstraintViolation::EnumStringListQuery)
|
2615 + | )
|
2616 + | .transpose()?
|
2617 + | ,
|
2950 2618 | }
|
2619 + | )
|
2951 2620 | }
|
2952 - | }
|
2953 - | /// See [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
2954 - | pub mod constrained_http_bound_shapes_operation_input {
|
2955 - |
|
2956 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2957 - | /// Holds one variant for each of the ways the builder can fail.
|
2958 - | #[non_exhaustive]
|
2959 - | #[allow(clippy::enum_variant_names)]
|
2960 - | pub enum ConstraintViolation {
|
2961 - | /// `length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
2962 - | MissingLengthStringLabel,
|
2963 - | /// Constraint violation occurred building member `length_string_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2964 - | #[doc(hidden)]
|
2965 - | LengthStringLabel(crate::model::length_string::ConstraintViolation),
|
2966 - | /// Constraint violation occurred building member `range_integer_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2967 - | #[doc(hidden)]
|
2968 - | RangeIntegerLabel(crate::model::range_integer::ConstraintViolation),
|
2969 - | /// Constraint violation occurred building member `range_short_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2970 - | #[doc(hidden)]
|
2971 - | RangeShortLabel(crate::model::range_short::ConstraintViolation),
|
2972 - | /// Constraint violation occurred building member `range_long_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2973 - | #[doc(hidden)]
|
2974 - | RangeLongLabel(crate::model::range_long::ConstraintViolation),
|
2975 - | /// Constraint violation occurred building member `range_byte_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2976 - | #[doc(hidden)]
|
2977 - | RangeByteLabel(crate::model::range_byte::ConstraintViolation),
|
2978 - | /// `enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
2979 - | MissingEnumStringLabel,
|
2980 - | /// Constraint violation occurred building member `enum_string_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2981 - | #[doc(hidden)]
|
2982 - | EnumStringLabel(crate::model::enum_string::ConstraintViolation),
|
2983 - | /// `length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
2984 - | MissingLengthStringHeaderMap,
|
2985 - | /// Constraint violation occurred building member `length_string_header_map` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2986 - | #[doc(hidden)]
|
2987 - | LengthStringHeaderMap(crate::model::map_of_length_string::ConstraintViolation),
|
2988 - | /// Constraint violation occurred building member `length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2989 - | #[doc(hidden)]
|
2990 - | LengthStringHeader(crate::model::length_string::ConstraintViolation),
|
2991 - | /// Constraint violation occurred building member `range_integer_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2992 - | #[doc(hidden)]
|
2993 - | RangeIntegerHeader(crate::model::range_integer::ConstraintViolation),
|
2994 - | /// Constraint violation occurred building member `range_short_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2995 - | #[doc(hidden)]
|
2996 - | RangeShortHeader(crate::model::range_short::ConstraintViolation),
|
2997 - | /// Constraint violation occurred building member `range_long_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
2998 - | #[doc(hidden)]
|
2999 - | RangeLongHeader(crate::model::range_long::ConstraintViolation),
|
3000 - | /// Constraint violation occurred building member `range_byte_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3001 - | #[doc(hidden)]
|
3002 - | RangeByteHeader(crate::model::range_byte::ConstraintViolation),
|
3003 - | /// Constraint violation occurred building member `length_string_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3004 - | #[doc(hidden)]
|
3005 - | LengthStringSetHeader(crate::model::set_of_length_string::ConstraintViolation),
|
3006 - | /// Constraint violation occurred building member `list_length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3007 - | #[doc(hidden)]
|
3008 - | ListLengthStringHeader(crate::model::list_of_length_string::ConstraintViolation),
|
3009 - | /// Constraint violation occurred building member `length_list_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3010 - | #[doc(hidden)]
|
3011 - | LengthListPatternStringHeader(
|
3012 - | crate::model::length_list_of_pattern_string::ConstraintViolation,
|
3013 - | ),
|
3014 - | /// Constraint violation occurred building member `length_set_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3015 - | #[doc(hidden)]
|
3016 - | LengthSetPatternStringHeader(
|
3017 - | crate::model::length_set_of_pattern_string::ConstraintViolation,
|
3018 - | ),
|
3019 - | /// Constraint violation occurred building member `range_byte_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3020 - | #[doc(hidden)]
|
3021 - | RangeByteSetHeader(crate::model::set_of_range_byte::ConstraintViolation),
|
3022 - | /// Constraint violation occurred building member `range_short_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3023 - | #[doc(hidden)]
|
3024 - | RangeShortSetHeader(crate::model::set_of_range_short::ConstraintViolation),
|
3025 - | /// Constraint violation occurred building member `range_integer_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3026 - | #[doc(hidden)]
|
3027 - | RangeIntegerSetHeader(crate::model::set_of_range_integer::ConstraintViolation),
|
3028 - | /// Constraint violation occurred building member `range_long_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3029 - | #[doc(hidden)]
|
3030 - | RangeLongSetHeader(crate::model::set_of_range_long::ConstraintViolation),
|
3031 - | /// Constraint violation occurred building member `range_byte_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3032 - | #[doc(hidden)]
|
3033 - | RangeByteListHeader(crate::model::list_of_range_byte::ConstraintViolation),
|
3034 - | /// Constraint violation occurred building member `range_short_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3035 - | #[doc(hidden)]
|
3036 - | RangeShortListHeader(crate::model::list_of_range_short::ConstraintViolation),
|
3037 - | /// Constraint violation occurred building member `range_integer_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3038 - | #[doc(hidden)]
|
3039 - | RangeIntegerListHeader(crate::model::list_of_range_integer::ConstraintViolation),
|
3040 - | /// Constraint violation occurred building member `range_long_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3041 - | #[doc(hidden)]
|
3042 - | RangeLongListHeader(crate::model::list_of_range_long::ConstraintViolation),
|
3043 - | /// Constraint violation occurred building member `length_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3044 - | #[doc(hidden)]
|
3045 - | LengthStringQuery(crate::model::length_string::ConstraintViolation),
|
3046 - | /// Constraint violation occurred building member `range_byte_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3047 - | #[doc(hidden)]
|
3048 - | RangeByteQuery(crate::model::range_byte::ConstraintViolation),
|
3049 - | /// Constraint violation occurred building member `range_short_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3050 - | #[doc(hidden)]
|
3051 - | RangeShortQuery(crate::model::range_short::ConstraintViolation),
|
3052 - | /// Constraint violation occurred building member `range_integer_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3053 - | #[doc(hidden)]
|
3054 - | RangeIntegerQuery(crate::model::range_integer::ConstraintViolation),
|
3055 - | /// Constraint violation occurred building member `range_long_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3056 - | #[doc(hidden)]
|
3057 - | RangeLongQuery(crate::model::range_long::ConstraintViolation),
|
3058 - | /// Constraint violation occurred building member `enum_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3059 - | #[doc(hidden)]
|
3060 - | EnumStringQuery(crate::model::enum_string::ConstraintViolation),
|
3061 - | /// Constraint violation occurred building member `length_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3062 - | #[doc(hidden)]
|
3063 - | LengthStringListQuery(crate::model::list_of_length_string::ConstraintViolation),
|
3064 - | /// Constraint violation occurred building member `length_list_pattern_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3065 - | #[doc(hidden)]
|
3066 - | LengthListPatternStringQuery(
|
3067 - | crate::model::length_list_of_pattern_string::ConstraintViolation,
|
3068 - | ),
|
3069 - | /// Constraint violation occurred building member `length_string_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3070 - | #[doc(hidden)]
|
3071 - | LengthStringSetQuery(crate::model::set_of_length_string::ConstraintViolation),
|
3072 - | /// Constraint violation occurred building member `range_byte_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3073 - | #[doc(hidden)]
|
3074 - | RangeByteListQuery(crate::model::list_of_range_byte::ConstraintViolation),
|
3075 - | /// Constraint violation occurred building member `range_short_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3076 - | #[doc(hidden)]
|
3077 - | RangeShortListQuery(crate::model::list_of_range_short::ConstraintViolation),
|
3078 - | /// Constraint violation occurred building member `range_integer_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3079 - | #[doc(hidden)]
|
3080 - | RangeIntegerListQuery(crate::model::list_of_range_integer::ConstraintViolation),
|
3081 - | /// Constraint violation occurred building member `range_long_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3082 - | #[doc(hidden)]
|
3083 - | RangeLongListQuery(crate::model::list_of_range_long::ConstraintViolation),
|
3084 - | /// Constraint violation occurred building member `range_byte_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3085 - | #[doc(hidden)]
|
3086 - | RangeByteSetQuery(crate::model::set_of_range_byte::ConstraintViolation),
|
3087 - | /// Constraint violation occurred building member `range_short_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3088 - | #[doc(hidden)]
|
3089 - | RangeShortSetQuery(crate::model::set_of_range_short::ConstraintViolation),
|
3090 - | /// Constraint violation occurred building member `range_integer_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3091 - | #[doc(hidden)]
|
3092 - | RangeIntegerSetQuery(crate::model::set_of_range_integer::ConstraintViolation),
|
3093 - | /// Constraint violation occurred building member `range_long_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3094 - | #[doc(hidden)]
|
3095 - | RangeLongSetQuery(crate::model::set_of_range_long::ConstraintViolation),
|
3096 - | /// Constraint violation occurred building member `enum_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3097 - | #[doc(hidden)]
|
3098 - | EnumStringListQuery(crate::model::list_of_enum_string::ConstraintViolation),
|
3099 - | }
|
3100 - | impl ::std::fmt::Display for ConstraintViolation {
|
3101 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3102 - | match self {
|
3103 - | ConstraintViolation::MissingLengthStringLabel => write!(f, "`length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3104 - | ConstraintViolation::LengthStringLabel(_) => write!(f, "constraint violation occurred building member `length_string_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3105 - | ConstraintViolation::RangeIntegerLabel(_) => write!(f, "constraint violation occurred building member `range_integer_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3106 - | ConstraintViolation::RangeShortLabel(_) => write!(f, "constraint violation occurred building member `range_short_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3107 - | ConstraintViolation::RangeLongLabel(_) => write!(f, "constraint violation occurred building member `range_long_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3108 - | ConstraintViolation::RangeByteLabel(_) => write!(f, "constraint violation occurred building member `range_byte_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3109 - | ConstraintViolation::MissingEnumStringLabel => write!(f, "`enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3110 - | ConstraintViolation::EnumStringLabel(_) => write!(f, "constraint violation occurred building member `enum_string_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3111 - | ConstraintViolation::MissingLengthStringHeaderMap => write!(f, "`length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3112 - | ConstraintViolation::LengthStringHeaderMap(_) => write!(f, "constraint violation occurred building member `length_string_header_map` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3113 - | ConstraintViolation::LengthStringHeader(_) => write!(f, "constraint violation occurred building member `length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3114 - | ConstraintViolation::RangeIntegerHeader(_) => write!(f, "constraint violation occurred building member `range_integer_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3115 - | ConstraintViolation::RangeShortHeader(_) => write!(f, "constraint violation occurred building member `range_short_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3116 - | ConstraintViolation::RangeLongHeader(_) => write!(f, "constraint violation occurred building member `range_long_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3117 - | ConstraintViolation::RangeByteHeader(_) => write!(f, "constraint violation occurred building member `range_byte_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3118 - | ConstraintViolation::LengthStringSetHeader(_) => write!(f, "constraint violation occurred building member `length_string_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3119 - | ConstraintViolation::ListLengthStringHeader(_) => write!(f, "constraint violation occurred building member `list_length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3120 - | ConstraintViolation::LengthListPatternStringHeader(_) => write!(f, "constraint violation occurred building member `length_list_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3121 - | ConstraintViolation::LengthSetPatternStringHeader(_) => write!(f, "constraint violation occurred building member `length_set_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3122 - | ConstraintViolation::RangeByteSetHeader(_) => write!(f, "constraint violation occurred building member `range_byte_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3123 - | ConstraintViolation::RangeShortSetHeader(_) => write!(f, "constraint violation occurred building member `range_short_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3124 - | ConstraintViolation::RangeIntegerSetHeader(_) => write!(f, "constraint violation occurred building member `range_integer_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3125 - | ConstraintViolation::RangeLongSetHeader(_) => write!(f, "constraint violation occurred building member `range_long_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3126 - | ConstraintViolation::RangeByteListHeader(_) => write!(f, "constraint violation occurred building member `range_byte_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3127 - | ConstraintViolation::RangeShortListHeader(_) => write!(f, "constraint violation occurred building member `range_short_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3128 - | ConstraintViolation::RangeIntegerListHeader(_) => write!(f, "constraint violation occurred building member `range_integer_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3129 - | ConstraintViolation::RangeLongListHeader(_) => write!(f, "constraint violation occurred building member `range_long_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3130 - | ConstraintViolation::LengthStringQuery(_) => write!(f, "constraint violation occurred building member `length_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3131 - | ConstraintViolation::RangeByteQuery(_) => write!(f, "constraint violation occurred building member `range_byte_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3132 - | ConstraintViolation::RangeShortQuery(_) => write!(f, "constraint violation occurred building member `range_short_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3133 - | ConstraintViolation::RangeIntegerQuery(_) => write!(f, "constraint violation occurred building member `range_integer_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3134 - | ConstraintViolation::RangeLongQuery(_) => write!(f, "constraint violation occurred building member `range_long_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3135 - | ConstraintViolation::EnumStringQuery(_) => write!(f, "constraint violation occurred building member `enum_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3136 - | ConstraintViolation::LengthStringListQuery(_) => write!(f, "constraint violation occurred building member `length_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3137 - | ConstraintViolation::LengthListPatternStringQuery(_) => write!(f, "constraint violation occurred building member `length_list_pattern_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3138 - | ConstraintViolation::LengthStringSetQuery(_) => write!(f, "constraint violation occurred building member `length_string_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3139 - | ConstraintViolation::RangeByteListQuery(_) => write!(f, "constraint violation occurred building member `range_byte_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3140 - | ConstraintViolation::RangeShortListQuery(_) => write!(f, "constraint violation occurred building member `range_short_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3141 - | ConstraintViolation::RangeIntegerListQuery(_) => write!(f, "constraint violation occurred building member `range_integer_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3142 - | ConstraintViolation::RangeLongListQuery(_) => write!(f, "constraint violation occurred building member `range_long_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3143 - | ConstraintViolation::RangeByteSetQuery(_) => write!(f, "constraint violation occurred building member `range_byte_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3144 - | ConstraintViolation::RangeShortSetQuery(_) => write!(f, "constraint violation occurred building member `range_short_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3145 - | ConstraintViolation::RangeIntegerSetQuery(_) => write!(f, "constraint violation occurred building member `range_integer_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3146 - | ConstraintViolation::RangeLongSetQuery(_) => write!(f, "constraint violation occurred building member `range_long_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3147 - | ConstraintViolation::EnumStringListQuery(_) => write!(f, "constraint violation occurred building member `enum_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3148 - | }
|
3149 - | }
|
3150 - | }
|
3151 - | impl ::std::error::Error for ConstraintViolation {}
|
3152 - | impl ConstraintViolation {
|
3153 - | pub(crate) fn as_validation_exception_field(
|
3154 - | self,
|
3155 - | path: ::std::string::String,
|
3156 - | ) -> crate::model::ValidationExceptionField {
|
3157 - | match self {
|
3158 - | ConstraintViolation::MissingLengthStringLabel => crate::model::ValidationExceptionField {
|
3159 - | message: format!("Value at '{}/lengthStringLabel' failed to satisfy constraint: Member must not be null", path),
|
3160 - | path: path + "/lengthStringLabel",
|
3161 - | },
|
3162 - | ConstraintViolation::LengthStringLabel(inner) => inner.as_validation_exception_field(path + "/lengthStringLabel"),
|
3163 - | ConstraintViolation::RangeIntegerLabel(inner) => inner.as_validation_exception_field(path + "/rangeIntegerLabel"),
|
3164 - | ConstraintViolation::RangeShortLabel(inner) => inner.as_validation_exception_field(path + "/rangeShortLabel"),
|
3165 - | ConstraintViolation::RangeLongLabel(inner) => inner.as_validation_exception_field(path + "/rangeLongLabel"),
|
3166 - | ConstraintViolation::RangeByteLabel(inner) => inner.as_validation_exception_field(path + "/rangeByteLabel"),
|
3167 - | ConstraintViolation::MissingEnumStringLabel => crate::model::ValidationExceptionField {
|
3168 - | message: format!("Value at '{}/enumStringLabel' failed to satisfy constraint: Member must not be null", path),
|
3169 - | path: path + "/enumStringLabel",
|
3170 - | },
|
3171 - | ConstraintViolation::EnumStringLabel(inner) => inner.as_validation_exception_field(path + "/enumStringLabel"),
|
3172 - | ConstraintViolation::MissingLengthStringHeaderMap => crate::model::ValidationExceptionField {
|
3173 - | message: format!("Value at '{}/lengthStringHeaderMap' failed to satisfy constraint: Member must not be null", path),
|
3174 - | path: path + "/lengthStringHeaderMap",
|
3175 - | },
|
3176 - | ConstraintViolation::LengthStringHeaderMap(inner) => inner.as_validation_exception_field(path + "/lengthStringHeaderMap"),
|
3177 - | ConstraintViolation::LengthStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthStringHeader"),
|
3178 - | ConstraintViolation::RangeIntegerHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerHeader"),
|
3179 - | ConstraintViolation::RangeShortHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortHeader"),
|
3180 - | ConstraintViolation::RangeLongHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongHeader"),
|
3181 - | ConstraintViolation::RangeByteHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteHeader"),
|
3182 - | ConstraintViolation::LengthStringSetHeader(inner) => inner.as_validation_exception_field(path + "/lengthStringSetHeader"),
|
3183 - | ConstraintViolation::ListLengthStringHeader(inner) => inner.as_validation_exception_field(path + "/listLengthStringHeader"),
|
3184 - | ConstraintViolation::LengthListPatternStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthListPatternStringHeader"),
|
3185 - | ConstraintViolation::LengthSetPatternStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthSetPatternStringHeader"),
|
3186 - | ConstraintViolation::RangeByteSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteSetHeader"),
|
3187 - | ConstraintViolation::RangeShortSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortSetHeader"),
|
3188 - | ConstraintViolation::RangeIntegerSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerSetHeader"),
|
3189 - | ConstraintViolation::RangeLongSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongSetHeader"),
|
3190 - | ConstraintViolation::RangeByteListHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteListHeader"),
|
3191 - | ConstraintViolation::RangeShortListHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortListHeader"),
|
3192 - | ConstraintViolation::RangeIntegerListHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerListHeader"),
|
3193 - | ConstraintViolation::RangeLongListHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongListHeader"),
|
3194 - | ConstraintViolation::LengthStringQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringQuery"),
|
3195 - | ConstraintViolation::RangeByteQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteQuery"),
|
3196 - | ConstraintViolation::RangeShortQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortQuery"),
|
3197 - | ConstraintViolation::RangeIntegerQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerQuery"),
|
3198 - | ConstraintViolation::RangeLongQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongQuery"),
|
3199 - | ConstraintViolation::EnumStringQuery(inner) => inner.as_validation_exception_field(path + "/enumStringQuery"),
|
3200 - | ConstraintViolation::LengthStringListQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringListQuery"),
|
3201 - | ConstraintViolation::LengthListPatternStringQuery(inner) => inner.as_validation_exception_field(path + "/lengthListPatternStringQuery"),
|
3202 - | ConstraintViolation::LengthStringSetQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringSetQuery"),
|
3203 - | ConstraintViolation::RangeByteListQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteListQuery"),
|
3204 - | ConstraintViolation::RangeShortListQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortListQuery"),
|
3205 - | ConstraintViolation::RangeIntegerListQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerListQuery"),
|
3206 - | ConstraintViolation::RangeLongListQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongListQuery"),
|
3207 - | ConstraintViolation::RangeByteSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteSetQuery"),
|
3208 - | ConstraintViolation::RangeShortSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortSetQuery"),
|
3209 - | ConstraintViolation::RangeIntegerSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerSetQuery"),
|
3210 - | ConstraintViolation::RangeLongSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongSetQuery"),
|
3211 - | ConstraintViolation::EnumStringListQuery(inner) => inner.as_validation_exception_field(path + "/enumStringListQuery"),
|
3212 - | }
|
3213 - | }
|
3214 - | }
|
3215 - | impl ::std::convert::From<ConstraintViolation>
|
3216 - | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3217 - | {
|
3218 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3219 - | let first_validation_exception_field =
|
3220 - | constraint_violation.as_validation_exception_field("".to_owned());
|
3221 - | let validation_exception = crate::error::ValidationException {
|
3222 - | message: format!(
|
3223 - | "1 validation error detected. {}",
|
3224 - | &first_validation_exception_field.message
|
3225 - | ),
|
3226 - | field_list: Some(vec![first_validation_exception_field]),
|
3227 - | };
|
3228 - | Self::ConstraintViolation(
|
3229 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3230 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3231 - | )
|
3232 - | }
|
3233 - | }
|
3234 - | impl ::std::convert::From<Builder>
|
3235 - | for crate::constrained::MaybeConstrained<
|
3236 - | crate::input::ConstrainedHttpBoundShapesOperationInput,
|
3237 - | >
|
3238 - | {
|
3239 - | fn from(builder: Builder) -> Self {
|
3240 - | Self::Unconstrained(builder)
|
3241 - | }
|
3242 - | }
|
3243 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedHttpBoundShapesOperationInput {
|
3244 - | type Error = ConstraintViolation;
|
3245 - |
|
3246 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3247 - | builder.build()
|
3248 - | }
|
3249 - | }
|
3250 - | /// A builder for [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
3251 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3252 - | pub struct Builder {
|
3253 - | pub(crate) length_string_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
3254 - | pub(crate) range_integer_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
3255 - | pub(crate) range_short_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
3256 - | pub(crate) range_long_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
3257 - | pub(crate) range_byte_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
3258 - | pub(crate) enum_string_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EnumString>>,
|
3259 - | pub(crate) length_string_header_map: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
|
3260 - | pub(crate) length_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
3261 - | pub(crate) range_integer_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
3262 - | pub(crate) range_short_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
3263 - | pub(crate) range_long_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
3264 - | pub(crate) range_byte_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
3265 - | pub(crate) length_string_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>>,
|
3266 - | pub(crate) list_length_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>,
|
3267 - | pub(crate) length_list_pattern_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>>,
|
3268 - | pub(crate) length_set_pattern_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>>,
|
3269 - | pub(crate) range_byte_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>>,
|
3270 - | pub(crate) range_short_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>>,
|
3271 - | pub(crate) range_integer_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>>,
|
3272 - | pub(crate) range_long_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>>,
|
3273 - | pub(crate) range_byte_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>,
|
3274 - | pub(crate) range_short_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>,
|
3275 - | pub(crate) range_integer_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>,
|
3276 - | pub(crate) range_long_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>,
|
3277 - | pub(crate) length_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
3278 - | pub(crate) range_byte_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
3279 - | pub(crate) range_short_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
3280 - | pub(crate) range_integer_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
3281 - | pub(crate) range_long_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
3282 - | pub(crate) enum_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EnumString>>,
|
3283 - | pub(crate) length_string_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>,
|
3284 - | pub(crate) length_list_pattern_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>>,
|
3285 - | pub(crate) length_string_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>>,
|
3286 - | pub(crate) range_byte_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>,
|
3287 - | pub(crate) range_short_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>,
|
3288 - | pub(crate) range_integer_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>,
|
3289 - | pub(crate) range_long_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>,
|
3290 - | pub(crate) range_byte_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>>,
|
3291 - | pub(crate) range_short_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>>,
|
3292 - | pub(crate) range_integer_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>>,
|
3293 - | pub(crate) range_long_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>>,
|
3294 - | pub(crate) enum_string_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>>,
|
3295 - | }
|
3296 - | impl Builder {
|
3297 - | #[allow(missing_docs)] // documentation missing in model
|
3298 - | pub fn length_string_label(mut self, input: crate::model::LengthString) -> Self {
|
3299 - | self.length_string_label =
|
3300 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3301 - | self
|
3302 - | }
|
3303 - | #[allow(missing_docs)] // documentation missing in model
|
3304 - | pub(crate) fn set_length_string_label(
|
3305 - | mut self,
|
3306 - | input: impl ::std::convert::Into<
|
3307 - | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
3308 - | >,
|
3309 - | ) -> Self {
|
3310 - | self.length_string_label = Some(input.into());
|
3311 - | self
|
3312 - | }
|
3313 - | #[allow(missing_docs)] // documentation missing in model
|
3314 - | pub fn range_integer_label(mut self, input: crate::model::RangeInteger) -> Self {
|
3315 - | self.range_integer_label =
|
3316 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3317 - | self
|
3318 - | }
|
3319 - | #[allow(missing_docs)] // documentation missing in model
|
3320 - | pub(crate) fn set_range_integer_label(
|
3321 - | mut self,
|
3322 - | input: impl ::std::convert::Into<
|
3323 - | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
3324 - | >,
|
3325 - | ) -> Self {
|
3326 - | self.range_integer_label = Some(input.into());
|
3327 - | self
|
3328 - | }
|
3329 - | #[allow(missing_docs)] // documentation missing in model
|
3330 - | pub fn range_short_label(mut self, input: crate::model::RangeShort) -> Self {
|
3331 - | self.range_short_label = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3332 - | self
|
3333 - | }
|
3334 - | #[allow(missing_docs)] // documentation missing in model
|
3335 - | pub(crate) fn set_range_short_label(
|
3336 - | mut self,
|
3337 - | input: impl ::std::convert::Into<
|
3338 - | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
3339 - | >,
|
3340 - | ) -> Self {
|
3341 - | self.range_short_label = Some(input.into());
|
3342 - | self
|
3343 - | }
|
3344 - | #[allow(missing_docs)] // documentation missing in model
|
3345 - | pub fn range_long_label(mut self, input: crate::model::RangeLong) -> Self {
|
3346 - | self.range_long_label = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3347 - | self
|
3348 - | }
|
3349 - | #[allow(missing_docs)] // documentation missing in model
|
3350 - | pub(crate) fn set_range_long_label(
|
3351 - | mut self,
|
3352 - | input: impl ::std::convert::Into<
|
3353 - | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
3354 - | >,
|
3355 - | ) -> Self {
|
3356 - | self.range_long_label = Some(input.into());
|
3357 - | self
|
3358 - | }
|
3359 - | #[allow(missing_docs)] // documentation missing in model
|
3360 - | pub fn range_byte_label(mut self, input: crate::model::RangeByte) -> Self {
|
3361 - | self.range_byte_label = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3362 - | self
|
3363 - | }
|
3364 - | #[allow(missing_docs)] // documentation missing in model
|
3365 - | pub(crate) fn set_range_byte_label(
|
3366 - | mut self,
|
3367 - | input: impl ::std::convert::Into<
|
3368 - | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
3369 - | >,
|
3370 - | ) -> Self {
|
3371 - | self.range_byte_label = Some(input.into());
|
3372 - | self
|
3373 - | }
|
3374 - | #[allow(missing_docs)] // documentation missing in model
|
3375 - | pub fn enum_string_label(mut self, input: crate::model::EnumString) -> Self {
|
3376 - | self.enum_string_label = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3377 - | self
|
3378 - | }
|
3379 - | #[allow(missing_docs)] // documentation missing in model
|
3380 - | pub(crate) fn set_enum_string_label(
|
3381 - | mut self,
|
3382 - | input: impl ::std::convert::Into<
|
3383 - | crate::constrained::MaybeConstrained<crate::model::EnumString>,
|
3384 - | >,
|
3385 - | ) -> Self {
|
3386 - | self.enum_string_label = Some(input.into());
|
3387 - | self
|
3388 - | }
|
3389 - | #[allow(missing_docs)] // documentation missing in model
|
3390 - | pub fn length_string_header_map(
|
3391 - | mut self,
|
3392 - | input: ::std::collections::HashMap<
|
3393 - | crate::model::LengthString,
|
3394 - | crate::model::LengthString,
|
3395 - | >,
|
3396 - | ) -> Self {
|
3397 - | self.length_string_header_map = Some(
|
3398 - | crate::constrained::MaybeConstrained::Constrained((input).into()),
|
3399 - | );
|
3400 - | self
|
3401 - | }
|
3402 - | #[allow(missing_docs)] // documentation missing in model
|
3403 - | pub(crate) fn set_length_string_header_map(
|
3404 - | mut self,
|
3405 - | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
|
3406 - | ) -> Self {
|
3407 - | self.length_string_header_map = Some(input.into());
|
3408 - | self
|
3409 - | }
|
3410 - | #[allow(missing_docs)] // documentation missing in model
|
3411 - | pub fn length_string_header(
|
3412 - | mut self,
|
3413 - | input: ::std::option::Option<crate::model::LengthString>,
|
3414 - | ) -> Self {
|
3415 - | self.length_string_header =
|
3416 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3417 - | self
|
3418 - | }
|
3419 - | #[allow(missing_docs)] // documentation missing in model
|
3420 - | pub(crate) fn set_length_string_header(
|
3421 - | mut self,
|
3422 - | input: Option<
|
3423 - | impl ::std::convert::Into<
|
3424 - | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
3425 - | >,
|
3426 - | >,
|
3427 - | ) -> Self {
|
3428 - | self.length_string_header = input.map(|v| v.into());
|
3429 - | self
|
3430 - | }
|
3431 - | #[allow(missing_docs)] // documentation missing in model
|
3432 - | pub fn range_integer_header(mut self, input: crate::model::RangeInteger) -> Self {
|
3433 - | self.range_integer_header =
|
3434 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3435 - | self
|
3436 - | }
|
3437 - | #[allow(missing_docs)] // documentation missing in model
|
3438 - | pub(crate) fn set_range_integer_header(
|
3439 - | mut self,
|
3440 - | input: impl ::std::convert::Into<
|
3441 - | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
3442 - | >,
|
3443 - | ) -> Self {
|
3444 - | self.range_integer_header = Some(input.into());
|
3445 - | self
|
3446 - | }
|
3447 - | #[allow(missing_docs)] // documentation missing in model
|
3448 - | pub fn range_short_header(mut self, input: crate::model::RangeShort) -> Self {
|
3449 - | self.range_short_header =
|
3450 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3451 - | self
|
3452 - | }
|
3453 - | #[allow(missing_docs)] // documentation missing in model
|
3454 - | pub(crate) fn set_range_short_header(
|
3455 - | mut self,
|
3456 - | input: impl ::std::convert::Into<
|
3457 - | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
3458 - | >,
|
3459 - | ) -> Self {
|
3460 - | self.range_short_header = Some(input.into());
|
3461 - | self
|
3462 - | }
|
3463 - | #[allow(missing_docs)] // documentation missing in model
|
3464 - | pub fn range_long_header(mut self, input: crate::model::RangeLong) -> Self {
|
3465 - | self.range_long_header = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3466 - | self
|
3467 - | }
|
3468 - | #[allow(missing_docs)] // documentation missing in model
|
3469 - | pub(crate) fn set_range_long_header(
|
3470 - | mut self,
|
3471 - | input: impl ::std::convert::Into<
|
3472 - | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
3473 - | >,
|
3474 - | ) -> Self {
|
3475 - | self.range_long_header = Some(input.into());
|
3476 - | self
|
3477 - | }
|
3478 - | #[allow(missing_docs)] // documentation missing in model
|
3479 - | pub fn range_byte_header(mut self, input: crate::model::RangeByte) -> Self {
|
3480 - | self.range_byte_header = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3481 - | self
|
3482 - | }
|
3483 - | #[allow(missing_docs)] // documentation missing in model
|
3484 - | pub(crate) fn set_range_byte_header(
|
3485 - | mut self,
|
3486 - | input: impl ::std::convert::Into<
|
3487 - | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
3488 - | >,
|
3489 - | ) -> Self {
|
3490 - | self.range_byte_header = Some(input.into());
|
3491 - | self
|
3492 - | }
|
3493 - | #[allow(missing_docs)] // documentation missing in model
|
3494 - | pub fn length_string_set_header(
|
3495 - | mut self,
|
3496 - | input: ::std::option::Option<crate::model::SetOfLengthString>,
|
3497 - | ) -> Self {
|
3498 - | self.length_string_set_header =
|
3499 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3500 - | self
|
3501 - | }
|
3502 - | #[allow(missing_docs)] // documentation missing in model
|
3503 - | pub(crate) fn set_length_string_set_header(
|
3504 - | mut self,
|
3505 - | input: Option<
|
3506 - | impl ::std::convert::Into<
|
3507 - | crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
|
3508 - | >,
|
3509 - | >,
|
3510 - | ) -> Self {
|
3511 - | self.length_string_set_header = input.map(|v| v.into());
|
3512 - | self
|
3513 - | }
|
3514 - | #[allow(missing_docs)] // documentation missing in model
|
3515 - | pub fn list_length_string_header(
|
3516 - | mut self,
|
3517 - | input: ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
|
3518 - | ) -> Self {
|
3519 - | self.list_length_string_header =
|
3520 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3521 - | self
|
3522 - | }
|
3523 - | #[allow(missing_docs)] // documentation missing in model
|
3524 - | pub(crate) fn set_list_length_string_header(
|
3525 - | mut self,
|
3526 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
|
3527 - | ) -> Self {
|
3528 - | self.list_length_string_header = input.map(|v| v.into());
|
3529 - | self
|
3530 - | }
|
3531 - | #[allow(missing_docs)] // documentation missing in model
|
3532 - | pub fn length_list_pattern_string_header(
|
3533 - | mut self,
|
3534 - | input: ::std::option::Option<crate::model::LengthListOfPatternString>,
|
3535 - | ) -> Self {
|
3536 - | self.length_list_pattern_string_header =
|
3537 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3538 - | self
|
3539 2621 | }
|
3540 - | #[allow(missing_docs)] // documentation missing in model
|
3541 - | pub(crate) fn set_length_list_pattern_string_header(
|
3542 - | mut self,
|
3543 - | input: Option<
|
3544 - | impl ::std::convert::Into<
|
3545 - | crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
|
3546 - | >,
|
3547 - | >,
|
3548 - | ) -> Self {
|
3549 - | self.length_list_pattern_string_header = input.map(|v| v.into());
|
3550 - | self
|
2622 + | }
|
2623 + | /// See [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2624 + | pub mod constrained_http_payload_bound_shape_operation_input {
|
2625 + |
|
2626 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2627 + | /// Holds one variant for each of the ways the builder can fail.
|
2628 + | #[non_exhaustive]
|
2629 + | #[allow(clippy::enum_variant_names)]
|
2630 + | pub enum ConstraintViolation {
|
2631 + | /// `http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
2632 + | MissingHttpPayloadBoundConstrainedShape,
|
2633 + | /// Constraint violation occurred building member `http_payload_bound_constrained_shape` when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
2634 + | #[doc(hidden)]
|
2635 + | HttpPayloadBoundConstrainedShape(crate::model::con_a::ConstraintViolation),
|
3551 2636 | }
|
3552 - | #[allow(missing_docs)] // documentation missing in model
|
3553 - | pub fn length_set_pattern_string_header(
|
3554 - | mut self,
|
3555 - | input: ::std::option::Option<crate::model::LengthSetOfPatternString>,
|
3556 - | ) -> Self {
|
3557 - | self.length_set_pattern_string_header =
|
3558 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3559 - | self
|
2637 + | impl ::std::fmt::Display for ConstraintViolation {
|
2638 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2639 + | match self {
|
2640 + | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => write!(f, "`http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
2641 + | ConstraintViolation::HttpPayloadBoundConstrainedShape(_) => write!(f, "constraint violation occurred building member `http_payload_bound_constrained_shape` when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
3560 2642 | }
|
3561 - | #[allow(missing_docs)] // documentation missing in model
|
3562 - | pub(crate) fn set_length_set_pattern_string_header(
|
3563 - | mut self,
|
3564 - | input: Option<
|
3565 - | impl ::std::convert::Into<
|
3566 - | crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>,
|
3567 - | >,
|
3568 - | >,
|
3569 - | ) -> Self {
|
3570 - | self.length_set_pattern_string_header = input.map(|v| v.into());
|
3571 - | self
|
3572 2643 | }
|
3573 - | #[allow(missing_docs)] // documentation missing in model
|
3574 - | pub fn range_byte_set_header(
|
3575 - | mut self,
|
3576 - | input: ::std::option::Option<crate::model::SetOfRangeByte>,
|
3577 - | ) -> Self {
|
3578 - | self.range_byte_set_header =
|
3579 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3580 - | self
|
3581 2644 | }
|
3582 - | #[allow(missing_docs)] // documentation missing in model
|
3583 - | pub(crate) fn set_range_byte_set_header(
|
3584 - | mut self,
|
3585 - | input: Option<
|
3586 - | impl ::std::convert::Into<
|
3587 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
|
3588 - | >,
|
3589 - | >,
|
3590 - | ) -> Self {
|
3591 - | self.range_byte_set_header = input.map(|v| v.into());
|
3592 - | self
|
2645 + | impl ::std::error::Error for ConstraintViolation {}
|
2646 + | impl ConstraintViolation {
|
2647 + | pub(crate) fn as_validation_exception_field(
|
2648 + | self,
|
2649 + | path: ::std::string::String,
|
2650 + | ) -> crate::model::ValidationExceptionField {
|
2651 + | match self {
|
2652 + | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => crate::model::ValidationExceptionField {
|
2653 + | message: format!("Value at '{}/httpPayloadBoundConstrainedShape' failed to satisfy constraint: Member must not be null", path),
|
2654 + | path: path + "/httpPayloadBoundConstrainedShape",
|
2655 + | },
|
2656 + | ConstraintViolation::HttpPayloadBoundConstrainedShape(inner) => inner.as_validation_exception_field(path + "/httpPayloadBoundConstrainedShape"),
|
3593 2657 | }
|
3594 - | #[allow(missing_docs)] // documentation missing in model
|
3595 - | pub fn range_short_set_header(
|
3596 - | mut self,
|
3597 - | input: ::std::option::Option<crate::model::SetOfRangeShort>,
|
3598 - | ) -> Self {
|
3599 - | self.range_short_set_header =
|
3600 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3601 - | self
|
3602 2658 | }
|
3603 - | #[allow(missing_docs)] // documentation missing in model
|
3604 - | pub(crate) fn set_range_short_set_header(
|
3605 - | mut self,
|
3606 - | input: Option<
|
3607 - | impl ::std::convert::Into<
|
3608 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
|
3609 - | >,
|
3610 - | >,
|
3611 - | ) -> Self {
|
3612 - | self.range_short_set_header = input.map(|v| v.into());
|
3613 - | self
|
3614 2659 | }
|
3615 - | #[allow(missing_docs)] // documentation missing in model
|
3616 - | pub fn range_integer_set_header(
|
3617 - | mut self,
|
3618 - | input: ::std::option::Option<crate::model::SetOfRangeInteger>,
|
3619 - | ) -> Self {
|
3620 - | self.range_integer_set_header =
|
3621 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3622 - | self
|
2660 + | impl ::std::convert::From<ConstraintViolation>
|
2661 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2662 + | {
|
2663 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2664 + | let first_validation_exception_field =
|
2665 + | constraint_violation.as_validation_exception_field("".to_owned());
|
2666 + | let validation_exception = crate::error::ValidationException {
|
2667 + | message: format!(
|
2668 + | "1 validation error detected. {}",
|
2669 + | &first_validation_exception_field.message
|
2670 + | ),
|
2671 + | field_list: Some(vec![first_validation_exception_field]),
|
2672 + | };
|
2673 + | Self::ConstraintViolation(
|
2674 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2675 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2676 + | )
|
3623 2677 | }
|
3624 - | #[allow(missing_docs)] // documentation missing in model
|
3625 - | pub(crate) fn set_range_integer_set_header(
|
3626 - | mut self,
|
3627 - | input: Option<
|
3628 - | impl ::std::convert::Into<
|
3629 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
|
3630 - | >,
|
3631 - | >,
|
3632 - | ) -> Self {
|
3633 - | self.range_integer_set_header = input.map(|v| v.into());
|
3634 - | self
|
3635 2678 | }
|
3636 - | #[allow(missing_docs)] // documentation missing in model
|
3637 - | pub fn range_long_set_header(
|
3638 - | mut self,
|
3639 - | input: ::std::option::Option<crate::model::SetOfRangeLong>,
|
3640 - | ) -> Self {
|
3641 - | self.range_long_set_header =
|
3642 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3643 - | self
|
2679 + | impl ::std::convert::From<Builder>
|
2680 + | for crate::constrained::MaybeConstrained<
|
2681 + | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput,
|
2682 + | >
|
2683 + | {
|
2684 + | fn from(builder: Builder) -> Self {
|
2685 + | Self::Unconstrained(builder)
|
3644 2686 | }
|
3645 - | #[allow(missing_docs)] // documentation missing in model
|
3646 - | pub(crate) fn set_range_long_set_header(
|
3647 - | mut self,
|
3648 - | input: Option<
|
3649 - | impl ::std::convert::Into<
|
3650 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
|
3651 - | >,
|
3652 - | >,
|
3653 - | ) -> Self {
|
3654 - | self.range_long_set_header = input.map(|v| v.into());
|
3655 - | self
|
3656 2687 | }
|
3657 - | #[allow(missing_docs)] // documentation missing in model
|
3658 - | pub fn range_byte_list_header(
|
3659 - | mut self,
|
3660 - | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
|
3661 - | ) -> Self {
|
3662 - | self.range_byte_list_header =
|
3663 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3664 - | self
|
2688 + | impl ::std::convert::TryFrom<Builder>
|
2689 + | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
2690 + | {
|
2691 + | type Error = ConstraintViolation;
|
2692 + |
|
2693 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2694 + | builder.build()
|
3665 2695 | }
|
3666 - | #[allow(missing_docs)] // documentation missing in model
|
3667 - | pub(crate) fn set_range_byte_list_header(
|
3668 - | mut self,
|
3669 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
|
3670 - | ) -> Self {
|
3671 - | self.range_byte_list_header = input.map(|v| v.into());
|
3672 - | self
|
3673 2696 | }
|
3674 - | #[allow(missing_docs)] // documentation missing in model
|
3675 - | pub fn range_short_list_header(
|
3676 - | mut self,
|
3677 - | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
|
3678 - | ) -> Self {
|
3679 - | self.range_short_list_header =
|
3680 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3681 - | self
|
2697 + | /// A builder for [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2698 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2699 + | pub struct Builder {
|
2700 + | pub(crate) http_payload_bound_constrained_shape:
|
2701 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
3682 2702 | }
|
2703 + | impl Builder {
|
3683 2704 | #[allow(missing_docs)] // documentation missing in model
|
3684 - | pub(crate) fn set_range_short_list_header(
|
3685 - | mut self,
|
3686 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
|
3687 - | ) -> Self {
|
3688 - | self.range_short_list_header = input.map(|v| v.into());
|
2705 + | pub fn http_payload_bound_constrained_shape(mut self, input: crate::model::ConA) -> Self {
|
2706 + | self.http_payload_bound_constrained_shape =
|
2707 + | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3689 2708 | self
|
3690 2709 | }
|
3691 2710 | #[allow(missing_docs)] // documentation missing in model
|
3692 - | pub fn range_integer_list_header(
|
2711 + | pub(crate) fn set_http_payload_bound_constrained_shape(
|
3693 2712 | mut self,
|
3694 - | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeInteger>>,
|
2713 + | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
3695 2714 | ) -> Self {
|
3696 - | self.range_integer_list_header =
|
3697 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
2715 + | self.http_payload_bound_constrained_shape = Some(input.into());
|
3698 2716 | self
|
3699 2717 | }
|
3700 - | #[allow(missing_docs)] // documentation missing in model
|
3701 - | pub(crate) fn set_range_integer_list_header(
|
3702 - | mut self,
|
3703 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
|
3704 - | ) -> Self {
|
3705 - | self.range_integer_list_header = input.map(|v| v.into());
|
3706 - | self
|
2718 + | /// Consumes the builder and constructs a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2719 + | ///
|
2720 + | /// The builder fails to construct a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput) if a [`ConstraintViolation`] occurs.
|
2721 + | ///
|
2722 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2723 + | pub fn build(
|
2724 + | self,
|
2725 + | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
2726 + | {
|
2727 + | self.build_enforcing_all_constraints()
|
3707 2728 | }
|
3708 - | #[allow(missing_docs)] // documentation missing in model
|
3709 - | pub fn range_long_list_header(
|
3710 - | mut self,
|
3711 - | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
|
3712 - | ) -> Self {
|
3713 - | self.range_long_list_header =
|
3714 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3715 - | self
|
2729 + | fn build_enforcing_all_constraints(
|
2730 + | self,
|
2731 + | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
2732 + | {
|
2733 + | Ok(
|
2734 + | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput {
|
2735 + | http_payload_bound_constrained_shape: self
|
2736 + | .http_payload_bound_constrained_shape
|
2737 + | .map(|v| match v {
|
2738 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2739 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2740 + | })
|
2741 + | .map(|res| {
|
2742 + | res.map_err(ConstraintViolation::HttpPayloadBoundConstrainedShape)
|
2743 + | })
|
2744 + | .transpose()?
|
2745 + | .ok_or(ConstraintViolation::MissingHttpPayloadBoundConstrainedShape)?,
|
2746 + | },
|
2747 + | )
|
3716 2748 | }
|
3717 - | #[allow(missing_docs)] // documentation missing in model
|
3718 - | pub(crate) fn set_range_long_list_header(
|
3719 - | mut self,
|
3720 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
|
3721 - | ) -> Self {
|
3722 - | self.range_long_list_header = input.map(|v| v.into());
|
3723 - | self
|
3724 2749 | }
|
3725 - | #[allow(missing_docs)] // documentation missing in model
|
3726 - | pub fn length_string_query(
|
3727 - | mut self,
|
3728 - | input: ::std::option::Option<crate::model::LengthString>,
|
3729 - | ) -> Self {
|
3730 - | self.length_string_query = input.map(crate::constrained::MaybeConstrained::Constrained);
|
3731 - | self
|
2750 + | }
|
2751 + | /// See [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
2752 + | pub mod constrained_recursive_shapes_operation_input {
|
2753 + |
|
2754 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2755 + | /// Holds one variant for each of the ways the builder can fail.
|
2756 + | #[non_exhaustive]
|
2757 + | #[allow(clippy::enum_variant_names)]
|
2758 + | pub enum ConstraintViolation {
|
2759 + | /// Constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`.
|
2760 + | #[doc(hidden)]
|
2761 + | Nested(crate::model::recursive_shapes_input_output_nested1::ConstraintViolation),
|
2762 + | /// `recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`.
|
2763 + | MissingRecursiveList,
|
2764 + | /// Constraint violation occurred building member `recursive_list` when building `ConstrainedRecursiveShapesOperationInput`.
|
2765 + | #[doc(hidden)]
|
2766 + | RecursiveList(crate::model::recursive_list::ConstraintViolation),
|
3732 2767 | }
|
3733 - | #[allow(missing_docs)] // documentation missing in model
|
3734 - | pub(crate) fn set_length_string_query(
|
3735 - | mut self,
|
3736 - | input: Option<
|
3737 - | impl ::std::convert::Into<
|
3738 - | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
3739 - | >,
|
3740 - | >,
|
3741 - | ) -> Self {
|
3742 - | self.length_string_query = input.map(|v| v.into());
|
3743 - | self
|
2768 + | impl ::std::fmt::Display for ConstraintViolation {
|
2769 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2770 + | match self {
|
2771 + | ConstraintViolation::Nested(_) => write!(f, "constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`"),
|
2772 + | ConstraintViolation::MissingRecursiveList => write!(f, "`recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`"),
|
2773 + | ConstraintViolation::RecursiveList(_) => write!(f, "constraint violation occurred building member `recursive_list` when building `ConstrainedRecursiveShapesOperationInput`"),
|
3744 2774 | }
|
3745 - | #[allow(missing_docs)] // documentation missing in model
|
3746 - | pub fn range_byte_query(mut self, input: crate::model::RangeByte) -> Self {
|
3747 - | self.range_byte_query = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3748 - | self
|
3749 2775 | }
|
3750 - | #[allow(missing_docs)] // documentation missing in model
|
3751 - | pub(crate) fn set_range_byte_query(
|
3752 - | mut self,
|
3753 - | input: impl ::std::convert::Into<
|
3754 - | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
3755 - | >,
|
3756 - | ) -> Self {
|
3757 - | self.range_byte_query = Some(input.into());
|
3758 - | self
|
3759 2776 | }
|
3760 - | #[allow(missing_docs)] // documentation missing in model
|
3761 - | pub fn range_short_query(mut self, input: crate::model::RangeShort) -> Self {
|
3762 - | self.range_short_query = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3763 - | self
|
2777 + | impl ::std::error::Error for ConstraintViolation {}
|
2778 + | impl ConstraintViolation {
|
2779 + | pub(crate) fn as_validation_exception_field(
|
2780 + | self,
|
2781 + | path: ::std::string::String,
|
2782 + | ) -> crate::model::ValidationExceptionField {
|
2783 + | match self {
|
2784 + | ConstraintViolation::Nested(inner) => inner.as_validation_exception_field(path + "/nested"),
|
2785 + | ConstraintViolation::MissingRecursiveList => crate::model::ValidationExceptionField {
|
2786 + | message: format!("Value at '{}/recursiveList' failed to satisfy constraint: Member must not be null", path),
|
2787 + | path: path + "/recursiveList",
|
2788 + | },
|
2789 + | ConstraintViolation::RecursiveList(inner) => inner.as_validation_exception_field(path + "/recursiveList"),
|
3764 2790 | }
|
3765 - | #[allow(missing_docs)] // documentation missing in model
|
3766 - | pub(crate) fn set_range_short_query(
|
3767 - | mut self,
|
3768 - | input: impl ::std::convert::Into<
|
3769 - | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
3770 - | >,
|
3771 - | ) -> Self {
|
3772 - | self.range_short_query = Some(input.into());
|
3773 - | self
|
3774 2791 | }
|
3775 - | #[allow(missing_docs)] // documentation missing in model
|
3776 - | pub fn range_integer_query(mut self, input: crate::model::RangeInteger) -> Self {
|
3777 - | self.range_integer_query =
|
3778 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3779 - | self
|
3780 2792 | }
|
3781 - | #[allow(missing_docs)] // documentation missing in model
|
3782 - | pub(crate) fn set_range_integer_query(
|
3783 - | mut self,
|
3784 - | input: impl ::std::convert::Into<
|
3785 - | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
3786 - | >,
|
3787 - | ) -> Self {
|
3788 - | self.range_integer_query = Some(input.into());
|
3789 - | self
|
2793 + | impl ::std::convert::From<ConstraintViolation>
|
2794 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2795 + | {
|
2796 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2797 + | let first_validation_exception_field =
|
2798 + | constraint_violation.as_validation_exception_field("".to_owned());
|
2799 + | let validation_exception = crate::error::ValidationException {
|
2800 + | message: format!(
|
2801 + | "1 validation error detected. {}",
|
2802 + | &first_validation_exception_field.message
|
2803 + | ),
|
2804 + | field_list: Some(vec![first_validation_exception_field]),
|
2805 + | };
|
2806 + | Self::ConstraintViolation(
|
2807 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2808 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2809 + | )
|
3790 2810 | }
|
3791 - | #[allow(missing_docs)] // documentation missing in model
|
3792 - | pub fn range_long_query(mut self, input: crate::model::RangeLong) -> Self {
|
3793 - | self.range_long_query = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
3794 - | self
|
3795 2811 | }
|
3796 - | #[allow(missing_docs)] // documentation missing in model
|
3797 - | pub(crate) fn set_range_long_query(
|
3798 - | mut self,
|
3799 - | input: impl ::std::convert::Into<
|
3800 - | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
3801 - | >,
|
3802 - | ) -> Self {
|
3803 - | self.range_long_query = Some(input.into());
|
3804 - | self
|
2812 + | impl ::std::convert::From<Builder>
|
2813 + | for crate::constrained::MaybeConstrained<
|
2814 + | crate::input::ConstrainedRecursiveShapesOperationInput,
|
2815 + | >
|
2816 + | {
|
2817 + | fn from(builder: Builder) -> Self {
|
2818 + | Self::Unconstrained(builder)
|
3805 2819 | }
|
3806 - | #[allow(missing_docs)] // documentation missing in model
|
3807 - | pub fn enum_string_query(
|
3808 - | mut self,
|
3809 - | input: ::std::option::Option<crate::model::EnumString>,
|
3810 - | ) -> Self {
|
3811 - | self.enum_string_query = input.map(crate::constrained::MaybeConstrained::Constrained);
|
3812 - | self
|
3813 2820 | }
|
3814 - | #[allow(missing_docs)] // documentation missing in model
|
3815 - | pub(crate) fn set_enum_string_query(
|
3816 - | mut self,
|
3817 - | input: Option<
|
3818 - | impl ::std::convert::Into<
|
3819 - | crate::constrained::MaybeConstrained<crate::model::EnumString>,
|
2821 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedRecursiveShapesOperationInput {
|
2822 + | type Error = ConstraintViolation;
|
2823 + |
|
2824 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2825 + | builder.build()
|
2826 + | }
|
2827 + | }
|
2828 + | /// A builder for [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
2829 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2830 + | pub struct Builder {
|
2831 + | pub(crate) nested: ::std::option::Option<
|
2832 + | crate::constrained::MaybeConstrained<crate::model::RecursiveShapesInputOutputNested1>,
|
2833 + | >,
|
2834 + | pub(crate) recursive_list: ::std::option::Option<
|
2835 + | crate::constrained::MaybeConstrained<
|
2836 + | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
3820 2837 | >,
|
3821 2838 | >,
|
3822 - | ) -> Self {
|
3823 - | self.enum_string_query = input.map(|v| v.into());
|
3824 - | self
|
3825 - | }
|
3826 - | #[allow(missing_docs)] // documentation missing in model
|
3827 - | pub fn length_string_list_query(
|
3828 - | mut self,
|
3829 - | input: ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
|
3830 - | ) -> Self {
|
3831 - | self.length_string_list_query =
|
3832 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3833 - | self
|
3834 - | }
|
3835 - | #[allow(missing_docs)] // documentation missing in model
|
3836 - | pub(crate) fn set_length_string_list_query(
|
3837 - | mut self,
|
3838 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
|
3839 - | ) -> Self {
|
3840 - | self.length_string_list_query = input.map(|v| v.into());
|
3841 - | self
|
3842 2839 | }
|
2840 + | impl Builder {
|
3843 2841 | #[allow(missing_docs)] // documentation missing in model
|
3844 - | pub fn length_list_pattern_string_query(
|
2842 + | pub fn nested(
|
3845 2843 | mut self,
|
3846 - | input: ::std::option::Option<crate::model::LengthListOfPatternString>,
|
2844 + | input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
3847 2845 | ) -> Self {
|
3848 - | self.length_list_pattern_string_query =
|
3849 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
2846 + | self.nested = input.map(crate::constrained::MaybeConstrained::Constrained);
|
3850 2847 | self
|
3851 2848 | }
|
3852 2849 | #[allow(missing_docs)] // documentation missing in model
|
3853 - | pub(crate) fn set_length_list_pattern_string_query(
|
2850 + | pub(crate) fn set_nested(
|
3854 2851 | mut self,
|
3855 2852 | input: Option<
|
3856 2853 | impl ::std::convert::Into<
|
3857 - | crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
|
2854 + | crate::constrained::MaybeConstrained<
|
2855 + | crate::model::RecursiveShapesInputOutputNested1,
|
2856 + | >,
|
3858 2857 | >,
|
3859 2858 | >,
|
3860 2859 | ) -> Self {
|
3861 - | self.length_list_pattern_string_query = input.map(|v| v.into());
|
2860 + | self.nested = input.map(|v| v.into());
|
3862 2861 | self
|
3863 2862 | }
|
3864 2863 | #[allow(missing_docs)] // documentation missing in model
|
3865 - | pub fn length_string_set_query(
|
2864 + | pub fn recursive_list(
|
3866 2865 | mut self,
|
3867 - | input: ::std::option::Option<crate::model::SetOfLengthString>,
|
2866 + | input: ::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
|
3868 2867 | ) -> Self {
|
3869 - | self.length_string_set_query =
|
3870 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
2868 + | self.recursive_list = Some(crate::constrained::MaybeConstrained::Constrained(
|
2869 + | (input).into(),
|
2870 + | ));
|
3871 2871 | self
|
3872 2872 | }
|
3873 2873 | #[allow(missing_docs)] // documentation missing in model
|
3874 - | pub(crate) fn set_length_string_set_query(
|
2874 + | pub(crate) fn set_recursive_list(
|
3875 2875 | mut self,
|
3876 - | input: Option<
|
3877 - | impl ::std::convert::Into<
|
3878 - | crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
|
2876 + | input: impl ::std::convert::Into<
|
2877 + | crate::constrained::MaybeConstrained<
|
2878 + | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
3879 2879 | >,
|
3880 2880 | >,
|
3881 2881 | ) -> Self {
|
3882 - | self.length_string_set_query = input.map(|v| v.into());
|
2882 + | self.recursive_list = Some(input.into());
|
3883 2883 | self
|
3884 2884 | }
|
3885 - | #[allow(missing_docs)] // documentation missing in model
|
3886 - | pub fn range_byte_list_query(
|
3887 - | mut self,
|
3888 - | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
|
3889 - | ) -> Self {
|
3890 - | self.range_byte_list_query =
|
3891 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3892 - | self
|
2885 + | /// Consumes the builder and constructs a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
2886 + | ///
|
2887 + | /// The builder fails to construct a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
2888 + | ///
|
2889 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2890 + | pub fn build(
|
2891 + | self,
|
2892 + | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
2893 + | {
|
2894 + | self.build_enforcing_all_constraints()
|
3893 2895 | }
|
3894 - | #[allow(missing_docs)] // documentation missing in model
|
3895 - | pub(crate) fn set_range_byte_list_query(
|
3896 - | mut self,
|
3897 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
|
3898 - | ) -> Self {
|
3899 - | self.range_byte_list_query = input.map(|v| v.into());
|
3900 - | self
|
2896 + | fn build_enforcing_all_constraints(
|
2897 + | self,
|
2898 + | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
2899 + | {
|
2900 + | Ok(crate::input::ConstrainedRecursiveShapesOperationInput {
|
2901 + | nested: self
|
2902 + | .nested
|
2903 + | .map(|v| match v {
|
2904 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2905 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2906 + | })
|
2907 + | .map(|res| res.map_err(ConstraintViolation::Nested))
|
2908 + | .transpose()?,
|
2909 + | recursive_list: self
|
2910 + | .recursive_list
|
2911 + | .map(|v| match v {
|
2912 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2913 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2914 + | })
|
2915 + | .map(|res| {
|
2916 + | res.map(|v| v.into())
|
2917 + | .map_err(ConstraintViolation::RecursiveList)
|
2918 + | })
|
2919 + | .transpose()?
|
2920 + | .ok_or(ConstraintViolation::MissingRecursiveList)?,
|
2921 + | })
|
3901 2922 | }
|
3902 - | #[allow(missing_docs)] // documentation missing in model
|
3903 - | pub fn range_short_list_query(
|
3904 - | mut self,
|
3905 - | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
|
3906 - | ) -> Self {
|
3907 - | self.range_short_list_query =
|
3908 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3909 - | self
|
3910 2923 | }
|
3911 - | #[allow(missing_docs)] // documentation missing in model
|
3912 - | pub(crate) fn set_range_short_list_query(
|
3913 - | mut self,
|
3914 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
|
3915 - | ) -> Self {
|
3916 - | self.range_short_list_query = input.map(|v| v.into());
|
3917 - | self
|
2924 + | }
|
2925 + | /// See [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
2926 + | pub mod query_params_targeting_length_map_operation_input {
|
2927 + |
|
2928 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2929 + | /// Holds one variant for each of the ways the builder can fail.
|
2930 + | #[non_exhaustive]
|
2931 + | #[allow(clippy::enum_variant_names)]
|
2932 + | pub enum ConstraintViolation {
|
2933 + | /// Constraint violation occurred building member `length_map` when building `QueryParamsTargetingLengthMapOperationInput`.
|
2934 + | #[doc(hidden)]
|
2935 + | LengthMap(crate::model::con_b_map::ConstraintViolation),
|
3918 2936 | }
|
3919 - | #[allow(missing_docs)] // documentation missing in model
|
3920 - | pub fn range_integer_list_query(
|
3921 - | mut self,
|
3922 - | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeInteger>>,
|
3923 - | ) -> Self {
|
3924 - | self.range_integer_list_query =
|
3925 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3926 - | self
|
2937 + | impl ::std::fmt::Display for ConstraintViolation {
|
2938 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2939 + | match self {
|
2940 + | ConstraintViolation::LengthMap(_) => write!(f, "constraint violation occurred building member `length_map` when building `QueryParamsTargetingLengthMapOperationInput`"),
|
3927 2941 | }
|
3928 - | #[allow(missing_docs)] // documentation missing in model
|
3929 - | pub(crate) fn set_range_integer_list_query(
|
3930 - | mut self,
|
3931 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
|
3932 - | ) -> Self {
|
3933 - | self.range_integer_list_query = input.map(|v| v.into());
|
3934 - | self
|
3935 2942 | }
|
3936 - | #[allow(missing_docs)] // documentation missing in model
|
3937 - | pub fn range_long_list_query(
|
3938 - | mut self,
|
3939 - | input: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
|
3940 - | ) -> Self {
|
3941 - | self.range_long_list_query =
|
3942 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3943 - | self
|
3944 2943 | }
|
3945 - | #[allow(missing_docs)] // documentation missing in model
|
3946 - | pub(crate) fn set_range_long_list_query(
|
3947 - | mut self,
|
3948 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
|
3949 - | ) -> Self {
|
3950 - | self.range_long_list_query = input.map(|v| v.into());
|
3951 - | self
|
2944 + | impl ::std::error::Error for ConstraintViolation {}
|
2945 + | impl ConstraintViolation {
|
2946 + | pub(crate) fn as_validation_exception_field(
|
2947 + | self,
|
2948 + | path: ::std::string::String,
|
2949 + | ) -> crate::model::ValidationExceptionField {
|
2950 + | match self {
|
2951 + | ConstraintViolation::LengthMap(inner) => {
|
2952 + | inner.as_validation_exception_field(path + "/lengthMap")
|
3952 2953 | }
|
3953 - | #[allow(missing_docs)] // documentation missing in model
|
3954 - | pub fn range_byte_set_query(
|
3955 - | mut self,
|
3956 - | input: ::std::option::Option<crate::model::SetOfRangeByte>,
|
3957 - | ) -> Self {
|
3958 - | self.range_byte_set_query =
|
3959 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3960 - | self
|
3961 2954 | }
|
3962 - | #[allow(missing_docs)] // documentation missing in model
|
3963 - | pub(crate) fn set_range_byte_set_query(
|
3964 - | mut self,
|
3965 - | input: Option<
|
3966 - | impl ::std::convert::Into<
|
3967 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
|
3968 - | >,
|
3969 - | >,
|
3970 - | ) -> Self {
|
3971 - | self.range_byte_set_query = input.map(|v| v.into());
|
3972 - | self
|
3973 2955 | }
|
3974 - | #[allow(missing_docs)] // documentation missing in model
|
3975 - | pub fn range_short_set_query(
|
3976 - | mut self,
|
3977 - | input: ::std::option::Option<crate::model::SetOfRangeShort>,
|
3978 - | ) -> Self {
|
3979 - | self.range_short_set_query =
|
3980 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
3981 - | self
|
3982 2956 | }
|
3983 - | #[allow(missing_docs)] // documentation missing in model
|
3984 - | pub(crate) fn set_range_short_set_query(
|
3985 - | mut self,
|
3986 - | input: Option<
|
3987 - | impl ::std::convert::Into<
|
3988 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
|
3989 - | >,
|
3990 - | >,
|
3991 - | ) -> Self {
|
3992 - | self.range_short_set_query = input.map(|v| v.into());
|
3993 - | self
|
2957 + | impl ::std::convert::From<ConstraintViolation>
|
2958 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2959 + | {
|
2960 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2961 + | let first_validation_exception_field =
|
2962 + | constraint_violation.as_validation_exception_field("".to_owned());
|
2963 + | let validation_exception = crate::error::ValidationException {
|
2964 + | message: format!(
|
2965 + | "1 validation error detected. {}",
|
2966 + | &first_validation_exception_field.message
|
2967 + | ),
|
2968 + | field_list: Some(vec![first_validation_exception_field]),
|
2969 + | };
|
2970 + | Self::ConstraintViolation(
|
2971 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2972 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2973 + | )
|
2974 + | }
|
2975 + | }
|
2976 + | impl ::std::convert::From<Builder>
|
2977 + | for crate::constrained::MaybeConstrained<
|
2978 + | crate::input::QueryParamsTargetingLengthMapOperationInput,
|
2979 + | >
|
2980 + | {
|
2981 + | fn from(builder: Builder) -> Self {
|
2982 + | Self::Unconstrained(builder)
|
3994 2983 | }
|
3995 - | #[allow(missing_docs)] // documentation missing in model
|
3996 - | pub fn range_integer_set_query(
|
3997 - | mut self,
|
3998 - | input: ::std::option::Option<crate::model::SetOfRangeInteger>,
|
3999 - | ) -> Self {
|
4000 - | self.range_integer_set_query =
|
4001 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
4002 - | self
|
4003 2984 | }
|
4004 - | #[allow(missing_docs)] // documentation missing in model
|
4005 - | pub(crate) fn set_range_integer_set_query(
|
4006 - | mut self,
|
4007 - | input: Option<
|
4008 - | impl ::std::convert::Into<
|
4009 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
|
4010 - | >,
|
4011 - | >,
|
4012 - | ) -> Self {
|
4013 - | self.range_integer_set_query = input.map(|v| v.into());
|
4014 - | self
|
2985 + | impl ::std::convert::TryFrom<Builder>
|
2986 + | for crate::input::QueryParamsTargetingLengthMapOperationInput
|
2987 + | {
|
2988 + | type Error = ConstraintViolation;
|
2989 + |
|
2990 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2991 + | builder.build()
|
4015 2992 | }
|
4016 - | #[allow(missing_docs)] // documentation missing in model
|
4017 - | pub fn range_long_set_query(
|
4018 - | mut self,
|
4019 - | input: ::std::option::Option<crate::model::SetOfRangeLong>,
|
4020 - | ) -> Self {
|
4021 - | self.range_long_set_query =
|
4022 - | input.map(crate::constrained::MaybeConstrained::Constrained);
|
4023 - | self
|
4024 2993 | }
|
4025 - | #[allow(missing_docs)] // documentation missing in model
|
4026 - | pub(crate) fn set_range_long_set_query(
|
4027 - | mut self,
|
4028 - | input: Option<
|
4029 - | impl ::std::convert::Into<
|
4030 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
|
4031 - | >,
|
4032 - | >,
|
4033 - | ) -> Self {
|
4034 - | self.range_long_set_query = input.map(|v| v.into());
|
4035 - | self
|
2994 + | /// A builder for [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
2995 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2996 + | pub struct Builder {
|
2997 + | pub(crate) length_map:
|
2998 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
4036 2999 | }
|
3000 + | impl Builder {
|
4037 3001 | #[allow(missing_docs)] // documentation missing in model
|
4038 - | pub fn enum_string_list_query(
|
4039 - | mut self,
|
4040 - | input: ::std::option::Option<::std::vec::Vec<crate::model::EnumString>>,
|
4041 - | ) -> Self {
|
4042 - | self.enum_string_list_query =
|
4043 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3002 + | pub fn length_map(mut self, input: ::std::option::Option<crate::model::ConBMap>) -> Self {
|
3003 + | self.length_map = input.map(crate::constrained::MaybeConstrained::Constrained);
|
4044 3004 | self
|
4045 3005 | }
|
4046 3006 | #[allow(missing_docs)] // documentation missing in model
|
4047 - | pub(crate) fn set_enum_string_list_query(
|
3007 + | pub(crate) fn set_length_map(
|
4048 3008 | mut self,
|
4049 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>>>,
|
3009 + | input: Option<
|
3010 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
3011 + | >,
|
4050 3012 | ) -> Self {
|
4051 - | self.enum_string_list_query = input.map(|v| v.into());
|
3013 + | self.length_map = input.map(|v| v.into());
|
4052 3014 | self
|
4053 3015 | }
|
4054 - | /// Consumes the builder and constructs a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
3016 + | /// Consumes the builder and constructs a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
4055 3017 | ///
|
4056 - | /// The builder fails to construct a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
3018 + | /// The builder fails to construct a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput) if a [`ConstraintViolation`] occurs.
|
4057 3019 | ///
|
4058 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
4059 3020 | pub fn build(
|
4060 3021 | self,
|
4061 - | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
3022 + | ) -> Result<crate::input::QueryParamsTargetingLengthMapOperationInput, ConstraintViolation>
|
4062 3023 | {
|
4063 3024 | self.build_enforcing_all_constraints()
|
4064 3025 | }
|
4065 3026 | fn build_enforcing_all_constraints(
|
4066 - | self,
|
4067 - | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
4068 - | {
|
4069 - | Ok(
|
4070 - | crate::input::ConstrainedHttpBoundShapesOperationInput {
|
4071 - | length_string_label: self.length_string_label
|
4072 - | .map(|v| match v {
|
4073 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4074 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4075 - | })
|
4076 - | .map(|res|
|
4077 - | res.map_err(ConstraintViolation::LengthStringLabel)
|
4078 - | )
|
4079 - | .transpose()?
|
4080 - | .ok_or(ConstraintViolation::MissingLengthStringLabel)?
|
4081 - | ,
|
4082 - | range_integer_label: self.range_integer_label
|
4083 - | .map(|v| match v {
|
4084 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4085 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4086 - | })
|
4087 - | .map(|res|
|
4088 - | res.map_err(ConstraintViolation::RangeIntegerLabel)
|
4089 - | )
|
4090 - | .transpose()?
|
4091 - | .unwrap_or_else(||
|
4092 - | 0i32
|
4093 - | .try_into()
|
4094 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4095 - | )
|
4096 - | ,
|
4097 - | range_short_label: self.range_short_label
|
4098 - | .map(|v| match v {
|
4099 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4100 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4101 - | })
|
4102 - | .map(|res|
|
4103 - | res.map_err(ConstraintViolation::RangeShortLabel)
|
4104 - | )
|
4105 - | .transpose()?
|
4106 - | .unwrap_or_else(||
|
4107 - | 0i16
|
4108 - | .try_into()
|
4109 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4110 - | )
|
4111 - | ,
|
4112 - | range_long_label: self.range_long_label
|
4113 - | .map(|v| match v {
|
4114 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4115 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4116 - | })
|
4117 - | .map(|res|
|
4118 - | res.map_err(ConstraintViolation::RangeLongLabel)
|
4119 - | )
|
4120 - | .transpose()?
|
4121 - | .unwrap_or_else(||
|
4122 - | 0i64
|
4123 - | .try_into()
|
4124 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4125 - | )
|
4126 - | ,
|
4127 - | range_byte_label: self.range_byte_label
|
4128 - | .map(|v| match v {
|
4129 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4130 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4131 - | })
|
4132 - | .map(|res|
|
4133 - | res.map_err(ConstraintViolation::RangeByteLabel)
|
4134 - | )
|
4135 - | .transpose()?
|
4136 - | .unwrap_or_else(||
|
4137 - | 0i8
|
4138 - | .try_into()
|
4139 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4140 - | )
|
4141 - | ,
|
4142 - | enum_string_label: self.enum_string_label
|
4143 - | .map(|v| match v {
|
4144 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4145 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4146 - | })
|
4147 - | .map(|res|
|
4148 - | res.map_err(ConstraintViolation::EnumStringLabel)
|
4149 - | )
|
4150 - | .transpose()?
|
4151 - | .ok_or(ConstraintViolation::MissingEnumStringLabel)?
|
4152 - | ,
|
4153 - | length_string_header_map: self.length_string_header_map
|
4154 - | .map(|v| match v {
|
4155 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4156 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4157 - | })
|
4158 - | .map(|res|
|
4159 - | res.map(|v| v.into()).map_err(ConstraintViolation::LengthStringHeaderMap)
|
4160 - | )
|
4161 - | .transpose()?
|
4162 - | .ok_or(ConstraintViolation::MissingLengthStringHeaderMap)?
|
4163 - | ,
|
4164 - | length_string_header: self.length_string_header
|
4165 - | .map(|v| match v {
|
4166 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4167 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4168 - | })
|
4169 - | .map(|res|
|
4170 - | res.map_err(ConstraintViolation::LengthStringHeader)
|
4171 - | )
|
4172 - | .transpose()?
|
4173 - | ,
|
4174 - | range_integer_header: self.range_integer_header
|
4175 - | .map(|v| match v {
|
4176 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4177 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4178 - | })
|
4179 - | .map(|res|
|
4180 - | res.map_err(ConstraintViolation::RangeIntegerHeader)
|
4181 - | )
|
4182 - | .transpose()?
|
4183 - | .unwrap_or_else(||
|
4184 - | 0i32
|
4185 - | .try_into()
|
4186 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4187 - | )
|
4188 - | ,
|
4189 - | range_short_header: self.range_short_header
|
4190 - | .map(|v| match v {
|
4191 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4192 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4193 - | })
|
4194 - | .map(|res|
|
4195 - | res.map_err(ConstraintViolation::RangeShortHeader)
|
4196 - | )
|
4197 - | .transpose()?
|
4198 - | .unwrap_or_else(||
|
4199 - | 0i16
|
4200 - | .try_into()
|
4201 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4202 - | )
|
4203 - | ,
|
4204 - | range_long_header: self.range_long_header
|
4205 - | .map(|v| match v {
|
4206 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4207 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4208 - | })
|
4209 - | .map(|res|
|
4210 - | res.map_err(ConstraintViolation::RangeLongHeader)
|
4211 - | )
|
4212 - | .transpose()?
|
4213 - | .unwrap_or_else(||
|
4214 - | 0i64
|
4215 - | .try_into()
|
4216 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4217 - | )
|
4218 - | ,
|
4219 - | range_byte_header: self.range_byte_header
|
4220 - | .map(|v| match v {
|
4221 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4222 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4223 - | })
|
4224 - | .map(|res|
|
4225 - | res.map_err(ConstraintViolation::RangeByteHeader)
|
4226 - | )
|
4227 - | .transpose()?
|
4228 - | .unwrap_or_else(||
|
4229 - | 0i8
|
4230 - | .try_into()
|
4231 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4232 - | )
|
4233 - | ,
|
4234 - | length_string_set_header: self.length_string_set_header
|
4235 - | .map(|v| match v {
|
4236 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4237 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4238 - | })
|
4239 - | .map(|res|
|
4240 - | res.map_err(ConstraintViolation::LengthStringSetHeader)
|
4241 - | )
|
4242 - | .transpose()?
|
4243 - | ,
|
4244 - | list_length_string_header: self.list_length_string_header
|
3027 + | self,
|
3028 + | ) -> Result<crate::input::QueryParamsTargetingLengthMapOperationInput, ConstraintViolation>
|
3029 + | {
|
3030 + | Ok(crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3031 + | length_map: self
|
3032 + | .length_map
|
4245 3033 | .map(|v| match v {
|
4246 3034 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4247 3035 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4248 3036 | })
|
4249 - | .map(|res|
|
4250 - | res.map(|v| v.into()).map_err(ConstraintViolation::ListLengthStringHeader)
|
4251 - | )
|
4252 - | .transpose()?
|
4253 - | ,
|
4254 - | length_list_pattern_string_header: self.length_list_pattern_string_header
|
4255 - | .map(|v| match v {
|
4256 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4257 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3037 + | .map(|res| res.map_err(ConstraintViolation::LengthMap))
|
3038 + | .transpose()?,
|
4258 3039 | })
|
4259 - | .map(|res|
|
4260 - | res.map_err(ConstraintViolation::LengthListPatternStringHeader)
|
3040 + | }
|
3041 + | }
|
3042 + | }
|
3043 + | /// See [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3044 + | pub mod query_params_targeting_map_of_length_string_operation_input {
|
3045 + |
|
3046 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3047 + | /// Holds one variant for each of the ways the builder can fail.
|
3048 + | #[non_exhaustive]
|
3049 + | #[allow(clippy::enum_variant_names)]
|
3050 + | pub enum ConstraintViolation {
|
3051 + | /// Constraint violation occurred building member `map_of_length_string` when building `QueryParamsTargetingMapOfLengthStringOperationInput`.
|
3052 + | #[doc(hidden)]
|
3053 + | MapOfLengthString(crate::model::map_of_length_string::ConstraintViolation),
|
3054 + | }
|
3055 + | impl ::std::fmt::Display for ConstraintViolation {
|
3056 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3057 + | match self {
|
3058 + | ConstraintViolation::MapOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_length_string` when building `QueryParamsTargetingMapOfLengthStringOperationInput`"),
|
3059 + | }
|
3060 + | }
|
3061 + | }
|
3062 + | impl ::std::error::Error for ConstraintViolation {}
|
3063 + | impl ConstraintViolation {
|
3064 + | pub(crate) fn as_validation_exception_field(
|
3065 + | self,
|
3066 + | path: ::std::string::String,
|
3067 + | ) -> crate::model::ValidationExceptionField {
|
3068 + | match self {
|
3069 + | ConstraintViolation::MapOfLengthString(inner) => {
|
3070 + | inner.as_validation_exception_field(path + "/mapOfLengthString")
|
3071 + | }
|
3072 + | }
|
3073 + | }
|
3074 + | }
|
3075 + | impl ::std::convert::From<ConstraintViolation>
|
3076 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3077 + | {
|
3078 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3079 + | let first_validation_exception_field =
|
3080 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3081 + | let validation_exception = crate::error::ValidationException {
|
3082 + | message: format!(
|
3083 + | "1 validation error detected. {}",
|
3084 + | &first_validation_exception_field.message
|
3085 + | ),
|
3086 + | field_list: Some(vec![first_validation_exception_field]),
|
3087 + | };
|
3088 + | Self::ConstraintViolation(
|
3089 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3090 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4261 3091 | )
|
4262 - | .transpose()?
|
4263 - | ,
|
4264 - | length_set_pattern_string_header: self.length_set_pattern_string_header
|
3092 + | }
|
3093 + | }
|
3094 + | impl ::std::convert::From<Builder>
|
3095 + | for crate::constrained::MaybeConstrained<
|
3096 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
3097 + | >
|
3098 + | {
|
3099 + | fn from(builder: Builder) -> Self {
|
3100 + | Self::Unconstrained(builder)
|
3101 + | }
|
3102 + | }
|
3103 + | impl ::std::convert::TryFrom<Builder>
|
3104 + | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
3105 + | {
|
3106 + | type Error = ConstraintViolation;
|
3107 + |
|
3108 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3109 + | builder.build()
|
3110 + | }
|
3111 + | }
|
3112 + | /// A builder for [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3113 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3114 + | pub struct Builder {
|
3115 + | pub(crate) map_of_length_string: ::std::option::Option<
|
3116 + | crate::constrained::MaybeConstrained<
|
3117 + | crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained,
|
3118 + | >,
|
3119 + | >,
|
3120 + | }
|
3121 + | impl Builder {
|
3122 + | #[allow(missing_docs)] // documentation missing in model
|
3123 + | pub fn map_of_length_string(
|
3124 + | mut self,
|
3125 + | input: ::std::option::Option<
|
3126 + | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
3127 + | >,
|
3128 + | ) -> Self {
|
3129 + | self.map_of_length_string =
|
3130 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3131 + | self
|
3132 + | }
|
3133 + | #[allow(missing_docs)] // documentation missing in model
|
3134 + | pub(crate) fn set_map_of_length_string(
|
3135 + | mut self,
|
3136 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>>,
|
3137 + | ) -> Self {
|
3138 + | self.map_of_length_string = input.map(|v| v.into());
|
3139 + | self
|
3140 + | }
|
3141 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3142 + | ///
|
3143 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3144 + | ///
|
3145 + | pub fn build(
|
3146 + | self,
|
3147 + | ) -> Result<
|
3148 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
3149 + | ConstraintViolation,
|
3150 + | > {
|
3151 + | self.build_enforcing_all_constraints()
|
3152 + | }
|
3153 + | fn build_enforcing_all_constraints(
|
3154 + | self,
|
3155 + | ) -> Result<
|
3156 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
3157 + | ConstraintViolation,
|
3158 + | > {
|
3159 + | Ok(
|
3160 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
3161 + | map_of_length_string: self
|
3162 + | .map_of_length_string
|
4265 3163 | .map(|v| match v {
|
4266 3164 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4267 3165 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4268 3166 | })
|
4269 - | .map(|res|
|
4270 - | res.map_err(ConstraintViolation::LengthSetPatternStringHeader)
|
4271 - | )
|
4272 - | .transpose()?
|
4273 - | ,
|
4274 - | range_byte_set_header: self.range_byte_set_header
|
4275 - | .map(|v| match v {
|
4276 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4277 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3167 + | .map(|res| {
|
3168 + | res.map(|v| v.into())
|
3169 + | .map_err(ConstraintViolation::MapOfLengthString)
|
4278 3170 | })
|
4279 - | .map(|res|
|
4280 - | res.map_err(ConstraintViolation::RangeByteSetHeader)
|
3171 + | .transpose()?,
|
3172 + | },
|
4281 3173 | )
|
4282 - | .transpose()?
|
4283 - | ,
|
4284 - | range_short_set_header: self.range_short_set_header
|
4285 - | .map(|v| match v {
|
4286 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4287 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4288 - | })
|
4289 - | .map(|res|
|
4290 - | res.map_err(ConstraintViolation::RangeShortSetHeader)
|
3174 + | }
|
3175 + | }
|
3176 + | }
|
3177 + | /// See [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3178 + | pub mod query_params_targeting_map_of_list_of_length_string_operation_input {
|
3179 + |
|
3180 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3181 + | /// Holds one variant for each of the ways the builder can fail.
|
3182 + | #[non_exhaustive]
|
3183 + | #[allow(clippy::enum_variant_names)]
|
3184 + | pub enum ConstraintViolation {
|
3185 + | /// Constraint violation occurred building member `map_of_list_of_length_string` when building `QueryParamsTargetingMapOfListOfLengthStringOperationInput`.
|
3186 + | #[doc(hidden)]
|
3187 + | MapOfListOfLengthString(crate::model::map_of_list_of_length_string::ConstraintViolation),
|
3188 + | }
|
3189 + | impl ::std::fmt::Display for ConstraintViolation {
|
3190 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3191 + | match self {
|
3192 + | ConstraintViolation::MapOfListOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_length_string` when building `QueryParamsTargetingMapOfListOfLengthStringOperationInput`"),
|
3193 + | }
|
3194 + | }
|
3195 + | }
|
3196 + | impl ::std::error::Error for ConstraintViolation {}
|
3197 + | impl ConstraintViolation {
|
3198 + | pub(crate) fn as_validation_exception_field(
|
3199 + | self,
|
3200 + | path: ::std::string::String,
|
3201 + | ) -> crate::model::ValidationExceptionField {
|
3202 + | match self {
|
3203 + | ConstraintViolation::MapOfListOfLengthString(inner) => {
|
3204 + | inner.as_validation_exception_field(path + "/mapOfListOfLengthString")
|
3205 + | }
|
3206 + | }
|
3207 + | }
|
3208 + | }
|
3209 + | impl ::std::convert::From<ConstraintViolation>
|
3210 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3211 + | {
|
3212 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3213 + | let first_validation_exception_field =
|
3214 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3215 + | let validation_exception = crate::error::ValidationException {
|
3216 + | message: format!(
|
3217 + | "1 validation error detected. {}",
|
3218 + | &first_validation_exception_field.message
|
3219 + | ),
|
3220 + | field_list: Some(vec![first_validation_exception_field]),
|
3221 + | };
|
3222 + | Self::ConstraintViolation(
|
3223 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3224 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4291 3225 | )
|
4292 - | .transpose()?
|
4293 - | ,
|
4294 - | range_integer_set_header: self.range_integer_set_header
|
3226 + | }
|
3227 + | }
|
3228 + | impl ::std::convert::From<Builder>
|
3229 + | for crate::constrained::MaybeConstrained<
|
3230 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
3231 + | >
|
3232 + | {
|
3233 + | fn from(builder: Builder) -> Self {
|
3234 + | Self::Unconstrained(builder)
|
3235 + | }
|
3236 + | }
|
3237 + | impl ::std::convert::TryFrom<Builder>
|
3238 + | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
3239 + | {
|
3240 + | type Error = ConstraintViolation;
|
3241 + |
|
3242 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3243 + | builder.build()
|
3244 + | }
|
3245 + | }
|
3246 + | /// A builder for [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3247 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3248 + | pub struct Builder {
|
3249 + | pub(crate) map_of_list_of_length_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained>>,
|
3250 + | }
|
3251 + | impl Builder {
|
3252 + | #[allow(missing_docs)] // documentation missing in model
|
3253 + | pub fn map_of_list_of_length_string(
|
3254 + | mut self,
|
3255 + | input: ::std::option::Option<
|
3256 + | ::std::collections::HashMap<
|
3257 + | crate::model::LengthString,
|
3258 + | ::std::vec::Vec<crate::model::LengthString>,
|
3259 + | >,
|
3260 + | >,
|
3261 + | ) -> Self {
|
3262 + | self.map_of_list_of_length_string =
|
3263 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3264 + | self
|
3265 + | }
|
3266 + | #[allow(missing_docs)] // documentation missing in model
|
3267 + | pub(crate) fn set_map_of_list_of_length_string(
|
3268 + | mut self,
|
3269 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained>>>,
|
3270 + | ) -> Self {
|
3271 + | self.map_of_list_of_length_string = input.map(|v| v.into());
|
3272 + | self
|
3273 + | }
|
3274 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3275 + | ///
|
3276 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3277 + | ///
|
3278 + | pub fn build(
|
3279 + | self,
|
3280 + | ) -> Result<
|
3281 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
3282 + | ConstraintViolation,
|
3283 + | > {
|
3284 + | self.build_enforcing_all_constraints()
|
3285 + | }
|
3286 + | fn build_enforcing_all_constraints(
|
3287 + | self,
|
3288 + | ) -> Result<
|
3289 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
3290 + | ConstraintViolation,
|
3291 + | > {
|
3292 + | Ok(
|
3293 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
3294 + | map_of_list_of_length_string: self
|
3295 + | .map_of_list_of_length_string
|
4295 3296 | .map(|v| match v {
|
4296 3297 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4297 3298 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4298 3299 | })
|
4299 - | .map(|res|
|
4300 - | res.map_err(ConstraintViolation::RangeIntegerSetHeader)
|
4301 - | )
|
4302 - | .transpose()?
|
4303 - | ,
|
4304 - | range_long_set_header: self.range_long_set_header
|
4305 - | .map(|v| match v {
|
4306 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4307 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3300 + | .map(|res| {
|
3301 + | res.map(|v| v.into())
|
3302 + | .map_err(ConstraintViolation::MapOfListOfLengthString)
|
4308 3303 | })
|
4309 - | .map(|res|
|
4310 - | res.map_err(ConstraintViolation::RangeLongSetHeader)
|
3304 + | .transpose()?,
|
3305 + | },
|
4311 3306 | )
|
4312 - | .transpose()?
|
4313 - | ,
|
4314 - | range_byte_list_header: self.range_byte_list_header
|
4315 - | .map(|v| match v {
|
4316 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4317 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4318 - | })
|
4319 - | .map(|res|
|
4320 - | res.map(|v| v.into()).map_err(ConstraintViolation::RangeByteListHeader)
|
3307 + | }
|
3308 + | }
|
3309 + | }
|
3310 + | /// See [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3311 + | pub mod query_params_targeting_map_of_set_of_length_string_operation_input {
|
3312 + |
|
3313 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3314 + | /// Holds one variant for each of the ways the builder can fail.
|
3315 + | #[non_exhaustive]
|
3316 + | #[allow(clippy::enum_variant_names)]
|
3317 + | pub enum ConstraintViolation {
|
3318 + | /// Constraint violation occurred building member `map_of_set_of_length_string` when building `QueryParamsTargetingMapOfSetOfLengthStringOperationInput`.
|
3319 + | #[doc(hidden)]
|
3320 + | MapOfSetOfLengthString(crate::model::map_of_set_of_length_string::ConstraintViolation),
|
3321 + | }
|
3322 + | impl ::std::fmt::Display for ConstraintViolation {
|
3323 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3324 + | match self {
|
3325 + | ConstraintViolation::MapOfSetOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_set_of_length_string` when building `QueryParamsTargetingMapOfSetOfLengthStringOperationInput`"),
|
3326 + | }
|
3327 + | }
|
3328 + | }
|
3329 + | impl ::std::error::Error for ConstraintViolation {}
|
3330 + | impl ConstraintViolation {
|
3331 + | pub(crate) fn as_validation_exception_field(
|
3332 + | self,
|
3333 + | path: ::std::string::String,
|
3334 + | ) -> crate::model::ValidationExceptionField {
|
3335 + | match self {
|
3336 + | ConstraintViolation::MapOfSetOfLengthString(inner) => {
|
3337 + | inner.as_validation_exception_field(path + "/mapOfSetOfLengthString")
|
3338 + | }
|
3339 + | }
|
3340 + | }
|
3341 + | }
|
3342 + | impl ::std::convert::From<ConstraintViolation>
|
3343 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3344 + | {
|
3345 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3346 + | let first_validation_exception_field =
|
3347 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3348 + | let validation_exception = crate::error::ValidationException {
|
3349 + | message: format!(
|
3350 + | "1 validation error detected. {}",
|
3351 + | &first_validation_exception_field.message
|
3352 + | ),
|
3353 + | field_list: Some(vec![first_validation_exception_field]),
|
3354 + | };
|
3355 + | Self::ConstraintViolation(
|
3356 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3357 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4321 3358 | )
|
4322 - | .transpose()?
|
4323 - | ,
|
4324 - | range_short_list_header: self.range_short_list_header
|
3359 + | }
|
3360 + | }
|
3361 + | impl ::std::convert::From<Builder>
|
3362 + | for crate::constrained::MaybeConstrained<
|
3363 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
3364 + | >
|
3365 + | {
|
3366 + | fn from(builder: Builder) -> Self {
|
3367 + | Self::Unconstrained(builder)
|
3368 + | }
|
3369 + | }
|
3370 + | impl ::std::convert::TryFrom<Builder>
|
3371 + | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
3372 + | {
|
3373 + | type Error = ConstraintViolation;
|
3374 + |
|
3375 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3376 + | builder.build()
|
3377 + | }
|
3378 + | }
|
3379 + | /// A builder for [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3380 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3381 + | pub struct Builder {
|
3382 + | pub(crate) map_of_set_of_length_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained>>,
|
3383 + | }
|
3384 + | impl Builder {
|
3385 + | #[allow(missing_docs)] // documentation missing in model
|
3386 + | pub fn map_of_set_of_length_string(
|
3387 + | mut self,
|
3388 + | input: ::std::option::Option<
|
3389 + | ::std::collections::HashMap<
|
3390 + | crate::model::LengthString,
|
3391 + | crate::model::SetOfLengthString,
|
3392 + | >,
|
3393 + | >,
|
3394 + | ) -> Self {
|
3395 + | self.map_of_set_of_length_string =
|
3396 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3397 + | self
|
3398 + | }
|
3399 + | #[allow(missing_docs)] // documentation missing in model
|
3400 + | pub(crate) fn set_map_of_set_of_length_string(
|
3401 + | mut self,
|
3402 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained>>>,
|
3403 + | ) -> Self {
|
3404 + | self.map_of_set_of_length_string = input.map(|v| v.into());
|
3405 + | self
|
3406 + | }
|
3407 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3408 + | ///
|
3409 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3410 + | ///
|
3411 + | pub fn build(
|
3412 + | self,
|
3413 + | ) -> Result<
|
3414 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
3415 + | ConstraintViolation,
|
3416 + | > {
|
3417 + | self.build_enforcing_all_constraints()
|
3418 + | }
|
3419 + | fn build_enforcing_all_constraints(
|
3420 + | self,
|
3421 + | ) -> Result<
|
3422 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
3423 + | ConstraintViolation,
|
3424 + | > {
|
3425 + | Ok(
|
3426 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
3427 + | map_of_set_of_length_string: self
|
3428 + | .map_of_set_of_length_string
|
4325 3429 | .map(|v| match v {
|
4326 3430 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4327 3431 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4328 3432 | })
|
4329 - | .map(|res|
|
4330 - | res.map(|v| v.into()).map_err(ConstraintViolation::RangeShortListHeader)
|
4331 - | )
|
4332 - | .transpose()?
|
4333 - | ,
|
4334 - | range_integer_list_header: self.range_integer_list_header
|
4335 - | .map(|v| match v {
|
4336 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4337 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3433 + | .map(|res| {
|
3434 + | res.map(|v| v.into())
|
3435 + | .map_err(ConstraintViolation::MapOfSetOfLengthString)
|
4338 3436 | })
|
4339 - | .map(|res|
|
4340 - | res.map(|v| v.into()).map_err(ConstraintViolation::RangeIntegerListHeader)
|
3437 + | .transpose()?,
|
3438 + | },
|
4341 3439 | )
|
4342 - | .transpose()?
|
4343 - | ,
|
4344 - | range_long_list_header: self.range_long_list_header
|
4345 - | .map(|v| match v {
|
4346 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4347 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4348 - | })
|
4349 - | .map(|res|
|
4350 - | res.map(|v| v.into()).map_err(ConstraintViolation::RangeLongListHeader)
|
3440 + | }
|
3441 + | }
|
3442 + | }
|
3443 + | /// See [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3444 + | pub mod query_params_targeting_map_of_length_list_of_pattern_string_operation_input {
|
3445 + |
|
3446 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3447 + | /// Holds one variant for each of the ways the builder can fail.
|
3448 + | #[non_exhaustive]
|
3449 + | #[allow(clippy::enum_variant_names)]
|
3450 + | pub enum ConstraintViolation {
|
3451 + | /// Constraint violation occurred building member `map_of_length_list_of_pattern_string` when building `QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`.
|
3452 + | #[doc(hidden)]
|
3453 + | MapOfLengthListOfPatternString(
|
3454 + | crate::model::map_of_length_list_of_pattern_string::ConstraintViolation,
|
3455 + | ),
|
3456 + | }
|
3457 + | impl ::std::fmt::Display for ConstraintViolation {
|
3458 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3459 + | match self {
|
3460 + | ConstraintViolation::MapOfLengthListOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_list_of_pattern_string` when building `QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`"),
|
3461 + | }
|
3462 + | }
|
3463 + | }
|
3464 + | impl ::std::error::Error for ConstraintViolation {}
|
3465 + | impl ConstraintViolation {
|
3466 + | pub(crate) fn as_validation_exception_field(
|
3467 + | self,
|
3468 + | path: ::std::string::String,
|
3469 + | ) -> crate::model::ValidationExceptionField {
|
3470 + | match self {
|
3471 + | ConstraintViolation::MapOfLengthListOfPatternString(inner) => {
|
3472 + | inner.as_validation_exception_field(path + "/mapOfLengthListOfPatternString")
|
3473 + | }
|
3474 + | }
|
3475 + | }
|
3476 + | }
|
3477 + | impl ::std::convert::From<ConstraintViolation>
|
3478 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3479 + | {
|
3480 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3481 + | let first_validation_exception_field =
|
3482 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3483 + | let validation_exception = crate::error::ValidationException {
|
3484 + | message: format!(
|
3485 + | "1 validation error detected. {}",
|
3486 + | &first_validation_exception_field.message
|
3487 + | ),
|
3488 + | field_list: Some(vec![first_validation_exception_field]),
|
3489 + | };
|
3490 + | Self::ConstraintViolation(
|
3491 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3492 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4351 3493 | )
|
4352 - | .transpose()?
|
4353 - | ,
|
4354 - | length_string_query: self.length_string_query
|
3494 + | }
|
3495 + | }
|
3496 + | impl ::std::convert::From<Builder>
|
3497 + | for crate::constrained::MaybeConstrained<
|
3498 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
3499 + | >
|
3500 + | {
|
3501 + | fn from(builder: Builder) -> Self {
|
3502 + | Self::Unconstrained(builder)
|
3503 + | }
|
3504 + | }
|
3505 + | impl ::std::convert::TryFrom<Builder>
|
3506 + | for crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
3507 + | {
|
3508 + | type Error = ConstraintViolation;
|
3509 + |
|
3510 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3511 + | builder.build()
|
3512 + | }
|
3513 + | }
|
3514 + | /// A builder for [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3515 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3516 + | pub struct Builder {
|
3517 + | pub(crate) map_of_length_list_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained>>,
|
3518 + | }
|
3519 + | impl Builder {
|
3520 + | #[allow(missing_docs)] // documentation missing in model
|
3521 + | pub fn map_of_length_list_of_pattern_string(
|
3522 + | mut self,
|
3523 + | input: ::std::option::Option<
|
3524 + | ::std::collections::HashMap<
|
3525 + | crate::model::PatternString,
|
3526 + | crate::model::LengthListOfPatternString,
|
3527 + | >,
|
3528 + | >,
|
3529 + | ) -> Self {
|
3530 + | self.map_of_length_list_of_pattern_string =
|
3531 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3532 + | self
|
3533 + | }
|
3534 + | #[allow(missing_docs)] // documentation missing in model
|
3535 + | pub(crate) fn set_map_of_length_list_of_pattern_string(
|
3536 + | mut self,
|
3537 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained>>>,
|
3538 + | ) -> Self {
|
3539 + | self.map_of_length_list_of_pattern_string = input.map(|v| v.into());
|
3540 + | self
|
3541 + | }
|
3542 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3543 + | ///
|
3544 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3545 + | ///
|
3546 + | pub fn build(
|
3547 + | self,
|
3548 + | ) -> Result<
|
3549 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
3550 + | ConstraintViolation,
|
3551 + | > {
|
3552 + | self.build_enforcing_all_constraints()
|
3553 + | }
|
3554 + | fn build_enforcing_all_constraints(
|
3555 + | self,
|
3556 + | ) -> Result<
|
3557 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
3558 + | ConstraintViolation,
|
3559 + | > {
|
3560 + | Ok(
|
3561 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
3562 + | map_of_length_list_of_pattern_string: self
|
3563 + | .map_of_length_list_of_pattern_string
|
4355 3564 | .map(|v| match v {
|
4356 3565 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4357 3566 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4358 3567 | })
|
4359 - | .map(|res|
|
4360 - | res.map_err(ConstraintViolation::LengthStringQuery)
|
4361 - | )
|
4362 - | .transpose()?
|
4363 - | ,
|
4364 - | range_byte_query: self.range_byte_query
|
4365 - | .map(|v| match v {
|
4366 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4367 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3568 + | .map(|res| {
|
3569 + | res.map(|v| v.into())
|
3570 + | .map_err(ConstraintViolation::MapOfLengthListOfPatternString)
|
4368 3571 | })
|
4369 - | .map(|res|
|
4370 - | res.map_err(ConstraintViolation::RangeByteQuery)
|
3572 + | .transpose()?,
|
3573 + | },
|
4371 3574 | )
|
4372 - | .transpose()?
|
4373 - | .unwrap_or_else(||
|
4374 - | 0i8
|
4375 - | .try_into()
|
4376 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3575 + | }
|
3576 + | }
|
3577 + | }
|
3578 + | /// See [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
3579 + | pub mod query_params_targeting_map_of_list_of_enum_string_operation_input {
|
3580 + |
|
3581 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3582 + | /// Holds one variant for each of the ways the builder can fail.
|
3583 + | #[non_exhaustive]
|
3584 + | #[allow(clippy::enum_variant_names)]
|
3585 + | pub enum ConstraintViolation {
|
3586 + | /// Constraint violation occurred building member `map_of_list_of_enum_string` when building `QueryParamsTargetingMapOfListOfEnumStringOperationInput`.
|
3587 + | #[doc(hidden)]
|
3588 + | MapOfListOfEnumString(crate::model::map_of_list_of_enum_string::ConstraintViolation),
|
3589 + | }
|
3590 + | impl ::std::fmt::Display for ConstraintViolation {
|
3591 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3592 + | match self {
|
3593 + | ConstraintViolation::MapOfListOfEnumString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_enum_string` when building `QueryParamsTargetingMapOfListOfEnumStringOperationInput`"),
|
3594 + | }
|
3595 + | }
|
3596 + | }
|
3597 + | impl ::std::error::Error for ConstraintViolation {}
|
3598 + | impl ConstraintViolation {
|
3599 + | pub(crate) fn as_validation_exception_field(
|
3600 + | self,
|
3601 + | path: ::std::string::String,
|
3602 + | ) -> crate::model::ValidationExceptionField {
|
3603 + | match self {
|
3604 + | ConstraintViolation::MapOfListOfEnumString(inner) => {
|
3605 + | inner.as_validation_exception_field(path + "/mapOfListOfEnumString")
|
3606 + | }
|
3607 + | }
|
3608 + | }
|
3609 + | }
|
3610 + | impl ::std::convert::From<ConstraintViolation>
|
3611 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3612 + | {
|
3613 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3614 + | let first_validation_exception_field =
|
3615 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3616 + | let validation_exception = crate::error::ValidationException {
|
3617 + | message: format!(
|
3618 + | "1 validation error detected. {}",
|
3619 + | &first_validation_exception_field.message
|
3620 + | ),
|
3621 + | field_list: Some(vec![first_validation_exception_field]),
|
3622 + | };
|
3623 + | Self::ConstraintViolation(
|
3624 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3625 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4377 3626 | )
|
4378 - | ,
|
4379 - | range_short_query: self.range_short_query
|
3627 + | }
|
3628 + | }
|
3629 + | impl ::std::convert::From<Builder>
|
3630 + | for crate::constrained::MaybeConstrained<
|
3631 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
3632 + | >
|
3633 + | {
|
3634 + | fn from(builder: Builder) -> Self {
|
3635 + | Self::Unconstrained(builder)
|
3636 + | }
|
3637 + | }
|
3638 + | impl ::std::convert::TryFrom<Builder>
|
3639 + | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
3640 + | {
|
3641 + | type Error = ConstraintViolation;
|
3642 + |
|
3643 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3644 + | builder.build()
|
3645 + | }
|
3646 + | }
|
3647 + | /// A builder for [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
3648 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3649 + | pub struct Builder {
|
3650 + | pub(crate) map_of_list_of_enum_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained>>,
|
3651 + | }
|
3652 + | impl Builder {
|
3653 + | #[allow(missing_docs)] // documentation missing in model
|
3654 + | pub fn map_of_list_of_enum_string(
|
3655 + | mut self,
|
3656 + | input: ::std::option::Option<
|
3657 + | ::std::collections::HashMap<
|
3658 + | crate::model::EnumString,
|
3659 + | ::std::vec::Vec<crate::model::EnumString>,
|
3660 + | >,
|
3661 + | >,
|
3662 + | ) -> Self {
|
3663 + | self.map_of_list_of_enum_string =
|
3664 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3665 + | self
|
3666 + | }
|
3667 + | #[allow(missing_docs)] // documentation missing in model
|
3668 + | pub(crate) fn set_map_of_list_of_enum_string(
|
3669 + | mut self,
|
3670 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained>>>,
|
3671 + | ) -> Self {
|
3672 + | self.map_of_list_of_enum_string = input.map(|v| v.into());
|
3673 + | self
|
3674 + | }
|
3675 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
3676 + | ///
|
3677 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3678 + | ///
|
3679 + | pub fn build(
|
3680 + | self,
|
3681 + | ) -> Result<
|
3682 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
3683 + | ConstraintViolation,
|
3684 + | > {
|
3685 + | self.build_enforcing_all_constraints()
|
3686 + | }
|
3687 + | fn build_enforcing_all_constraints(
|
3688 + | self,
|
3689 + | ) -> Result<
|
3690 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
3691 + | ConstraintViolation,
|
3692 + | > {
|
3693 + | Ok(
|
3694 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
3695 + | map_of_list_of_enum_string: self
|
3696 + | .map_of_list_of_enum_string
|
4380 3697 | .map(|v| match v {
|
4381 3698 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4382 3699 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4383 3700 | })
|
4384 - | .map(|res|
|
4385 - | res.map_err(ConstraintViolation::RangeShortQuery)
|
3701 + | .map(|res| {
|
3702 + | res.map(|v| v.into())
|
3703 + | .map_err(ConstraintViolation::MapOfListOfEnumString)
|
3704 + | })
|
3705 + | .transpose()?,
|
3706 + | },
|
4386 3707 | )
|
4387 - | .transpose()?
|
4388 - | .unwrap_or_else(||
|
4389 - | 0i16
|
4390 - | .try_into()
|
4391 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3708 + | }
|
3709 + | }
|
3710 + | }
|
3711 + | /// See [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
3712 + | pub mod query_params_targeting_map_of_pattern_string_operation_input {
|
3713 + |
|
3714 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3715 + | /// Holds one variant for each of the ways the builder can fail.
|
3716 + | #[non_exhaustive]
|
3717 + | #[allow(clippy::enum_variant_names)]
|
3718 + | pub enum ConstraintViolation {
|
3719 + | /// Constraint violation occurred building member `map_of_pattern_string` when building `QueryParamsTargetingMapOfPatternStringOperationInput`.
|
3720 + | #[doc(hidden)]
|
3721 + | MapOfPatternString(crate::model::map_of_pattern_string::ConstraintViolation),
|
3722 + | }
|
3723 + | impl ::std::fmt::Display for ConstraintViolation {
|
3724 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3725 + | match self {
|
3726 + | ConstraintViolation::MapOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_pattern_string` when building `QueryParamsTargetingMapOfPatternStringOperationInput`"),
|
3727 + | }
|
3728 + | }
|
3729 + | }
|
3730 + | impl ::std::error::Error for ConstraintViolation {}
|
3731 + | impl ConstraintViolation {
|
3732 + | pub(crate) fn as_validation_exception_field(
|
3733 + | self,
|
3734 + | path: ::std::string::String,
|
3735 + | ) -> crate::model::ValidationExceptionField {
|
3736 + | match self {
|
3737 + | ConstraintViolation::MapOfPatternString(inner) => {
|
3738 + | inner.as_validation_exception_field(path + "/mapOfPatternString")
|
3739 + | }
|
3740 + | }
|
3741 + | }
|
3742 + | }
|
3743 + | impl ::std::convert::From<ConstraintViolation>
|
3744 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3745 + | {
|
3746 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3747 + | let first_validation_exception_field =
|
3748 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3749 + | let validation_exception = crate::error::ValidationException {
|
3750 + | message: format!(
|
3751 + | "1 validation error detected. {}",
|
3752 + | &first_validation_exception_field.message
|
3753 + | ),
|
3754 + | field_list: Some(vec![first_validation_exception_field]),
|
3755 + | };
|
3756 + | Self::ConstraintViolation(
|
3757 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3758 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4392 3759 | )
|
4393 - | ,
|
4394 - | range_integer_query: self.range_integer_query
|
3760 + | }
|
3761 + | }
|
3762 + | impl ::std::convert::From<Builder>
|
3763 + | for crate::constrained::MaybeConstrained<
|
3764 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
3765 + | >
|
3766 + | {
|
3767 + | fn from(builder: Builder) -> Self {
|
3768 + | Self::Unconstrained(builder)
|
3769 + | }
|
3770 + | }
|
3771 + | impl ::std::convert::TryFrom<Builder>
|
3772 + | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
3773 + | {
|
3774 + | type Error = ConstraintViolation;
|
3775 + |
|
3776 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3777 + | builder.build()
|
3778 + | }
|
3779 + | }
|
3780 + | /// A builder for [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
3781 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3782 + | pub struct Builder {
|
3783 + | pub(crate) map_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained>>,
|
3784 + | }
|
3785 + | impl Builder {
|
3786 + | #[allow(missing_docs)] // documentation missing in model
|
3787 + | pub fn map_of_pattern_string(
|
3788 + | mut self,
|
3789 + | input: ::std::option::Option<
|
3790 + | ::std::collections::HashMap<
|
3791 + | crate::model::PatternString,
|
3792 + | crate::model::PatternString,
|
3793 + | >,
|
3794 + | >,
|
3795 + | ) -> Self {
|
3796 + | self.map_of_pattern_string =
|
3797 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3798 + | self
|
3799 + | }
|
3800 + | #[allow(missing_docs)] // documentation missing in model
|
3801 + | pub(crate) fn set_map_of_pattern_string(
|
3802 + | mut self,
|
3803 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained>>>,
|
3804 + | ) -> Self {
|
3805 + | self.map_of_pattern_string = input.map(|v| v.into());
|
3806 + | self
|
3807 + | }
|
3808 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
3809 + | ///
|
3810 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3811 + | ///
|
3812 + | pub fn build(
|
3813 + | self,
|
3814 + | ) -> Result<
|
3815 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
3816 + | ConstraintViolation,
|
3817 + | > {
|
3818 + | self.build_enforcing_all_constraints()
|
3819 + | }
|
3820 + | fn build_enforcing_all_constraints(
|
3821 + | self,
|
3822 + | ) -> Result<
|
3823 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
3824 + | ConstraintViolation,
|
3825 + | > {
|
3826 + | Ok(
|
3827 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
3828 + | map_of_pattern_string: self
|
3829 + | .map_of_pattern_string
|
4395 3830 | .map(|v| match v {
|
4396 3831 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4397 3832 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4398 3833 | })
|
4399 - | .map(|res|
|
4400 - | res.map_err(ConstraintViolation::RangeIntegerQuery)
|
4401 - | )
|
4402 - | .transpose()?
|
4403 - | .unwrap_or_else(||
|
4404 - | 0i32
|
4405 - | .try_into()
|
4406 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4407 - | )
|
4408 - | ,
|
4409 - | range_long_query: self.range_long_query
|
4410 - | .map(|v| match v {
|
4411 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4412 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3834 + | .map(|res| {
|
3835 + | res.map(|v| v.into())
|
3836 + | .map_err(ConstraintViolation::MapOfPatternString)
|
4413 3837 | })
|
4414 - | .map(|res|
|
4415 - | res.map_err(ConstraintViolation::RangeLongQuery)
|
4416 - | )
|
4417 - | .transpose()?
|
4418 - | .unwrap_or_else(||
|
4419 - | 0i64
|
4420 - | .try_into()
|
4421 - | .expect("this check should have failed at generation time; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3838 + | .transpose()?,
|
3839 + | },
|
4422 3840 | )
|
4423 - | ,
|
4424 - | enum_string_query: self.enum_string_query
|
4425 - | .map(|v| match v {
|
4426 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4427 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4428 - | })
|
4429 - | .map(|res|
|
4430 - | res.map_err(ConstraintViolation::EnumStringQuery)
|
3841 + | }
|
3842 + | }
|
3843 + | }
|
3844 + | /// See [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
3845 + | pub mod query_params_targeting_map_of_list_of_pattern_string_operation_input {
|
3846 + |
|
3847 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3848 + | /// Holds one variant for each of the ways the builder can fail.
|
3849 + | #[non_exhaustive]
|
3850 + | #[allow(clippy::enum_variant_names)]
|
3851 + | pub enum ConstraintViolation {
|
3852 + | /// Constraint violation occurred building member `map_of_list_of_pattern_string` when building `QueryParamsTargetingMapOfListOfPatternStringOperationInput`.
|
3853 + | #[doc(hidden)]
|
3854 + | MapOfListOfPatternString(crate::model::map_of_list_of_pattern_string::ConstraintViolation),
|
3855 + | }
|
3856 + | impl ::std::fmt::Display for ConstraintViolation {
|
3857 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3858 + | match self {
|
3859 + | ConstraintViolation::MapOfListOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_pattern_string` when building `QueryParamsTargetingMapOfListOfPatternStringOperationInput`"),
|
3860 + | }
|
3861 + | }
|
3862 + | }
|
3863 + | impl ::std::error::Error for ConstraintViolation {}
|
3864 + | impl ConstraintViolation {
|
3865 + | pub(crate) fn as_validation_exception_field(
|
3866 + | self,
|
3867 + | path: ::std::string::String,
|
3868 + | ) -> crate::model::ValidationExceptionField {
|
3869 + | match self {
|
3870 + | ConstraintViolation::MapOfListOfPatternString(inner) => {
|
3871 + | inner.as_validation_exception_field(path + "/mapOfListOfPatternString")
|
3872 + | }
|
3873 + | }
|
3874 + | }
|
3875 + | }
|
3876 + | impl ::std::convert::From<ConstraintViolation>
|
3877 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3878 + | {
|
3879 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3880 + | let first_validation_exception_field =
|
3881 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3882 + | let validation_exception = crate::error::ValidationException {
|
3883 + | message: format!(
|
3884 + | "1 validation error detected. {}",
|
3885 + | &first_validation_exception_field.message
|
3886 + | ),
|
3887 + | field_list: Some(vec![first_validation_exception_field]),
|
3888 + | };
|
3889 + | Self::ConstraintViolation(
|
3890 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3891 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4431 3892 | )
|
4432 - | .transpose()?
|
4433 - | ,
|
4434 - | length_string_list_query: self.length_string_list_query
|
3893 + | }
|
3894 + | }
|
3895 + | impl ::std::convert::From<Builder>
|
3896 + | for crate::constrained::MaybeConstrained<
|
3897 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
3898 + | >
|
3899 + | {
|
3900 + | fn from(builder: Builder) -> Self {
|
3901 + | Self::Unconstrained(builder)
|
3902 + | }
|
3903 + | }
|
3904 + | impl ::std::convert::TryFrom<Builder>
|
3905 + | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
3906 + | {
|
3907 + | type Error = ConstraintViolation;
|
3908 + |
|
3909 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3910 + | builder.build()
|
3911 + | }
|
3912 + | }
|
3913 + | /// A builder for [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
3914 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3915 + | pub struct Builder {
|
3916 + | pub(crate) map_of_list_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained>>,
|
3917 + | }
|
3918 + | impl Builder {
|
3919 + | #[allow(missing_docs)] // documentation missing in model
|
3920 + | pub fn map_of_list_of_pattern_string(
|
3921 + | mut self,
|
3922 + | input: ::std::option::Option<
|
3923 + | ::std::collections::HashMap<
|
3924 + | crate::model::PatternString,
|
3925 + | ::std::vec::Vec<crate::model::PatternString>,
|
3926 + | >,
|
3927 + | >,
|
3928 + | ) -> Self {
|
3929 + | self.map_of_list_of_pattern_string =
|
3930 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
3931 + | self
|
3932 + | }
|
3933 + | #[allow(missing_docs)] // documentation missing in model
|
3934 + | pub(crate) fn set_map_of_list_of_pattern_string(
|
3935 + | mut self,
|
3936 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained>>>,
|
3937 + | ) -> Self {
|
3938 + | self.map_of_list_of_pattern_string = input.map(|v| v.into());
|
3939 + | self
|
3940 + | }
|
3941 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
3942 + | ///
|
3943 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3944 + | ///
|
3945 + | pub fn build(
|
3946 + | self,
|
3947 + | ) -> Result<
|
3948 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
3949 + | ConstraintViolation,
|
3950 + | > {
|
3951 + | self.build_enforcing_all_constraints()
|
3952 + | }
|
3953 + | fn build_enforcing_all_constraints(
|
3954 + | self,
|
3955 + | ) -> Result<
|
3956 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
3957 + | ConstraintViolation,
|
3958 + | > {
|
3959 + | Ok(
|
3960 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
3961 + | map_of_list_of_pattern_string: self
|
3962 + | .map_of_list_of_pattern_string
|
4435 3963 | .map(|v| match v {
|
4436 3964 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4437 3965 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4438 3966 | })
|
4439 - | .map(|res|
|
4440 - | res.map(|v| v.into()).map_err(ConstraintViolation::LengthStringListQuery)
|
4441 - | )
|
4442 - | .transpose()?
|
4443 - | ,
|
4444 - | length_list_pattern_string_query: self.length_list_pattern_string_query
|
4445 - | .map(|v| match v {
|
4446 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4447 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3967 + | .map(|res| {
|
3968 + | res.map(|v| v.into())
|
3969 + | .map_err(ConstraintViolation::MapOfListOfPatternString)
|
4448 3970 | })
|
4449 - | .map(|res|
|
4450 - | res.map_err(ConstraintViolation::LengthListPatternStringQuery)
|
3971 + | .transpose()?,
|
3972 + | },
|
4451 3973 | )
|
4452 - | .transpose()?
|
4453 - | ,
|
4454 - | length_string_set_query: self.length_string_set_query
|
4455 - | .map(|v| match v {
|
4456 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4457 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4458 - | })
|
4459 - | .map(|res|
|
4460 - | res.map_err(ConstraintViolation::LengthStringSetQuery)
|
3974 + | }
|
3975 + | }
|
3976 + | }
|
3977 + | /// See [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
3978 + | pub mod query_params_targeting_map_of_length_pattern_string_operation_input {
|
3979 + |
|
3980 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3981 + | /// Holds one variant for each of the ways the builder can fail.
|
3982 + | #[non_exhaustive]
|
3983 + | #[allow(clippy::enum_variant_names)]
|
3984 + | pub enum ConstraintViolation {
|
3985 + | /// Constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfLengthPatternStringOperationInput`.
|
3986 + | #[doc(hidden)]
|
3987 + | MapOfLengthPatternString(crate::model::map_of_length_pattern_string::ConstraintViolation),
|
3988 + | }
|
3989 + | impl ::std::fmt::Display for ConstraintViolation {
|
3990 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3991 + | match self {
|
3992 + | ConstraintViolation::MapOfLengthPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfLengthPatternStringOperationInput`"),
|
3993 + | }
|
3994 + | }
|
3995 + | }
|
3996 + | impl ::std::error::Error for ConstraintViolation {}
|
3997 + | impl ConstraintViolation {
|
3998 + | pub(crate) fn as_validation_exception_field(
|
3999 + | self,
|
4000 + | path: ::std::string::String,
|
4001 + | ) -> crate::model::ValidationExceptionField {
|
4002 + | match self {
|
4003 + | ConstraintViolation::MapOfLengthPatternString(inner) => {
|
4004 + | inner.as_validation_exception_field(path + "/mapOfLengthPatternString")
|
4005 + | }
|
4006 + | }
|
4007 + | }
|
4008 + | }
|
4009 + | impl ::std::convert::From<ConstraintViolation>
|
4010 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4011 + | {
|
4012 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4013 + | let first_validation_exception_field =
|
4014 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4015 + | let validation_exception = crate::error::ValidationException {
|
4016 + | message: format!(
|
4017 + | "1 validation error detected. {}",
|
4018 + | &first_validation_exception_field.message
|
4019 + | ),
|
4020 + | field_list: Some(vec![first_validation_exception_field]),
|
4021 + | };
|
4022 + | Self::ConstraintViolation(
|
4023 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4024 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4461 4025 | )
|
4462 - | .transpose()?
|
4463 - | ,
|
4464 - | range_byte_list_query: self.range_byte_list_query
|
4026 + | }
|
4027 + | }
|
4028 + | impl ::std::convert::From<Builder>
|
4029 + | for crate::constrained::MaybeConstrained<
|
4030 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
4031 + | >
|
4032 + | {
|
4033 + | fn from(builder: Builder) -> Self {
|
4034 + | Self::Unconstrained(builder)
|
4035 + | }
|
4036 + | }
|
4037 + | impl ::std::convert::TryFrom<Builder>
|
4038 + | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
4039 + | {
|
4040 + | type Error = ConstraintViolation;
|
4041 + |
|
4042 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4043 + | builder.build()
|
4044 + | }
|
4045 + | }
|
4046 + | /// A builder for [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
4047 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4048 + | pub struct Builder {
|
4049 + | pub(crate) map_of_length_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained>>,
|
4050 + | }
|
4051 + | impl Builder {
|
4052 + | #[allow(missing_docs)] // documentation missing in model
|
4053 + | pub fn map_of_length_pattern_string(
|
4054 + | mut self,
|
4055 + | input: ::std::option::Option<
|
4056 + | ::std::collections::HashMap<
|
4057 + | crate::model::LengthPatternString,
|
4058 + | crate::model::LengthPatternString,
|
4059 + | >,
|
4060 + | >,
|
4061 + | ) -> Self {
|
4062 + | self.map_of_length_pattern_string =
|
4063 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
4064 + | self
|
4065 + | }
|
4066 + | #[allow(missing_docs)] // documentation missing in model
|
4067 + | pub(crate) fn set_map_of_length_pattern_string(
|
4068 + | mut self,
|
4069 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained>>>,
|
4070 + | ) -> Self {
|
4071 + | self.map_of_length_pattern_string = input.map(|v| v.into());
|
4072 + | self
|
4073 + | }
|
4074 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
4075 + | ///
|
4076 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
4077 + | ///
|
4078 + | pub fn build(
|
4079 + | self,
|
4080 + | ) -> Result<
|
4081 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
4082 + | ConstraintViolation,
|
4083 + | > {
|
4084 + | self.build_enforcing_all_constraints()
|
4085 + | }
|
4086 + | fn build_enforcing_all_constraints(
|
4087 + | self,
|
4088 + | ) -> Result<
|
4089 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
4090 + | ConstraintViolation,
|
4091 + | > {
|
4092 + | Ok(
|
4093 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
4094 + | map_of_length_pattern_string: self
|
4095 + | .map_of_length_pattern_string
|
4465 4096 | .map(|v| match v {
|
4466 4097 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4467 4098 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4468 4099 | })
|
4469 - | .map(|res|
|
4470 - | res.map(|v| v.into()).map_err(ConstraintViolation::RangeByteListQuery)
|
4471 - | )
|
4472 - | .transpose()?
|
4473 - | ,
|
4474 - | range_short_list_query: self.range_short_list_query
|
4475 - | .map(|v| match v {
|
4476 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4477 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4100 + | .map(|res| {
|
4101 + | res.map(|v| v.into())
|
4102 + | .map_err(ConstraintViolation::MapOfLengthPatternString)
|
4478 4103 | })
|
4479 - | .map(|res|
|
4480 - | res.map(|v| v.into()).map_err(ConstraintViolation::RangeShortListQuery)
|
4104 + | .transpose()?,
|
4105 + | },
|
4481 4106 | )
|
4482 - | .transpose()?
|
4483 - | ,
|
4484 - | range_integer_list_query: self.range_integer_list_query
|
4485 - | .map(|v| match v {
|
4486 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4487 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4488 - | })
|
4489 - | .map(|res|
|
4490 - | res.map(|v| v.into()).map_err(ConstraintViolation::RangeIntegerListQuery)
|
4107 + | }
|
4108 + | }
|
4109 + | }
|
4110 + | /// See [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4111 + | pub mod query_params_targeting_map_of_list_of_length_pattern_string_operation_input {
|
4112 + |
|
4113 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4114 + | /// Holds one variant for each of the ways the builder can fail.
|
4115 + | #[non_exhaustive]
|
4116 + | #[allow(clippy::enum_variant_names)]
|
4117 + | pub enum ConstraintViolation {
|
4118 + | /// Constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`.
|
4119 + | #[doc(hidden)]
|
4120 + | MapOfLengthPatternString(
|
4121 + | crate::model::map_of_list_of_length_pattern_string::ConstraintViolation,
|
4122 + | ),
|
4123 + | }
|
4124 + | impl ::std::fmt::Display for ConstraintViolation {
|
4125 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4126 + | match self {
|
4127 + | ConstraintViolation::MapOfLengthPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`"),
|
4128 + | }
|
4129 + | }
|
4130 + | }
|
4131 + | impl ::std::error::Error for ConstraintViolation {}
|
4132 + | impl ConstraintViolation {
|
4133 + | pub(crate) fn as_validation_exception_field(
|
4134 + | self,
|
4135 + | path: ::std::string::String,
|
4136 + | ) -> crate::model::ValidationExceptionField {
|
4137 + | match self {
|
4138 + | ConstraintViolation::MapOfLengthPatternString(inner) => {
|
4139 + | inner.as_validation_exception_field(path + "/mapOfLengthPatternString")
|
4140 + | }
|
4141 + | }
|
4142 + | }
|
4143 + | }
|
4144 + | impl ::std::convert::From<ConstraintViolation>
|
4145 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4146 + | {
|
4147 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4148 + | let first_validation_exception_field =
|
4149 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4150 + | let validation_exception = crate::error::ValidationException {
|
4151 + | message: format!(
|
4152 + | "1 validation error detected. {}",
|
4153 + | &first_validation_exception_field.message
|
4154 + | ),
|
4155 + | field_list: Some(vec![first_validation_exception_field]),
|
4156 + | };
|
4157 + | Self::ConstraintViolation(
|
4158 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4159 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4491 4160 | )
|
4492 - | .transpose()?
|
4493 - | ,
|
4494 - | range_long_list_query: self.range_long_list_query
|
4161 + | }
|
4162 + | }
|
4163 + | impl ::std::convert::From<Builder>
|
4164 + | for crate::constrained::MaybeConstrained<
|
4165 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
4166 + | >
|
4167 + | {
|
4168 + | fn from(builder: Builder) -> Self {
|
4169 + | Self::Unconstrained(builder)
|
4170 + | }
|
4171 + | }
|
4172 + | impl ::std::convert::TryFrom<Builder>
|
4173 + | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
4174 + | {
|
4175 + | type Error = ConstraintViolation;
|
4176 + |
|
4177 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4178 + | builder.build()
|
4179 + | }
|
4180 + | }
|
4181 + | /// A builder for [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4182 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4183 + | pub struct Builder {
|
4184 + | pub(crate) map_of_length_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained>>,
|
4185 + | }
|
4186 + | impl Builder {
|
4187 + | #[allow(missing_docs)] // documentation missing in model
|
4188 + | pub fn map_of_length_pattern_string(
|
4189 + | mut self,
|
4190 + | input: ::std::option::Option<
|
4191 + | ::std::collections::HashMap<
|
4192 + | crate::model::LengthPatternString,
|
4193 + | ::std::vec::Vec<crate::model::LengthPatternString>,
|
4194 + | >,
|
4195 + | >,
|
4196 + | ) -> Self {
|
4197 + | self.map_of_length_pattern_string =
|
4198 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
4199 + | self
|
4200 + | }
|
4201 + | #[allow(missing_docs)] // documentation missing in model
|
4202 + | pub(crate) fn set_map_of_length_pattern_string(
|
4203 + | mut self,
|
4204 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained>>>,
|
4205 + | ) -> Self {
|
4206 + | self.map_of_length_pattern_string = input.map(|v| v.into());
|
4207 + | self
|
4208 + | }
|
4209 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4210 + | ///
|
4211 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
4212 + | ///
|
4213 + | pub fn build(
|
4214 + | self,
|
4215 + | ) -> Result<
|
4216 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
4217 + | ConstraintViolation,
|
4218 + | > {
|
4219 + | self.build_enforcing_all_constraints()
|
4220 + | }
|
4221 + | fn build_enforcing_all_constraints(
|
4222 + | self,
|
4223 + | ) -> Result<
|
4224 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
4225 + | ConstraintViolation,
|
4226 + | > {
|
4227 + | Ok(
|
4228 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
4229 + | map_of_length_pattern_string: self
|
4230 + | .map_of_length_pattern_string
|
4495 4231 | .map(|v| match v {
|
4496 4232 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4497 4233 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4498 4234 | })
|
4499 - | .map(|res|
|
4500 - | res.map(|v| v.into()).map_err(ConstraintViolation::RangeLongListQuery)
|
4501 - | )
|
4502 - | .transpose()?
|
4503 - | ,
|
4504 - | range_byte_set_query: self.range_byte_set_query
|
4505 - | .map(|v| match v {
|
4506 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4507 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4235 + | .map(|res| {
|
4236 + | res.map(|v| v.into())
|
4237 + | .map_err(ConstraintViolation::MapOfLengthPatternString)
|
4508 4238 | })
|
4509 - | .map(|res|
|
4510 - | res.map_err(ConstraintViolation::RangeByteSetQuery)
|
4239 + | .transpose()?,
|
4240 + | },
|
4511 4241 | )
|
4512 - | .transpose()?
|
4513 - | ,
|
4514 - | range_short_set_query: self.range_short_set_query
|
4515 - | .map(|v| match v {
|
4516 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4517 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4518 - | })
|
4519 - | .map(|res|
|
4520 - | res.map_err(ConstraintViolation::RangeShortSetQuery)
|
4242 + | }
|
4243 + | }
|
4244 + | }
|
4245 + | /// See [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4246 + | pub mod http_prefix_headers_targeting_length_map_operation_input {
|
4247 + |
|
4248 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4249 + | /// Holds one variant for each of the ways the builder can fail.
|
4250 + | #[non_exhaustive]
|
4251 + | #[allow(clippy::enum_variant_names)]
|
4252 + | pub enum ConstraintViolation {
|
4253 + | /// Constraint violation occurred building member `length_map` when building `HttpPrefixHeadersTargetingLengthMapOperationInput`.
|
4254 + | #[doc(hidden)]
|
4255 + | LengthMap(crate::model::con_b_map::ConstraintViolation),
|
4256 + | }
|
4257 + | impl ::std::fmt::Display for ConstraintViolation {
|
4258 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4259 + | match self {
|
4260 + | ConstraintViolation::LengthMap(_) => write!(f, "constraint violation occurred building member `length_map` when building `HttpPrefixHeadersTargetingLengthMapOperationInput`"),
|
4261 + | }
|
4262 + | }
|
4263 + | }
|
4264 + | impl ::std::error::Error for ConstraintViolation {}
|
4265 + | impl ConstraintViolation {
|
4266 + | pub(crate) fn as_validation_exception_field(
|
4267 + | self,
|
4268 + | path: ::std::string::String,
|
4269 + | ) -> crate::model::ValidationExceptionField {
|
4270 + | match self {
|
4271 + | ConstraintViolation::LengthMap(inner) => {
|
4272 + | inner.as_validation_exception_field(path + "/lengthMap")
|
4273 + | }
|
4274 + | }
|
4275 + | }
|
4276 + | }
|
4277 + | impl ::std::convert::From<ConstraintViolation>
|
4278 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4279 + | {
|
4280 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4281 + | let first_validation_exception_field =
|
4282 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4283 + | let validation_exception = crate::error::ValidationException {
|
4284 + | message: format!(
|
4285 + | "1 validation error detected. {}",
|
4286 + | &first_validation_exception_field.message
|
4287 + | ),
|
4288 + | field_list: Some(vec![first_validation_exception_field]),
|
4289 + | };
|
4290 + | Self::ConstraintViolation(
|
4291 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4292 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4521 4293 | )
|
4522 - | .transpose()?
|
4523 - | ,
|
4524 - | range_integer_set_query: self.range_integer_set_query
|
4294 + | }
|
4295 + | }
|
4296 + | impl ::std::convert::From<Builder>
|
4297 + | for crate::constrained::MaybeConstrained<
|
4298 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
4299 + | >
|
4300 + | {
|
4301 + | fn from(builder: Builder) -> Self {
|
4302 + | Self::Unconstrained(builder)
|
4303 + | }
|
4304 + | }
|
4305 + | impl ::std::convert::TryFrom<Builder>
|
4306 + | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
4307 + | {
|
4308 + | type Error = ConstraintViolation;
|
4309 + |
|
4310 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4311 + | builder.build()
|
4312 + | }
|
4313 + | }
|
4314 + | /// A builder for [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4315 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4316 + | pub struct Builder {
|
4317 + | pub(crate) length_map:
|
4318 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
4319 + | }
|
4320 + | impl Builder {
|
4321 + | #[allow(missing_docs)] // documentation missing in model
|
4322 + | pub fn length_map(mut self, input: ::std::option::Option<crate::model::ConBMap>) -> Self {
|
4323 + | self.length_map = input.map(crate::constrained::MaybeConstrained::Constrained);
|
4324 + | self
|
4325 + | }
|
4326 + | #[allow(missing_docs)] // documentation missing in model
|
4327 + | pub(crate) fn set_length_map(
|
4328 + | mut self,
|
4329 + | input: Option<
|
4330 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
4331 + | >,
|
4332 + | ) -> Self {
|
4333 + | self.length_map = input.map(|v| v.into());
|
4334 + | self
|
4335 + | }
|
4336 + | /// Consumes the builder and constructs a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4337 + | ///
|
4338 + | /// The builder fails to construct a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput) if a [`ConstraintViolation`] occurs.
|
4339 + | ///
|
4340 + | pub fn build(
|
4341 + | self,
|
4342 + | ) -> Result<
|
4343 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
4344 + | ConstraintViolation,
|
4345 + | > {
|
4346 + | self.build_enforcing_all_constraints()
|
4347 + | }
|
4348 + | fn build_enforcing_all_constraints(
|
4349 + | self,
|
4350 + | ) -> Result<
|
4351 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
4352 + | ConstraintViolation,
|
4353 + | > {
|
4354 + | Ok(
|
4355 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
4356 + | length_map: self
|
4357 + | .length_map
|
4525 4358 | .map(|v| match v {
|
4526 4359 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4527 4360 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4528 4361 | })
|
4529 - | .map(|res|
|
4530 - | res.map_err(ConstraintViolation::RangeIntegerSetQuery)
|
4362 + | .map(|res| res.map_err(ConstraintViolation::LengthMap))
|
4363 + | .transpose()?,
|
4364 + | },
|
4531 4365 | )
|
4532 - | .transpose()?
|
4533 - | ,
|
4534 - | range_long_set_query: self.range_long_set_query
|
4535 - | .map(|v| match v {
|
4536 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4537 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4538 - | })
|
4539 - | .map(|res|
|
4540 - | res.map_err(ConstraintViolation::RangeLongSetQuery)
|
4366 + | }
|
4367 + | }
|
4368 + | }
|
4369 + | /// See [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
4370 + | pub mod query_params_targeting_map_of_enum_string_operation_input {
|
4371 + |
|
4372 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4373 + | /// Holds one variant for each of the ways the builder can fail.
|
4374 + | #[non_exhaustive]
|
4375 + | #[allow(clippy::enum_variant_names)]
|
4376 + | pub enum ConstraintViolation {
|
4377 + | /// Constraint violation occurred building member `map_of_enum_string` when building `QueryParamsTargetingMapOfEnumStringOperationInput`.
|
4378 + | #[doc(hidden)]
|
4379 + | MapOfEnumString(crate::model::map_of_enum_string::ConstraintViolation),
|
4380 + | }
|
4381 + | impl ::std::fmt::Display for ConstraintViolation {
|
4382 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4383 + | match self {
|
4384 + | ConstraintViolation::MapOfEnumString(_) => write!(f, "constraint violation occurred building member `map_of_enum_string` when building `QueryParamsTargetingMapOfEnumStringOperationInput`"),
|
4385 + | }
|
4386 + | }
|
4387 + | }
|
4388 + | impl ::std::error::Error for ConstraintViolation {}
|
4389 + | impl ConstraintViolation {
|
4390 + | pub(crate) fn as_validation_exception_field(
|
4391 + | self,
|
4392 + | path: ::std::string::String,
|
4393 + | ) -> crate::model::ValidationExceptionField {
|
4394 + | match self {
|
4395 + | ConstraintViolation::MapOfEnumString(inner) => {
|
4396 + | inner.as_validation_exception_field(path + "/mapOfEnumString")
|
4397 + | }
|
4398 + | }
|
4399 + | }
|
4400 + | }
|
4401 + | impl ::std::convert::From<ConstraintViolation>
|
4402 + | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4403 + | {
|
4404 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4405 + | let first_validation_exception_field =
|
4406 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4407 + | let validation_exception = crate::error::ValidationException {
|
4408 + | message: format!(
|
4409 + | "1 validation error detected. {}",
|
4410 + | &first_validation_exception_field.message
|
4411 + | ),
|
4412 + | field_list: Some(vec![first_validation_exception_field]),
|
4413 + | };
|
4414 + | Self::ConstraintViolation(
|
4415 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4416 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4541 4417 | )
|
4542 - | .transpose()?
|
4543 - | ,
|
4544 - | enum_string_list_query: self.enum_string_list_query
|
4418 + | }
|
4419 + | }
|
4420 + | impl ::std::convert::From<Builder>
|
4421 + | for crate::constrained::MaybeConstrained<
|
4422 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
4423 + | >
|
4424 + | {
|
4425 + | fn from(builder: Builder) -> Self {
|
4426 + | Self::Unconstrained(builder)
|
4427 + | }
|
4428 + | }
|
4429 + | impl ::std::convert::TryFrom<Builder>
|
4430 + | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
4431 + | {
|
4432 + | type Error = ConstraintViolation;
|
4433 + |
|
4434 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4435 + | builder.build()
|
4436 + | }
|
4437 + | }
|
4438 + | /// A builder for [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
4439 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4440 + | pub struct Builder {
|
4441 + | pub(crate) map_of_enum_string: ::std::option::Option<
|
4442 + | crate::constrained::MaybeConstrained<
|
4443 + | crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained,
|
4444 + | >,
|
4445 + | >,
|
4446 + | }
|
4447 + | impl Builder {
|
4448 + | #[allow(missing_docs)] // documentation missing in model
|
4449 + | pub fn map_of_enum_string(
|
4450 + | mut self,
|
4451 + | input: ::std::option::Option<
|
4452 + | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
4453 + | >,
|
4454 + | ) -> Self {
|
4455 + | self.map_of_enum_string =
|
4456 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
4457 + | self
|
4458 + | }
|
4459 + | #[allow(missing_docs)] // documentation missing in model
|
4460 + | pub(crate) fn set_map_of_enum_string(
|
4461 + | mut self,
|
4462 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained>>>,
|
4463 + | ) -> Self {
|
4464 + | self.map_of_enum_string = input.map(|v| v.into());
|
4465 + | self
|
4466 + | }
|
4467 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
4468 + | ///
|
4469 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput) if a [`ConstraintViolation`] occurs.
|
4470 + | ///
|
4471 + | pub fn build(
|
4472 + | self,
|
4473 + | ) -> Result<
|
4474 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
4475 + | ConstraintViolation,
|
4476 + | > {
|
4477 + | self.build_enforcing_all_constraints()
|
4478 + | }
|
4479 + | fn build_enforcing_all_constraints(
|
4480 + | self,
|
4481 + | ) -> Result<
|
4482 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
4483 + | ConstraintViolation,
|
4484 + | > {
|
4485 + | Ok(
|
4486 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
4487 + | map_of_enum_string: self
|
4488 + | .map_of_enum_string
|
4545 4489 | .map(|v| match v {
|
4546 4490 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4547 4491 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4548 4492 | })
|
4549 - | .map(|res|
|
4550 - | res.map(|v| v.into()).map_err(ConstraintViolation::EnumStringListQuery)
|
4551 - | )
|
4552 - | .transpose()?
|
4553 - | ,
|
4554 - | }
|
4493 + | .map(|res| {
|
4494 + | res.map(|v| v.into())
|
4495 + | .map_err(ConstraintViolation::MapOfEnumString)
|
4496 + | })
|
4497 + | .transpose()?,
|
4498 + | },
|
4555 4499 | )
|
4556 4500 | }
|
4557 4501 | }
|
4558 4502 | }
|
4559 - | /// See [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
4560 - | pub mod constrained_shapes_only_in_output_operation_input {
|
4503 + | /// See [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
4504 + | pub mod non_streaming_blob_operation_input {
|
4561 4505 |
|
4562 - | impl ::std::convert::From<Builder> for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
4506 + | impl ::std::convert::From<Builder> for crate::input::NonStreamingBlobOperationInput {
|
4563 4507 | fn from(builder: Builder) -> Self {
|
4564 4508 | builder.build()
|
4565 4509 | }
|
4566 4510 | }
|
4567 - | /// A builder for [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
4511 + | /// A builder for [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
4568 4512 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4569 - | pub struct Builder {}
|
4513 + | pub struct Builder {
|
4514 + | pub(crate) non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
4515 + | }
|
4570 4516 | impl Builder {
|
4571 - | /// Consumes the builder and constructs a [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
4572 - | pub fn build(self) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
4517 + | #[allow(missing_docs)] // documentation missing in model
|
4518 + | pub fn non_streaming_blob(
|
4519 + | mut self,
|
4520 + | input: ::std::option::Option<::aws_smithy_types::Blob>,
|
4521 + | ) -> Self {
|
4522 + | self.non_streaming_blob = input;
|
4523 + | self
|
4524 + | }
|
4525 + | #[allow(missing_docs)] // documentation missing in model
|
4526 + | pub(crate) fn set_non_streaming_blob(
|
4527 + | mut self,
|
4528 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
|
4529 + | ) -> Self {
|
4530 + | self.non_streaming_blob = input.map(|v| v.into());
|
4531 + | self
|
4532 + | }
|
4533 + | /// Consumes the builder and constructs a [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
4534 + | pub fn build(self) -> crate::input::NonStreamingBlobOperationInput {
|
4573 4535 | self.build_enforcing_all_constraints()
|
4574 4536 | }
|
4575 - | fn build_enforcing_all_constraints(
|
4576 - | self,
|
4577 - | ) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
4578 - | crate::input::ConstrainedShapesOnlyInOutputOperationInput {}
|
4537 + | fn build_enforcing_all_constraints(self) -> crate::input::NonStreamingBlobOperationInput {
|
4538 + | crate::input::NonStreamingBlobOperationInput {
|
4539 + | non_streaming_blob: self.non_streaming_blob,
|
4540 + | }
|
4579 4541 | }
|
4580 4542 | }
|
4581 4543 | }
|
4582 - | /// See [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
4583 - | pub mod constrained_shapes_operation_input {
|
4544 + | /// See [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
4545 + | pub mod streaming_blob_operation_input {
|
4546 + |
|
4547 + | impl ::std::convert::From<Builder> for crate::input::StreamingBlobOperationInput {
|
4548 + | fn from(builder: Builder) -> Self {
|
4549 + | builder.build()
|
4550 + | }
|
4551 + | }
|
4552 + | /// A builder for [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
4553 + | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
4554 + | pub struct Builder {
|
4555 + | pub(crate) streaming_blob:
|
4556 + | ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
4557 + | }
|
4558 + | impl Builder {
|
4559 + | #[allow(missing_docs)] // documentation missing in model
|
4560 + | pub fn streaming_blob(
|
4561 + | mut self,
|
4562 + | input: ::aws_smithy_types::byte_stream::ByteStream,
|
4563 + | ) -> Self {
|
4564 + | self.streaming_blob = Some(input);
|
4565 + | self
|
4566 + | }
|
4567 + | #[allow(missing_docs)] // documentation missing in model
|
4568 + | pub(crate) fn set_streaming_blob(
|
4569 + | mut self,
|
4570 + | input: impl ::std::convert::Into<::aws_smithy_types::byte_stream::ByteStream>,
|
4571 + | ) -> Self {
|
4572 + | self.streaming_blob = Some(input.into());
|
4573 + | self
|
4574 + | }
|
4575 + | /// Consumes the builder and constructs a [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
4576 + | pub fn build(self) -> crate::input::StreamingBlobOperationInput {
|
4577 + | self.build_enforcing_all_constraints()
|
4578 + | }
|
4579 + | fn build_enforcing_all_constraints(self) -> crate::input::StreamingBlobOperationInput {
|
4580 + | crate::input::StreamingBlobOperationInput {
|
4581 + | streaming_blob: self.streaming_blob.unwrap_or_default(),
|
4582 + | }
|
4583 + | }
|
4584 + | }
|
4585 + | }
|
4586 + | /// See [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
4587 + | pub mod event_streams_operation_input {
|
4584 4588 |
|
4585 4589 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4586 4590 | /// Holds one variant for each of the ways the builder can fail.
|
4587 4591 | #[non_exhaustive]
|
4588 4592 | #[allow(clippy::enum_variant_names)]
|
4589 4593 | pub enum ConstraintViolation {
|
4590 - | /// `con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`.
|
4591 - | MissingConA,
|
4592 - | /// Constraint violation occurred building member `con_a` when building `ConstrainedShapesOperationInput`.
|
4593 - | #[doc(hidden)]
|
4594 - | ConA(crate::model::con_a::ConstraintViolation),
|
4594 + | /// `events` was not provided but it is required when building `EventStreamsOperationInput`.
|
4595 + | MissingEvents,
|
4595 4596 | }
|
4596 4597 | impl ::std::fmt::Display for ConstraintViolation {
|
4597 4598 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4598 4599 | match self {
|
4599 - | ConstraintViolation::MissingConA => write!(f, "`con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`"),
|
4600 - | ConstraintViolation::ConA(_) => write!(f, "constraint violation occurred building member `con_a` when building `ConstrainedShapesOperationInput`"),
|
4600 + | ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `EventStreamsOperationInput`"),
|
4601 4601 | }
|
4602 4602 | }
|
4603 4603 | }
|
4604 4604 | impl ::std::error::Error for ConstraintViolation {}
|
4605 4605 | impl ConstraintViolation {
|
4606 4606 | pub(crate) fn as_validation_exception_field(
|
4607 4607 | self,
|
4608 4608 | path: ::std::string::String,
|
4609 4609 | ) -> crate::model::ValidationExceptionField {
|
4610 4610 | match self {
|
4611 - | ConstraintViolation::MissingConA => crate::model::ValidationExceptionField {
|
4612 - | message: format!(
|
4613 - | "Value at '{}/conA' failed to satisfy constraint: Member must not be null",
|
4614 - | path
|
4615 - | ),
|
4616 - | path: path + "/conA",
|
4611 + | ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
|
4612 + | message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
|
4613 + | path: path + "/events",
|
4617 4614 | },
|
4618 - | ConstraintViolation::ConA(inner) => {
|
4619 - | inner.as_validation_exception_field(path + "/conA")
|
4620 - | }
|
4621 4615 | }
|
4622 4616 | }
|
4623 4617 | }
|
4624 4618 | impl ::std::convert::From<ConstraintViolation>
|
4625 4619 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4626 4620 | {
|
4627 4621 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4628 4622 | let first_validation_exception_field =
|
4629 4623 | constraint_violation.as_validation_exception_field("".to_owned());
|
4630 4624 | let validation_exception = crate::error::ValidationException {
|
4631 4625 | message: format!(
|
4632 4626 | "1 validation error detected. {}",
|
4633 4627 | &first_validation_exception_field.message
|
4634 4628 | ),
|
4635 4629 | field_list: Some(vec![first_validation_exception_field]),
|
4636 4630 | };
|
4637 4631 | Self::ConstraintViolation(
|
4638 4632 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4639 4633 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4640 4634 | )
|
4641 4635 | }
|
4642 4636 | }
|
4643 4637 | impl ::std::convert::From<Builder>
|
4644 - | for crate::constrained::MaybeConstrained<crate::input::ConstrainedShapesOperationInput>
|
4638 + | for crate::constrained::MaybeConstrained<crate::input::EventStreamsOperationInput>
|
4645 4639 | {
|
4646 4640 | fn from(builder: Builder) -> Self {
|
4647 4641 | Self::Unconstrained(builder)
|
4648 4642 | }
|
4649 4643 | }
|
4650 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedShapesOperationInput {
|
4644 + | impl ::std::convert::TryFrom<Builder> for crate::input::EventStreamsOperationInput {
|
4651 4645 | type Error = ConstraintViolation;
|
4652 4646 |
|
4653 4647 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4654 4648 | builder.build()
|
4655 4649 | }
|
4656 4650 | }
|
4657 - | /// A builder for [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
4658 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4651 + | /// A builder for [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
4652 + | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
4659 4653 | pub struct Builder {
|
4660 - | pub(crate) con_a:
|
4661 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
4654 + | pub(crate) events: ::std::option::Option<
|
4655 + | ::aws_smithy_http::event_stream::Receiver<
|
4656 + | crate::model::Event,
|
4657 + | crate::error::EventError,
|
4658 + | >,
|
4659 + | >,
|
4662 4660 | }
|
4663 4661 | impl Builder {
|
4664 4662 | #[allow(missing_docs)] // documentation missing in model
|
4665 - | pub fn con_a(mut self, input: crate::model::ConA) -> Self {
|
4666 - | self.con_a = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
4663 + | pub fn events(
|
4664 + | mut self,
|
4665 + | input: ::aws_smithy_http::event_stream::Receiver<
|
4666 + | crate::model::Event,
|
4667 + | crate::error::EventError,
|
4668 + | >,
|
4669 + | ) -> Self {
|
4670 + | self.events = Some(input);
|
4667 4671 | self
|
4668 4672 | }
|
4669 4673 | #[allow(missing_docs)] // documentation missing in model
|
4670 - | pub(crate) fn set_con_a(
|
4674 + | pub(crate) fn set_events(
|
4671 4675 | mut self,
|
4672 - | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
4676 + | input: impl ::std::convert::Into<
|
4677 + | ::aws_smithy_http::event_stream::Receiver<
|
4678 + | crate::model::Event,
|
4679 + | crate::error::EventError,
|
4680 + | >,
|
4681 + | >,
|
4673 4682 | ) -> Self {
|
4674 - | self.con_a = Some(input.into());
|
4683 + | self.events = Some(input.into());
|
4675 4684 | self
|
4676 4685 | }
|
4677 - | /// Consumes the builder and constructs a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
4686 + | /// Consumes the builder and constructs a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
4678 4687 | ///
|
4679 - | /// The builder fails to construct a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
4688 + | /// The builder fails to construct a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput) if a [`ConstraintViolation`] occurs.
|
4680 4689 | ///
|
4681 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
4682 4690 | pub fn build(
|
4683 4691 | self,
|
4684 - | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
4692 + | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
4685 4693 | self.build_enforcing_all_constraints()
|
4686 4694 | }
|
4687 4695 | fn build_enforcing_all_constraints(
|
4688 4696 | self,
|
4689 - | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
4690 - | Ok(crate::input::ConstrainedShapesOperationInput {
|
4691 - | con_a: self
|
4692 - | .con_a
|
4693 - | .map(|v| match v {
|
4694 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4695 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4696 - | })
|
4697 - | .map(|res| res.map_err(ConstraintViolation::ConA))
|
4698 - | .transpose()?
|
4699 - | .ok_or(ConstraintViolation::MissingConA)?,
|
4697 + | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
4698 + | Ok(crate::input::EventStreamsOperationInput {
|
4699 + | events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
|
4700 4700 | })
|
4701 4701 | }
|
4702 4702 | }
|
4703 4703 | }
|