8 8 | impl From<crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained>
|
9 9 | for crate::constrained::MaybeConstrained<crate::model::ConstrainedUnion>
|
10 10 | {
|
11 11 | fn from(
|
12 12 | value: crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained,
|
13 13 | ) -> Self {
|
14 14 | Self::Unconstrained(value)
|
15 15 | }
|
16 16 | }
|
17 17 |
|
18 - | pub(crate) mod map_of_enum_string_unconstrained {
|
18 + | pub(crate) mod map_of_length_string_unconstrained {
|
19 19 |
|
20 20 | #[derive(Debug, Clone)]
|
21 - | pub(crate) struct MapOfEnumStringUnconstrained(
|
21 + | pub(crate) struct MapOfLengthStringUnconstrained(
|
22 22 | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
23 23 | );
|
24 24 |
|
25 - | impl From<MapOfEnumStringUnconstrained>
|
25 + | impl From<MapOfLengthStringUnconstrained>
|
26 26 | for crate::constrained::MaybeConstrained<
|
27 - | crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained,
|
27 + | crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained,
|
28 28 | >
|
29 29 | {
|
30 - | fn from(value: MapOfEnumStringUnconstrained) -> Self {
|
30 + | fn from(value: MapOfLengthStringUnconstrained) -> Self {
|
31 31 | Self::Unconstrained(value)
|
32 32 | }
|
33 33 | }
|
34 - | impl std::convert::TryFrom<MapOfEnumStringUnconstrained>
|
35 - | for crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained
|
34 + | impl std::convert::TryFrom<MapOfLengthStringUnconstrained>
|
35 + | for crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained
|
36 36 | {
|
37 - | type Error = crate::model::map_of_enum_string_internal::ConstraintViolation;
|
38 - | fn try_from(value: MapOfEnumStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
37 + | type Error = crate::model::map_of_length_string_internal::ConstraintViolation;
|
38 + | fn try_from(
|
39 + | value: MapOfLengthStringUnconstrained,
|
40 + | ) -> std::result::Result<Self, Self::Error> {
|
39 41 | let res: ::std::result::Result<
|
40 - | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
42 + | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
41 43 | Self::Error,
|
42 44 | > = value
|
43 45 | .0
|
44 46 | .into_iter()
|
45 47 | .map(|(k, v)| {
|
46 - | let k: crate::model::EnumString = k.try_into().map_err(Self::Error::Key)?;
|
48 + | let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
|
47 49 |
|
48 - | match crate::model::EnumString::try_from(v) {
|
50 + | match crate::model::LengthString::try_from(v) {
|
49 51 | Ok(v) => Ok((k, v)),
|
50 52 | Err(inner_constraint_violation) => {
|
51 53 | Err(Self::Error::Value(k, inner_constraint_violation))
|
52 54 | }
|
53 55 | }
|
54 56 | })
|
55 57 | .collect();
|
56 58 | let hm = res?;
|
57 59 | Ok(Self(hm))
|
58 60 | }
|
59 61 | }
|
60 62 | }
|
61 - | pub(crate) mod con_b_map_unconstrained {
|
63 + | pub(crate) mod set_of_length_string_unconstrained {
|
62 64 |
|
63 65 | #[derive(Debug, Clone)]
|
64 - | pub(crate) struct ConBMapUnconstrained(
|
65 - | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
66 + | pub(crate) struct SetOfLengthStringUnconstrained(
|
67 + | pub(crate) std::vec::Vec<::std::string::String>,
|
66 68 | );
|
67 69 |
|
68 - | impl From<ConBMapUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ConBMap> {
|
69 - | fn from(value: ConBMapUnconstrained) -> Self {
|
70 + | impl From<SetOfLengthStringUnconstrained>
|
71 + | for crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>
|
72 + | {
|
73 + | fn from(value: SetOfLengthStringUnconstrained) -> Self {
|
70 74 | Self::Unconstrained(value)
|
71 75 | }
|
72 76 | }
|
73 - | impl std::convert::TryFrom<ConBMapUnconstrained> for crate::model::ConBMap {
|
74 - | type Error = crate::model::con_b_map_internal::ConstraintViolation;
|
75 - | fn try_from(value: ConBMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
77 + | impl std::convert::TryFrom<SetOfLengthStringUnconstrained> for crate::model::SetOfLengthString {
|
78 + | type Error = crate::model::set_of_length_string_internal::ConstraintViolation;
|
79 + | fn try_from(
|
80 + | value: SetOfLengthStringUnconstrained,
|
81 + | ) -> std::result::Result<Self, Self::Error> {
|
76 82 | let res: ::std::result::Result<
|
77 - | ::std::collections::HashMap<::std::string::String, crate::model::LengthString>,
|
78 - | Self::Error,
|
83 + | ::std::vec::Vec<crate::model::LengthString>,
|
84 + | (
|
85 + | usize,
|
86 + | crate::model::length_string_internal::ConstraintViolation,
|
87 + | ),
|
79 88 | > = value
|
80 89 | .0
|
81 90 | .into_iter()
|
82 - | .map(|(k, v)| match crate::model::LengthString::try_from(v) {
|
83 - | Ok(v) => Ok((k, v)),
|
84 - | Err(inner_constraint_violation) => {
|
85 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
86 - | }
|
87 - | })
|
88 - | .collect();
|
89 - | let hm = res?;
|
90 - | Self::try_from(hm)
|
91 - | }
|
92 - | }
|
93 - | }
|
94 - | pub(crate) mod map_of_list_of_length_pattern_string_unconstrained {
|
95 - |
|
96 - | #[derive(Debug, Clone)]
|
97 - | pub(crate) struct MapOfListOfLengthPatternStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::list_of_length_pattern_string_unconstrained::ListOfLengthPatternStringUnconstrained>);
|
98 - |
|
99 - | impl From<MapOfListOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained> {
|
100 - | fn from(value: MapOfListOfLengthPatternStringUnconstrained) -> Self {
|
101 - | Self::Unconstrained(value)
|
102 - | }
|
103 - | }
|
104 - | impl std::convert::TryFrom<MapOfListOfLengthPatternStringUnconstrained> for crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained {
|
105 - | type Error = crate::model::map_of_list_of_length_pattern_string_internal::ConstraintViolation;
|
106 - | fn try_from(value: MapOfListOfLengthPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
107 - | let res: ::std::result::Result<::std::collections::HashMap<crate::model::LengthPatternString, crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained>, Self::Error> = value.0
|
108 - | .into_iter()
|
109 - | .map(|(k, v)| {
|
110 - | let k: crate::model::LengthPatternString = k.try_into().map_err(Self::Error::Key)?;
|
111 - |
|
112 - | match crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained::try_from(v) {
|
113 - | Ok(v) => Ok((k, v)),
|
114 - | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
115 - | }
|
91 + | .enumerate()
|
92 + | .map(|(idx, inner)| {
|
93 + | inner
|
94 + | .try_into()
|
95 + | .map_err(|inner_violation| (idx, inner_violation))
|
116 96 | })
|
117 97 | .collect();
|
118 - | let hm = res?;
|
119 - | Ok(Self(hm))
|
98 + | let inner =
|
99 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
100 + | Self::try_from(inner)
|
120 101 | }
|
121 102 | }
|
122 103 | }
|
123 - | pub(crate) mod list_of_length_pattern_string_unconstrained {
|
104 + | pub(crate) mod list_of_length_string_unconstrained {
|
124 105 |
|
125 106 | #[derive(Debug, Clone)]
|
126 - | pub(crate) struct ListOfLengthPatternStringUnconstrained(
|
107 + | pub(crate) struct ListOfLengthStringUnconstrained(
|
127 108 | pub(crate) std::vec::Vec<::std::string::String>,
|
128 109 | );
|
129 110 |
|
130 - | impl From<ListOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained> {
|
131 - | fn from(value: ListOfLengthPatternStringUnconstrained) -> Self {
|
111 + | impl From<ListOfLengthStringUnconstrained>
|
112 + | for crate::constrained::MaybeConstrained<
|
113 + | crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained,
|
114 + | >
|
115 + | {
|
116 + | fn from(value: ListOfLengthStringUnconstrained) -> Self {
|
132 117 | Self::Unconstrained(value)
|
133 118 | }
|
134 119 | }
|
135 - | impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
|
136 - | type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
|
137 - | fn try_from(value: ListOfLengthPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
138 - | let res: ::std::result::Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
|
120 + | impl std::convert::TryFrom<ListOfLengthStringUnconstrained>
|
121 + | for crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained
|
122 + | {
|
123 + | type Error = crate::model::list_of_length_string_internal::ConstraintViolation;
|
124 + | fn try_from(
|
125 + | value: ListOfLengthStringUnconstrained,
|
126 + | ) -> std::result::Result<Self, Self::Error> {
|
127 + | let res: ::std::result::Result<
|
128 + | ::std::vec::Vec<crate::model::LengthString>,
|
129 + | (
|
130 + | usize,
|
131 + | crate::model::length_string_internal::ConstraintViolation,
|
132 + | ),
|
133 + | > = value
|
139 134 | .0
|
140 135 | .into_iter()
|
141 136 | .enumerate()
|
142 137 | .map(|(idx, inner)| {
|
143 - | inner.try_into().map_err(|inner_violation| (idx, inner_violation))
|
138 + | inner
|
139 + | .try_into()
|
140 + | .map_err(|inner_violation| (idx, inner_violation))
|
144 141 | })
|
145 142 | .collect();
|
146 - | let inner = res
|
147 - |
|
148 - | .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
143 + | let inner =
|
144 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
149 145 | Ok(Self(inner))
|
150 146 | }
|
151 147 | }
|
152 148 | }
|
153 - | pub(crate) mod map_of_length_pattern_string_unconstrained {
|
149 + | pub(crate) mod length_list_of_pattern_string_unconstrained {
|
154 150 |
|
155 151 | #[derive(Debug, Clone)]
|
156 - | pub(crate) struct MapOfLengthPatternStringUnconstrained(
|
157 - | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
152 + | pub(crate) struct LengthListOfPatternStringUnconstrained(
|
153 + | pub(crate) std::vec::Vec<::std::string::String>,
|
158 154 | );
|
159 155 |
|
160 - | impl From<MapOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained> {
|
161 - | fn from(value: MapOfLengthPatternStringUnconstrained) -> Self {
|
162 - | Self::Unconstrained(value)
|
163 - | }
|
164 - | }
|
165 - | impl std::convert::TryFrom<MapOfLengthPatternStringUnconstrained> for crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained {
|
166 - | type Error = crate::model::map_of_length_pattern_string_internal::ConstraintViolation;
|
167 - | fn try_from(value: MapOfLengthPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
168 - | let res: ::std::result::Result<::std::collections::HashMap<crate::model::LengthPatternString, crate::model::LengthPatternString>, Self::Error> = value.0
|
169 - | .into_iter()
|
170 - | .map(|(k, v)| {
|
171 - | let k: crate::model::LengthPatternString = k.try_into().map_err(Self::Error::Key)?;
|
172 - |
|
173 - | match crate::model::LengthPatternString::try_from(v) {
|
174 - | Ok(v) => Ok((k, v)),
|
175 - | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
176 - | }
|
177 - | })
|
178 - | .collect();
|
179 - | let hm = res?;
|
180 - | Ok(Self(hm))
|
181 - | }
|
182 - | }
|
183 - | }
|
184 - | pub(crate) mod map_of_list_of_pattern_string_unconstrained {
|
185 - |
|
186 - | #[derive(Debug, Clone)]
|
187 - | pub(crate) struct MapOfListOfPatternStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::list_of_pattern_string_unconstrained::ListOfPatternStringUnconstrained>);
|
188 - |
|
189 - | impl From<MapOfListOfPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained> {
|
190 - | fn from(value: MapOfListOfPatternStringUnconstrained) -> Self {
|
156 + | impl From<LengthListOfPatternStringUnconstrained>
|
157 + | for crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>
|
158 + | {
|
159 + | fn from(value: LengthListOfPatternStringUnconstrained) -> Self {
|
191 160 | Self::Unconstrained(value)
|
192 161 | }
|
193 162 | }
|
194 - | impl std::convert::TryFrom<MapOfListOfPatternStringUnconstrained> for crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained {
|
195 - | type Error = crate::model::map_of_list_of_pattern_string_internal::ConstraintViolation;
|
196 - | fn try_from(value: MapOfListOfPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
197 - | let res: ::std::result::Result<::std::collections::HashMap<crate::model::PatternString, crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained>, Self::Error> = value.0
|
163 + | impl std::convert::TryFrom<LengthListOfPatternStringUnconstrained>
|
164 + | for crate::model::LengthListOfPatternString
|
165 + | {
|
166 + | type Error = crate::model::length_list_of_pattern_string_internal::ConstraintViolation;
|
167 + | fn try_from(
|
168 + | value: LengthListOfPatternStringUnconstrained,
|
169 + | ) -> std::result::Result<Self, Self::Error> {
|
170 + | let res: ::std::result::Result<
|
171 + | ::std::vec::Vec<crate::model::PatternString>,
|
172 + | (
|
173 + | usize,
|
174 + | crate::model::pattern_string_internal::ConstraintViolation,
|
175 + | ),
|
176 + | > = value
|
177 + | .0
|
198 178 | .into_iter()
|
199 - | .map(|(k, v)| {
|
200 - | let k: crate::model::PatternString = k.try_into().map_err(Self::Error::Key)?;
|
201 - |
|
202 - | match crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained::try_from(v) {
|
203 - | Ok(v) => Ok((k, v)),
|
204 - | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
205 - | }
|
179 + | .enumerate()
|
180 + | .map(|(idx, inner)| {
|
181 + | inner
|
182 + | .try_into()
|
183 + | .map_err(|inner_violation| (idx, inner_violation))
|
206 184 | })
|
207 185 | .collect();
|
208 - | let hm = res?;
|
209 - | Ok(Self(hm))
|
186 + | let inner =
|
187 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
188 + | Self::try_from(inner)
|
210 189 | }
|
211 190 | }
|
212 191 | }
|
213 - | pub(crate) mod list_of_pattern_string_unconstrained {
|
192 + | pub(crate) mod length_set_of_pattern_string_unconstrained {
|
214 193 |
|
215 194 | #[derive(Debug, Clone)]
|
216 - | pub(crate) struct ListOfPatternStringUnconstrained(
|
195 + | pub(crate) struct LengthSetOfPatternStringUnconstrained(
|
217 196 | pub(crate) std::vec::Vec<::std::string::String>,
|
218 197 | );
|
219 198 |
|
220 - | impl From<ListOfPatternStringUnconstrained>
|
221 - | for crate::constrained::MaybeConstrained<
|
222 - | crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained,
|
223 - | >
|
199 + | impl From<LengthSetOfPatternStringUnconstrained>
|
200 + | for crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>
|
224 201 | {
|
225 - | fn from(value: ListOfPatternStringUnconstrained) -> Self {
|
202 + | fn from(value: LengthSetOfPatternStringUnconstrained) -> Self {
|
226 203 | Self::Unconstrained(value)
|
227 204 | }
|
228 205 | }
|
229 - | impl std::convert::TryFrom<ListOfPatternStringUnconstrained>
|
230 - | for crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained
|
206 + | impl std::convert::TryFrom<LengthSetOfPatternStringUnconstrained>
|
207 + | for crate::model::LengthSetOfPatternString
|
231 208 | {
|
232 - | type Error = crate::model::list_of_pattern_string_internal::ConstraintViolation;
|
209 + | type Error = crate::model::length_set_of_pattern_string_internal::ConstraintViolation;
|
233 210 | fn try_from(
|
234 - | value: ListOfPatternStringUnconstrained,
|
211 + | value: LengthSetOfPatternStringUnconstrained,
|
235 212 | ) -> std::result::Result<Self, Self::Error> {
|
236 213 | let res: ::std::result::Result<
|
237 214 | ::std::vec::Vec<crate::model::PatternString>,
|
238 215 | (
|
239 216 | usize,
|
240 217 | crate::model::pattern_string_internal::ConstraintViolation,
|
241 218 | ),
|
242 219 | > = value
|
243 220 | .0
|
244 221 | .into_iter()
|
245 222 | .enumerate()
|
246 223 | .map(|(idx, inner)| {
|
247 224 | inner
|
248 225 | .try_into()
|
249 226 | .map_err(|inner_violation| (idx, inner_violation))
|
250 227 | })
|
251 228 | .collect();
|
252 229 | let inner =
|
253 230 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
254 - | Ok(Self(inner))
|
231 + | Self::try_from(inner)
|
255 232 | }
|
256 233 | }
|
257 234 | }
|
258 - | pub(crate) mod map_of_pattern_string_unconstrained {
|
235 + | pub(crate) mod set_of_range_byte_unconstrained {
|
259 236 |
|
260 237 | #[derive(Debug, Clone)]
|
261 - | pub(crate) struct MapOfPatternStringUnconstrained(
|
262 - | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
263 - | );
|
238 + | pub(crate) struct SetOfRangeByteUnconstrained(pub(crate) std::vec::Vec<i8>);
|
264 239 |
|
265 - | impl From<MapOfPatternStringUnconstrained>
|
266 - | for crate::constrained::MaybeConstrained<
|
267 - | crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained,
|
268 - | >
|
240 + | impl From<SetOfRangeByteUnconstrained>
|
241 + | for crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>
|
269 242 | {
|
270 - | fn from(value: MapOfPatternStringUnconstrained) -> Self {
|
243 + | fn from(value: SetOfRangeByteUnconstrained) -> Self {
|
271 244 | Self::Unconstrained(value)
|
272 245 | }
|
273 246 | }
|
274 - | impl std::convert::TryFrom<MapOfPatternStringUnconstrained>
|
275 - | for crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained
|
276 - | {
|
277 - | type Error = crate::model::map_of_pattern_string_internal::ConstraintViolation;
|
278 - | fn try_from(
|
279 - | value: MapOfPatternStringUnconstrained,
|
280 - | ) -> std::result::Result<Self, Self::Error> {
|
247 + | impl std::convert::TryFrom<SetOfRangeByteUnconstrained> for crate::model::SetOfRangeByte {
|
248 + | type Error = crate::model::set_of_range_byte_internal::ConstraintViolation;
|
249 + | fn try_from(value: SetOfRangeByteUnconstrained) -> std::result::Result<Self, Self::Error> {
|
281 250 | let res: ::std::result::Result<
|
282 - | ::std::collections::HashMap<
|
283 - | crate::model::PatternString,
|
284 - | crate::model::PatternString,
|
285 - | >,
|
286 - | Self::Error,
|
251 + | ::std::vec::Vec<crate::model::RangeByte>,
|
252 + | (
|
253 + | usize,
|
254 + | crate::model::range_byte_internal::ConstraintViolation,
|
255 + | ),
|
287 256 | > = value
|
288 257 | .0
|
289 258 | .into_iter()
|
290 - | .map(|(k, v)| {
|
291 - | let k: crate::model::PatternString = k.try_into().map_err(Self::Error::Key)?;
|
292 - |
|
293 - | match crate::model::PatternString::try_from(v) {
|
294 - | Ok(v) => Ok((k, v)),
|
295 - | Err(inner_constraint_violation) => {
|
296 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
297 - | }
|
298 - | }
|
259 + | .enumerate()
|
260 + | .map(|(idx, inner)| {
|
261 + | inner
|
262 + | .try_into()
|
263 + | .map_err(|inner_violation| (idx, inner_violation))
|
299 264 | })
|
300 265 | .collect();
|
301 - | let hm = res?;
|
302 - | Ok(Self(hm))
|
266 + | let inner =
|
267 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
268 + | Self::try_from(inner)
|
303 269 | }
|
304 270 | }
|
305 271 | }
|
306 - | pub(crate) mod map_of_list_of_enum_string_unconstrained {
|
272 + | pub(crate) mod set_of_range_short_unconstrained {
|
307 273 |
|
308 274 | #[derive(Debug, Clone)]
|
309 - | pub(crate) struct MapOfListOfEnumStringUnconstrained(
|
310 - | pub(crate) std::collections::HashMap<
|
311 - | ::std::string::String,
|
312 - | crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained,
|
313 - | >,
|
314 - | );
|
275 + | pub(crate) struct SetOfRangeShortUnconstrained(pub(crate) std::vec::Vec<i16>);
|
315 276 |
|
316 - | impl From<MapOfListOfEnumStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained> {
|
317 - | fn from(value: MapOfListOfEnumStringUnconstrained) -> Self {
|
277 + | impl From<SetOfRangeShortUnconstrained>
|
278 + | for crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>
|
279 + | {
|
280 + | fn from(value: SetOfRangeShortUnconstrained) -> Self {
|
318 281 | Self::Unconstrained(value)
|
319 282 | }
|
320 283 | }
|
321 - | impl std::convert::TryFrom<MapOfListOfEnumStringUnconstrained> for crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained {
|
322 - | type Error = crate::model::map_of_list_of_enum_string_internal::ConstraintViolation;
|
323 - | fn try_from(value: MapOfListOfEnumStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
324 - | let res: ::std::result::Result<::std::collections::HashMap<crate::model::EnumString, crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>, Self::Error> = value.0
|
284 + | impl std::convert::TryFrom<SetOfRangeShortUnconstrained> for crate::model::SetOfRangeShort {
|
285 + | type Error = crate::model::set_of_range_short_internal::ConstraintViolation;
|
286 + | fn try_from(value: SetOfRangeShortUnconstrained) -> std::result::Result<Self, Self::Error> {
|
287 + | let res: ::std::result::Result<
|
288 + | ::std::vec::Vec<crate::model::RangeShort>,
|
289 + | (
|
290 + | usize,
|
291 + | crate::model::range_short_internal::ConstraintViolation,
|
292 + | ),
|
293 + | > = value
|
294 + | .0
|
325 295 | .into_iter()
|
326 - | .map(|(k, v)| {
|
327 - | let k: crate::model::EnumString = k.try_into().map_err(Self::Error::Key)?;
|
328 - |
|
329 - | match crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained::try_from(v) {
|
330 - | Ok(v) => Ok((k, v)),
|
331 - | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
332 - | }
|
296 + | .enumerate()
|
297 + | .map(|(idx, inner)| {
|
298 + | inner
|
299 + | .try_into()
|
300 + | .map_err(|inner_violation| (idx, inner_violation))
|
333 301 | })
|
334 302 | .collect();
|
335 - | let hm = res?;
|
336 - | Ok(Self(hm))
|
303 + | let inner =
|
304 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
305 + | Self::try_from(inner)
|
337 306 | }
|
338 307 | }
|
339 308 | }
|
340 - | pub(crate) mod list_of_enum_string_unconstrained {
|
309 + | pub(crate) mod set_of_range_integer_unconstrained {
|
341 310 |
|
342 311 | #[derive(Debug, Clone)]
|
343 - | pub(crate) struct ListOfEnumStringUnconstrained(
|
344 - | pub(crate) std::vec::Vec<::std::string::String>,
|
345 - | );
|
312 + | pub(crate) struct SetOfRangeIntegerUnconstrained(pub(crate) std::vec::Vec<i32>);
|
346 313 |
|
347 - | impl From<ListOfEnumStringUnconstrained>
|
348 - | for crate::constrained::MaybeConstrained<
|
349 - | crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained,
|
350 - | >
|
314 + | impl From<SetOfRangeIntegerUnconstrained>
|
315 + | for crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>
|
351 316 | {
|
352 - | fn from(value: ListOfEnumStringUnconstrained) -> Self {
|
317 + | fn from(value: SetOfRangeIntegerUnconstrained) -> Self {
|
353 318 | Self::Unconstrained(value)
|
354 319 | }
|
355 320 | }
|
356 - | impl std::convert::TryFrom<ListOfEnumStringUnconstrained>
|
357 - | for crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained
|
358 - | {
|
359 - | type Error = crate::model::list_of_enum_string_internal::ConstraintViolation;
|
321 + | impl std::convert::TryFrom<SetOfRangeIntegerUnconstrained> for crate::model::SetOfRangeInteger {
|
322 + | type Error = crate::model::set_of_range_integer_internal::ConstraintViolation;
|
360 323 | fn try_from(
|
361 - | value: ListOfEnumStringUnconstrained,
|
324 + | value: SetOfRangeIntegerUnconstrained,
|
362 325 | ) -> std::result::Result<Self, Self::Error> {
|
363 326 | let res: ::std::result::Result<
|
364 - | ::std::vec::Vec<crate::model::EnumString>,
|
327 + | ::std::vec::Vec<crate::model::RangeInteger>,
|
365 328 | (
|
366 329 | usize,
|
367 - | crate::model::enum_string_internal::ConstraintViolation,
|
330 + | crate::model::range_integer_internal::ConstraintViolation,
|
368 331 | ),
|
369 332 | > = value
|
370 333 | .0
|
371 334 | .into_iter()
|
372 335 | .enumerate()
|
373 336 | .map(|(idx, inner)| {
|
374 337 | inner
|
375 338 | .try_into()
|
376 339 | .map_err(|inner_violation| (idx, inner_violation))
|
377 340 | })
|
378 341 | .collect();
|
379 342 | let inner =
|
380 343 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
381 - | Ok(Self(inner))
|
344 + | Self::try_from(inner)
|
382 345 | }
|
383 346 | }
|
384 347 | }
|
385 - | pub(crate) mod map_of_length_list_of_pattern_string_unconstrained {
|
348 + | pub(crate) mod set_of_range_long_unconstrained {
|
386 349 |
|
387 350 | #[derive(Debug, Clone)]
|
388 - | pub(crate) struct MapOfLengthListOfPatternStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained>);
|
351 + | pub(crate) struct SetOfRangeLongUnconstrained(pub(crate) std::vec::Vec<i64>);
|
389 352 |
|
390 - | impl From<MapOfLengthListOfPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained> {
|
391 - | fn from(value: MapOfLengthListOfPatternStringUnconstrained) -> Self {
|
353 + | impl From<SetOfRangeLongUnconstrained>
|
354 + | for crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>
|
355 + | {
|
356 + | fn from(value: SetOfRangeLongUnconstrained) -> Self {
|
392 357 | Self::Unconstrained(value)
|
393 358 | }
|
394 359 | }
|
395 - | impl std::convert::TryFrom<MapOfLengthListOfPatternStringUnconstrained> for crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained {
|
396 - | type Error = crate::model::map_of_length_list_of_pattern_string_internal::ConstraintViolation;
|
397 - | fn try_from(value: MapOfLengthListOfPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
398 - | let res: ::std::result::Result<::std::collections::HashMap<crate::model::PatternString, crate::model::LengthListOfPatternString>, Self::Error> = value.0
|
360 + | impl std::convert::TryFrom<SetOfRangeLongUnconstrained> for crate::model::SetOfRangeLong {
|
361 + | type Error = crate::model::set_of_range_long_internal::ConstraintViolation;
|
362 + | fn try_from(value: SetOfRangeLongUnconstrained) -> std::result::Result<Self, Self::Error> {
|
363 + | let res: ::std::result::Result<
|
364 + | ::std::vec::Vec<crate::model::RangeLong>,
|
365 + | (
|
366 + | usize,
|
367 + | crate::model::range_long_internal::ConstraintViolation,
|
368 + | ),
|
369 + | > = value
|
370 + | .0
|
399 371 | .into_iter()
|
400 - | .map(|(k, v)| {
|
401 - | let k: crate::model::PatternString = k.try_into().map_err(Self::Error::Key)?;
|
402 - |
|
403 - | match crate::model::LengthListOfPatternString::try_from(v) {
|
404 - | Ok(v) => Ok((k, v)),
|
405 - | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
406 - | }
|
372 + | .enumerate()
|
373 + | .map(|(idx, inner)| {
|
374 + | inner
|
375 + | .try_into()
|
376 + | .map_err(|inner_violation| (idx, inner_violation))
|
407 377 | })
|
408 378 | .collect();
|
409 - | let hm = res?;
|
410 - | Ok(Self(hm))
|
379 + | let inner =
|
380 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
381 + | Self::try_from(inner)
|
411 382 | }
|
412 383 | }
|
413 384 | }
|
414 - | pub(crate) mod length_list_of_pattern_string_unconstrained {
|
385 + | pub(crate) mod list_of_range_byte_unconstrained {
|
415 386 |
|
416 387 | #[derive(Debug, Clone)]
|
417 - | pub(crate) struct LengthListOfPatternStringUnconstrained(
|
418 - | pub(crate) std::vec::Vec<::std::string::String>,
|
419 - | );
|
388 + | pub(crate) struct ListOfRangeByteUnconstrained(pub(crate) std::vec::Vec<i8>);
|
420 389 |
|
421 - | impl From<LengthListOfPatternStringUnconstrained>
|
422 - | for crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>
|
390 + | impl From<ListOfRangeByteUnconstrained>
|
391 + | for crate::constrained::MaybeConstrained<
|
392 + | crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained,
|
393 + | >
|
423 394 | {
|
424 - | fn from(value: LengthListOfPatternStringUnconstrained) -> Self {
|
395 + | fn from(value: ListOfRangeByteUnconstrained) -> Self {
|
425 396 | Self::Unconstrained(value)
|
426 397 | }
|
427 398 | }
|
428 - | impl std::convert::TryFrom<LengthListOfPatternStringUnconstrained>
|
429 - | for crate::model::LengthListOfPatternString
|
399 + | impl std::convert::TryFrom<ListOfRangeByteUnconstrained>
|
400 + | for crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained
|
430 401 | {
|
431 - | type Error = crate::model::length_list_of_pattern_string_internal::ConstraintViolation;
|
432 - | fn try_from(
|
433 - | value: LengthListOfPatternStringUnconstrained,
|
434 - | ) -> std::result::Result<Self, Self::Error> {
|
402 + | type Error = crate::model::list_of_range_byte_internal::ConstraintViolation;
|
403 + | fn try_from(value: ListOfRangeByteUnconstrained) -> std::result::Result<Self, Self::Error> {
|
435 404 | let res: ::std::result::Result<
|
436 - | ::std::vec::Vec<crate::model::PatternString>,
|
405 + | ::std::vec::Vec<crate::model::RangeByte>,
|
437 406 | (
|
438 407 | usize,
|
439 - | crate::model::pattern_string_internal::ConstraintViolation,
|
408 + | crate::model::range_byte_internal::ConstraintViolation,
|
440 409 | ),
|
441 410 | > = value
|
442 411 | .0
|
443 412 | .into_iter()
|
444 413 | .enumerate()
|
445 414 | .map(|(idx, inner)| {
|
446 415 | inner
|
447 416 | .try_into()
|
448 417 | .map_err(|inner_violation| (idx, inner_violation))
|
449 418 | })
|
450 419 | .collect();
|
451 420 | let inner =
|
452 421 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
453 - | Self::try_from(inner)
|
422 + | Ok(Self(inner))
|
454 423 | }
|
455 424 | }
|
456 425 | }
|
457 - | pub(crate) mod map_of_set_of_length_string_unconstrained {
|
426 + | pub(crate) mod list_of_range_short_unconstrained {
|
458 427 |
|
459 428 | #[derive(Debug, Clone)]
|
460 - | pub(crate) struct MapOfSetOfLengthStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained>);
|
429 + | pub(crate) struct ListOfRangeShortUnconstrained(pub(crate) std::vec::Vec<i16>);
|
461 430 |
|
462 - | impl From<MapOfSetOfLengthStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained> {
|
463 - | fn from(value: MapOfSetOfLengthStringUnconstrained) -> Self {
|
431 + | impl From<ListOfRangeShortUnconstrained>
|
432 + | for crate::constrained::MaybeConstrained<
|
433 + | crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained,
|
434 + | >
|
435 + | {
|
436 + | fn from(value: ListOfRangeShortUnconstrained) -> Self {
|
464 437 | Self::Unconstrained(value)
|
465 438 | }
|
466 439 | }
|
467 - | impl std::convert::TryFrom<MapOfSetOfLengthStringUnconstrained> for crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained {
|
468 - | type Error = crate::model::map_of_set_of_length_string_internal::ConstraintViolation;
|
469 - | fn try_from(value: MapOfSetOfLengthStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
470 - | let res: ::std::result::Result<::std::collections::HashMap<crate::model::LengthString, crate::model::SetOfLengthString>, Self::Error> = value.0
|
440 + | impl std::convert::TryFrom<ListOfRangeShortUnconstrained>
|
441 + | for crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained
|
442 + | {
|
443 + | type Error = crate::model::list_of_range_short_internal::ConstraintViolation;
|
444 + | fn try_from(
|
445 + | value: ListOfRangeShortUnconstrained,
|
446 + | ) -> std::result::Result<Self, Self::Error> {
|
447 + | let res: ::std::result::Result<
|
448 + | ::std::vec::Vec<crate::model::RangeShort>,
|
449 + | (
|
450 + | usize,
|
451 + | crate::model::range_short_internal::ConstraintViolation,
|
452 + | ),
|
453 + | > = value
|
454 + | .0
|
471 455 | .into_iter()
|
472 - | .map(|(k, v)| {
|
473 - | let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
|
474 - |
|
475 - | match crate::model::SetOfLengthString::try_from(v) {
|
476 - | Ok(v) => Ok((k, v)),
|
477 - | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
478 - | }
|
456 + | .enumerate()
|
457 + | .map(|(idx, inner)| {
|
458 + | inner
|
459 + | .try_into()
|
460 + | .map_err(|inner_violation| (idx, inner_violation))
|
479 461 | })
|
480 462 | .collect();
|
481 - | let hm = res?;
|
482 - | Ok(Self(hm))
|
463 + | let inner =
|
464 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
465 + | Ok(Self(inner))
|
483 466 | }
|
484 467 | }
|
485 468 | }
|
486 - | pub(crate) mod set_of_length_string_unconstrained {
|
469 + | pub(crate) mod list_of_range_integer_unconstrained {
|
487 470 |
|
488 471 | #[derive(Debug, Clone)]
|
489 - | pub(crate) struct SetOfLengthStringUnconstrained(
|
490 - | pub(crate) std::vec::Vec<::std::string::String>,
|
491 - | );
|
472 + | pub(crate) struct ListOfRangeIntegerUnconstrained(pub(crate) std::vec::Vec<i32>);
|
492 473 |
|
493 - | impl From<SetOfLengthStringUnconstrained>
|
494 - | for crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>
|
474 + | impl From<ListOfRangeIntegerUnconstrained>
|
475 + | for crate::constrained::MaybeConstrained<
|
476 + | crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained,
|
477 + | >
|
495 478 | {
|
496 - | fn from(value: SetOfLengthStringUnconstrained) -> Self {
|
479 + | fn from(value: ListOfRangeIntegerUnconstrained) -> Self {
|
497 480 | Self::Unconstrained(value)
|
498 481 | }
|
499 482 | }
|
500 - | impl std::convert::TryFrom<SetOfLengthStringUnconstrained> for crate::model::SetOfLengthString {
|
501 - | type Error = crate::model::set_of_length_string_internal::ConstraintViolation;
|
483 + | impl std::convert::TryFrom<ListOfRangeIntegerUnconstrained>
|
484 + | for crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained
|
485 + | {
|
486 + | type Error = crate::model::list_of_range_integer_internal::ConstraintViolation;
|
502 487 | fn try_from(
|
503 - | value: SetOfLengthStringUnconstrained,
|
488 + | value: ListOfRangeIntegerUnconstrained,
|
504 489 | ) -> std::result::Result<Self, Self::Error> {
|
505 490 | let res: ::std::result::Result<
|
506 - | ::std::vec::Vec<crate::model::LengthString>,
|
491 + | ::std::vec::Vec<crate::model::RangeInteger>,
|
507 492 | (
|
508 493 | usize,
|
509 - | crate::model::length_string_internal::ConstraintViolation,
|
494 + | crate::model::range_integer_internal::ConstraintViolation,
|
510 495 | ),
|
511 496 | > = value
|
512 497 | .0
|
513 498 | .into_iter()
|
514 499 | .enumerate()
|
515 500 | .map(|(idx, inner)| {
|
516 501 | inner
|
517 502 | .try_into()
|
518 503 | .map_err(|inner_violation| (idx, inner_violation))
|
519 504 | })
|
520 505 | .collect();
|
521 506 | let inner =
|
522 507 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
523 - | Self::try_from(inner)
|
508 + | Ok(Self(inner))
|
524 509 | }
|
525 510 | }
|
526 511 | }
|
527 - | pub(crate) mod map_of_list_of_length_string_unconstrained {
|
528 - |
|
529 - | #[derive(Debug, Clone)]
|
530 - | pub(crate) struct MapOfListOfLengthStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained>);
|
531 - |
|
532 - | impl From<MapOfListOfLengthStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained> {
|
533 - | fn from(value: MapOfListOfLengthStringUnconstrained) -> Self {
|
534 - | Self::Unconstrained(value)
|
535 - | }
|
536 - | }
|
537 - | impl std::convert::TryFrom<MapOfListOfLengthStringUnconstrained> for crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained {
|
538 - | type Error = crate::model::map_of_list_of_length_string_internal::ConstraintViolation;
|
539 - | fn try_from(value: MapOfListOfLengthStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
540 - | let res: ::std::result::Result<::std::collections::HashMap<crate::model::LengthString, crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>, Self::Error> = value.0
|
541 - | .into_iter()
|
542 - | .map(|(k, v)| {
|
543 - | let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
|
544 - |
|
545 - | match crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained::try_from(v) {
|
546 - | Ok(v) => Ok((k, v)),
|
547 - | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
548 - | }
|
549 - | })
|
550 - | .collect();
|
551 - | let hm = res?;
|
552 - | Ok(Self(hm))
|
553 - | }
|
554 - | }
|
555 - | }
|
556 - | pub(crate) mod list_of_length_string_unconstrained {
|
512 + | pub(crate) mod list_of_range_long_unconstrained {
|
557 513 |
|
558 514 | #[derive(Debug, Clone)]
|
559 - | pub(crate) struct ListOfLengthStringUnconstrained(
|
560 - | pub(crate) std::vec::Vec<::std::string::String>,
|
561 - | );
|
515 + | pub(crate) struct ListOfRangeLongUnconstrained(pub(crate) std::vec::Vec<i64>);
|
562 516 |
|
563 - | impl From<ListOfLengthStringUnconstrained>
|
517 + | impl From<ListOfRangeLongUnconstrained>
|
564 518 | for crate::constrained::MaybeConstrained<
|
565 - | crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained,
|
519 + | crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained,
|
566 520 | >
|
567 521 | {
|
568 - | fn from(value: ListOfLengthStringUnconstrained) -> Self {
|
522 + | fn from(value: ListOfRangeLongUnconstrained) -> Self {
|
569 523 | Self::Unconstrained(value)
|
570 524 | }
|
571 525 | }
|
572 - | impl std::convert::TryFrom<ListOfLengthStringUnconstrained>
|
573 - | for crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained
|
526 + | impl std::convert::TryFrom<ListOfRangeLongUnconstrained>
|
527 + | for crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained
|
574 528 | {
|
575 - | type Error = crate::model::list_of_length_string_internal::ConstraintViolation;
|
576 - | fn try_from(
|
577 - | value: ListOfLengthStringUnconstrained,
|
578 - | ) -> std::result::Result<Self, Self::Error> {
|
529 + | type Error = crate::model::list_of_range_long_internal::ConstraintViolation;
|
530 + | fn try_from(value: ListOfRangeLongUnconstrained) -> std::result::Result<Self, Self::Error> {
|
579 531 | let res: ::std::result::Result<
|
580 - | ::std::vec::Vec<crate::model::LengthString>,
|
532 + | ::std::vec::Vec<crate::model::RangeLong>,
|
581 533 | (
|
582 534 | usize,
|
583 - | crate::model::length_string_internal::ConstraintViolation,
|
535 + | crate::model::range_long_internal::ConstraintViolation,
|
584 536 | ),
|
585 537 | > = value
|
586 538 | .0
|
587 539 | .into_iter()
|
588 540 | .enumerate()
|
589 541 | .map(|(idx, inner)| {
|
590 542 | inner
|
591 543 | .try_into()
|
592 544 | .map_err(|inner_violation| (idx, inner_violation))
|
593 545 | })
|
594 546 | .collect();
|
595 547 | let inner =
|
596 548 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
597 549 | Ok(Self(inner))
|
598 550 | }
|
599 551 | }
|
600 552 | }
|
601 - | pub(crate) mod map_of_length_string_unconstrained {
|
553 + | pub(crate) mod list_of_enum_string_unconstrained {
|
602 554 |
|
603 555 | #[derive(Debug, Clone)]
|
604 - | pub(crate) struct MapOfLengthStringUnconstrained(
|
605 - | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
556 + | pub(crate) struct ListOfEnumStringUnconstrained(
|
557 + | pub(crate) std::vec::Vec<::std::string::String>,
|
606 558 | );
|
607 559 |
|
608 - | impl From<MapOfLengthStringUnconstrained>
|
560 + | impl From<ListOfEnumStringUnconstrained>
|
609 561 | for crate::constrained::MaybeConstrained<
|
610 - | crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained,
|
562 + | crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained,
|
611 563 | >
|
612 564 | {
|
613 - | fn from(value: MapOfLengthStringUnconstrained) -> Self {
|
565 + | fn from(value: ListOfEnumStringUnconstrained) -> Self {
|
614 566 | Self::Unconstrained(value)
|
615 567 | }
|
616 568 | }
|
617 - | impl std::convert::TryFrom<MapOfLengthStringUnconstrained>
|
618 - | for crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained
|
569 + | impl std::convert::TryFrom<ListOfEnumStringUnconstrained>
|
570 + | for crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained
|
619 571 | {
|
620 - | type Error = crate::model::map_of_length_string_internal::ConstraintViolation;
|
572 + | type Error = crate::model::list_of_enum_string_internal::ConstraintViolation;
|
621 573 | fn try_from(
|
622 - | value: MapOfLengthStringUnconstrained,
|
574 + | value: ListOfEnumStringUnconstrained,
|
623 575 | ) -> std::result::Result<Self, Self::Error> {
|
624 576 | let res: ::std::result::Result<
|
625 - | ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
|
626 - | Self::Error,
|
577 + | ::std::vec::Vec<crate::model::EnumString>,
|
578 + | (
|
579 + | usize,
|
580 + | crate::model::enum_string_internal::ConstraintViolation,
|
581 + | ),
|
627 582 | > = value
|
628 583 | .0
|
629 584 | .into_iter()
|
630 - | .map(|(k, v)| {
|
631 - | let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
|
632 - |
|
633 - | match crate::model::LengthString::try_from(v) {
|
634 - | Ok(v) => Ok((k, v)),
|
635 - | Err(inner_constraint_violation) => {
|
636 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
637 - | }
|
638 - | }
|
585 + | .enumerate()
|
586 + | .map(|(idx, inner)| {
|
587 + | inner
|
588 + | .try_into()
|
589 + | .map_err(|inner_violation| (idx, inner_violation))
|
639 590 | })
|
640 591 | .collect();
|
641 - | let hm = res?;
|
642 - | Ok(Self(hm))
|
592 + | let inner =
|
593 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
594 + | Ok(Self(inner))
|
643 595 | }
|
644 596 | }
|
645 597 | }
|
646 598 | pub(crate) mod recursive_list_unconstrained {
|
647 599 |
|
648 600 | #[derive(Debug, Clone)]
|
649 601 | pub(crate) struct RecursiveListUnconstrained(
|
650 602 | pub(crate)
|
651 603 | std::vec::Vec<crate::model::recursive_shapes_input_output_nested1_internal::Builder>,
|
652 604 | );
|
653 605 |
|
654 606 | impl From<RecursiveListUnconstrained>
|
655 607 | for crate::constrained::MaybeConstrained<
|
656 608 | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
657 609 | >
|
658 610 | {
|
659 611 | fn from(value: RecursiveListUnconstrained) -> Self {
|
660 612 | Self::Unconstrained(value)
|
661 613 | }
|
662 614 | }
|
663 615 | impl std::convert::TryFrom<RecursiveListUnconstrained>
|
664 616 | for crate::constrained::recursive_list_constrained::RecursiveListConstrained
|
665 617 | {
|
666 618 | type Error = crate::model::recursive_list_internal::ConstraintViolation;
|
667 619 | fn try_from(value: RecursiveListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
668 620 | let res: ::std::result::Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
|
669 621 | .0
|
670 622 | .into_iter()
|
671 623 | .enumerate()
|
672 624 | .map(|(idx, inner)| {
|
673 625 | inner.try_into().map_err(|inner_violation| (idx, inner_violation))
|
674 626 | })
|
675 627 | .collect();
|
676 628 | let inner =
|
677 629 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
678 630 | Ok(Self(inner))
|
679 631 | }
|
680 632 | }
|
681 633 | }
|
682 - | pub(crate) mod length_set_of_pattern_string_unconstrained {
|
634 + | pub(crate) mod con_b_map_unconstrained {
|
683 635 |
|
684 636 | #[derive(Debug, Clone)]
|
685 - | pub(crate) struct LengthSetOfPatternStringUnconstrained(
|
686 - | pub(crate) std::vec::Vec<::std::string::String>,
|
637 + | pub(crate) struct ConBMapUnconstrained(
|
638 + | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
687 639 | );
|
688 640 |
|
689 - | impl From<LengthSetOfPatternStringUnconstrained>
|
690 - | for crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>
|
691 - | {
|
692 - | fn from(value: LengthSetOfPatternStringUnconstrained) -> Self {
|
641 + | impl From<ConBMapUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ConBMap> {
|
642 + | fn from(value: ConBMapUnconstrained) -> Self {
|
693 643 | Self::Unconstrained(value)
|
694 644 | }
|
695 645 | }
|
696 - | impl std::convert::TryFrom<LengthSetOfPatternStringUnconstrained>
|
697 - | for crate::model::LengthSetOfPatternString
|
698 - | {
|
699 - | type Error = crate::model::length_set_of_pattern_string_internal::ConstraintViolation;
|
700 - | fn try_from(
|
701 - | value: LengthSetOfPatternStringUnconstrained,
|
702 - | ) -> std::result::Result<Self, Self::Error> {
|
646 + | impl std::convert::TryFrom<ConBMapUnconstrained> for crate::model::ConBMap {
|
647 + | type Error = crate::model::con_b_map_internal::ConstraintViolation;
|
648 + | fn try_from(value: ConBMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
703 649 | let res: ::std::result::Result<
|
704 - | ::std::vec::Vec<crate::model::PatternString>,
|
705 - | (
|
706 - | usize,
|
707 - | crate::model::pattern_string_internal::ConstraintViolation,
|
708 - | ),
|
650 + | ::std::collections::HashMap<::std::string::String, crate::model::LengthString>,
|
651 + | Self::Error,
|
709 652 | > = value
|
710 653 | .0
|
711 654 | .into_iter()
|
712 - | .enumerate()
|
713 - | .map(|(idx, inner)| {
|
714 - | inner
|
715 - | .try_into()
|
716 - | .map_err(|inner_violation| (idx, inner_violation))
|
655 + | .map(|(k, v)| match crate::model::LengthString::try_from(v) {
|
656 + | Ok(v) => Ok((k, v)),
|
657 + | Err(inner_constraint_violation) => {
|
658 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
659 + | }
|
717 660 | })
|
718 661 | .collect();
|
719 - | let inner =
|
720 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
721 - | Self::try_from(inner)
|
662 + | let hm = res?;
|
663 + | Self::try_from(hm)
|
722 664 | }
|
723 665 | }
|
724 666 | }
|
725 - | pub(crate) mod set_of_length_pattern_string_unconstrained {
|
667 + | pub(crate) mod map_of_list_of_length_string_unconstrained {
|
726 668 |
|
727 669 | #[derive(Debug, Clone)]
|
728 - | pub(crate) struct SetOfLengthPatternStringUnconstrained(
|
729 - | pub(crate) std::vec::Vec<::std::string::String>,
|
730 - | );
|
670 + | pub(crate) struct MapOfListOfLengthStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::list_of_length_string_unconstrained::ListOfLengthStringUnconstrained>);
|
731 671 |
|
732 - | impl From<SetOfLengthPatternStringUnconstrained>
|
733 - | for crate::constrained::MaybeConstrained<crate::model::SetOfLengthPatternString>
|
734 - | {
|
735 - | fn from(value: SetOfLengthPatternStringUnconstrained) -> Self {
|
672 + | impl From<MapOfListOfLengthStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained> {
|
673 + | fn from(value: MapOfListOfLengthStringUnconstrained) -> Self {
|
736 674 | Self::Unconstrained(value)
|
737 675 | }
|
738 676 | }
|
739 - | impl std::convert::TryFrom<SetOfLengthPatternStringUnconstrained>
|
740 - | for crate::model::SetOfLengthPatternString
|
741 - | {
|
742 - | type Error = crate::model::set_of_length_pattern_string_internal::ConstraintViolation;
|
743 - | fn try_from(
|
744 - | value: SetOfLengthPatternStringUnconstrained,
|
745 - | ) -> std::result::Result<Self, Self::Error> {
|
746 - | let res: ::std::result::Result<
|
747 - | ::std::vec::Vec<crate::model::LengthPatternString>,
|
748 - | (
|
749 - | usize,
|
750 - | crate::model::length_pattern_string_internal::ConstraintViolation,
|
751 - | ),
|
752 - | > = value
|
753 - | .0
|
677 + | impl std::convert::TryFrom<MapOfListOfLengthStringUnconstrained> for crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained {
|
678 + | type Error = crate::model::map_of_list_of_length_string_internal::ConstraintViolation;
|
679 + | fn try_from(value: MapOfListOfLengthStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
680 + | let res: ::std::result::Result<::std::collections::HashMap<crate::model::LengthString, crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>, Self::Error> = value.0
|
754 681 | .into_iter()
|
755 - | .enumerate()
|
756 - | .map(|(idx, inner)| {
|
757 - | inner
|
758 - | .try_into()
|
759 - | .map_err(|inner_violation| (idx, inner_violation))
|
682 + | .map(|(k, v)| {
|
683 + | let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
|
684 + |
|
685 + | match crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained::try_from(v) {
|
686 + | Ok(v) => Ok((k, v)),
|
687 + | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
688 + | }
|
760 689 | })
|
761 690 | .collect();
|
762 - | let inner =
|
763 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
764 - | Self::try_from(inner)
|
691 + | let hm = res?;
|
692 + | Ok(Self(hm))
|
765 693 | }
|
766 694 | }
|
767 695 | }
|
768 - | pub(crate) mod set_of_pattern_string_unconstrained {
|
696 + | pub(crate) mod map_of_set_of_length_string_unconstrained {
|
769 697 |
|
770 698 | #[derive(Debug, Clone)]
|
771 - | pub(crate) struct SetOfPatternStringUnconstrained(
|
772 - | pub(crate) std::vec::Vec<::std::string::String>,
|
773 - | );
|
699 + | pub(crate) struct MapOfSetOfLengthStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained>);
|
774 700 |
|
775 - | impl From<SetOfPatternStringUnconstrained>
|
776 - | for crate::constrained::MaybeConstrained<crate::model::SetOfPatternString>
|
777 - | {
|
778 - | fn from(value: SetOfPatternStringUnconstrained) -> Self {
|
701 + | impl From<MapOfSetOfLengthStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained> {
|
702 + | fn from(value: MapOfSetOfLengthStringUnconstrained) -> Self {
|
779 703 | Self::Unconstrained(value)
|
780 704 | }
|
781 705 | }
|
782 - | impl std::convert::TryFrom<SetOfPatternStringUnconstrained> for crate::model::SetOfPatternString {
|
783 - | type Error = crate::model::set_of_pattern_string_internal::ConstraintViolation;
|
784 - | fn try_from(
|
785 - | value: SetOfPatternStringUnconstrained,
|
786 - | ) -> std::result::Result<Self, Self::Error> {
|
787 - | let res: ::std::result::Result<
|
788 - | ::std::vec::Vec<crate::model::PatternString>,
|
789 - | (
|
790 - | usize,
|
791 - | crate::model::pattern_string_internal::ConstraintViolation,
|
792 - | ),
|
793 - | > = value
|
794 - | .0
|
706 + | impl std::convert::TryFrom<MapOfSetOfLengthStringUnconstrained> for crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained {
|
707 + | type Error = crate::model::map_of_set_of_length_string_internal::ConstraintViolation;
|
708 + | fn try_from(value: MapOfSetOfLengthStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
709 + | let res: ::std::result::Result<::std::collections::HashMap<crate::model::LengthString, crate::model::SetOfLengthString>, Self::Error> = value.0
|
795 710 | .into_iter()
|
796 - | .enumerate()
|
797 - | .map(|(idx, inner)| {
|
798 - | inner
|
799 - | .try_into()
|
800 - | .map_err(|inner_violation| (idx, inner_violation))
|
711 + | .map(|(k, v)| {
|
712 + | let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
|
713 + |
|
714 + | match crate::model::SetOfLengthString::try_from(v) {
|
715 + | Ok(v) => Ok((k, v)),
|
716 + | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
717 + | }
|
801 718 | })
|
802 719 | .collect();
|
803 - | let inner =
|
804 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
805 - | Self::try_from(inner)
|
720 + | let hm = res?;
|
721 + | Ok(Self(hm))
|
806 722 | }
|
807 723 | }
|
808 724 | }
|
809 - | pub(crate) mod map_of_range_byte_unconstrained {
|
725 + | pub(crate) mod map_of_length_list_of_pattern_string_unconstrained {
|
810 726 |
|
811 727 | #[derive(Debug, Clone)]
|
812 - | pub(crate) struct MapOfRangeByteUnconstrained(
|
813 - | pub(crate) std::collections::HashMap<::std::string::String, i8>,
|
814 - | );
|
728 + | pub(crate) struct MapOfLengthListOfPatternStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::length_list_of_pattern_string_unconstrained::LengthListOfPatternStringUnconstrained>);
|
815 729 |
|
816 - | impl From<MapOfRangeByteUnconstrained>
|
817 - | for crate::constrained::MaybeConstrained<
|
818 - | crate::constrained::map_of_range_byte_constrained::MapOfRangeByteConstrained,
|
819 - | >
|
820 - | {
|
821 - | fn from(value: MapOfRangeByteUnconstrained) -> Self {
|
730 + | impl From<MapOfLengthListOfPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained> {
|
731 + | fn from(value: MapOfLengthListOfPatternStringUnconstrained) -> Self {
|
822 732 | Self::Unconstrained(value)
|
823 733 | }
|
824 734 | }
|
825 - | impl std::convert::TryFrom<MapOfRangeByteUnconstrained>
|
826 - | for crate::constrained::map_of_range_byte_constrained::MapOfRangeByteConstrained
|
827 - | {
|
828 - | type Error = crate::model::map_of_range_byte_internal::ConstraintViolation;
|
829 - | fn try_from(value: MapOfRangeByteUnconstrained) -> std::result::Result<Self, Self::Error> {
|
830 - | let res: ::std::result::Result<
|
831 - | ::std::collections::HashMap<::std::string::String, crate::model::RangeByte>,
|
832 - | Self::Error,
|
833 - | > = value
|
834 - | .0
|
735 + | impl std::convert::TryFrom<MapOfLengthListOfPatternStringUnconstrained> for crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained {
|
736 + | type Error = crate::model::map_of_length_list_of_pattern_string_internal::ConstraintViolation;
|
737 + | fn try_from(value: MapOfLengthListOfPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
738 + | let res: ::std::result::Result<::std::collections::HashMap<crate::model::PatternString, crate::model::LengthListOfPatternString>, Self::Error> = value.0
|
835 739 | .into_iter()
|
836 - | .map(|(k, v)| match crate::model::RangeByte::try_from(v) {
|
740 + | .map(|(k, v)| {
|
741 + | let k: crate::model::PatternString = k.try_into().map_err(Self::Error::Key)?;
|
742 + |
|
743 + | match crate::model::LengthListOfPatternString::try_from(v) {
|
837 744 | Ok(v) => Ok((k, v)),
|
838 - | Err(inner_constraint_violation) => {
|
839 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
745 + | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
840 746 | }
|
841 747 | })
|
842 748 | .collect();
|
843 749 | let hm = res?;
|
844 750 | Ok(Self(hm))
|
845 751 | }
|
846 752 | }
|
847 753 | }
|
848 - | pub(crate) mod set_of_range_byte_unconstrained {
|
754 + | pub(crate) mod map_of_list_of_enum_string_unconstrained {
|
849 755 |
|
850 756 | #[derive(Debug, Clone)]
|
851 - | pub(crate) struct SetOfRangeByteUnconstrained(pub(crate) std::vec::Vec<i8>);
|
757 + | pub(crate) struct MapOfListOfEnumStringUnconstrained(
|
758 + | pub(crate) std::collections::HashMap<
|
759 + | ::std::string::String,
|
760 + | crate::unconstrained::list_of_enum_string_unconstrained::ListOfEnumStringUnconstrained,
|
761 + | >,
|
762 + | );
|
852 763 |
|
853 - | impl From<SetOfRangeByteUnconstrained>
|
854 - | for crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>
|
855 - | {
|
856 - | fn from(value: SetOfRangeByteUnconstrained) -> Self {
|
764 + | impl From<MapOfListOfEnumStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained> {
|
765 + | fn from(value: MapOfListOfEnumStringUnconstrained) -> Self {
|
857 766 | Self::Unconstrained(value)
|
858 767 | }
|
859 768 | }
|
860 - | impl std::convert::TryFrom<SetOfRangeByteUnconstrained> for crate::model::SetOfRangeByte {
|
861 - | type Error = crate::model::set_of_range_byte_internal::ConstraintViolation;
|
862 - | fn try_from(value: SetOfRangeByteUnconstrained) -> std::result::Result<Self, Self::Error> {
|
863 - | let res: ::std::result::Result<
|
864 - | ::std::vec::Vec<crate::model::RangeByte>,
|
865 - | (
|
866 - | usize,
|
867 - | crate::model::range_byte_internal::ConstraintViolation,
|
868 - | ),
|
869 - | > = value
|
870 - | .0
|
769 + | impl std::convert::TryFrom<MapOfListOfEnumStringUnconstrained> for crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained {
|
770 + | type Error = crate::model::map_of_list_of_enum_string_internal::ConstraintViolation;
|
771 + | fn try_from(value: MapOfListOfEnumStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
772 + | let res: ::std::result::Result<::std::collections::HashMap<crate::model::EnumString, crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>, Self::Error> = value.0
|
871 773 | .into_iter()
|
872 - | .enumerate()
|
873 - | .map(|(idx, inner)| {
|
874 - | inner
|
875 - | .try_into()
|
876 - | .map_err(|inner_violation| (idx, inner_violation))
|
774 + | .map(|(k, v)| {
|
775 + | let k: crate::model::EnumString = k.try_into().map_err(Self::Error::Key)?;
|
776 + |
|
777 + | match crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained::try_from(v) {
|
778 + | Ok(v) => Ok((k, v)),
|
779 + | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
780 + | }
|
877 781 | })
|
878 782 | .collect();
|
879 - | let inner =
|
880 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
881 - | Self::try_from(inner)
|
783 + | let hm = res?;
|
784 + | Ok(Self(hm))
|
882 785 | }
|
883 786 | }
|
884 787 | }
|
885 - | pub(crate) mod list_of_range_byte_unconstrained {
|
788 + | pub(crate) mod map_of_pattern_string_unconstrained {
|
886 789 |
|
887 790 | #[derive(Debug, Clone)]
|
888 - | pub(crate) struct ListOfRangeByteUnconstrained(pub(crate) std::vec::Vec<i8>);
|
791 + | pub(crate) struct MapOfPatternStringUnconstrained(
|
792 + | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
793 + | );
|
889 794 |
|
890 - | impl From<ListOfRangeByteUnconstrained>
|
795 + | impl From<MapOfPatternStringUnconstrained>
|
891 796 | for crate::constrained::MaybeConstrained<
|
892 - | crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained,
|
797 + | crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained,
|
893 798 | >
|
894 799 | {
|
895 - | fn from(value: ListOfRangeByteUnconstrained) -> Self {
|
800 + | fn from(value: MapOfPatternStringUnconstrained) -> Self {
|
896 801 | Self::Unconstrained(value)
|
897 802 | }
|
898 803 | }
|
899 - | impl std::convert::TryFrom<ListOfRangeByteUnconstrained>
|
900 - | for crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained
|
804 + | impl std::convert::TryFrom<MapOfPatternStringUnconstrained>
|
805 + | for crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained
|
901 806 | {
|
902 - | type Error = crate::model::list_of_range_byte_internal::ConstraintViolation;
|
903 - | fn try_from(value: ListOfRangeByteUnconstrained) -> std::result::Result<Self, Self::Error> {
|
807 + | type Error = crate::model::map_of_pattern_string_internal::ConstraintViolation;
|
808 + | fn try_from(
|
809 + | value: MapOfPatternStringUnconstrained,
|
810 + | ) -> std::result::Result<Self, Self::Error> {
|
904 811 | let res: ::std::result::Result<
|
905 - | ::std::vec::Vec<crate::model::RangeByte>,
|
906 - | (
|
907 - | usize,
|
908 - | crate::model::range_byte_internal::ConstraintViolation,
|
909 - | ),
|
812 + | ::std::collections::HashMap<
|
813 + | crate::model::PatternString,
|
814 + | crate::model::PatternString,
|
815 + | >,
|
816 + | Self::Error,
|
910 817 | > = value
|
911 818 | .0
|
912 819 | .into_iter()
|
913 - | .enumerate()
|
914 - | .map(|(idx, inner)| {
|
915 - | inner
|
916 - | .try_into()
|
917 - | .map_err(|inner_violation| (idx, inner_violation))
|
820 + | .map(|(k, v)| {
|
821 + | let k: crate::model::PatternString = k.try_into().map_err(Self::Error::Key)?;
|
822 + |
|
823 + | match crate::model::PatternString::try_from(v) {
|
824 + | Ok(v) => Ok((k, v)),
|
825 + | Err(inner_constraint_violation) => {
|
826 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
827 + | }
|
828 + | }
|
918 829 | })
|
919 830 | .collect();
|
920 - | let inner =
|
921 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
922 - | Ok(Self(inner))
|
831 + | let hm = res?;
|
832 + | Ok(Self(hm))
|
923 833 | }
|
924 834 | }
|
925 835 | }
|
926 - | pub(crate) mod map_of_range_long_unconstrained {
|
836 + | pub(crate) mod map_of_list_of_pattern_string_unconstrained {
|
927 837 |
|
928 838 | #[derive(Debug, Clone)]
|
929 - | pub(crate) struct MapOfRangeLongUnconstrained(
|
930 - | pub(crate) std::collections::HashMap<::std::string::String, i64>,
|
839 + | pub(crate) struct MapOfListOfPatternStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::list_of_pattern_string_unconstrained::ListOfPatternStringUnconstrained>);
|
840 + |
|
841 + | impl From<MapOfListOfPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained> {
|
842 + | fn from(value: MapOfListOfPatternStringUnconstrained) -> Self {
|
843 + | Self::Unconstrained(value)
|
844 + | }
|
845 + | }
|
846 + | impl std::convert::TryFrom<MapOfListOfPatternStringUnconstrained> for crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained {
|
847 + | type Error = crate::model::map_of_list_of_pattern_string_internal::ConstraintViolation;
|
848 + | fn try_from(value: MapOfListOfPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
849 + | let res: ::std::result::Result<::std::collections::HashMap<crate::model::PatternString, crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained>, Self::Error> = value.0
|
850 + | .into_iter()
|
851 + | .map(|(k, v)| {
|
852 + | let k: crate::model::PatternString = k.try_into().map_err(Self::Error::Key)?;
|
853 + |
|
854 + | match crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained::try_from(v) {
|
855 + | Ok(v) => Ok((k, v)),
|
856 + | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
857 + | }
|
858 + | })
|
859 + | .collect();
|
860 + | let hm = res?;
|
861 + | Ok(Self(hm))
|
862 + | }
|
863 + | }
|
864 + | }
|
865 + | pub(crate) mod map_of_length_pattern_string_unconstrained {
|
866 + |
|
867 + | #[derive(Debug, Clone)]
|
868 + | pub(crate) struct MapOfLengthPatternStringUnconstrained(
|
869 + | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
931 870 | );
|
932 871 |
|
933 - | impl From<MapOfRangeLongUnconstrained>
|
872 + | impl From<MapOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained> {
|
873 + | fn from(value: MapOfLengthPatternStringUnconstrained) -> Self {
|
874 + | Self::Unconstrained(value)
|
875 + | }
|
876 + | }
|
877 + | impl std::convert::TryFrom<MapOfLengthPatternStringUnconstrained> for crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained {
|
878 + | type Error = crate::model::map_of_length_pattern_string_internal::ConstraintViolation;
|
879 + | fn try_from(value: MapOfLengthPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
880 + | let res: ::std::result::Result<::std::collections::HashMap<crate::model::LengthPatternString, crate::model::LengthPatternString>, Self::Error> = value.0
|
881 + | .into_iter()
|
882 + | .map(|(k, v)| {
|
883 + | let k: crate::model::LengthPatternString = k.try_into().map_err(Self::Error::Key)?;
|
884 + |
|
885 + | match crate::model::LengthPatternString::try_from(v) {
|
886 + | Ok(v) => Ok((k, v)),
|
887 + | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
888 + | }
|
889 + | })
|
890 + | .collect();
|
891 + | let hm = res?;
|
892 + | Ok(Self(hm))
|
893 + | }
|
894 + | }
|
895 + | }
|
896 + | pub(crate) mod map_of_list_of_length_pattern_string_unconstrained {
|
897 + |
|
898 + | #[derive(Debug, Clone)]
|
899 + | pub(crate) struct MapOfListOfLengthPatternStringUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::list_of_length_pattern_string_unconstrained::ListOfLengthPatternStringUnconstrained>);
|
900 + |
|
901 + | impl From<MapOfListOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained> {
|
902 + | fn from(value: MapOfListOfLengthPatternStringUnconstrained) -> Self {
|
903 + | Self::Unconstrained(value)
|
904 + | }
|
905 + | }
|
906 + | impl std::convert::TryFrom<MapOfListOfLengthPatternStringUnconstrained> for crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained {
|
907 + | type Error = crate::model::map_of_list_of_length_pattern_string_internal::ConstraintViolation;
|
908 + | fn try_from(value: MapOfListOfLengthPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
909 + | let res: ::std::result::Result<::std::collections::HashMap<crate::model::LengthPatternString, crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained>, Self::Error> = value.0
|
910 + | .into_iter()
|
911 + | .map(|(k, v)| {
|
912 + | let k: crate::model::LengthPatternString = k.try_into().map_err(Self::Error::Key)?;
|
913 + |
|
914 + | match crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained::try_from(v) {
|
915 + | Ok(v) => Ok((k, v)),
|
916 + | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
917 + | }
|
918 + | })
|
919 + | .collect();
|
920 + | let hm = res?;
|
921 + | Ok(Self(hm))
|
922 + | }
|
923 + | }
|
924 + | }
|
925 + | pub(crate) mod map_of_enum_string_unconstrained {
|
926 + |
|
927 + | #[derive(Debug, Clone)]
|
928 + | pub(crate) struct MapOfEnumStringUnconstrained(
|
929 + | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
930 + | );
|
931 + |
|
932 + | impl From<MapOfEnumStringUnconstrained>
|
934 933 | for crate::constrained::MaybeConstrained<
|
935 - | crate::constrained::map_of_range_long_constrained::MapOfRangeLongConstrained,
|
934 + | crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained,
|
936 935 | >
|
937 936 | {
|
938 - | fn from(value: MapOfRangeLongUnconstrained) -> Self {
|
937 + | fn from(value: MapOfEnumStringUnconstrained) -> Self {
|
939 938 | Self::Unconstrained(value)
|
940 939 | }
|
941 940 | }
|
942 - | impl std::convert::TryFrom<MapOfRangeLongUnconstrained>
|
943 - | for crate::constrained::map_of_range_long_constrained::MapOfRangeLongConstrained
|
941 + | impl std::convert::TryFrom<MapOfEnumStringUnconstrained>
|
942 + | for crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained
|
944 943 | {
|
945 - | type Error = crate::model::map_of_range_long_internal::ConstraintViolation;
|
946 - | fn try_from(value: MapOfRangeLongUnconstrained) -> std::result::Result<Self, Self::Error> {
|
944 + | type Error = crate::model::map_of_enum_string_internal::ConstraintViolation;
|
945 + | fn try_from(value: MapOfEnumStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
947 946 | let res: ::std::result::Result<
|
948 - | ::std::collections::HashMap<::std::string::String, crate::model::RangeLong>,
|
947 + | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
949 948 | Self::Error,
|
950 949 | > = value
|
951 950 | .0
|
952 951 | .into_iter()
|
953 - | .map(|(k, v)| match crate::model::RangeLong::try_from(v) {
|
952 + | .map(|(k, v)| {
|
953 + | let k: crate::model::EnumString = k.try_into().map_err(Self::Error::Key)?;
|
954 + |
|
955 + | match crate::model::EnumString::try_from(v) {
|
954 956 | Ok(v) => Ok((k, v)),
|
955 957 | Err(inner_constraint_violation) => {
|
956 958 | Err(Self::Error::Value(k, inner_constraint_violation))
|
957 959 | }
|
960 + | }
|
958 961 | })
|
959 962 | .collect();
|
960 963 | let hm = res?;
|
961 964 | Ok(Self(hm))
|
962 965 | }
|
963 966 | }
|
964 967 | }
|
965 - | pub(crate) mod set_of_range_long_unconstrained {
|
968 + | pub(crate) mod con_b_list_unconstrained {
|
966 969 |
|
967 970 | #[derive(Debug, Clone)]
|
968 - | pub(crate) struct SetOfRangeLongUnconstrained(pub(crate) std::vec::Vec<i64>);
|
971 + | pub(crate) struct ConBListUnconstrained(
|
972 + | pub(crate) std::vec::Vec<
|
973 + | crate::unconstrained::con_b_list_inner_unconstrained::ConBListInnerUnconstrained,
|
974 + | >,
|
975 + | );
|
969 976 |
|
970 - | impl From<SetOfRangeLongUnconstrained>
|
971 - | for crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>
|
977 + | impl From<ConBListUnconstrained>
|
978 + | for crate::constrained::MaybeConstrained<
|
979 + | crate::constrained::con_b_list_constrained::ConBListConstrained,
|
980 + | >
|
972 981 | {
|
973 - | fn from(value: SetOfRangeLongUnconstrained) -> Self {
|
982 + | fn from(value: ConBListUnconstrained) -> Self {
|
974 983 | Self::Unconstrained(value)
|
975 984 | }
|
976 985 | }
|
977 - | impl std::convert::TryFrom<SetOfRangeLongUnconstrained> for crate::model::SetOfRangeLong {
|
978 - | type Error = crate::model::set_of_range_long_internal::ConstraintViolation;
|
979 - | fn try_from(value: SetOfRangeLongUnconstrained) -> std::result::Result<Self, Self::Error> {
|
986 + | impl std::convert::TryFrom<ConBListUnconstrained>
|
987 + | for crate::constrained::con_b_list_constrained::ConBListConstrained
|
988 + | {
|
989 + | type Error = crate::model::con_b_list_internal::ConstraintViolation;
|
990 + | fn try_from(value: ConBListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
980 991 | let res: ::std::result::Result<
|
981 - | ::std::vec::Vec<crate::model::RangeLong>,
|
992 + | ::std::vec::Vec<
|
993 + | crate::constrained::con_b_list_inner_constrained::ConBListInnerConstrained,
|
994 + | >,
|
982 995 | (
|
983 996 | usize,
|
984 - | crate::model::range_long_internal::ConstraintViolation,
|
997 + | crate::model::con_b_list_inner_internal::ConstraintViolation,
|
985 998 | ),
|
986 999 | > = value
|
987 1000 | .0
|
988 1001 | .into_iter()
|
989 1002 | .enumerate()
|
990 1003 | .map(|(idx, inner)| {
|
991 1004 | inner
|
992 1005 | .try_into()
|
993 1006 | .map_err(|inner_violation| (idx, inner_violation))
|
994 1007 | })
|
995 1008 | .collect();
|
996 1009 | let inner =
|
997 1010 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
998 - | Self::try_from(inner)
|
1011 + | Ok(Self(inner))
|
999 1012 | }
|
1000 1013 | }
|
1001 1014 | }
|
1002 - | pub(crate) mod list_of_range_long_unconstrained {
|
1015 + | pub(crate) mod length_list_unconstrained {
|
1003 1016 |
|
1004 1017 | #[derive(Debug, Clone)]
|
1005 - | pub(crate) struct ListOfRangeLongUnconstrained(pub(crate) std::vec::Vec<i64>);
|
1018 + | pub(crate) struct LengthListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
1006 1019 |
|
1007 - | impl From<ListOfRangeLongUnconstrained>
|
1008 - | for crate::constrained::MaybeConstrained<
|
1009 - | crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained,
|
1010 - | >
|
1020 + | impl From<LengthListUnconstrained>
|
1021 + | for crate::constrained::MaybeConstrained<crate::model::LengthList>
|
1011 1022 | {
|
1012 - | fn from(value: ListOfRangeLongUnconstrained) -> Self {
|
1023 + | fn from(value: LengthListUnconstrained) -> Self {
|
1013 1024 | Self::Unconstrained(value)
|
1014 1025 | }
|
1015 1026 | }
|
1016 - | impl std::convert::TryFrom<ListOfRangeLongUnconstrained>
|
1017 - | for crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained
|
1027 + | impl std::convert::TryFrom<LengthListUnconstrained> for crate::model::LengthList {
|
1028 + | type Error = crate::model::length_list_internal::ConstraintViolation;
|
1029 + | fn try_from(value: LengthListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1030 + | let inner = value.0;
|
1031 + | Self::try_from(inner)
|
1032 + | }
|
1033 + | }
|
1034 + | }
|
1035 + | pub(crate) mod sensitive_length_list_unconstrained {
|
1036 + |
|
1037 + | #[derive(Debug, Clone)]
|
1038 + | pub(crate) struct SensitiveLengthListUnconstrained(
|
1039 + | pub(crate) std::vec::Vec<crate::model::SensitiveStructure>,
|
1040 + | );
|
1041 + |
|
1042 + | impl From<SensitiveLengthListUnconstrained>
|
1043 + | for crate::constrained::MaybeConstrained<crate::model::SensitiveLengthList>
|
1018 1044 | {
|
1019 - | type Error = crate::model::list_of_range_long_internal::ConstraintViolation;
|
1020 - | fn try_from(value: ListOfRangeLongUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1045 + | fn from(value: SensitiveLengthListUnconstrained) -> Self {
|
1046 + | Self::Unconstrained(value)
|
1047 + | }
|
1048 + | }
|
1049 + | impl std::convert::TryFrom<SensitiveLengthListUnconstrained> for crate::model::SensitiveLengthList {
|
1050 + | type Error = crate::model::sensitive_length_list_internal::ConstraintViolation;
|
1051 + | fn try_from(
|
1052 + | value: SensitiveLengthListUnconstrained,
|
1053 + | ) -> std::result::Result<Self, Self::Error> {
|
1054 + | let inner = value.0;
|
1055 + | Self::try_from(inner)
|
1056 + | }
|
1057 + | }
|
1058 + | }
|
1059 + | pub(crate) mod con_b_set_unconstrained {
|
1060 + |
|
1061 + | #[derive(Debug, Clone)]
|
1062 + | pub(crate) struct ConBSetUnconstrained(
|
1063 + | pub(crate) std::vec::Vec<
|
1064 + | crate::unconstrained::con_b_set_inner_unconstrained::ConBSetInnerUnconstrained,
|
1065 + | >,
|
1066 + | );
|
1067 + |
|
1068 + | impl From<ConBSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ConBSet> {
|
1069 + | fn from(value: ConBSetUnconstrained) -> Self {
|
1070 + | Self::Unconstrained(value)
|
1071 + | }
|
1072 + | }
|
1073 + | impl std::convert::TryFrom<ConBSetUnconstrained> for crate::model::ConBSet {
|
1074 + | type Error = crate::model::con_b_set_internal::ConstraintViolation;
|
1075 + | fn try_from(value: ConBSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1021 1076 | let res: ::std::result::Result<
|
1022 - | ::std::vec::Vec<crate::model::RangeLong>,
|
1077 + | ::std::vec::Vec<crate::model::ConBSetInner>,
|
1023 1078 | (
|
1024 1079 | usize,
|
1025 - | crate::model::range_long_internal::ConstraintViolation,
|
1080 + | crate::model::con_b_set_inner_internal::ConstraintViolation,
|
1026 1081 | ),
|
1027 1082 | > = value
|
1028 1083 | .0
|
1029 1084 | .into_iter()
|
1030 1085 | .enumerate()
|
1031 1086 | .map(|(idx, inner)| {
|
1032 1087 | inner
|
1033 1088 | .try_into()
|
1034 1089 | .map_err(|inner_violation| (idx, inner_violation))
|
1035 1090 | })
|
1036 1091 | .collect();
|
1037 1092 | let inner =
|
1038 1093 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1039 - | Ok(Self(inner))
|
1094 + | Self::try_from(inner)
|
1040 1095 | }
|
1041 1096 | }
|
1042 1097 | }
|
1043 - | pub(crate) mod map_of_range_short_unconstrained {
|
1098 + | pub(crate) mod length_map_unconstrained {
|
1044 1099 |
|
1045 1100 | #[derive(Debug, Clone)]
|
1046 - | pub(crate) struct MapOfRangeShortUnconstrained(
|
1047 - | pub(crate) std::collections::HashMap<::std::string::String, i16>,
|
1101 + | pub(crate) struct LengthMapUnconstrained(
|
1102 + | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1048 1103 | );
|
1049 1104 |
|
1050 - | impl From<MapOfRangeShortUnconstrained>
|
1051 - | for crate::constrained::MaybeConstrained<
|
1052 - | crate::constrained::map_of_range_short_constrained::MapOfRangeShortConstrained,
|
1053 - | >
|
1105 + | impl From<LengthMapUnconstrained>
|
1106 + | for crate::constrained::MaybeConstrained<crate::model::LengthMap>
|
1054 1107 | {
|
1055 - | fn from(value: MapOfRangeShortUnconstrained) -> Self {
|
1108 + | fn from(value: LengthMapUnconstrained) -> Self {
|
1056 1109 | Self::Unconstrained(value)
|
1057 1110 | }
|
1058 1111 | }
|
1059 - | impl std::convert::TryFrom<MapOfRangeShortUnconstrained>
|
1060 - | for crate::constrained::map_of_range_short_constrained::MapOfRangeShortConstrained
|
1061 - | {
|
1062 - | type Error = crate::model::map_of_range_short_internal::ConstraintViolation;
|
1063 - | fn try_from(value: MapOfRangeShortUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1064 - | let res: ::std::result::Result<
|
1065 - | ::std::collections::HashMap<::std::string::String, crate::model::RangeShort>,
|
1066 - | Self::Error,
|
1067 - | > = value
|
1068 - | .0
|
1112 + | impl std::convert::TryFrom<LengthMapUnconstrained> for crate::model::LengthMap {
|
1113 + | type Error = crate::model::length_map_internal::ConstraintViolation;
|
1114 + | fn try_from(value: LengthMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1115 + | let hm = value.0;
|
1116 + | Self::try_from(hm)
|
1117 + | }
|
1118 + | }
|
1119 + | }
|
1120 + | pub(crate) mod map_of_map_of_list_of_list_of_con_b_unconstrained {
|
1121 + |
|
1122 + | #[derive(Debug, Clone)]
|
1123 + | pub(crate) struct MapOfMapOfListOfListOfConBUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::map_of_list_of_list_of_con_b_unconstrained::MapOfListOfListOfConBUnconstrained>);
|
1124 + |
|
1125 + | impl From<MapOfMapOfListOfListOfConBUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_map_of_list_of_list_of_con_b_constrained::MapOfMapOfListOfListOfConBConstrained> {
|
1126 + | fn from(value: MapOfMapOfListOfListOfConBUnconstrained) -> Self {
|
1127 + | Self::Unconstrained(value)
|
1128 + | }
|
1129 + | }
|
1130 + | impl std::convert::TryFrom<MapOfMapOfListOfListOfConBUnconstrained> for crate::constrained::map_of_map_of_list_of_list_of_con_b_constrained::MapOfMapOfListOfListOfConBConstrained {
|
1131 + | type Error = crate::model::map_of_map_of_list_of_list_of_con_b_internal::ConstraintViolation;
|
1132 + | fn try_from(value: MapOfMapOfListOfListOfConBUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1133 + | let res: ::std::result::Result<::std::collections::HashMap<::std::string::String, crate::constrained::map_of_list_of_list_of_con_b_constrained::MapOfListOfListOfConBConstrained>, Self::Error> = value.0
|
1069 1134 | .into_iter()
|
1070 - | .map(|(k, v)| match crate::model::RangeShort::try_from(v) {
|
1135 + | .map(|(k, v)| {
|
1136 + | match crate::constrained::map_of_list_of_list_of_con_b_constrained::MapOfListOfListOfConBConstrained::try_from(v) {
|
1071 1137 | Ok(v) => Ok((k, v)),
|
1072 - | Err(inner_constraint_violation) => {
|
1073 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
1138 + | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
1074 1139 | }
|
1075 1140 | })
|
1076 1141 | .collect();
|
1077 1142 | let hm = res?;
|
1078 1143 | Ok(Self(hm))
|
1079 1144 | }
|
1080 1145 | }
|
1081 1146 | }
|
1082 - | pub(crate) mod set_of_range_short_unconstrained {
|
1147 + | pub(crate) mod sparse_map_unconstrained {
|
1083 1148 |
|
1084 1149 | #[derive(Debug, Clone)]
|
1085 - | pub(crate) struct SetOfRangeShortUnconstrained(pub(crate) std::vec::Vec<i16>);
|
1150 + | pub(crate) struct SparseMapUnconstrained(
|
1151 + | pub(crate) std::collections::HashMap<
|
1152 + | ::std::string::String,
|
1153 + | ::std::option::Option<
|
1154 + | crate::unconstrained::unique_items_list_unconstrained::UniqueItemsListUnconstrained,
|
1155 + | >,
|
1156 + | >,
|
1157 + | );
|
1086 1158 |
|
1087 - | impl From<SetOfRangeShortUnconstrained>
|
1088 - | for crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>
|
1159 + | impl From<SparseMapUnconstrained>
|
1160 + | for crate::constrained::MaybeConstrained<
|
1161 + | crate::constrained::sparse_map_constrained::SparseMapConstrained,
|
1162 + | >
|
1089 1163 | {
|
1090 - | fn from(value: SetOfRangeShortUnconstrained) -> Self {
|
1164 + | fn from(value: SparseMapUnconstrained) -> Self {
|
1091 1165 | Self::Unconstrained(value)
|
1092 1166 | }
|
1093 1167 | }
|
1094 - | impl std::convert::TryFrom<SetOfRangeShortUnconstrained> for crate::model::SetOfRangeShort {
|
1095 - | type Error = crate::model::set_of_range_short_internal::ConstraintViolation;
|
1096 - | fn try_from(value: SetOfRangeShortUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1168 + | impl std::convert::TryFrom<SparseMapUnconstrained>
|
1169 + | for crate::constrained::sparse_map_constrained::SparseMapConstrained
|
1170 + | {
|
1171 + | type Error = crate::model::sparse_map_internal::ConstraintViolation;
|
1172 + | fn try_from(value: SparseMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1097 1173 | let res: ::std::result::Result<
|
1098 - | ::std::vec::Vec<crate::model::RangeShort>,
|
1099 - | (
|
1100 - | usize,
|
1101 - | crate::model::range_short_internal::ConstraintViolation,
|
1102 - | ),
|
1174 + | ::std::collections::HashMap<
|
1175 + | ::std::string::String,
|
1176 + | ::std::option::Option<crate::model::UniqueItemsList>,
|
1177 + | >,
|
1178 + | Self::Error,
|
1103 1179 | > = value
|
1104 1180 | .0
|
1105 1181 | .into_iter()
|
1106 - | .enumerate()
|
1107 - | .map(|(idx, inner)| {
|
1108 - | inner
|
1109 - | .try_into()
|
1110 - | .map_err(|inner_violation| (idx, inner_violation))
|
1182 + | .map(|(k, v)| match v {
|
1183 + | None => Ok((k, None)),
|
1184 + | Some(v) => match crate::model::UniqueItemsList::try_from(v) {
|
1185 + | Ok(v) => Ok((k, Some(v))),
|
1186 + | Err(inner_constraint_violation) => {
|
1187 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
1188 + | }
|
1189 + | },
|
1111 1190 | })
|
1112 1191 | .collect();
|
1113 - | let inner =
|
1114 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1115 - | Self::try_from(inner)
|
1192 + | let hm = res?;
|
1193 + | Ok(Self(hm))
|
1116 1194 | }
|
1117 1195 | }
|
1118 1196 | }
|
1119 - | pub(crate) mod list_of_range_short_unconstrained {
|
1197 + | pub(crate) mod sparse_list_unconstrained {
|
1120 1198 |
|
1121 1199 | #[derive(Debug, Clone)]
|
1122 - | pub(crate) struct ListOfRangeShortUnconstrained(pub(crate) std::vec::Vec<i16>);
|
1200 + | pub(crate) struct SparseListUnconstrained(
|
1201 + | pub(crate) std::vec::Vec<::std::option::Option<::std::string::String>>,
|
1202 + | );
|
1123 1203 |
|
1124 - | impl From<ListOfRangeShortUnconstrained>
|
1204 + | impl From<SparseListUnconstrained>
|
1125 1205 | for crate::constrained::MaybeConstrained<
|
1126 - | crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained,
|
1206 + | crate::constrained::sparse_list_constrained::SparseListConstrained,
|
1127 1207 | >
|
1128 1208 | {
|
1129 - | fn from(value: ListOfRangeShortUnconstrained) -> Self {
|
1209 + | fn from(value: SparseListUnconstrained) -> Self {
|
1130 1210 | Self::Unconstrained(value)
|
1131 1211 | }
|
1132 1212 | }
|
1133 - | impl std::convert::TryFrom<ListOfRangeShortUnconstrained>
|
1134 - | for crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained
|
1213 + | impl std::convert::TryFrom<SparseListUnconstrained>
|
1214 + | for crate::constrained::sparse_list_constrained::SparseListConstrained
|
1135 1215 | {
|
1136 - | type Error = crate::model::list_of_range_short_internal::ConstraintViolation;
|
1137 - | fn try_from(
|
1138 - | value: ListOfRangeShortUnconstrained,
|
1139 - | ) -> std::result::Result<Self, Self::Error> {
|
1216 + | type Error = crate::model::sparse_list_internal::ConstraintViolation;
|
1217 + | fn try_from(value: SparseListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1140 1218 | let res: ::std::result::Result<
|
1141 - | ::std::vec::Vec<crate::model::RangeShort>,
|
1219 + | ::std::vec::Vec<::std::option::Option<crate::model::LengthString>>,
|
1142 1220 | (
|
1143 1221 | usize,
|
1144 - | crate::model::range_short_internal::ConstraintViolation,
|
1222 + | crate::model::length_string_internal::ConstraintViolation,
|
1145 1223 | ),
|
1146 1224 | > = value
|
1147 1225 | .0
|
1148 1226 | .into_iter()
|
1149 1227 | .enumerate()
|
1150 1228 | .map(|(idx, inner)| {
|
1229 + | inner
|
1230 + | .map(|inner| {
|
1151 1231 | inner
|
1152 1232 | .try_into()
|
1153 1233 | .map_err(|inner_violation| (idx, inner_violation))
|
1154 1234 | })
|
1235 + | .transpose()
|
1236 + | })
|
1155 1237 | .collect();
|
1156 1238 | let inner =
|
1157 1239 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1158 1240 | Ok(Self(inner))
|
1159 1241 | }
|
1160 1242 | }
|
1161 1243 | }
|
1162 - | pub(crate) mod map_of_range_integer_unconstrained {
|
1244 + | pub(crate) mod sparse_length_map_unconstrained {
|
1163 1245 |
|
1164 1246 | #[derive(Debug, Clone)]
|
1165 - | pub(crate) struct MapOfRangeIntegerUnconstrained(
|
1166 - | pub(crate) std::collections::HashMap<::std::string::String, i32>,
|
1247 + | pub(crate) struct SparseLengthMapUnconstrained(
|
1248 + | pub(crate) std::collections::HashMap<
|
1249 + | ::std::string::String,
|
1250 + | ::std::option::Option<::std::string::String>,
|
1251 + | >,
|
1167 1252 | );
|
1168 1253 |
|
1169 - | impl From<MapOfRangeIntegerUnconstrained>
|
1170 - | for crate::constrained::MaybeConstrained<
|
1171 - | crate::constrained::map_of_range_integer_constrained::MapOfRangeIntegerConstrained,
|
1172 - | >
|
1254 + | impl From<SparseLengthMapUnconstrained>
|
1255 + | for crate::constrained::MaybeConstrained<crate::model::SparseLengthMap>
|
1173 1256 | {
|
1174 - | fn from(value: MapOfRangeIntegerUnconstrained) -> Self {
|
1257 + | fn from(value: SparseLengthMapUnconstrained) -> Self {
|
1175 1258 | Self::Unconstrained(value)
|
1176 1259 | }
|
1177 1260 | }
|
1178 - | impl std::convert::TryFrom<MapOfRangeIntegerUnconstrained>
|
1179 - | for crate::constrained::map_of_range_integer_constrained::MapOfRangeIntegerConstrained
|
1180 - | {
|
1181 - | type Error = crate::model::map_of_range_integer_internal::ConstraintViolation;
|
1182 - | fn try_from(
|
1183 - | value: MapOfRangeIntegerUnconstrained,
|
1184 - | ) -> std::result::Result<Self, Self::Error> {
|
1185 - | let res: ::std::result::Result<
|
1186 - | ::std::collections::HashMap<::std::string::String, crate::model::RangeInteger>,
|
1187 - | Self::Error,
|
1188 - | > = value
|
1189 - | .0
|
1190 - | .into_iter()
|
1191 - | .map(|(k, v)| match crate::model::RangeInteger::try_from(v) {
|
1192 - | Ok(v) => Ok((k, v)),
|
1193 - | Err(inner_constraint_violation) => {
|
1194 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
1195 - | }
|
1196 - | })
|
1197 - | .collect();
|
1198 - | let hm = res?;
|
1199 - | Ok(Self(hm))
|
1261 + | impl std::convert::TryFrom<SparseLengthMapUnconstrained> for crate::model::SparseLengthMap {
|
1262 + | type Error = crate::model::sparse_length_map_internal::ConstraintViolation;
|
1263 + | fn try_from(value: SparseLengthMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1264 + | let hm = value.0;
|
1265 + | Self::try_from(hm)
|
1200 1266 | }
|
1201 1267 | }
|
1202 1268 | }
|
1203 - | pub(crate) mod set_of_range_integer_unconstrained {
|
1269 + | pub(crate) mod sparse_length_list_unconstrained {
|
1204 1270 |
|
1205 1271 | #[derive(Debug, Clone)]
|
1206 - | pub(crate) struct SetOfRangeIntegerUnconstrained(pub(crate) std::vec::Vec<i32>);
|
1272 + | pub(crate) struct SparseLengthListUnconstrained(
|
1273 + | pub(crate) std::vec::Vec<::std::option::Option<::std::string::String>>,
|
1274 + | );
|
1207 1275 |
|
1208 - | impl From<SetOfRangeIntegerUnconstrained>
|
1209 - | for crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>
|
1276 + | impl From<SparseLengthListUnconstrained>
|
1277 + | for crate::constrained::MaybeConstrained<crate::model::SparseLengthList>
|
1210 1278 | {
|
1211 - | fn from(value: SetOfRangeIntegerUnconstrained) -> Self {
|
1279 + | fn from(value: SparseLengthListUnconstrained) -> Self {
|
1212 1280 | Self::Unconstrained(value)
|
1213 1281 | }
|
1214 1282 | }
|
1215 - | impl std::convert::TryFrom<SetOfRangeIntegerUnconstrained> for crate::model::SetOfRangeInteger {
|
1216 - | type Error = crate::model::set_of_range_integer_internal::ConstraintViolation;
|
1283 + | impl std::convert::TryFrom<SparseLengthListUnconstrained> for crate::model::SparseLengthList {
|
1284 + | type Error = crate::model::sparse_length_list_internal::ConstraintViolation;
|
1217 1285 | fn try_from(
|
1218 - | value: SetOfRangeIntegerUnconstrained,
|
1286 + | value: SparseLengthListUnconstrained,
|
1219 1287 | ) -> std::result::Result<Self, Self::Error> {
|
1220 - | let res: ::std::result::Result<
|
1221 - | ::std::vec::Vec<crate::model::RangeInteger>,
|
1222 - | (
|
1223 - | usize,
|
1224 - | crate::model::range_integer_internal::ConstraintViolation,
|
1288 + | let inner = value.0;
|
1289 + | Self::try_from(inner)
|
1290 + | }
|
1291 + | }
|
1292 + | }
|
1293 + | pub(crate) mod constrained_union_unconstrained {
|
1294 + |
|
1295 + | #[allow(clippy::enum_variant_names)]
|
1296 + | #[derive(Debug, Clone)]
|
1297 + | pub(crate) enum ConstrainedUnionUnconstrained {
|
1298 + | ConBList(crate::unconstrained::con_b_list_unconstrained::ConBListUnconstrained),
|
1299 + | ConBMap(crate::unconstrained::con_b_map_unconstrained::ConBMapUnconstrained),
|
1300 + | ConBSet(crate::unconstrained::con_b_set_unconstrained::ConBSetUnconstrained),
|
1301 + | ConstrainedStructure(crate::model::con_b_internal::Builder),
|
1302 + | EnumString(::std::string::String),
|
1303 + | LengthString(::std::string::String),
|
1304 + | }
|
1305 + | impl ::std::convert::TryFrom<ConstrainedUnionUnconstrained> for crate::model::ConstrainedUnion {
|
1306 + | type Error = crate::model::constrained_union_internal::ConstraintViolation;
|
1307 + |
|
1308 + | fn try_from(
|
1309 + | value: ConstrainedUnionUnconstrained,
|
1310 + | ) -> ::std::result::Result<Self, Self::Error> {
|
1311 + | Ok(
|
1312 + | match value {
|
1313 + | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::ConBList(unconstrained) => Self::ConBList(
|
1314 + | {
|
1315 + | let constrained: crate::constrained::con_b_list_constrained::ConBListConstrained = unconstrained
|
1316 + | .try_into()
|
1317 + | .map_err(Self::Error::ConBList)?;
|
1318 + | constrained.into()
|
1319 + | }
|
1225 1320 | ),
|
1226 - | > = value
|
1227 - | .0
|
1228 - | .into_iter()
|
1229 - | .enumerate()
|
1230 - | .map(|(idx, inner)| {
|
1231 - | inner
|
1321 + | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::ConBMap(unconstrained) => Self::ConBMap(
|
1322 + | {
|
1323 + | let constrained: crate::model::ConBMap = unconstrained
|
1232 1324 | .try_into()
|
1233 - | .map_err(|inner_violation| (idx, inner_violation))
|
1234 - | })
|
1235 - | .collect();
|
1236 - | let inner =
|
1237 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1238 - | Self::try_from(inner)
|
1325 + | .map_err(Self::Error::ConBMap)?;
|
1326 + | constrained.into()
|
1327 + | }
|
1328 + | ),
|
1329 + | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::ConBSet(unconstrained) => Self::ConBSet(
|
1330 + | {
|
1331 + | let constrained: crate::model::ConBSet = unconstrained
|
1332 + | .try_into()
|
1333 + | .map_err(Self::Error::ConBSet)?;
|
1334 + | constrained.into()
|
1335 + | }
|
1336 + | ),
|
1337 + | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::ConstrainedStructure(unconstrained) => Self::ConstrainedStructure(
|
1338 + | unconstrained
|
1339 + | .try_into()
|
1340 + |
|
1341 + |
|
1342 + | .map_err(Self::Error::ConstrainedStructure)?
|
1343 + | ),
|
1344 + | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::EnumString(unconstrained) => Self::EnumString(
|
1345 + | unconstrained
|
1346 + | .try_into()
|
1347 + |
|
1348 + |
|
1349 + | .map_err(Self::Error::EnumString)?
|
1350 + | ),
|
1351 + | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::LengthString(unconstrained) => Self::LengthString(
|
1352 + | {
|
1353 + | let constrained: crate::model::LengthString = unconstrained
|
1354 + | .try_into()
|
1355 + | .map_err(Self::Error::LengthString)?;
|
1356 + | constrained.into()
|
1357 + | }
|
1358 + | ),
|
1359 + | }
|
1360 + | )
|
1239 1361 | }
|
1240 1362 | }
|
1241 1363 | }
|
1242 - | pub(crate) mod list_of_range_integer_unconstrained {
|
1364 + | pub(crate) mod list_of_length_blob_unconstrained {
|
1243 1365 |
|
1244 1366 | #[derive(Debug, Clone)]
|
1245 - | pub(crate) struct ListOfRangeIntegerUnconstrained(pub(crate) std::vec::Vec<i32>);
|
1367 + | pub(crate) struct ListOfLengthBlobUnconstrained(
|
1368 + | pub(crate) std::vec::Vec<::aws_smithy_http_server_python::types::Blob>,
|
1369 + | );
|
1246 1370 |
|
1247 - | impl From<ListOfRangeIntegerUnconstrained>
|
1371 + | impl From<ListOfLengthBlobUnconstrained>
|
1248 1372 | for crate::constrained::MaybeConstrained<
|
1249 - | crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained,
|
1373 + | crate::constrained::list_of_length_blob_constrained::ListOfLengthBlobConstrained,
|
1250 1374 | >
|
1251 1375 | {
|
1252 - | fn from(value: ListOfRangeIntegerUnconstrained) -> Self {
|
1376 + | fn from(value: ListOfLengthBlobUnconstrained) -> Self {
|
1253 1377 | Self::Unconstrained(value)
|
1254 1378 | }
|
1255 1379 | }
|
1256 - | impl std::convert::TryFrom<ListOfRangeIntegerUnconstrained>
|
1257 - | for crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained
|
1380 + | impl std::convert::TryFrom<ListOfLengthBlobUnconstrained>
|
1381 + | for crate::constrained::list_of_length_blob_constrained::ListOfLengthBlobConstrained
|
1258 1382 | {
|
1259 - | type Error = crate::model::list_of_range_integer_internal::ConstraintViolation;
|
1383 + | type Error = crate::model::list_of_length_blob_internal::ConstraintViolation;
|
1260 1384 | fn try_from(
|
1261 - | value: ListOfRangeIntegerUnconstrained,
|
1385 + | value: ListOfLengthBlobUnconstrained,
|
1262 1386 | ) -> std::result::Result<Self, Self::Error> {
|
1263 1387 | let res: ::std::result::Result<
|
1264 - | ::std::vec::Vec<crate::model::RangeInteger>,
|
1388 + | ::std::vec::Vec<crate::model::LengthBlob>,
|
1265 1389 | (
|
1266 1390 | usize,
|
1267 - | crate::model::range_integer_internal::ConstraintViolation,
|
1391 + | crate::model::length_blob_internal::ConstraintViolation,
|
1268 1392 | ),
|
1269 1393 | > = value
|
1270 1394 | .0
|
1271 1395 | .into_iter()
|
1272 1396 | .enumerate()
|
1273 1397 | .map(|(idx, inner)| {
|
1274 1398 | inner
|
1275 1399 | .try_into()
|
1276 1400 | .map_err(|inner_violation| (idx, inner_violation))
|
1277 1401 | })
|
1278 1402 | .collect();
|
1279 1403 | let inner =
|
1280 1404 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1281 1405 | Ok(Self(inner))
|
1282 1406 | }
|
1283 1407 | }
|
1284 1408 | }
|
1285 1409 | pub(crate) mod map_of_length_blob_unconstrained {
|
1286 1410 |
|
1287 1411 | #[derive(Debug, Clone)]
|
1288 1412 | pub(crate) struct MapOfLengthBlobUnconstrained(
|
1289 1413 | pub(crate) std::collections::HashMap<
|
1290 1414 | ::std::string::String,
|
1291 1415 | ::aws_smithy_http_server_python::types::Blob,
|
1292 1416 | >,
|
1293 1417 | );
|
1294 1418 |
|
1295 1419 | impl From<MapOfLengthBlobUnconstrained>
|
1296 1420 | for crate::constrained::MaybeConstrained<
|
1297 1421 | crate::constrained::map_of_length_blob_constrained::MapOfLengthBlobConstrained,
|
1298 1422 | >
|
1299 1423 | {
|
1300 1424 | fn from(value: MapOfLengthBlobUnconstrained) -> Self {
|
1301 1425 | Self::Unconstrained(value)
|
1302 1426 | }
|
1303 1427 | }
|
1304 1428 | impl std::convert::TryFrom<MapOfLengthBlobUnconstrained>
|
1305 1429 | for crate::constrained::map_of_length_blob_constrained::MapOfLengthBlobConstrained
|
1306 1430 | {
|
1307 1431 | type Error = crate::model::map_of_length_blob_internal::ConstraintViolation;
|
1308 1432 | fn try_from(value: MapOfLengthBlobUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1309 1433 | let res: ::std::result::Result<
|
1310 - | ::std::collections::HashMap<::std::string::String, crate::model::LengthBlob>,
|
1434 + | ::std::collections::HashMap<::std::string::String, crate::model::LengthBlob>,
|
1435 + | Self::Error,
|
1436 + | > = value
|
1437 + | .0
|
1438 + | .into_iter()
|
1439 + | .map(|(k, v)| match crate::model::LengthBlob::try_from(v) {
|
1440 + | Ok(v) => Ok((k, v)),
|
1441 + | Err(inner_constraint_violation) => {
|
1442 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
1443 + | }
|
1444 + | })
|
1445 + | .collect();
|
1446 + | let hm = res?;
|
1447 + | Ok(Self(hm))
|
1448 + | }
|
1449 + | }
|
1450 + | }
|
1451 + | pub(crate) mod map_of_range_integer_unconstrained {
|
1452 + |
|
1453 + | #[derive(Debug, Clone)]
|
1454 + | pub(crate) struct MapOfRangeIntegerUnconstrained(
|
1455 + | pub(crate) std::collections::HashMap<::std::string::String, i32>,
|
1456 + | );
|
1457 + |
|
1458 + | impl From<MapOfRangeIntegerUnconstrained>
|
1459 + | for crate::constrained::MaybeConstrained<
|
1460 + | crate::constrained::map_of_range_integer_constrained::MapOfRangeIntegerConstrained,
|
1461 + | >
|
1462 + | {
|
1463 + | fn from(value: MapOfRangeIntegerUnconstrained) -> Self {
|
1464 + | Self::Unconstrained(value)
|
1465 + | }
|
1466 + | }
|
1467 + | impl std::convert::TryFrom<MapOfRangeIntegerUnconstrained>
|
1468 + | for crate::constrained::map_of_range_integer_constrained::MapOfRangeIntegerConstrained
|
1469 + | {
|
1470 + | type Error = crate::model::map_of_range_integer_internal::ConstraintViolation;
|
1471 + | fn try_from(
|
1472 + | value: MapOfRangeIntegerUnconstrained,
|
1473 + | ) -> std::result::Result<Self, Self::Error> {
|
1474 + | let res: ::std::result::Result<
|
1475 + | ::std::collections::HashMap<::std::string::String, crate::model::RangeInteger>,
|
1311 1476 | Self::Error,
|
1312 1477 | > = value
|
1313 1478 | .0
|
1314 1479 | .into_iter()
|
1315 - | .map(|(k, v)| match crate::model::LengthBlob::try_from(v) {
|
1480 + | .map(|(k, v)| match crate::model::RangeInteger::try_from(v) {
|
1316 1481 | Ok(v) => Ok((k, v)),
|
1317 1482 | Err(inner_constraint_violation) => {
|
1318 1483 | Err(Self::Error::Value(k, inner_constraint_violation))
|
1319 1484 | }
|
1320 1485 | })
|
1321 1486 | .collect();
|
1322 1487 | let hm = res?;
|
1323 1488 | Ok(Self(hm))
|
1324 1489 | }
|
1325 1490 | }
|
1326 1491 | }
|
1327 - | pub(crate) mod list_of_length_blob_unconstrained {
|
1492 + | pub(crate) mod map_of_range_short_unconstrained {
|
1328 1493 |
|
1329 1494 | #[derive(Debug, Clone)]
|
1330 - | pub(crate) struct ListOfLengthBlobUnconstrained(
|
1331 - | pub(crate) std::vec::Vec<::aws_smithy_http_server_python::types::Blob>,
|
1495 + | pub(crate) struct MapOfRangeShortUnconstrained(
|
1496 + | pub(crate) std::collections::HashMap<::std::string::String, i16>,
|
1332 1497 | );
|
1333 1498 |
|
1334 - | impl From<ListOfLengthBlobUnconstrained>
|
1499 + | impl From<MapOfRangeShortUnconstrained>
|
1335 1500 | for crate::constrained::MaybeConstrained<
|
1336 - | crate::constrained::list_of_length_blob_constrained::ListOfLengthBlobConstrained,
|
1501 + | crate::constrained::map_of_range_short_constrained::MapOfRangeShortConstrained,
|
1337 1502 | >
|
1338 1503 | {
|
1339 - | fn from(value: ListOfLengthBlobUnconstrained) -> Self {
|
1504 + | fn from(value: MapOfRangeShortUnconstrained) -> Self {
|
1340 1505 | Self::Unconstrained(value)
|
1341 1506 | }
|
1342 1507 | }
|
1343 - | impl std::convert::TryFrom<ListOfLengthBlobUnconstrained>
|
1344 - | for crate::constrained::list_of_length_blob_constrained::ListOfLengthBlobConstrained
|
1508 + | impl std::convert::TryFrom<MapOfRangeShortUnconstrained>
|
1509 + | for crate::constrained::map_of_range_short_constrained::MapOfRangeShortConstrained
|
1345 1510 | {
|
1346 - | type Error = crate::model::list_of_length_blob_internal::ConstraintViolation;
|
1347 - | fn try_from(
|
1348 - | value: ListOfLengthBlobUnconstrained,
|
1349 - | ) -> std::result::Result<Self, Self::Error> {
|
1511 + | type Error = crate::model::map_of_range_short_internal::ConstraintViolation;
|
1512 + | fn try_from(value: MapOfRangeShortUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1350 1513 | let res: ::std::result::Result<
|
1351 - | ::std::vec::Vec<crate::model::LengthBlob>,
|
1352 - | (
|
1353 - | usize,
|
1354 - | crate::model::length_blob_internal::ConstraintViolation,
|
1355 - | ),
|
1514 + | ::std::collections::HashMap<::std::string::String, crate::model::RangeShort>,
|
1515 + | Self::Error,
|
1356 1516 | > = value
|
1357 1517 | .0
|
1358 1518 | .into_iter()
|
1359 - | .enumerate()
|
1360 - | .map(|(idx, inner)| {
|
1361 - | inner
|
1362 - | .try_into()
|
1363 - | .map_err(|inner_violation| (idx, inner_violation))
|
1519 + | .map(|(k, v)| match crate::model::RangeShort::try_from(v) {
|
1520 + | Ok(v) => Ok((k, v)),
|
1521 + | Err(inner_constraint_violation) => {
|
1522 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
1523 + | }
|
1364 1524 | })
|
1365 1525 | .collect();
|
1366 - | let inner =
|
1367 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1368 - | Ok(Self(inner))
|
1526 + | let hm = res?;
|
1527 + | Ok(Self(hm))
|
1369 1528 | }
|
1370 1529 | }
|
1371 1530 | }
|
1372 - | pub(crate) mod constrained_union_unconstrained {
|
1531 + | pub(crate) mod map_of_range_long_unconstrained {
|
1373 1532 |
|
1374 - | #[allow(clippy::enum_variant_names)]
|
1375 1533 | #[derive(Debug, Clone)]
|
1376 - | pub(crate) enum ConstrainedUnionUnconstrained {
|
1377 - | ConBList(crate::unconstrained::con_b_list_unconstrained::ConBListUnconstrained),
|
1378 - | ConBMap(crate::unconstrained::con_b_map_unconstrained::ConBMapUnconstrained),
|
1379 - | ConBSet(crate::unconstrained::con_b_set_unconstrained::ConBSetUnconstrained),
|
1380 - | ConstrainedStructure(crate::model::con_b_internal::Builder),
|
1381 - | EnumString(::std::string::String),
|
1382 - | LengthString(::std::string::String),
|
1383 - | }
|
1384 - | impl ::std::convert::TryFrom<ConstrainedUnionUnconstrained> for crate::model::ConstrainedUnion {
|
1385 - | type Error = crate::model::constrained_union_internal::ConstraintViolation;
|
1534 + | pub(crate) struct MapOfRangeLongUnconstrained(
|
1535 + | pub(crate) std::collections::HashMap<::std::string::String, i64>,
|
1536 + | );
|
1386 1537 |
|
1387 - | fn try_from(
|
1388 - | value: ConstrainedUnionUnconstrained,
|
1389 - | ) -> ::std::result::Result<Self, Self::Error> {
|
1390 - | Ok(
|
1391 - | match value {
|
1392 - | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::ConBList(unconstrained) => Self::ConBList(
|
1393 - | {
|
1394 - | let constrained: crate::constrained::con_b_list_constrained::ConBListConstrained = unconstrained
|
1395 - | .try_into()
|
1396 - | .map_err(Self::Error::ConBList)?;
|
1397 - | constrained.into()
|
1398 - | }
|
1399 - | ),
|
1400 - | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::ConBMap(unconstrained) => Self::ConBMap(
|
1538 + | impl From<MapOfRangeLongUnconstrained>
|
1539 + | for crate::constrained::MaybeConstrained<
|
1540 + | crate::constrained::map_of_range_long_constrained::MapOfRangeLongConstrained,
|
1541 + | >
|
1401 1542 | {
|
1402 - | let constrained: crate::model::ConBMap = unconstrained
|
1403 - | .try_into()
|
1404 - | .map_err(Self::Error::ConBMap)?;
|
1405 - | constrained.into()
|
1543 + | fn from(value: MapOfRangeLongUnconstrained) -> Self {
|
1544 + | Self::Unconstrained(value)
|
1406 1545 | }
|
1407 - | ),
|
1408 - | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::ConBSet(unconstrained) => Self::ConBSet(
|
1409 - | {
|
1410 - | let constrained: crate::model::ConBSet = unconstrained
|
1411 - | .try_into()
|
1412 - | .map_err(Self::Error::ConBSet)?;
|
1413 - | constrained.into()
|
1414 1546 | }
|
1415 - | ),
|
1416 - | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::ConstrainedStructure(unconstrained) => Self::ConstrainedStructure(
|
1417 - | unconstrained
|
1418 - | .try_into()
|
1419 - |
|
1420 - |
|
1421 - | .map_err(Self::Error::ConstrainedStructure)?
|
1422 - | ),
|
1423 - | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::EnumString(unconstrained) => Self::EnumString(
|
1424 - | unconstrained
|
1425 - | .try_into()
|
1426 - |
|
1427 - |
|
1428 - | .map_err(Self::Error::EnumString)?
|
1429 - | ),
|
1430 - | crate::unconstrained::constrained_union_unconstrained::ConstrainedUnionUnconstrained::LengthString(unconstrained) => Self::LengthString(
|
1547 + | impl std::convert::TryFrom<MapOfRangeLongUnconstrained>
|
1548 + | for crate::constrained::map_of_range_long_constrained::MapOfRangeLongConstrained
|
1431 1549 | {
|
1432 - | let constrained: crate::model::LengthString = unconstrained
|
1433 - | .try_into()
|
1434 - | .map_err(Self::Error::LengthString)?;
|
1435 - | constrained.into()
|
1436 - | }
|
1437 - | ),
|
1550 + | type Error = crate::model::map_of_range_long_internal::ConstraintViolation;
|
1551 + | fn try_from(value: MapOfRangeLongUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1552 + | let res: ::std::result::Result<
|
1553 + | ::std::collections::HashMap<::std::string::String, crate::model::RangeLong>,
|
1554 + | Self::Error,
|
1555 + | > = value
|
1556 + | .0
|
1557 + | .into_iter()
|
1558 + | .map(|(k, v)| match crate::model::RangeLong::try_from(v) {
|
1559 + | Ok(v) => Ok((k, v)),
|
1560 + | Err(inner_constraint_violation) => {
|
1561 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
1438 1562 | }
|
1439 - | )
|
1563 + | })
|
1564 + | .collect();
|
1565 + | let hm = res?;
|
1566 + | Ok(Self(hm))
|
1440 1567 | }
|
1441 1568 | }
|
1442 1569 | }
|
1443 - | pub(crate) mod con_b_set_unconstrained {
|
1570 + | pub(crate) mod map_of_range_byte_unconstrained {
|
1444 1571 |
|
1445 1572 | #[derive(Debug, Clone)]
|
1446 - | pub(crate) struct ConBSetUnconstrained(
|
1447 - | pub(crate) std::vec::Vec<
|
1448 - | crate::unconstrained::con_b_set_inner_unconstrained::ConBSetInnerUnconstrained,
|
1449 - | >,
|
1573 + | pub(crate) struct MapOfRangeByteUnconstrained(
|
1574 + | pub(crate) std::collections::HashMap<::std::string::String, i8>,
|
1450 1575 | );
|
1451 1576 |
|
1452 - | impl From<ConBSetUnconstrained> for crate::constrained::MaybeConstrained<crate::model::ConBSet> {
|
1453 - | fn from(value: ConBSetUnconstrained) -> Self {
|
1577 + | impl From<MapOfRangeByteUnconstrained>
|
1578 + | for crate::constrained::MaybeConstrained<
|
1579 + | crate::constrained::map_of_range_byte_constrained::MapOfRangeByteConstrained,
|
1580 + | >
|
1581 + | {
|
1582 + | fn from(value: MapOfRangeByteUnconstrained) -> Self {
|
1454 1583 | Self::Unconstrained(value)
|
1455 1584 | }
|
1456 1585 | }
|
1457 - | impl std::convert::TryFrom<ConBSetUnconstrained> for crate::model::ConBSet {
|
1458 - | type Error = crate::model::con_b_set_internal::ConstraintViolation;
|
1459 - | fn try_from(value: ConBSetUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1586 + | impl std::convert::TryFrom<MapOfRangeByteUnconstrained>
|
1587 + | for crate::constrained::map_of_range_byte_constrained::MapOfRangeByteConstrained
|
1588 + | {
|
1589 + | type Error = crate::model::map_of_range_byte_internal::ConstraintViolation;
|
1590 + | fn try_from(value: MapOfRangeByteUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1460 1591 | let res: ::std::result::Result<
|
1461 - | ::std::vec::Vec<crate::model::ConBSetInner>,
|
1462 - | (
|
1463 - | usize,
|
1464 - | crate::model::con_b_set_inner_internal::ConstraintViolation,
|
1465 - | ),
|
1592 + | ::std::collections::HashMap<::std::string::String, crate::model::RangeByte>,
|
1593 + | Self::Error,
|
1466 1594 | > = value
|
1467 1595 | .0
|
1468 1596 | .into_iter()
|
1469 - | .enumerate()
|
1470 - | .map(|(idx, inner)| {
|
1471 - | inner
|
1472 - | .try_into()
|
1473 - | .map_err(|inner_violation| (idx, inner_violation))
|
1597 + | .map(|(k, v)| match crate::model::RangeByte::try_from(v) {
|
1598 + | Ok(v) => Ok((k, v)),
|
1599 + | Err(inner_constraint_violation) => {
|
1600 + | Err(Self::Error::Value(k, inner_constraint_violation))
|
1601 + | }
|
1474 1602 | })
|
1475 1603 | .collect();
|
1476 - | let inner =
|
1477 - | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1478 - | Self::try_from(inner)
|
1479 - | }
|
1480 - | }
|
1481 - | }
|
1482 - | pub(crate) mod con_b_set_inner_unconstrained {
|
1483 - |
|
1484 - | #[derive(Debug, Clone)]
|
1485 - | pub(crate) struct ConBSetInnerUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
1486 - |
|
1487 - | impl From<ConBSetInnerUnconstrained>
|
1488 - | for crate::constrained::MaybeConstrained<crate::model::ConBSetInner>
|
1489 - | {
|
1490 - | fn from(value: ConBSetInnerUnconstrained) -> Self {
|
1491 - | Self::Unconstrained(value)
|
1492 - | }
|
1493 - | }
|
1494 - | impl std::convert::TryFrom<ConBSetInnerUnconstrained> for crate::model::ConBSetInner {
|
1495 - | type Error = crate::model::con_b_set_inner_internal::ConstraintViolation;
|
1496 - | fn try_from(value: ConBSetInnerUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1497 - | let inner = value.0;
|
1498 - | Self::try_from(inner)
|
1604 + | let hm = res?;
|
1605 + | Ok(Self(hm))
|
1499 1606 | }
|
1500 1607 | }
|
1501 1608 | }
|
1502 - | pub(crate) mod con_b_list_unconstrained {
|
1609 + | pub(crate) mod list_of_pattern_string_unconstrained {
|
1503 1610 |
|
1504 1611 | #[derive(Debug, Clone)]
|
1505 - | pub(crate) struct ConBListUnconstrained(
|
1506 - | pub(crate) std::vec::Vec<
|
1507 - | crate::unconstrained::con_b_list_inner_unconstrained::ConBListInnerUnconstrained,
|
1508 - | >,
|
1612 + | pub(crate) struct ListOfPatternStringUnconstrained(
|
1613 + | pub(crate) std::vec::Vec<::std::string::String>,
|
1509 1614 | );
|
1510 1615 |
|
1511 - | impl From<ConBListUnconstrained>
|
1616 + | impl From<ListOfPatternStringUnconstrained>
|
1512 1617 | for crate::constrained::MaybeConstrained<
|
1513 - | crate::constrained::con_b_list_constrained::ConBListConstrained,
|
1618 + | crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained,
|
1514 1619 | >
|
1515 1620 | {
|
1516 - | fn from(value: ConBListUnconstrained) -> Self {
|
1621 + | fn from(value: ListOfPatternStringUnconstrained) -> Self {
|
1517 1622 | Self::Unconstrained(value)
|
1518 1623 | }
|
1519 1624 | }
|
1520 - | impl std::convert::TryFrom<ConBListUnconstrained>
|
1521 - | for crate::constrained::con_b_list_constrained::ConBListConstrained
|
1625 + | impl std::convert::TryFrom<ListOfPatternStringUnconstrained>
|
1626 + | for crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained
|
1522 1627 | {
|
1523 - | type Error = crate::model::con_b_list_internal::ConstraintViolation;
|
1524 - | fn try_from(value: ConBListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1628 + | type Error = crate::model::list_of_pattern_string_internal::ConstraintViolation;
|
1629 + | fn try_from(
|
1630 + | value: ListOfPatternStringUnconstrained,
|
1631 + | ) -> std::result::Result<Self, Self::Error> {
|
1525 1632 | let res: ::std::result::Result<
|
1526 - | ::std::vec::Vec<
|
1527 - | crate::constrained::con_b_list_inner_constrained::ConBListInnerConstrained,
|
1528 - | >,
|
1633 + | ::std::vec::Vec<crate::model::PatternString>,
|
1529 1634 | (
|
1530 1635 | usize,
|
1531 - | crate::model::con_b_list_inner_internal::ConstraintViolation,
|
1636 + | crate::model::pattern_string_internal::ConstraintViolation,
|
1532 1637 | ),
|
1533 1638 | > = value
|
1534 1639 | .0
|
1535 1640 | .into_iter()
|
1536 1641 | .enumerate()
|
1537 1642 | .map(|(idx, inner)| {
|
1538 1643 | inner
|
1539 1644 | .try_into()
|
1540 1645 | .map_err(|inner_violation| (idx, inner_violation))
|
1541 1646 | })
|
1542 1647 | .collect();
|
1543 1648 | let inner =
|
1544 1649 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1545 1650 | Ok(Self(inner))
|
1546 1651 | }
|
1547 1652 | }
|
1548 1653 | }
|
1549 - | pub(crate) mod con_b_list_inner_unconstrained {
|
1654 + | pub(crate) mod set_of_pattern_string_unconstrained {
|
1550 1655 |
|
1551 1656 | #[derive(Debug, Clone)]
|
1552 - | pub(crate) struct ConBListInnerUnconstrained(
|
1553 - | pub(crate) std::vec::Vec<crate::model::con_b_internal::Builder>,
|
1657 + | pub(crate) struct SetOfPatternStringUnconstrained(
|
1658 + | pub(crate) std::vec::Vec<::std::string::String>,
|
1554 1659 | );
|
1555 1660 |
|
1556 - | impl From<ConBListInnerUnconstrained>
|
1557 - | for crate::constrained::MaybeConstrained<
|
1558 - | crate::constrained::con_b_list_inner_constrained::ConBListInnerConstrained,
|
1559 - | >
|
1661 + | impl From<SetOfPatternStringUnconstrained>
|
1662 + | for crate::constrained::MaybeConstrained<crate::model::SetOfPatternString>
|
1560 1663 | {
|
1561 - | fn from(value: ConBListInnerUnconstrained) -> Self {
|
1664 + | fn from(value: SetOfPatternStringUnconstrained) -> Self {
|
1562 1665 | Self::Unconstrained(value)
|
1563 1666 | }
|
1564 1667 | }
|
1565 - | impl std::convert::TryFrom<ConBListInnerUnconstrained>
|
1566 - | for crate::constrained::con_b_list_inner_constrained::ConBListInnerConstrained
|
1567 - | {
|
1568 - | type Error = crate::model::con_b_list_inner_internal::ConstraintViolation;
|
1569 - | fn try_from(value: ConBListInnerUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1668 + | impl std::convert::TryFrom<SetOfPatternStringUnconstrained> for crate::model::SetOfPatternString {
|
1669 + | type Error = crate::model::set_of_pattern_string_internal::ConstraintViolation;
|
1670 + | fn try_from(
|
1671 + | value: SetOfPatternStringUnconstrained,
|
1672 + | ) -> std::result::Result<Self, Self::Error> {
|
1570 1673 | let res: ::std::result::Result<
|
1571 - | ::std::vec::Vec<crate::model::ConB>,
|
1572 - | (usize, crate::model::con_b_internal::ConstraintViolation),
|
1674 + | ::std::vec::Vec<crate::model::PatternString>,
|
1675 + | (
|
1676 + | usize,
|
1677 + | crate::model::pattern_string_internal::ConstraintViolation,
|
1678 + | ),
|
1573 1679 | > = value
|
1574 1680 | .0
|
1575 1681 | .into_iter()
|
1576 1682 | .enumerate()
|
1577 1683 | .map(|(idx, inner)| {
|
1578 1684 | inner
|
1579 1685 | .try_into()
|
1580 1686 | .map_err(|inner_violation| (idx, inner_violation))
|
1581 1687 | })
|
1582 1688 | .collect();
|
1583 1689 | let inner =
|
1584 1690 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1585 - | Ok(Self(inner))
|
1586 - | }
|
1587 - | }
|
1588 - | }
|
1589 - | pub(crate) mod sparse_length_list_unconstrained {
|
1590 - |
|
1591 - | #[derive(Debug, Clone)]
|
1592 - | pub(crate) struct SparseLengthListUnconstrained(
|
1593 - | pub(crate) std::vec::Vec<::std::option::Option<::std::string::String>>,
|
1594 - | );
|
1595 - |
|
1596 - | impl From<SparseLengthListUnconstrained>
|
1597 - | for crate::constrained::MaybeConstrained<crate::model::SparseLengthList>
|
1598 - | {
|
1599 - | fn from(value: SparseLengthListUnconstrained) -> Self {
|
1600 - | Self::Unconstrained(value)
|
1601 - | }
|
1602 - | }
|
1603 - | impl std::convert::TryFrom<SparseLengthListUnconstrained> for crate::model::SparseLengthList {
|
1604 - | type Error = crate::model::sparse_length_list_internal::ConstraintViolation;
|
1605 - | fn try_from(
|
1606 - | value: SparseLengthListUnconstrained,
|
1607 - | ) -> std::result::Result<Self, Self::Error> {
|
1608 - | let inner = value.0;
|
1609 1691 | Self::try_from(inner)
|
1610 1692 | }
|
1611 1693 | }
|
1612 1694 | }
|
1613 - | pub(crate) mod sparse_length_map_unconstrained {
|
1695 + | pub(crate) mod list_of_length_pattern_string_unconstrained {
|
1614 1696 |
|
1615 1697 | #[derive(Debug, Clone)]
|
1616 - | pub(crate) struct SparseLengthMapUnconstrained(
|
1617 - | pub(crate) std::collections::HashMap<
|
1618 - | ::std::string::String,
|
1619 - | ::std::option::Option<::std::string::String>,
|
1620 - | >,
|
1698 + | pub(crate) struct ListOfLengthPatternStringUnconstrained(
|
1699 + | pub(crate) std::vec::Vec<::std::string::String>,
|
1621 1700 | );
|
1622 1701 |
|
1623 - | impl From<SparseLengthMapUnconstrained>
|
1624 - | for crate::constrained::MaybeConstrained<crate::model::SparseLengthMap>
|
1625 - | {
|
1626 - | fn from(value: SparseLengthMapUnconstrained) -> Self {
|
1702 + | impl From<ListOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained> {
|
1703 + | fn from(value: ListOfLengthPatternStringUnconstrained) -> Self {
|
1627 1704 | Self::Unconstrained(value)
|
1628 1705 | }
|
1629 1706 | }
|
1630 - | impl std::convert::TryFrom<SparseLengthMapUnconstrained> for crate::model::SparseLengthMap {
|
1631 - | type Error = crate::model::sparse_length_map_internal::ConstraintViolation;
|
1632 - | fn try_from(value: SparseLengthMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1633 - | let hm = value.0;
|
1634 - | Self::try_from(hm)
|
1707 + | impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
|
1708 + | type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
|
1709 + | fn try_from(value: ListOfLengthPatternStringUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1710 + | let res: ::std::result::Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
|
1711 + | .0
|
1712 + | .into_iter()
|
1713 + | .enumerate()
|
1714 + | .map(|(idx, inner)| {
|
1715 + | inner.try_into().map_err(|inner_violation| (idx, inner_violation))
|
1716 + | })
|
1717 + | .collect();
|
1718 + | let inner = res
|
1719 + |
|
1720 + | .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1721 + | Ok(Self(inner))
|
1635 1722 | }
|
1636 1723 | }
|
1637 1724 | }
|
1638 - | pub(crate) mod sparse_list_unconstrained {
|
1725 + | pub(crate) mod set_of_length_pattern_string_unconstrained {
|
1639 1726 |
|
1640 1727 | #[derive(Debug, Clone)]
|
1641 - | pub(crate) struct SparseListUnconstrained(
|
1642 - | pub(crate) std::vec::Vec<::std::option::Option<::std::string::String>>,
|
1728 + | pub(crate) struct SetOfLengthPatternStringUnconstrained(
|
1729 + | pub(crate) std::vec::Vec<::std::string::String>,
|
1643 1730 | );
|
1644 1731 |
|
1645 - | impl From<SparseListUnconstrained>
|
1646 - | for crate::constrained::MaybeConstrained<
|
1647 - | crate::constrained::sparse_list_constrained::SparseListConstrained,
|
1648 - | >
|
1732 + | impl From<SetOfLengthPatternStringUnconstrained>
|
1733 + | for crate::constrained::MaybeConstrained<crate::model::SetOfLengthPatternString>
|
1649 1734 | {
|
1650 - | fn from(value: SparseListUnconstrained) -> Self {
|
1735 + | fn from(value: SetOfLengthPatternStringUnconstrained) -> Self {
|
1651 1736 | Self::Unconstrained(value)
|
1652 1737 | }
|
1653 1738 | }
|
1654 - | impl std::convert::TryFrom<SparseListUnconstrained>
|
1655 - | for crate::constrained::sparse_list_constrained::SparseListConstrained
|
1739 + | impl std::convert::TryFrom<SetOfLengthPatternStringUnconstrained>
|
1740 + | for crate::model::SetOfLengthPatternString
|
1656 1741 | {
|
1657 - | type Error = crate::model::sparse_list_internal::ConstraintViolation;
|
1658 - | fn try_from(value: SparseListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1742 + | type Error = crate::model::set_of_length_pattern_string_internal::ConstraintViolation;
|
1743 + | fn try_from(
|
1744 + | value: SetOfLengthPatternStringUnconstrained,
|
1745 + | ) -> std::result::Result<Self, Self::Error> {
|
1659 1746 | let res: ::std::result::Result<
|
1660 - | ::std::vec::Vec<::std::option::Option<crate::model::LengthString>>,
|
1747 + | ::std::vec::Vec<crate::model::LengthPatternString>,
|
1661 1748 | (
|
1662 1749 | usize,
|
1663 - | crate::model::length_string_internal::ConstraintViolation,
|
1750 + | crate::model::length_pattern_string_internal::ConstraintViolation,
|
1664 1751 | ),
|
1665 1752 | > = value
|
1666 1753 | .0
|
1667 1754 | .into_iter()
|
1668 1755 | .enumerate()
|
1669 1756 | .map(|(idx, inner)| {
|
1670 - | inner
|
1671 - | .map(|inner| {
|
1672 1757 | inner
|
1673 1758 | .try_into()
|
1674 1759 | .map_err(|inner_violation| (idx, inner_violation))
|
1675 1760 | })
|
1676 - | .transpose()
|
1677 - | })
|
1678 1761 | .collect();
|
1679 1762 | let inner =
|
1680 1763 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1681 - | Ok(Self(inner))
|
1764 + | Self::try_from(inner)
|
1682 1765 | }
|
1683 1766 | }
|
1684 1767 | }
|
1685 - | pub(crate) mod sparse_map_unconstrained {
|
1768 + | pub(crate) mod con_b_list_inner_unconstrained {
|
1686 1769 |
|
1687 1770 | #[derive(Debug, Clone)]
|
1688 - | pub(crate) struct SparseMapUnconstrained(
|
1689 - | pub(crate) std::collections::HashMap<
|
1690 - | ::std::string::String,
|
1691 - | ::std::option::Option<
|
1692 - | crate::unconstrained::unique_items_list_unconstrained::UniqueItemsListUnconstrained,
|
1693 - | >,
|
1694 - | >,
|
1771 + | pub(crate) struct ConBListInnerUnconstrained(
|
1772 + | pub(crate) std::vec::Vec<crate::model::con_b_internal::Builder>,
|
1695 1773 | );
|
1696 1774 |
|
1697 - | impl From<SparseMapUnconstrained>
|
1775 + | impl From<ConBListInnerUnconstrained>
|
1698 1776 | for crate::constrained::MaybeConstrained<
|
1699 - | crate::constrained::sparse_map_constrained::SparseMapConstrained,
|
1777 + | crate::constrained::con_b_list_inner_constrained::ConBListInnerConstrained,
|
1700 1778 | >
|
1701 1779 | {
|
1702 - | fn from(value: SparseMapUnconstrained) -> Self {
|
1780 + | fn from(value: ConBListInnerUnconstrained) -> Self {
|
1703 1781 | Self::Unconstrained(value)
|
1704 1782 | }
|
1705 1783 | }
|
1706 - | impl std::convert::TryFrom<SparseMapUnconstrained>
|
1707 - | for crate::constrained::sparse_map_constrained::SparseMapConstrained
|
1784 + | impl std::convert::TryFrom<ConBListInnerUnconstrained>
|
1785 + | for crate::constrained::con_b_list_inner_constrained::ConBListInnerConstrained
|
1708 1786 | {
|
1709 - | type Error = crate::model::sparse_map_internal::ConstraintViolation;
|
1710 - | fn try_from(value: SparseMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1787 + | type Error = crate::model::con_b_list_inner_internal::ConstraintViolation;
|
1788 + | fn try_from(value: ConBListInnerUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1711 1789 | let res: ::std::result::Result<
|
1712 - | ::std::collections::HashMap<
|
1713 - | ::std::string::String,
|
1714 - | ::std::option::Option<crate::model::UniqueItemsList>,
|
1715 - | >,
|
1716 - | Self::Error,
|
1790 + | ::std::vec::Vec<crate::model::ConB>,
|
1791 + | (usize, crate::model::con_b_internal::ConstraintViolation),
|
1717 1792 | > = value
|
1718 1793 | .0
|
1719 1794 | .into_iter()
|
1720 - | .map(|(k, v)| match v {
|
1721 - | None => Ok((k, None)),
|
1722 - | Some(v) => match crate::model::UniqueItemsList::try_from(v) {
|
1723 - | Ok(v) => Ok((k, Some(v))),
|
1724 - | Err(inner_constraint_violation) => {
|
1725 - | Err(Self::Error::Value(k, inner_constraint_violation))
|
1726 - | }
|
1727 - | },
|
1795 + | .enumerate()
|
1796 + | .map(|(idx, inner)| {
|
1797 + | inner
|
1798 + | .try_into()
|
1799 + | .map_err(|inner_violation| (idx, inner_violation))
|
1728 1800 | })
|
1729 1801 | .collect();
|
1730 - | let hm = res?;
|
1731 - | Ok(Self(hm))
|
1802 + | let inner =
|
1803 + | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
1804 + | Ok(Self(inner))
|
1732 1805 | }
|
1733 1806 | }
|
1734 1807 | }
|
1735 - | pub(crate) mod unique_items_list_unconstrained {
|
1808 + | pub(crate) mod con_b_set_inner_unconstrained {
|
1736 1809 |
|
1737 1810 | #[derive(Debug, Clone)]
|
1738 - | pub(crate) struct UniqueItemsListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
1811 + | pub(crate) struct ConBSetInnerUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
1739 1812 |
|
1740 - | impl From<UniqueItemsListUnconstrained>
|
1741 - | for crate::constrained::MaybeConstrained<crate::model::UniqueItemsList>
|
1813 + | impl From<ConBSetInnerUnconstrained>
|
1814 + | for crate::constrained::MaybeConstrained<crate::model::ConBSetInner>
|
1742 1815 | {
|
1743 - | fn from(value: UniqueItemsListUnconstrained) -> Self {
|
1816 + | fn from(value: ConBSetInnerUnconstrained) -> Self {
|
1744 1817 | Self::Unconstrained(value)
|
1745 1818 | }
|
1746 1819 | }
|
1747 - | impl std::convert::TryFrom<UniqueItemsListUnconstrained> for crate::model::UniqueItemsList {
|
1748 - | type Error = crate::model::unique_items_list_internal::ConstraintViolation;
|
1749 - | fn try_from(value: UniqueItemsListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1820 + | impl std::convert::TryFrom<ConBSetInnerUnconstrained> for crate::model::ConBSetInner {
|
1821 + | type Error = crate::model::con_b_set_inner_internal::ConstraintViolation;
|
1822 + | fn try_from(value: ConBSetInnerUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1750 1823 | let inner = value.0;
|
1751 1824 | Self::try_from(inner)
|
1752 1825 | }
|
1753 1826 | }
|
1754 1827 | }
|
1755 - | pub(crate) mod map_of_map_of_list_of_list_of_con_b_unconstrained {
|
1756 - |
|
1757 - | #[derive(Debug, Clone)]
|
1758 - | pub(crate) struct MapOfMapOfListOfListOfConBUnconstrained(pub(crate) std::collections::HashMap<::std::string::String, crate::unconstrained::map_of_list_of_list_of_con_b_unconstrained::MapOfListOfListOfConBUnconstrained>);
|
1759 - |
|
1760 - | impl From<MapOfMapOfListOfListOfConBUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_map_of_list_of_list_of_con_b_constrained::MapOfMapOfListOfListOfConBConstrained> {
|
1761 - | fn from(value: MapOfMapOfListOfListOfConBUnconstrained) -> Self {
|
1762 - | Self::Unconstrained(value)
|
1763 - | }
|
1764 - | }
|
1765 - | impl std::convert::TryFrom<MapOfMapOfListOfListOfConBUnconstrained> for crate::constrained::map_of_map_of_list_of_list_of_con_b_constrained::MapOfMapOfListOfListOfConBConstrained {
|
1766 - | type Error = crate::model::map_of_map_of_list_of_list_of_con_b_internal::ConstraintViolation;
|
1767 - | fn try_from(value: MapOfMapOfListOfListOfConBUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1768 - | let res: ::std::result::Result<::std::collections::HashMap<::std::string::String, crate::constrained::map_of_list_of_list_of_con_b_constrained::MapOfListOfListOfConBConstrained>, Self::Error> = value.0
|
1769 - | .into_iter()
|
1770 - | .map(|(k, v)| {
|
1771 - | match crate::constrained::map_of_list_of_list_of_con_b_constrained::MapOfListOfListOfConBConstrained::try_from(v) {
|
1772 - | Ok(v) => Ok((k, v)),
|
1773 - | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
1774 - | }
|
1775 - | })
|
1776 - | .collect();
|
1777 - | let hm = res?;
|
1778 - | Ok(Self(hm))
|
1779 - | }
|
1780 - | }
|
1781 - | }
|
1782 1828 | pub(crate) mod map_of_list_of_list_of_con_b_unconstrained {
|
1783 1829 |
|
1784 1830 | #[derive(Debug, Clone)]
|
1785 1831 | pub(crate) struct MapOfListOfListOfConBUnconstrained(
|
1786 1832 | pub(crate) std::collections::HashMap<
|
1787 1833 | ::std::string::String,
|
1788 1834 | crate::unconstrained::con_b_list_unconstrained::ConBListUnconstrained,
|
1789 1835 | >,
|
1790 1836 | );
|
1791 1837 |
|
1792 1838 | impl From<MapOfListOfListOfConBUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_list_of_con_b_constrained::MapOfListOfListOfConBConstrained> {
|
1793 1839 | fn from(value: MapOfListOfListOfConBUnconstrained) -> Self {
|
1794 1840 | Self::Unconstrained(value)
|
1795 1841 | }
|
1796 1842 | }
|
1797 1843 | impl std::convert::TryFrom<MapOfListOfListOfConBUnconstrained> for crate::constrained::map_of_list_of_list_of_con_b_constrained::MapOfListOfListOfConBConstrained {
|
1798 1844 | type Error = crate::model::map_of_list_of_list_of_con_b_internal::ConstraintViolation;
|
1799 1845 | fn try_from(value: MapOfListOfListOfConBUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1800 1846 | let res: ::std::result::Result<::std::collections::HashMap<::std::string::String, crate::constrained::con_b_list_constrained::ConBListConstrained>, Self::Error> = value.0
|
1801 1847 | .into_iter()
|
1802 1848 | .map(|(k, v)| {
|
1803 1849 | match crate::constrained::con_b_list_constrained::ConBListConstrained::try_from(v) {
|
1804 1850 | Ok(v) => Ok((k, v)),
|
1805 1851 | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
1806 1852 | }
|
1807 1853 | })
|
1808 1854 | .collect();
|
1809 1855 | let hm = res?;
|
1810 1856 | Ok(Self(hm))
|
1811 1857 | }
|
1812 1858 | }
|
1813 1859 | }
|
1814 - | pub(crate) mod length_map_unconstrained {
|
1815 - |
|
1816 - | #[derive(Debug, Clone)]
|
1817 - | pub(crate) struct LengthMapUnconstrained(
|
1818 - | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1819 - | );
|
1820 - |
|
1821 - | impl From<LengthMapUnconstrained>
|
1822 - | for crate::constrained::MaybeConstrained<crate::model::LengthMap>
|
1823 - | {
|
1824 - | fn from(value: LengthMapUnconstrained) -> Self {
|
1825 - | Self::Unconstrained(value)
|
1826 - | }
|
1827 - | }
|
1828 - | impl std::convert::TryFrom<LengthMapUnconstrained> for crate::model::LengthMap {
|
1829 - | type Error = crate::model::length_map_internal::ConstraintViolation;
|
1830 - | fn try_from(value: LengthMapUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1831 - | let hm = value.0;
|
1832 - | Self::try_from(hm)
|
1833 - | }
|
1834 - | }
|
1835 - | }
|
1836 - | pub(crate) mod sensitive_length_list_unconstrained {
|
1837 - |
|
1838 - | #[derive(Debug, Clone)]
|
1839 - | pub(crate) struct SensitiveLengthListUnconstrained(
|
1840 - | pub(crate) std::vec::Vec<crate::model::SensitiveStructure>,
|
1841 - | );
|
1842 - |
|
1843 - | impl From<SensitiveLengthListUnconstrained>
|
1844 - | for crate::constrained::MaybeConstrained<crate::model::SensitiveLengthList>
|
1845 - | {
|
1846 - | fn from(value: SensitiveLengthListUnconstrained) -> Self {
|
1847 - | Self::Unconstrained(value)
|
1848 - | }
|
1849 - | }
|
1850 - | impl std::convert::TryFrom<SensitiveLengthListUnconstrained> for crate::model::SensitiveLengthList {
|
1851 - | type Error = crate::model::sensitive_length_list_internal::ConstraintViolation;
|
1852 - | fn try_from(
|
1853 - | value: SensitiveLengthListUnconstrained,
|
1854 - | ) -> std::result::Result<Self, Self::Error> {
|
1855 - | let inner = value.0;
|
1856 - | Self::try_from(inner)
|
1857 - | }
|
1858 - | }
|
1859 - | }
|
1860 - | pub(crate) mod length_list_unconstrained {
|
1860 + | pub(crate) mod unique_items_list_unconstrained {
|
1861 1861 |
|
1862 1862 | #[derive(Debug, Clone)]
|
1863 - | pub(crate) struct LengthListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
1863 + | pub(crate) struct UniqueItemsListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
|
1864 1864 |
|
1865 - | impl From<LengthListUnconstrained>
|
1866 - | for crate::constrained::MaybeConstrained<crate::model::LengthList>
|
1865 + | impl From<UniqueItemsListUnconstrained>
|
1866 + | for crate::constrained::MaybeConstrained<crate::model::UniqueItemsList>
|
1867 1867 | {
|
1868 - | fn from(value: LengthListUnconstrained) -> Self {
|
1868 + | fn from(value: UniqueItemsListUnconstrained) -> Self {
|
1869 1869 | Self::Unconstrained(value)
|
1870 1870 | }
|
1871 1871 | }
|
1872 - | impl std::convert::TryFrom<LengthListUnconstrained> for crate::model::LengthList {
|
1873 - | type Error = crate::model::length_list_internal::ConstraintViolation;
|
1874 - | fn try_from(value: LengthListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1872 + | impl std::convert::TryFrom<UniqueItemsListUnconstrained> for crate::model::UniqueItemsList {
|
1873 + | type Error = crate::model::unique_items_list_internal::ConstraintViolation;
|
1874 + | fn try_from(value: UniqueItemsListUnconstrained) -> std::result::Result<Self, Self::Error> {
|
1875 1875 | let inner = value.0;
|
1876 1876 | Self::try_from(inner)
|
1877 1877 | }
|
1878 1878 | }
|
1879 1879 | }
|