1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 |
|
3 - | impl crate::constrained::Constrained for crate::model::RecursiveUnionOne {
|
4 - | type Unconstrained =
|
5 - | crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained;
|
3 + | impl crate::constrained::Constrained for crate::model::EnumUnion {
|
4 + | type Unconstrained = crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained;
|
6 5 | }
|
7 6 |
|
8 - | impl From<crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained>
|
9 - | for crate::constrained::MaybeConstrained<crate::model::RecursiveUnionOne>
|
7 + | impl From<crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained>
|
8 + | for crate::constrained::MaybeConstrained<crate::model::EnumUnion>
|
10 9 | {
|
11 - | fn from(
|
12 - | value: crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained,
|
13 - | ) -> Self {
|
10 + | fn from(value: crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained) -> Self {
|
14 11 | Self::Unconstrained(value)
|
15 12 | }
|
16 13 | }
|
17 14 |
|
18 - | impl crate::constrained::Constrained for crate::model::RecursiveUnionTwo {
|
15 + | impl crate::constrained::Constrained for crate::model::PatternUnion {
|
19 16 | type Unconstrained =
|
20 - | crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained;
|
17 + | crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained;
|
21 18 | }
|
22 19 |
|
23 - | impl From<crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained>
|
24 - | for crate::constrained::MaybeConstrained<crate::model::RecursiveUnionTwo>
|
20 + | impl From<crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained>
|
21 + | for crate::constrained::MaybeConstrained<crate::model::PatternUnion>
|
25 22 | {
|
26 23 | fn from(
|
27 - | value: crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained,
|
24 + | value: crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained,
|
28 25 | ) -> Self {
|
29 26 | Self::Unconstrained(value)
|
30 27 | }
|
31 28 | }
|
32 29 |
|
33 30 | impl crate::constrained::Constrained for crate::model::PatternUnionOverride {
|
34 31 | type Unconstrained = crate::unconstrained::pattern_union_override_unconstrained::PatternUnionOverrideUnconstrained;
|
35 32 | }
|
36 33 |
|
37 34 | impl From<crate::unconstrained::pattern_union_override_unconstrained::PatternUnionOverrideUnconstrained> for crate::constrained::MaybeConstrained<crate::model::PatternUnionOverride> {
|
38 35 | fn from(value: crate::unconstrained::pattern_union_override_unconstrained::PatternUnionOverrideUnconstrained) -> Self {
|
39 36 | Self::Unconstrained(value)
|
40 37 | }
|
41 38 | }
|
42 39 |
|
43 - | impl crate::constrained::Constrained for crate::model::PatternUnion {
|
40 + | impl crate::constrained::Constrained for crate::model::RecursiveUnionOne {
|
44 41 | type Unconstrained =
|
45 - | crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained;
|
42 + | crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained;
|
46 43 | }
|
47 44 |
|
48 - | impl From<crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained>
|
49 - | for crate::constrained::MaybeConstrained<crate::model::PatternUnion>
|
45 + | impl From<crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained>
|
46 + | for crate::constrained::MaybeConstrained<crate::model::RecursiveUnionOne>
|
50 47 | {
|
51 48 | fn from(
|
52 - | value: crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained,
|
49 + | value: crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained,
|
53 50 | ) -> Self {
|
54 51 | Self::Unconstrained(value)
|
55 52 | }
|
56 53 | }
|
57 54 |
|
58 - | impl crate::constrained::Constrained for crate::model::EnumUnion {
|
59 - | type Unconstrained = crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained;
|
55 + | impl crate::constrained::Constrained for crate::model::RecursiveUnionTwo {
|
56 + | type Unconstrained =
|
57 + | crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained;
|
60 58 | }
|
61 59 |
|
62 - | impl From<crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained>
|
63 - | for crate::constrained::MaybeConstrained<crate::model::EnumUnion>
|
60 + | impl From<crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained>
|
61 + | for crate::constrained::MaybeConstrained<crate::model::RecursiveUnionTwo>
|
64 62 | {
|
65 - | fn from(value: crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained) -> Self {
|
63 + | fn from(
|
64 + | value: crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained,
|
65 + | ) -> Self {
|
66 66 | Self::Unconstrained(value)
|
67 67 | }
|
68 68 | }
|
69 + | pub(crate) mod enum_list_unconstrained {
|
69 70 |
|
70 - | pub(crate) mod recursive_union_one_unconstrained {
|
71 - |
|
72 - | #[allow(clippy::enum_variant_names)]
|
73 71 | #[derive(Debug, Clone)]
|
74 - | pub(crate) enum RecursiveUnionOneUnconstrained {
|
75 - | String(::std::string::String),
|
76 - | Union(::std::boxed::Box<crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained>),
|
77 - | }
|
78 - | impl ::std::convert::TryFrom<RecursiveUnionOneUnconstrained> for crate::model::RecursiveUnionOne {
|
79 - | type Error = crate::model::recursive_union_one::ConstraintViolation;
|
72 + | pub(crate) struct EnumListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
80 73 |
|
81 - | fn try_from(
|
82 - | value: RecursiveUnionOneUnconstrained,
|
83 - | ) -> ::std::result::Result<Self, Self::Error> {
|
84 - | Ok(
|
85 - | match value {
|
86 - | crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained::String(unconstrained) => Self::String(
|
87 - | unconstrained
|
88 - | .try_into()
|
89 - |
|
90 - |
|
91 - | .map_err(Self::Error::String)?
|
92 - | ),
|
93 - | crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained::Union(unconstrained) => Self::Union(
|
94 - | (*unconstrained)
|
95 - | .try_into()
|
96 - | .map(Box::new)
|
97 - | .map_err(Box::new)
|
98 - | .map_err(Self::Error::Union)?
|
99 - | ),
|
74 + | impl From<EnumListUnconstrained>
|
75 + | for crate::constrained::MaybeConstrained<
|
76 + | crate::constrained::enum_list_constrained::EnumListConstrained,
|
77 + | >
|
78 + | {
|
79 + | fn from(value: EnumListUnconstrained) -> Self {
|
80 + | Self::Unconstrained(value)
|
100 81 | }
|
101 - | )
|
82 + | }
|
83 + | impl std::convert::TryFrom<EnumListUnconstrained>
|
84 + | for crate::constrained::enum_list_constrained::EnumListConstrained
|
85 + | {
|
86 + | type Error = crate::model::enum_list::ConstraintViolation;
|
87 + | fn try_from(value: EnumListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
88 + | let res: ::std::result::Result<
|
89 + | ::std::vec::Vec<crate::model::EnumString>,
|
90 + | (usize, crate::model::enum_string::ConstraintViolation),
|
91 + | > = value
|
92 + | .0
|
93 + | .into_iter()
|
94 + | .enumerate()
|
95 + | .map(|(idx, inner)| {
|
96 + | inner
|
97 + | .try_into()
|
98 + | .map_err(|inner_violation| (idx, inner_violation))
|
99 + | })
|
100 + | .collect();
|
101 + | let inner =
|
102 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
103 + | Ok(Self(inner))
|
102 104 | }
|
103 105 | }
|
104 106 | }
|
105 - | pub(crate) mod recursive_union_two_unconstrained {
|
107 + | pub(crate) mod enum_map_unconstrained {
|
106 108 |
|
107 - | #[allow(clippy::enum_variant_names)]
|
108 109 | #[derive(Debug, Clone)]
|
109 - | pub(crate) enum RecursiveUnionTwoUnconstrained {
|
110 - | String(::std::string::String),
|
111 - | Union(
|
112 - | crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained,
|
113 - | ),
|
114 - | }
|
115 - | impl ::std::convert::TryFrom<RecursiveUnionTwoUnconstrained> for crate::model::RecursiveUnionTwo {
|
116 - | type Error = crate::model::recursive_union_two::ConstraintViolation;
|
110 + | pub(crate) struct EnumMapUnconstrained(
|
111 + | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
112 + | );
|
117 113 |
|
118 - | fn try_from(
|
119 - | value: RecursiveUnionTwoUnconstrained,
|
120 - | ) -> ::std::result::Result<Self, Self::Error> {
|
121 - | Ok(
|
122 - | match value {
|
123 - | crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained::String(unconstrained) => Self::String(
|
124 - | unconstrained
|
125 - | .try_into()
|
126 - |
|
127 - |
|
128 - | .map_err(Self::Error::String)?
|
129 - | ),
|
130 - | crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained::Union(unconstrained) => Self::Union(
|
131 - | unconstrained
|
132 - | .try_into()
|
133 - |
|
134 - |
|
135 - | .map_err(Self::Error::Union)?
|
136 - | ),
|
114 + | impl From<EnumMapUnconstrained>
|
115 + | for crate::constrained::MaybeConstrained<
|
116 + | crate::constrained::enum_map_constrained::EnumMapConstrained,
|
117 + | >
|
118 + | {
|
119 + | fn from(value: EnumMapUnconstrained) -> Self {
|
120 + | Self::Unconstrained(value)
|
137 121 | }
|
138 - | )
|
122 + | }
|
123 + | impl std::convert::TryFrom<EnumMapUnconstrained>
|
124 + | for crate::constrained::enum_map_constrained::EnumMapConstrained
|
125 + | {
|
126 + | type Error = crate::model::enum_map::ConstraintViolation;
|
127 + | fn try_from(value: EnumMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
128 + | let res: ::std::result::Result<
|
129 + | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
130 + | Self::Error,
|
131 + | > = value
|
132 + | .0
|
133 + | .into_iter()
|
134 + | .map(|(k, v)| {
|
135 + | let k: crate::model::EnumString = k.try_into().map_err(Self::Error::Key)?;
|
136 + |
|
137 + | match crate::model::EnumString::try_from(v) {
|
138 + | Ok(v) => Ok((k, v)),
|
139 + | Err(inner_constraint_violation) => {
|
140 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
141 + | }
|
142 + | }
|
143 + | })
|
144 + | .collect();
|
145 + | let hm = res?;
|
146 + | Ok(Self(hm))
|
139 147 | }
|
140 148 | }
|
141 149 | }
|
142 - | pub(crate) mod union_set_unconstrained {
|
150 + | pub(crate) mod enum_union_unconstrained {
|
143 151 |
|
152 + | #[allow(clippy::enum_variant_names)]
|
144 153 | #[derive(Debug, Clone)]
|
145 - | pub(crate) struct UnionSetUnconstrained(pub(crate) std::vec::Vec<crate::model::FooUnion>);
|
146 - |
|
147 - | impl From<UnionSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::UnionSet> {
|
148 - | fn from(value: UnionSetUnconstrained) -> Self {
|
149 - | Self::Unconstrained(value)
|
150 - | }
|
154 + | pub(crate) enum EnumUnionUnconstrained {
|
155 + | First(::std::string::String),
|
156 + | Second(::std::string::String),
|
151 157 | }
|
152 - | impl std::convert::TryFrom<UnionSetUnconstrained> for crate::model::UnionSet {
|
153 - | type Error = crate::model::union_set::ConstraintViolation;
|
154 - | fn try_from(value: UnionSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
155 - | let inner = value.0;
|
156 - | Self::try_from(inner)
|
158 + | impl ::std::convert::TryFrom<EnumUnionUnconstrained> for crate::model::EnumUnion {
|
159 + | type Error = crate::model::enum_union::ConstraintViolation;
|
160 + |
|
161 + | fn try_from(value: EnumUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
|
162 + | Ok(match value {
|
163 + | crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained::First(
|
164 + | unconstrained,
|
165 + | ) => Self::First(unconstrained.try_into().map_err(Self::Error::First)?),
|
166 + | crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained::Second(
|
167 + | unconstrained,
|
168 + | ) => Self::Second(unconstrained.try_into().map_err(Self::Error::Second)?),
|
169 + | })
|
157 170 | }
|
158 171 | }
|
159 172 | }
|
160 - | pub(crate) mod structure_set_with_no_key_unconstrained {
|
173 + | pub(crate) mod length_list_unconstrained {
|
161 174 |
|
162 175 | #[derive(Debug, Clone)]
|
163 - | pub(crate) struct StructureSetWithNoKeyUnconstrained(
|
164 - | pub(crate) std::vec::Vec<crate::model::missing_key_structure::Builder>,
|
165 - | );
|
176 + | pub(crate) struct LengthListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
166 177 |
|
167 - | impl From<StructureSetWithNoKeyUnconstrained>
|
168 - | for crate::constrained::MaybeConstrained<crate::model::StructureSetWithNoKey>
|
178 + | impl From<LengthListUnconstrained>
|
179 + | for crate::constrained::MaybeConstrained<crate::model::LengthList>
|
169 180 | {
|
170 - | fn from(value: StructureSetWithNoKeyUnconstrained) -> Self {
|
181 + | fn from(value: LengthListUnconstrained) -> Self {
|
171 182 | Self::Unconstrained(value)
|
172 183 | }
|
173 184 | }
|
174 - | impl std::convert::TryFrom<StructureSetWithNoKeyUnconstrained>
|
175 - | for crate::model::StructureSetWithNoKey
|
176 - | {
|
177 - | type Error = crate::model::structure_set_with_no_key::ConstraintViolation;
|
178 - | fn try_from(
|
179 - | value: StructureSetWithNoKeyUnconstrained,
|
180 - | ) -> std::result::Result<Self, Self::Error> {
|
185 + | impl std::convert::TryFrom<LengthListUnconstrained> for crate::model::LengthList {
|
186 + | type Error = crate::model::length_list::ConstraintViolation;
|
187 + | fn try_from(value: LengthListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
181 188 | let res: ::std::result::Result<
|
182 - | ::std::vec::Vec<crate::model::MissingKeyStructure>,
|
183 - | (
|
184 - | usize,
|
185 - | crate::model::missing_key_structure::ConstraintViolation,
|
186 - | ),
|
189 + | ::std::vec::Vec<crate::model::LengthString>,
|
190 + | (usize, crate::model::length_string::ConstraintViolation),
|
187 191 | > = value
|
188 192 | .0
|
189 193 | .into_iter()
|
190 194 | .enumerate()
|
191 195 | .map(|(idx, inner)| {
|
192 196 | inner
|
193 197 | .try_into()
|
194 198 | .map_err(|inner_violation| (idx, inner_violation))
|
195 199 | })
|
196 200 | .collect();
|
197 201 | let inner =
|
198 202 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
199 203 | Self::try_from(inner)
|
200 204 | }
|
201 205 | }
|
202 206 | }
|
203 - | pub(crate) mod structure_set_unconstrained {
|
207 + | pub(crate) mod length_map_unconstrained {
|
204 208 |
|
205 209 | #[derive(Debug, Clone)]
|
206 - | pub(crate) struct StructureSetUnconstrained(
|
207 - | pub(crate) std::vec::Vec<crate::model::GreetingStruct>,
|
210 + | pub(crate) struct LengthMapUnconstrained(
|
211 + | pub(crate) std::collections::HashMap<
|
212 + | ::std::string::String,
|
213 + | crate::unconstrained::length_list_unconstrained::LengthListUnconstrained,
|
214 + | >,
|
208 215 | );
|
209 216 |
|
210 - | impl From<StructureSetUnconstrained>
|
211 - | for crate::constrained::MaybeConstrained<crate::model::StructureSet>
|
217 + | impl From<LengthMapUnconstrained>
|
218 + | for crate::constrained::MaybeConstrained<crate::model::LengthMap>
|
212 219 | {
|
213 - | fn from(value: StructureSetUnconstrained) -> Self {
|
220 + | fn from(value: LengthMapUnconstrained) -> Self {
|
214 221 | Self::Unconstrained(value)
|
215 222 | }
|
216 223 | }
|
217 - | impl std::convert::TryFrom<StructureSetUnconstrained> for crate::model::StructureSet {
|
218 - | type Error = crate::model::structure_set::ConstraintViolation;
|
219 - | fn try_from(value: StructureSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
220 - | let inner = value.0;
|
221 - | Self::try_from(inner)
|
222 - | }
|
223 - | }
|
224 - | }
|
225 - | pub(crate) mod list_set_unconstrained {
|
226 - |
|
227 - | #[derive(Debug, Clone)]
|
228 - | pub(crate) struct ListSetUnconstrained(
|
229 - | pub(crate) std::vec::Vec<::std::vec::Vec<::std::string::String>>,
|
230 - | );
|
224 + | impl std::convert::TryFrom<LengthMapUnconstrained> for crate::model::LengthMap {
|
225 + | type Error = crate::model::length_map::ConstraintViolation;
|
226 + | fn try_from(value: LengthMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
227 + | let res: ::std::result::Result<
|
228 + | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthList>,
|
229 + | Self::Error,
|
230 + | > = value
|
231 + | .0
|
232 + | .into_iter()
|
233 + | .map(|(k, v)| {
|
234 + | let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
|
231 235 |
|
232 - | impl From<ListSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ListSet> {
|
233 - | fn from(value: ListSetUnconstrained) -> Self {
|
234 - | Self::Unconstrained(value)
|
235 - | }
|
236 - | }
|
237 - | impl std::convert::TryFrom<ListSetUnconstrained> for crate::model::ListSet {
|
238 - | type Error = crate::model::list_set::ConstraintViolation;
|
239 - | fn try_from(value: ListSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
240 - | let inner = value.0;
|
241 - | Self::try_from(inner)
|
236 + | match crate::model::LengthList::try_from(v) {
|
237 + | Ok(v) => Ok((k, v)),
|
238 + | Err(inner_constraint_violation) => {
|
239 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
240 + | }
|
241 + | }
|
242 + | })
|
243 + | .collect();
|
244 + | let hm = res?;
|
245 + | Self::try_from(hm)
|
242 246 | }
|
243 247 | }
|
244 248 | }
|
245 - | pub(crate) mod integer_enum_set_unconstrained {
|
249 + | pub(crate) mod pattern_list_unconstrained {
|
246 250 |
|
247 251 | #[derive(Debug, Clone)]
|
248 - | pub(crate) struct IntegerEnumSetUnconstrained(pub(crate) std::vec::Vec<i32>);
|
252 + | pub(crate) struct PatternListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
249 253 |
|
250 - | impl From<IntegerEnumSetUnconstrained>
|
251 - | for crate::constrained::MaybeConstrained<crate::model::IntegerEnumSet>
|
254 + | impl From<PatternListUnconstrained>
|
255 + | for crate::constrained::MaybeConstrained<
|
256 + | crate::constrained::pattern_list_constrained::PatternListConstrained,
|
257 + | >
|
252 258 | {
|
253 - | fn from(value: IntegerEnumSetUnconstrained) -> Self {
|
259 + | fn from(value: PatternListUnconstrained) -> Self {
|
254 260 | Self::Unconstrained(value)
|
255 261 | }
|
256 262 | }
|
257 - | impl std::convert::TryFrom<IntegerEnumSetUnconstrained> for crate::model::IntegerEnumSet {
|
258 - | type Error = crate::model::integer_enum_set::ConstraintViolation;
|
259 - | fn try_from(value: IntegerEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
260 - | let inner = value.0;
|
261 - | Self::try_from(inner)
|
262 - | }
|
263 - | }
|
264 - | }
|
265 - | pub(crate) mod foo_enum_set_unconstrained {
|
266 - |
|
267 - | #[derive(Debug, Clone)]
|
268 - | pub(crate) struct FooEnumSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
269 - |
|
270 - | impl From<FooEnumSetUnconstrained>
|
271 - | for crate::constrained::MaybeConstrained<crate::model::FooEnumSet>
|
263 + | impl std::convert::TryFrom<PatternListUnconstrained>
|
264 + | for crate::constrained::pattern_list_constrained::PatternListConstrained
|
272 265 | {
|
273 - | fn from(value: FooEnumSetUnconstrained) -> Self {
|
274 - | Self::Unconstrained(value)
|
275 - | }
|
276 - | }
|
277 - | impl std::convert::TryFrom<FooEnumSetUnconstrained> for crate::model::FooEnumSet {
|
278 - | type Error = crate::model::foo_enum_set::ConstraintViolation;
|
279 - | fn try_from(value: FooEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
266 + | type Error = crate::model::pattern_list::ConstraintViolation;
|
267 + | fn try_from(value: PatternListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
280 268 | let res: ::std::result::Result<
|
281 - | ::std::vec::Vec<crate::model::FooEnum>,
|
282 - | (usize, crate::model::foo_enum::ConstraintViolation),
|
269 + | ::std::vec::Vec<crate::model::PatternString>,
|
270 + | (usize, crate::model::pattern_string::ConstraintViolation),
|
283 271 | > = value
|
284 272 | .0
|
285 273 | .into_iter()
|
286 274 | .enumerate()
|
287 275 | .map(|(idx, inner)| {
|
288 276 | inner
|
289 277 | .try_into()
|
290 278 | .map_err(|inner_violation| (idx, inner_violation))
|
291 279 | })
|
292 280 | .collect();
|
293 281 | let inner =
|
294 282 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
295 - | Self::try_from(inner)
|
283 + | Ok(Self(inner))
|
296 284 | }
|
297 285 | }
|
298 286 | }
|
299 - | pub(crate) mod http_date_set_unconstrained {
|
287 + | pub(crate) mod pattern_map_unconstrained {
|
300 288 |
|
301 289 | #[derive(Debug, Clone)]
|
302 - | pub(crate) struct HttpDateSetUnconstrained(
|
303 - | pub(crate) std::vec::Vec<::aws_smithy_types::DateTime>,
|
290 + | pub(crate) struct PatternMapUnconstrained(
|
291 + | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
304 292 | );
|
305 293 |
|
306 - | impl From<HttpDateSetUnconstrained>
|
307 - | for crate::constrained::MaybeConstrained<crate::model::HttpDateSet>
|
294 + | impl From<PatternMapUnconstrained>
|
295 + | for crate::constrained::MaybeConstrained<
|
296 + | crate::constrained::pattern_map_constrained::PatternMapConstrained,
|
297 + | >
|
308 298 | {
|
309 - | fn from(value: HttpDateSetUnconstrained) -> Self {
|
299 + | fn from(value: PatternMapUnconstrained) -> Self {
|
310 300 | Self::Unconstrained(value)
|
311 301 | }
|
312 302 | }
|
313 - | impl std::convert::TryFrom<HttpDateSetUnconstrained> for crate::model::HttpDateSet {
|
314 - | type Error = crate::model::http_date_set::ConstraintViolation;
|
315 - | fn try_from(value: HttpDateSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
316 - | let inner = value.0;
|
317 - | Self::try_from(inner)
|
303 + | impl std::convert::TryFrom<PatternMapUnconstrained>
|
304 + | for crate::constrained::pattern_map_constrained::PatternMapConstrained
|
305 + | {
|
306 + | type Error = crate::model::pattern_map::ConstraintViolation;
|
307 + | fn try_from(value: PatternMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
308 + | let res: ::std::result::Result<
|
309 + | ::std::collections::HashMap<
|
310 + | crate::model::PatternString,
|
311 + | crate::model::PatternString,
|
312 + | >,
|
313 + | Self::Error,
|
314 + | > = value
|
315 + | .0
|
316 + | .into_iter()
|
317 + | .map(|(k, v)| {
|
318 + | let k: crate::model::PatternString = k.try_into().map_err(Self::Error::Key)?;
|
319 + |
|
320 + | match crate::model::PatternString::try_from(v) {
|
321 + | Ok(v) => Ok((k, v)),
|
322 + | Err(inner_constraint_violation) => {
|
323 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
324 + | }
|
325 + | }
|
326 + | })
|
327 + | .collect();
|
328 + | let hm = res?;
|
329 + | Ok(Self(hm))
|
318 330 | }
|
319 331 | }
|
320 332 | }
|
321 - | pub(crate) mod date_time_set_unconstrained {
|
333 + | pub(crate) mod pattern_union_unconstrained {
|
322 334 |
|
335 + | #[allow(clippy::enum_variant_names)]
|
323 336 | #[derive(Debug, Clone)]
|
324 - | pub(crate) struct DateTimeSetUnconstrained(
|
325 - | pub(crate) std::vec::Vec<::aws_smithy_types::DateTime>,
|
326 - | );
|
337 + | pub(crate) enum PatternUnionUnconstrained {
|
338 + | First(::std::string::String),
|
339 + | Second(::std::string::String),
|
340 + | }
|
341 + | impl ::std::convert::TryFrom<PatternUnionUnconstrained> for crate::model::PatternUnion {
|
342 + | type Error = crate::model::pattern_union::ConstraintViolation;
|
327 343 |
|
328 - | impl From<DateTimeSetUnconstrained>
|
329 - | for crate::constrained::MaybeConstrained<crate::model::DateTimeSet>
|
330 - | {
|
331 - | fn from(value: DateTimeSetUnconstrained) -> Self {
|
332 - | Self::Unconstrained(value)
|
344 + | fn try_from(value: PatternUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
|
345 + | Ok(
|
346 + | match value {
|
347 + | crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained::First(unconstrained) => Self::First(
|
348 + | unconstrained
|
349 + | .try_into()
|
350 + |
|
351 + |
|
352 + | .map_err(Self::Error::First)?
|
353 + | ),
|
354 + | crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained::Second(unconstrained) => Self::Second(
|
355 + | unconstrained
|
356 + | .try_into()
|
357 + |
|
358 + |
|
359 + | .map_err(Self::Error::Second)?
|
360 + | ),
|
333 361 | }
|
334 - | }
|
335 - | impl std::convert::TryFrom<DateTimeSetUnconstrained> for crate::model::DateTimeSet {
|
336 - | type Error = crate::model::date_time_set::ConstraintViolation;
|
337 - | fn try_from(value: DateTimeSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
338 - | let inner = value.0;
|
339 - | Self::try_from(inner)
|
362 + | )
|
340 363 | }
|
341 364 | }
|
342 365 | }
|
343 - | pub(crate) mod timestamp_set_unconstrained {
|
366 + | pub(crate) mod pattern_list_override_unconstrained {
|
344 367 |
|
345 368 | #[derive(Debug, Clone)]
|
346 - | pub(crate) struct TimestampSetUnconstrained(
|
347 - | pub(crate) std::vec::Vec<::aws_smithy_types::DateTime>,
|
369 + | pub(crate) struct PatternListOverrideUnconstrained(
|
370 + | pub(crate) std::vec::Vec<::std::string::String>,
|
348 371 | );
|
349 372 |
|
350 - | impl From<TimestampSetUnconstrained>
|
351 - | for crate::constrained::MaybeConstrained<crate::model::TimestampSet>
|
373 + | impl From<PatternListOverrideUnconstrained>
|
374 + | for crate::constrained::MaybeConstrained<
|
375 + | crate::constrained::pattern_list_override_constrained::PatternListOverrideConstrained,
|
376 + | >
|
352 377 | {
|
353 - | fn from(value: TimestampSetUnconstrained) -> Self {
|
354 - | Self::Unconstrained(value)
|
355 - | }
|
356 - | }
|
357 - | impl std::convert::TryFrom<TimestampSetUnconstrained> for crate::model::TimestampSet {
|
358 - | type Error = crate::model::timestamp_set::ConstraintViolation;
|
359 - | fn try_from(value: TimestampSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
360 - | let inner = value.0;
|
361 - | Self::try_from(inner)
|
362 - | }
|
363 - | }
|
364 - | }
|
365 - | pub(crate) mod long_set_unconstrained {
|
366 - |
|
367 - | #[derive(Debug, Clone)]
|
368 - | pub(crate) struct LongSetUnconstrained(pub(crate) std::vec::Vec<i64>);
|
369 - |
|
370 - | impl From<LongSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::LongSet> {
|
371 - | fn from(value: LongSetUnconstrained) -> Self {
|
378 + | fn from(value: PatternListOverrideUnconstrained) -> Self {
|
372 379 | Self::Unconstrained(value)
|
373 380 | }
|
374 381 | }
|
375 - | impl std::convert::TryFrom<LongSetUnconstrained> for crate::model::LongSet {
|
376 - | type Error = crate::model::long_set::ConstraintViolation;
|
377 - | fn try_from(value: LongSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
378 - | let inner = value.0;
|
379 - | Self::try_from(inner)
|
382 + | impl std::convert::TryFrom<PatternListOverrideUnconstrained>
|
383 + | for crate::constrained::pattern_list_override_constrained::PatternListOverrideConstrained
|
384 + | {
|
385 + | type Error = crate::model::pattern_list_override::ConstraintViolation;
|
386 + | fn try_from(
|
387 + | value: PatternListOverrideUnconstrained,
|
388 + | ) -> std::result::Result<Self, Self::Error> {
|
389 + | let res: ::std::result::Result<
|
390 + | ::std::vec::Vec<crate::model::pattern_list_override::Member>,
|
391 + | (
|
392 + | usize,
|
393 + | crate::model::pattern_list_override::member::ConstraintViolation,
|
394 + | ),
|
395 + | > = value
|
396 + | .0
|
397 + | .into_iter()
|
398 + | .enumerate()
|
399 + | .map(|(idx, inner)| {
|
400 + | inner
|
401 + | .try_into()
|
402 + | .map_err(|inner_violation| (idx, inner_violation))
|
403 + | })
|
404 + | .collect();
|
405 + | let inner =
|
406 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
407 + | Ok(Self(inner))
|
380 408 | }
|
381 409 | }
|
382 410 | }
|
383 - | pub(crate) mod integer_set_unconstrained {
|
411 + | pub(crate) mod pattern_map_override_unconstrained {
|
384 412 |
|
385 413 | #[derive(Debug, Clone)]
|
386 - | pub(crate) struct IntegerSetUnconstrained(pub(crate) std::vec::Vec<i32>);
|
414 + | pub(crate) struct PatternMapOverrideUnconstrained(
|
415 + | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
416 + | );
|
387 417 |
|
388 - | impl From<IntegerSetUnconstrained>
|
389 - | for crate::constrained::MaybeConstrained<crate::model::IntegerSet>
|
418 + | impl From<PatternMapOverrideUnconstrained>
|
419 + | for crate::constrained::MaybeConstrained<
|
420 + | crate::constrained::pattern_map_override_constrained::PatternMapOverrideConstrained,
|
421 + | >
|
390 422 | {
|
391 - | fn from(value: IntegerSetUnconstrained) -> Self {
|
423 + | fn from(value: PatternMapOverrideUnconstrained) -> Self {
|
392 424 | Self::Unconstrained(value)
|
393 425 | }
|
394 426 | }
|
395 - | impl std::convert::TryFrom<IntegerSetUnconstrained> for crate::model::IntegerSet {
|
396 - | type Error = crate::model::integer_set::ConstraintViolation;
|
397 - | fn try_from(value: IntegerSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
398 - | let inner = value.0;
|
399 - | Self::try_from(inner)
|
400 - | }
|
401 - | }
|
402 - | }
|
403 - | pub(crate) mod short_set_unconstrained {
|
404 - |
|
405 - | #[derive(Debug, Clone)]
|
406 - | pub(crate) struct ShortSetUnconstrained(pub(crate) std::vec::Vec<i16>);
|
407 - |
|
408 - | impl From<ShortSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ShortSet> {
|
409 - | fn from(value: ShortSetUnconstrained) -> Self {
|
427 + | impl std::convert::TryFrom<PatternMapOverrideUnconstrained>
|
428 + | for crate::constrained::pattern_map_override_constrained::PatternMapOverrideConstrained
|
429 + | {
|
430 + | type Error = crate::model::pattern_map_override::ConstraintViolation;
|
431 + | fn try_from(
|
432 + | value: PatternMapOverrideUnconstrained,
|
433 + | ) -> std::result::Result<Self, Self::Error> {
|
434 + | let res: ::std::result::Result<
|
435 + | ::std::collections::HashMap<
|
436 + | crate::model::pattern_map_override::Key,
|
437 + | crate::model::pattern_map_override::Value,
|
438 + | >,
|
439 + | Self::Error,
|
440 + | > = value
|
441 + | .0
|
442 + | .into_iter()
|
443 + | .map(|(k, v)| {
|
444 + | let k: crate::model::pattern_map_override::Key =
|
445 + | k.try_into().map_err(Self::Error::Key)?;
|
446 + |
|
447 + | match crate::model::pattern_map_override::Value::try_from(v) {
|
448 + | Ok(v) => Ok((k, v)),
|
449 + | Err(inner_constraint_violation) => {
|
450 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
451 + | }
|
452 + | }
|
453 + | })
|
454 + | .collect();
|
455 + | let hm = res?;
|
456 + | Ok(Self(hm))
|
457 + | }
|
458 + | }
|
459 + | }
|
460 + | pub(crate) mod pattern_union_override_unconstrained {
|
461 + |
|
462 + | #[allow(clippy::enum_variant_names)]
|
463 + | #[derive(Debug, Clone)]
|
464 + | pub(crate) enum PatternUnionOverrideUnconstrained {
|
465 + | First(::std::string::String),
|
466 + | Second(::std::string::String),
|
467 + | }
|
468 + | impl ::std::convert::TryFrom<PatternUnionOverrideUnconstrained>
|
469 + | for crate::model::PatternUnionOverride
|
470 + | {
|
471 + | type Error = crate::model::pattern_union_override::ConstraintViolation;
|
472 + |
|
473 + | fn try_from(
|
474 + | value: PatternUnionOverrideUnconstrained,
|
475 + | ) -> ::std::result::Result<Self, Self::Error> {
|
476 + | Ok(
|
477 + | match value {
|
478 + | crate::unconstrained::pattern_union_override_unconstrained::PatternUnionOverrideUnconstrained::First(unconstrained) => Self::First(
|
479 + | unconstrained
|
480 + | .try_into()
|
481 + |
|
482 + |
|
483 + | .map_err(Self::Error::First)?
|
484 + | ),
|
485 + | crate::unconstrained::pattern_union_override_unconstrained::PatternUnionOverrideUnconstrained::Second(unconstrained) => Self::Second(
|
486 + | unconstrained
|
487 + | .try_into()
|
488 + |
|
489 + |
|
490 + | .map_err(Self::Error::Second)?
|
491 + | ),
|
492 + | }
|
493 + | )
|
494 + | }
|
495 + | }
|
496 + | }
|
497 + | pub(crate) mod blob_set_unconstrained {
|
498 + |
|
499 + | #[derive(Debug, Clone)]
|
500 + | pub(crate) struct BlobSetUnconstrained(pub(crate) std::vec::Vec<::aws_smithy_types::Blob>);
|
501 + |
|
502 + | impl From<BlobSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::BlobSet> {
|
503 + | fn from(value: BlobSetUnconstrained) -> Self {
|
410 504 | Self::Unconstrained(value)
|
411 505 | }
|
412 506 | }
|
413 - | impl std::convert::TryFrom<ShortSetUnconstrained> for crate::model::ShortSet {
|
414 - | type Error = crate::model::short_set::ConstraintViolation;
|
415 - | fn try_from(value: ShortSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
507 + | impl std::convert::TryFrom<BlobSetUnconstrained> for crate::model::BlobSet {
|
508 + | type Error = crate::model::blob_set::ConstraintViolation;
|
509 + | fn try_from(value: BlobSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
416 510 | let inner = value.0;
|
417 511 | Self::try_from(inner)
|
418 512 | }
|
419 513 | }
|
420 514 | }
|
421 - | pub(crate) mod byte_set_unconstrained {
|
515 + | pub(crate) mod boolean_set_unconstrained {
|
422 516 |
|
423 517 | #[derive(Debug, Clone)]
|
424 - | pub(crate) struct ByteSetUnconstrained(pub(crate) std::vec::Vec<i8>);
|
518 + | pub(crate) struct BooleanSetUnconstrained(pub(crate) std::vec::Vec<bool>);
|
425 519 |
|
426 - | impl From<ByteSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ByteSet> {
|
427 - | fn from(value: ByteSetUnconstrained) -> Self {
|
520 + | impl From<BooleanSetUnconstrained>
|
521 + | for crate::constrained::MaybeConstrained<crate::model::BooleanSet>
|
522 + | {
|
523 + | fn from(value: BooleanSetUnconstrained) -> Self {
|
428 524 | Self::Unconstrained(value)
|
429 525 | }
|
430 526 | }
|
431 - | impl std::convert::TryFrom<ByteSetUnconstrained> for crate::model::ByteSet {
|
432 - | type Error = crate::model::byte_set::ConstraintViolation;
|
433 - | fn try_from(value: ByteSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
527 + | impl std::convert::TryFrom<BooleanSetUnconstrained> for crate::model::BooleanSet {
|
528 + | type Error = crate::model::boolean_set::ConstraintViolation;
|
529 + | fn try_from(value: BooleanSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
434 530 | let inner = value.0;
|
435 531 | Self::try_from(inner)
|
436 532 | }
|
437 533 | }
|
438 534 | }
|
439 535 | pub(crate) mod string_set_unconstrained {
|
440 536 |
|
441 537 | #[derive(Debug, Clone)]
|
442 538 | pub(crate) struct StringSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
443 539 |
|
444 540 | impl From<StringSetUnconstrained>
|
445 541 | for crate::constrained::MaybeConstrained<crate::model::StringSet>
|
446 542 | {
|
447 543 | fn from(value: StringSetUnconstrained) -> Self {
|
448 544 | Self::Unconstrained(value)
|
449 545 | }
|
450 546 | }
|
451 547 | impl std::convert::TryFrom<StringSetUnconstrained> for crate::model::StringSet {
|
452 548 | type Error = crate::model::string_set::ConstraintViolation;
|
453 549 | fn try_from(value: StringSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
454 550 | let inner = value.0;
|
455 551 | Self::try_from(inner)
|
456 552 | }
|
457 553 | }
|
458 554 | }
|
459 - | pub(crate) mod boolean_set_unconstrained {
|
555 + | pub(crate) mod byte_set_unconstrained {
|
460 556 |
|
461 557 | #[derive(Debug, Clone)]
|
462 - | pub(crate) struct BooleanSetUnconstrained(pub(crate) std::vec::Vec<bool>);
|
558 + | pub(crate) struct ByteSetUnconstrained(pub(crate) std::vec::Vec<i8>);
|
463 559 |
|
464 - | impl From<BooleanSetUnconstrained>
|
465 - | for crate::constrained::MaybeConstrained<crate::model::BooleanSet>
|
466 - | {
|
467 - | fn from(value: BooleanSetUnconstrained) -> Self {
|
560 + | impl From<ByteSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ByteSet> {
|
561 + | fn from(value: ByteSetUnconstrained) -> Self {
|
468 562 | Self::Unconstrained(value)
|
469 563 | }
|
470 564 | }
|
471 - | impl std::convert::TryFrom<BooleanSetUnconstrained> for crate::model::BooleanSet {
|
472 - | type Error = crate::model::boolean_set::ConstraintViolation;
|
473 - | fn try_from(value: BooleanSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
565 + | impl std::convert::TryFrom<ByteSetUnconstrained> for crate::model::ByteSet {
|
566 + | type Error = crate::model::byte_set::ConstraintViolation;
|
567 + | fn try_from(value: ByteSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
474 568 | let inner = value.0;
|
475 569 | Self::try_from(inner)
|
476 570 | }
|
477 571 | }
|
478 572 | }
|
479 - | pub(crate) mod blob_set_unconstrained {
|
573 + | pub(crate) mod short_set_unconstrained {
|
480 574 |
|
481 575 | #[derive(Debug, Clone)]
|
482 - | pub(crate) struct BlobSetUnconstrained(pub(crate) std::vec::Vec<::aws_smithy_types::Blob>);
|
576 + | pub(crate) struct ShortSetUnconstrained(pub(crate) std::vec::Vec<i16>);
|
483 577 |
|
484 - | impl From<BlobSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::BlobSet> {
|
485 - | fn from(value: BlobSetUnconstrained) -> Self {
|
578 + | impl From<ShortSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ShortSet> {
|
579 + | fn from(value: ShortSetUnconstrained) -> Self {
|
486 580 | Self::Unconstrained(value)
|
487 581 | }
|
488 582 | }
|
489 - | impl std::convert::TryFrom<BlobSetUnconstrained> for crate::model::BlobSet {
|
490 - | type Error = crate::model::blob_set::ConstraintViolation;
|
491 - | fn try_from(value: BlobSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
583 + | impl std::convert::TryFrom<ShortSetUnconstrained> for crate::model::ShortSet {
|
584 + | type Error = crate::model::short_set::ConstraintViolation;
|
585 + | fn try_from(value: ShortSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
492 586 | let inner = value.0;
|
493 587 | Self::try_from(inner)
|
494 588 | }
|
495 589 | }
|
496 590 | }
|
497 - | pub(crate) mod pattern_union_override_unconstrained {
|
591 + | pub(crate) mod integer_set_unconstrained {
|
498 592 |
|
499 - | #[allow(clippy::enum_variant_names)]
|
500 593 | #[derive(Debug, Clone)]
|
501 - | pub(crate) enum PatternUnionOverrideUnconstrained {
|
502 - | First(::std::string::String),
|
503 - | Second(::std::string::String),
|
504 - | }
|
505 - | impl ::std::convert::TryFrom<PatternUnionOverrideUnconstrained>
|
506 - | for crate::model::PatternUnionOverride
|
507 - | {
|
508 - | type Error = crate::model::pattern_union_override::ConstraintViolation;
|
594 + | pub(crate) struct IntegerSetUnconstrained(pub(crate) std::vec::Vec<i32>);
|
509 595 |
|
510 - | fn try_from(
|
511 - | value: PatternUnionOverrideUnconstrained,
|
512 - | ) -> ::std::result::Result<Self, Self::Error> {
|
513 - | Ok(
|
514 - | match value {
|
515 - | crate::unconstrained::pattern_union_override_unconstrained::PatternUnionOverrideUnconstrained::First(unconstrained) => Self::First(
|
516 - | unconstrained
|
517 - | .try_into()
|
518 - |
|
519 - |
|
520 - | .map_err(Self::Error::First)?
|
521 - | ),
|
522 - | crate::unconstrained::pattern_union_override_unconstrained::PatternUnionOverrideUnconstrained::Second(unconstrained) => Self::Second(
|
523 - | unconstrained
|
524 - | .try_into()
|
525 - |
|
526 - |
|
527 - | .map_err(Self::Error::Second)?
|
528 - | ),
|
596 + | impl From<IntegerSetUnconstrained>
|
597 + | for crate::constrained::MaybeConstrained<crate::model::IntegerSet>
|
598 + | {
|
599 + | fn from(value: IntegerSetUnconstrained) -> Self {
|
600 + | Self::Unconstrained(value)
|
529 601 | }
|
530 - | )
|
602 + | }
|
603 + | impl std::convert::TryFrom<IntegerSetUnconstrained> for crate::model::IntegerSet {
|
604 + | type Error = crate::model::integer_set::ConstraintViolation;
|
605 + | fn try_from(value: IntegerSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
606 + | let inner = value.0;
|
607 + | Self::try_from(inner)
|
531 608 | }
|
532 609 | }
|
533 610 | }
|
534 - | pub(crate) mod pattern_map_override_unconstrained {
|
611 + | pub(crate) mod long_set_unconstrained {
|
535 612 |
|
536 613 | #[derive(Debug, Clone)]
|
537 - | pub(crate) struct PatternMapOverrideUnconstrained(
|
538 - | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
539 - | );
|
614 + | pub(crate) struct LongSetUnconstrained(pub(crate) std::vec::Vec<i64>);
|
540 615 |
|
541 - | impl From<PatternMapOverrideUnconstrained>
|
542 - | for crate::constrained::MaybeConstrained<
|
543 - | crate::constrained::pattern_map_override_constrained::PatternMapOverrideConstrained,
|
544 - | >
|
545 - | {
|
546 - | fn from(value: PatternMapOverrideUnconstrained) -> Self {
|
616 + | impl From<LongSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::LongSet> {
|
617 + | fn from(value: LongSetUnconstrained) -> Self {
|
547 618 | Self::Unconstrained(value)
|
548 619 | }
|
549 620 | }
|
550 - | impl std::convert::TryFrom<PatternMapOverrideUnconstrained>
|
551 - | for crate::constrained::pattern_map_override_constrained::PatternMapOverrideConstrained
|
552 - | {
|
553 - | type Error = crate::model::pattern_map_override::ConstraintViolation;
|
554 - | fn try_from(
|
555 - | value: PatternMapOverrideUnconstrained,
|
556 - | ) -> std::result::Result<Self, Self::Error> {
|
557 - | let res: ::std::result::Result<
|
558 - | ::std::collections::HashMap<
|
559 - | crate::model::pattern_map_override::Key,
|
560 - | crate::model::pattern_map_override::Value,
|
561 - | >,
|
562 - | Self::Error,
|
563 - | > = value
|
564 - | .0
|
565 - | .into_iter()
|
566 - | .map(|(k, v)| {
|
567 - | let k: crate::model::pattern_map_override::Key =
|
568 - | k.try_into().map_err(Self::Error::Key)?;
|
569 - |
|
570 - | match crate::model::pattern_map_override::Value::try_from(v) {
|
571 - | Ok(v) => Ok((k, v)),
|
572 - | Err(inner_constraint_violation) => {
|
573 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
574 - | }
|
575 - | }
|
576 - | })
|
577 - | .collect();
|
578 - | let hm = res?;
|
579 - | Ok(Self(hm))
|
621 + | impl std::convert::TryFrom<LongSetUnconstrained> for crate::model::LongSet {
|
622 + | type Error = crate::model::long_set::ConstraintViolation;
|
623 + | fn try_from(value: LongSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
624 + | let inner = value.0;
|
625 + | Self::try_from(inner)
|
580 626 | }
|
581 627 | }
|
582 628 | }
|
583 - | pub(crate) mod pattern_list_override_unconstrained {
|
629 + | pub(crate) mod timestamp_set_unconstrained {
|
584 630 |
|
585 631 | #[derive(Debug, Clone)]
|
586 - | pub(crate) struct PatternListOverrideUnconstrained(
|
587 - | pub(crate) std::vec::Vec<::std::string::String>,
|
632 + | pub(crate) struct TimestampSetUnconstrained(
|
633 + | pub(crate) std::vec::Vec<::aws_smithy_types::DateTime>,
|
588 634 | );
|
589 635 |
|
590 - | impl From<PatternListOverrideUnconstrained>
|
591 - | for crate::constrained::MaybeConstrained<
|
592 - | crate::constrained::pattern_list_override_constrained::PatternListOverrideConstrained,
|
593 - | >
|
636 + | impl From<TimestampSetUnconstrained>
|
637 + | for crate::constrained::MaybeConstrained<crate::model::TimestampSet>
|
594 638 | {
|
595 - | fn from(value: PatternListOverrideUnconstrained) -> Self {
|
639 + | fn from(value: TimestampSetUnconstrained) -> Self {
|
596 640 | Self::Unconstrained(value)
|
597 641 | }
|
598 642 | }
|
599 - | impl std::convert::TryFrom<PatternListOverrideUnconstrained>
|
600 - | for crate::constrained::pattern_list_override_constrained::PatternListOverrideConstrained
|
601 - | {
|
602 - | type Error = crate::model::pattern_list_override::ConstraintViolation;
|
603 - | fn try_from(
|
604 - | value: PatternListOverrideUnconstrained,
|
605 - | ) -> std::result::Result<Self, Self::Error> {
|
606 - | let res: ::std::result::Result<
|
607 - | ::std::vec::Vec<crate::model::pattern_list_override::Member>,
|
608 - | (
|
609 - | usize,
|
610 - | crate::model::pattern_list_override::member::ConstraintViolation,
|
611 - | ),
|
612 - | > = value
|
613 - | .0
|
614 - | .into_iter()
|
615 - | .enumerate()
|
616 - | .map(|(idx, inner)| {
|
617 - | inner
|
618 - | .try_into()
|
619 - | .map_err(|inner_violation| (idx, inner_violation))
|
620 - | })
|
621 - | .collect();
|
622 - | let inner =
|
623 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
624 - | Ok(Self(inner))
|
625 - | }
|
626 - | }
|
627 - | }
|
628 - | pub(crate) mod pattern_union_unconstrained {
|
629 - |
|
630 - | #[allow(clippy::enum_variant_names)]
|
631 - | #[derive(Debug, Clone)]
|
632 - | pub(crate) enum PatternUnionUnconstrained {
|
633 - | First(::std::string::String),
|
634 - | Second(::std::string::String),
|
635 - | }
|
636 - | impl ::std::convert::TryFrom<PatternUnionUnconstrained> for crate::model::PatternUnion {
|
637 - | type Error = crate::model::pattern_union::ConstraintViolation;
|
638 - |
|
639 - | fn try_from(value: PatternUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
|
640 - | Ok(
|
641 - | match value {
|
642 - | crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained::First(unconstrained) => Self::First(
|
643 - | unconstrained
|
644 - | .try_into()
|
645 - |
|
646 - |
|
647 - | .map_err(Self::Error::First)?
|
648 - | ),
|
649 - | crate::unconstrained::pattern_union_unconstrained::PatternUnionUnconstrained::Second(unconstrained) => Self::Second(
|
650 - | unconstrained
|
651 - | .try_into()
|
652 - |
|
653 - |
|
654 - | .map_err(Self::Error::Second)?
|
655 - | ),
|
656 - | }
|
657 - | )
|
643 + | impl std::convert::TryFrom<TimestampSetUnconstrained> for crate::model::TimestampSet {
|
644 + | type Error = crate::model::timestamp_set::ConstraintViolation;
|
645 + | fn try_from(value: TimestampSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
646 + | let inner = value.0;
|
647 + | Self::try_from(inner)
|
658 648 | }
|
659 649 | }
|
660 650 | }
|
661 - | pub(crate) mod pattern_map_unconstrained {
|
651 + | pub(crate) mod date_time_set_unconstrained {
|
662 652 |
|
663 653 | #[derive(Debug, Clone)]
|
664 - | pub(crate) struct PatternMapUnconstrained(
|
665 - | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
654 + | pub(crate) struct DateTimeSetUnconstrained(
|
655 + | pub(crate) std::vec::Vec<::aws_smithy_types::DateTime>,
|
666 656 | );
|
667 657 |
|
668 - | impl From<PatternMapUnconstrained>
|
669 - | for crate::constrained::MaybeConstrained<
|
670 - | crate::constrained::pattern_map_constrained::PatternMapConstrained,
|
671 - | >
|
658 + | impl From<DateTimeSetUnconstrained>
|
659 + | for crate::constrained::MaybeConstrained<crate::model::DateTimeSet>
|
672 660 | {
|
673 - | fn from(value: PatternMapUnconstrained) -> Self {
|
661 + | fn from(value: DateTimeSetUnconstrained) -> Self {
|
674 662 | Self::Unconstrained(value)
|
675 663 | }
|
676 664 | }
|
677 - | impl std::convert::TryFrom<PatternMapUnconstrained>
|
678 - | for crate::constrained::pattern_map_constrained::PatternMapConstrained
|
679 - | {
|
680 - | type Error = crate::model::pattern_map::ConstraintViolation;
|
681 - | fn try_from(value: PatternMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
682 - | let res: ::std::result::Result<
|
683 - | ::std::collections::HashMap<
|
684 - | crate::model::PatternString,
|
685 - | crate::model::PatternString,
|
686 - | >,
|
687 - | Self::Error,
|
688 - | > = value
|
689 - | .0
|
690 - | .into_iter()
|
691 - | .map(|(k, v)| {
|
692 - | let k: crate::model::PatternString = k.try_into().map_err(Self::Error::Key)?;
|
693 - |
|
694 - | match crate::model::PatternString::try_from(v) {
|
695 - | Ok(v) => Ok((k, v)),
|
696 - | Err(inner_constraint_violation) => {
|
697 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
698 - | }
|
699 - | }
|
700 - | })
|
701 - | .collect();
|
702 - | let hm = res?;
|
703 - | Ok(Self(hm))
|
665 + | impl std::convert::TryFrom<DateTimeSetUnconstrained> for crate::model::DateTimeSet {
|
666 + | type Error = crate::model::date_time_set::ConstraintViolation;
|
667 + | fn try_from(value: DateTimeSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
668 + | let inner = value.0;
|
669 + | Self::try_from(inner)
|
704 670 | }
|
705 671 | }
|
706 672 | }
|
707 - | pub(crate) mod pattern_list_unconstrained {
|
673 + | pub(crate) mod http_date_set_unconstrained {
|
708 674 |
|
709 675 | #[derive(Debug, Clone)]
|
710 - | pub(crate) struct PatternListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
676 + | pub(crate) struct HttpDateSetUnconstrained(
|
677 + | pub(crate) std::vec::Vec<::aws_smithy_types::DateTime>,
|
678 + | );
|
711 679 |
|
712 - | impl From<PatternListUnconstrained>
|
713 - | for crate::constrained::MaybeConstrained<
|
714 - | crate::constrained::pattern_list_constrained::PatternListConstrained,
|
715 - | >
|
680 + | impl From<HttpDateSetUnconstrained>
|
681 + | for crate::constrained::MaybeConstrained<crate::model::HttpDateSet>
|
716 682 | {
|
717 - | fn from(value: PatternListUnconstrained) -> Self {
|
683 + | fn from(value: HttpDateSetUnconstrained) -> Self {
|
718 684 | Self::Unconstrained(value)
|
719 685 | }
|
720 686 | }
|
721 - | impl std::convert::TryFrom<PatternListUnconstrained>
|
722 - | for crate::constrained::pattern_list_constrained::PatternListConstrained
|
723 - | {
|
724 - | type Error = crate::model::pattern_list::ConstraintViolation;
|
725 - | fn try_from(value: PatternListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
726 - | let res: ::std::result::Result<
|
727 - | ::std::vec::Vec<crate::model::PatternString>,
|
728 - | (usize, crate::model::pattern_string::ConstraintViolation),
|
729 - | > = value
|
730 - | .0
|
731 - | .into_iter()
|
732 - | .enumerate()
|
733 - | .map(|(idx, inner)| {
|
734 - | inner
|
735 - | .try_into()
|
736 - | .map_err(|inner_violation| (idx, inner_violation))
|
737 - | })
|
738 - | .collect();
|
739 - | let inner =
|
740 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
741 - | Ok(Self(inner))
|
687 + | impl std::convert::TryFrom<HttpDateSetUnconstrained> for crate::model::HttpDateSet {
|
688 + | type Error = crate::model::http_date_set::ConstraintViolation;
|
689 + | fn try_from(value: HttpDateSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
690 + | let inner = value.0;
|
691 + | Self::try_from(inner)
|
742 692 | }
|
743 693 | }
|
744 694 | }
|
745 - | pub(crate) mod length_list_unconstrained {
|
695 + | pub(crate) mod foo_enum_set_unconstrained {
|
746 696 |
|
747 697 | #[derive(Debug, Clone)]
|
748 - | pub(crate) struct LengthListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
698 + | pub(crate) struct FooEnumSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
749 699 |
|
750 - | impl From<LengthListUnconstrained>
|
751 - | for crate::constrained::MaybeConstrained<crate::model::LengthList>
|
700 + | impl From<FooEnumSetUnconstrained>
|
701 + | for crate::constrained::MaybeConstrained<crate::model::FooEnumSet>
|
752 702 | {
|
753 - | fn from(value: LengthListUnconstrained) -> Self {
|
703 + | fn from(value: FooEnumSetUnconstrained) -> Self {
|
754 704 | Self::Unconstrained(value)
|
755 705 | }
|
756 706 | }
|
757 - | impl std::convert::TryFrom<LengthListUnconstrained> for crate::model::LengthList {
|
758 - | type Error = crate::model::length_list::ConstraintViolation;
|
759 - | fn try_from(value: LengthListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
707 + | impl std::convert::TryFrom<FooEnumSetUnconstrained> for crate::model::FooEnumSet {
|
708 + | type Error = crate::model::foo_enum_set::ConstraintViolation;
|
709 + | fn try_from(value: FooEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
760 710 | let res: ::std::result::Result<
|
761 - | ::std::vec::Vec<crate::model::LengthString>,
|
762 - | (usize, crate::model::length_string::ConstraintViolation),
|
711 + | ::std::vec::Vec<crate::model::FooEnum>,
|
712 + | (usize, crate::model::foo_enum::ConstraintViolation),
|
763 713 | > = value
|
764 714 | .0
|
765 715 | .into_iter()
|
766 716 | .enumerate()
|
767 717 | .map(|(idx, inner)| {
|
768 718 | inner
|
769 719 | .try_into()
|
770 720 | .map_err(|inner_violation| (idx, inner_violation))
|
771 721 | })
|
772 722 | .collect();
|
773 723 | let inner =
|
774 724 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
775 725 | Self::try_from(inner)
|
776 726 | }
|
777 727 | }
|
778 728 | }
|
779 - | pub(crate) mod length_map_unconstrained {
|
729 + | pub(crate) mod integer_enum_set_unconstrained {
|
780 730 |
|
781 731 | #[derive(Debug, Clone)]
|
782 - | pub(crate) struct LengthMapUnconstrained(
|
783 - | pub(crate) std::collections::HashMap<
|
784 - | ::std::string::String,
|
785 - | crate::unconstrained::length_list_unconstrained::LengthListUnconstrained,
|
786 - | >,
|
787 - | );
|
732 + | pub(crate) struct IntegerEnumSetUnconstrained(pub(crate) std::vec::Vec<i32>);
|
788 733 |
|
789 - | impl From<LengthMapUnconstrained>
|
790 - | for crate::constrained::MaybeConstrained<crate::model::LengthMap>
|
734 + | impl From<IntegerEnumSetUnconstrained>
|
735 + | for crate::constrained::MaybeConstrained<crate::model::IntegerEnumSet>
|
791 736 | {
|
792 - | fn from(value: LengthMapUnconstrained) -> Self {
|
737 + | fn from(value: IntegerEnumSetUnconstrained) -> Self {
|
793 738 | Self::Unconstrained(value)
|
794 739 | }
|
795 740 | }
|
796 - | impl std::convert::TryFrom<LengthMapUnconstrained> for crate::model::LengthMap {
|
797 - | type Error = crate::model::length_map::ConstraintViolation;
|
798 - | fn try_from(value: LengthMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
799 - | let res: ::std::result::Result<
|
800 - | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthList>,
|
801 - | Self::Error,
|
802 - | > = value
|
803 - | .0
|
804 - | .into_iter()
|
805 - | .map(|(k, v)| {
|
806 - | let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
|
807 - |
|
808 - | match crate::model::LengthList::try_from(v) {
|
809 - | Ok(v) => Ok((k, v)),
|
810 - | Err(inner_constraint_violation) => {
|
811 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
812 - | }
|
813 - | }
|
814 - | })
|
815 - | .collect();
|
816 - | let hm = res?;
|
817 - | Self::try_from(hm)
|
741 + | impl std::convert::TryFrom<IntegerEnumSetUnconstrained> for crate::model::IntegerEnumSet {
|
742 + | type Error = crate::model::integer_enum_set::ConstraintViolation;
|
743 + | fn try_from(value: IntegerEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
744 + | let inner = value.0;
|
745 + | Self::try_from(inner)
|
818 746 | }
|
819 747 | }
|
820 748 | }
|
821 - | pub(crate) mod enum_union_unconstrained {
|
749 + | pub(crate) mod list_set_unconstrained {
|
822 750 |
|
823 - | #[allow(clippy::enum_variant_names)]
|
824 751 | #[derive(Debug, Clone)]
|
825 - | pub(crate) enum EnumUnionUnconstrained {
|
826 - | First(::std::string::String),
|
827 - | Second(::std::string::String),
|
828 - | }
|
829 - | impl ::std::convert::TryFrom<EnumUnionUnconstrained> for crate::model::EnumUnion {
|
830 - | type Error = crate::model::enum_union::ConstraintViolation;
|
752 + | pub(crate) struct ListSetUnconstrained(
|
753 + | pub(crate) std::vec::Vec<::std::vec::Vec<::std::string::String>>,
|
754 + | );
|
831 755 |
|
832 - | fn try_from(value: EnumUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
|
833 - | Ok(match value {
|
834 - | crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained::First(
|
835 - | unconstrained,
|
836 - | ) => Self::First(unconstrained.try_into().map_err(Self::Error::First)?),
|
837 - | crate::unconstrained::enum_union_unconstrained::EnumUnionUnconstrained::Second(
|
838 - | unconstrained,
|
839 - | ) => Self::Second(unconstrained.try_into().map_err(Self::Error::Second)?),
|
840 - | })
|
756 + | impl From<ListSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ListSet> {
|
757 + | fn from(value: ListSetUnconstrained) -> Self {
|
758 + | Self::Unconstrained(value)
|
759 + | }
|
760 + | }
|
761 + | impl std::convert::TryFrom<ListSetUnconstrained> for crate::model::ListSet {
|
762 + | type Error = crate::model::list_set::ConstraintViolation;
|
763 + | fn try_from(value: ListSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
764 + | let inner = value.0;
|
765 + | Self::try_from(inner)
|
841 766 | }
|
842 767 | }
|
843 768 | }
|
844 - | pub(crate) mod enum_map_unconstrained {
|
769 + | pub(crate) mod structure_set_unconstrained {
|
845 770 |
|
846 771 | #[derive(Debug, Clone)]
|
847 - | pub(crate) struct EnumMapUnconstrained(
|
848 - | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
772 + | pub(crate) struct StructureSetUnconstrained(
|
773 + | pub(crate) std::vec::Vec<crate::model::GreetingStruct>,
|
849 774 | );
|
850 775 |
|
851 - | impl From<EnumMapUnconstrained>
|
852 - | for crate::constrained::MaybeConstrained<
|
853 - | crate::constrained::enum_map_constrained::EnumMapConstrained,
|
854 - | >
|
776 + | impl From<StructureSetUnconstrained>
|
777 + | for crate::constrained::MaybeConstrained<crate::model::StructureSet>
|
855 778 | {
|
856 - | fn from(value: EnumMapUnconstrained) -> Self {
|
779 + | fn from(value: StructureSetUnconstrained) -> Self {
|
857 780 | Self::Unconstrained(value)
|
858 781 | }
|
859 782 | }
|
860 - | impl std::convert::TryFrom<EnumMapUnconstrained>
|
861 - | for crate::constrained::enum_map_constrained::EnumMapConstrained
|
862 - | {
|
863 - | type Error = crate::model::enum_map::ConstraintViolation;
|
864 - | fn try_from(value: EnumMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
865 - | let res: ::std::result::Result<
|
866 - | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
867 - | Self::Error,
|
868 - | > = value
|
869 - | .0
|
870 - | .into_iter()
|
871 - | .map(|(k, v)| {
|
872 - | let k: crate::model::EnumString = k.try_into().map_err(Self::Error::Key)?;
|
873 - |
|
874 - | match crate::model::EnumString::try_from(v) {
|
875 - | Ok(v) => Ok((k, v)),
|
876 - | Err(inner_constraint_violation) => {
|
877 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
878 - | }
|
879 - | }
|
880 - | })
|
881 - | .collect();
|
882 - | let hm = res?;
|
883 - | Ok(Self(hm))
|
783 + | impl std::convert::TryFrom<StructureSetUnconstrained> for crate::model::StructureSet {
|
784 + | type Error = crate::model::structure_set::ConstraintViolation;
|
785 + | fn try_from(value: StructureSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
786 + | let inner = value.0;
|
787 + | Self::try_from(inner)
|
884 788 | }
|
885 789 | }
|
886 790 | }
|
887 - | pub(crate) mod enum_list_unconstrained {
|
791 + | pub(crate) mod structure_set_with_no_key_unconstrained {
|
888 792 |
|
889 793 | #[derive(Debug, Clone)]
|
890 - | pub(crate) struct EnumListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
794 + | pub(crate) struct StructureSetWithNoKeyUnconstrained(
|
795 + | pub(crate) std::vec::Vec<crate::model::missing_key_structure::Builder>,
|
796 + | );
|
891 797 |
|
892 - | impl From<EnumListUnconstrained>
|
893 - | for crate::constrained::MaybeConstrained<
|
894 - | crate::constrained::enum_list_constrained::EnumListConstrained,
|
895 - | >
|
798 + | impl From<StructureSetWithNoKeyUnconstrained>
|
799 + | for crate::constrained::MaybeConstrained<crate::model::StructureSetWithNoKey>
|
896 800 | {
|
897 - | fn from(value: EnumListUnconstrained) -> Self {
|
801 + | fn from(value: StructureSetWithNoKeyUnconstrained) -> Self {
|
898 802 | Self::Unconstrained(value)
|
899 803 | }
|
900 804 | }
|
901 - | impl std::convert::TryFrom<EnumListUnconstrained>
|
902 - | for crate::constrained::enum_list_constrained::EnumListConstrained
|
805 + | impl std::convert::TryFrom<StructureSetWithNoKeyUnconstrained>
|
806 + | for crate::model::StructureSetWithNoKey
|
903 807 | {
|
904 - | type Error = crate::model::enum_list::ConstraintViolation;
|
905 - | fn try_from(value: EnumListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
808 + | type Error = crate::model::structure_set_with_no_key::ConstraintViolation;
|
809 + | fn try_from(
|
810 + | value: StructureSetWithNoKeyUnconstrained,
|
811 + | ) -> std::result::Result<Self, Self::Error> {
|
906 812 | let res: ::std::result::Result<
|
907 - | ::std::vec::Vec<crate::model::EnumString>,
|
908 - | (usize, crate::model::enum_string::ConstraintViolation),
|
813 + | ::std::vec::Vec<crate::model::MissingKeyStructure>,
|
814 + | (
|
815 + | usize,
|
816 + | crate::model::missing_key_structure::ConstraintViolation,
|
817 + | ),
|
909 818 | > = value
|
910 819 | .0
|
911 820 | .into_iter()
|
912 821 | .enumerate()
|
913 822 | .map(|(idx, inner)| {
|
914 823 | inner
|
915 824 | .try_into()
|
916 825 | .map_err(|inner_violation| (idx, inner_violation))
|
917 826 | })
|
918 827 | .collect();
|
919 828 | let inner =
|
920 829 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
921 - | Ok(Self(inner))
|
830 + | Self::try_from(inner)
|
831 + | }
|
832 + | }
|
833 + | }
|
834 + | pub(crate) mod union_set_unconstrained {
|
835 + |
|
836 + | #[derive(Debug, Clone)]
|
837 + | pub(crate) struct UnionSetUnconstrained(pub(crate) std::vec::Vec<crate::model::FooUnion>);
|
838 + |
|
839 + | impl From<UnionSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::UnionSet> {
|
840 + | fn from(value: UnionSetUnconstrained) -> Self {
|
841 + | Self::Unconstrained(value)
|
842 + | }
|
843 + | }
|
844 + | impl std::convert::TryFrom<UnionSetUnconstrained> for crate::model::UnionSet {
|
845 + | type Error = crate::model::union_set::ConstraintViolation;
|
846 + | fn try_from(value: UnionSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
847 + | let inner = value.0;
|
848 + | Self::try_from(inner)
|
849 + | }
|
850 + | }
|
851 + | }
|
852 + | pub(crate) mod recursive_union_one_unconstrained {
|
853 + |
|
854 + | #[allow(clippy::enum_variant_names)]
|
855 + | #[derive(Debug, Clone)]
|
856 + | pub(crate) enum RecursiveUnionOneUnconstrained {
|
857 + | String(::std::string::String),
|
858 + | Union(::std::boxed::Box<crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained>),
|
859 + | }
|
860 + | impl ::std::convert::TryFrom<RecursiveUnionOneUnconstrained> for crate::model::RecursiveUnionOne {
|
861 + | type Error = crate::model::recursive_union_one::ConstraintViolation;
|
862 + |
|
863 + | fn try_from(
|
864 + | value: RecursiveUnionOneUnconstrained,
|
865 + | ) -> ::std::result::Result<Self, Self::Error> {
|
866 + | Ok(
|
867 + | match value {
|
868 + | crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained::String(unconstrained) => Self::String(
|
869 + | unconstrained
|
870 + | .try_into()
|
871 + |
|
872 + |
|
873 + | .map_err(Self::Error::String)?
|
874 + | ),
|
875 + | crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained::Union(unconstrained) => Self::Union(
|
876 + | (*unconstrained)
|
877 + | .try_into()
|
878 + | .map(Box::new)
|
879 + | .map_err(Box::new)
|
880 + | .map_err(Self::Error::Union)?
|
881 + | ),
|
882 + | }
|
883 + | )
|
884 + | }
|
885 + | }
|
886 + | }
|
887 + | pub(crate) mod recursive_union_two_unconstrained {
|
888 + |
|
889 + | #[allow(clippy::enum_variant_names)]
|
890 + | #[derive(Debug, Clone)]
|
891 + | pub(crate) enum RecursiveUnionTwoUnconstrained {
|
892 + | String(::std::string::String),
|
893 + | Union(
|
894 + | crate::unconstrained::recursive_union_one_unconstrained::RecursiveUnionOneUnconstrained,
|
895 + | ),
|
896 + | }
|
897 + | impl ::std::convert::TryFrom<RecursiveUnionTwoUnconstrained> for crate::model::RecursiveUnionTwo {
|
898 + | type Error = crate::model::recursive_union_two::ConstraintViolation;
|
899 + |
|
900 + | fn try_from(
|
901 + | value: RecursiveUnionTwoUnconstrained,
|
902 + | ) -> ::std::result::Result<Self, Self::Error> {
|
903 + | Ok(
|
904 + | match value {
|
905 + | crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained::String(unconstrained) => Self::String(
|
906 + | unconstrained
|
907 + | .try_into()
|
908 + |
|
909 + |
|
910 + | .map_err(Self::Error::String)?
|
911 + | ),
|
912 + | crate::unconstrained::recursive_union_two_unconstrained::RecursiveUnionTwoUnconstrained::Union(unconstrained) => Self::Union(
|
913 + | unconstrained
|
914 + | .try_into()
|
915 + |
|
916 + |
|
917 + | .map_err(Self::Error::Union)?
|
918 + | ),
|
919 + | }
|
920 + | )
|
922 921 | }
|
923 922 | }
|
924 923 | }
|