51 51 | "aws.protocoltests.restxml.synthetic",
|
52 52 | "XmlIntEnumsInput",
|
53 53 | );
|
54 54 | static XMLINTENUMSINPUT_MEMBER_INT_ENUM1: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
55 55 | ::aws_smithy_schema::ShapeId::from_static(
|
56 56 | "aws.protocoltests.restxml.synthetic#XmlIntEnumsInput$intEnum1",
|
57 57 | "aws.protocoltests.restxml.synthetic",
|
58 58 | "XmlIntEnumsInput",
|
59 59 | ),
|
60 60 | ::aws_smithy_schema::ShapeType::Integer,
|
61 - | "int_enum1",
|
61 + | "intEnum1",
|
62 62 | 0,
|
63 63 | );
|
64 64 | static XMLINTENUMSINPUT_MEMBER_INT_ENUM2: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
65 65 | ::aws_smithy_schema::ShapeId::from_static(
|
66 66 | "aws.protocoltests.restxml.synthetic#XmlIntEnumsInput$intEnum2",
|
67 67 | "aws.protocoltests.restxml.synthetic",
|
68 68 | "XmlIntEnumsInput",
|
69 69 | ),
|
70 70 | ::aws_smithy_schema::ShapeType::Integer,
|
71 - | "int_enum2",
|
71 + | "intEnum2",
|
72 72 | 1,
|
73 73 | );
|
74 74 | static XMLINTENUMSINPUT_MEMBER_INT_ENUM3: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
75 75 | ::aws_smithy_schema::ShapeId::from_static(
|
76 76 | "aws.protocoltests.restxml.synthetic#XmlIntEnumsInput$intEnum3",
|
77 77 | "aws.protocoltests.restxml.synthetic",
|
78 78 | "XmlIntEnumsInput",
|
79 79 | ),
|
80 80 | ::aws_smithy_schema::ShapeType::Integer,
|
81 - | "int_enum3",
|
81 + | "intEnum3",
|
82 82 | 2,
|
83 83 | );
|
84 84 | static XMLINTENUMSINPUT_MEMBER_INT_ENUM_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
85 85 | ::aws_smithy_schema::ShapeId::from_static(
|
86 86 | "aws.protocoltests.restxml.synthetic#XmlIntEnumsInput$intEnumList",
|
87 87 | "aws.protocoltests.restxml.synthetic",
|
88 88 | "XmlIntEnumsInput",
|
89 89 | ),
|
90 90 | ::aws_smithy_schema::ShapeType::List,
|
91 - | "int_enum_list",
|
91 + | "intEnumList",
|
92 92 | 3,
|
93 93 | );
|
94 94 | static XMLINTENUMSINPUT_MEMBER_INT_ENUM_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
95 95 | ::aws_smithy_schema::ShapeId::from_static(
|
96 96 | "aws.protocoltests.restxml.synthetic#XmlIntEnumsInput$intEnumSet",
|
97 97 | "aws.protocoltests.restxml.synthetic",
|
98 98 | "XmlIntEnumsInput",
|
99 99 | ),
|
100 100 | ::aws_smithy_schema::ShapeType::List,
|
101 - | "int_enum_set",
|
101 + | "intEnumSet",
|
102 102 | 4,
|
103 103 | );
|
104 104 | static XMLINTENUMSINPUT_MEMBER_INT_ENUM_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
105 105 | ::aws_smithy_schema::ShapeId::from_static(
|
106 106 | "aws.protocoltests.restxml.synthetic#XmlIntEnumsInput$intEnumMap",
|
107 107 | "aws.protocoltests.restxml.synthetic",
|
108 108 | "XmlIntEnumsInput",
|
109 109 | ),
|
110 110 | ::aws_smithy_schema::ShapeType::Map,
|
111 - | "int_enum_map",
|
111 + | "intEnumMap",
|
112 112 | 5,
|
113 113 | );
|
114 114 | static XMLINTENUMSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
115 115 | XMLINTENUMSINPUT_SCHEMA_ID,
|
116 116 | ::aws_smithy_schema::ShapeType::Structure,
|
117 117 | &[
|
118 118 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM1,
|
119 119 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM2,
|
120 120 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM3,
|
121 121 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM_LIST,
|
122 122 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM_SET,
|
123 123 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM_MAP,
|
124 124 | ],
|
125 - | );
|
125 + | )
|
126 + | .with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/XmlIntEnums", None));
|
126 127 | impl XmlIntEnumsInput {
|
127 128 | /// The schema for this shape.
|
128 129 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &XMLINTENUMSINPUT_SCHEMA;
|
129 130 | }
|
130 131 | impl ::aws_smithy_schema::serde::SerializableStruct for XmlIntEnumsInput {
|
131 132 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
132 133 | fn serialize_members(
|
133 134 | &self,
|
134 135 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
135 136 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
136 137 | if let Some(ref val) = self.int_enum1 {
|
137 138 | ser.write_integer(&XMLINTENUMSINPUT_MEMBER_INT_ENUM1, *val)?;
|
138 139 | }
|
139 140 | if let Some(ref val) = self.int_enum2 {
|
140 141 | ser.write_integer(&XMLINTENUMSINPUT_MEMBER_INT_ENUM2, *val)?;
|
141 142 | }
|
142 143 | if let Some(ref val) = self.int_enum3 {
|
143 144 | ser.write_integer(&XMLINTENUMSINPUT_MEMBER_INT_ENUM3, *val)?;
|
144 145 | }
|
145 146 | if let Some(ref val) = self.int_enum_list {
|
146 147 | ser.write_list(
|
147 148 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM_LIST,
|
148 149 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
149 150 | for item in val {
|
150 151 | ser.write_integer(&aws_smithy_schema::prelude::INTEGER, *item)?;
|
151 152 | }
|
152 153 | Ok(())
|
153 154 | },
|
154 155 | )?;
|
155 156 | }
|
156 157 | if let Some(ref val) = self.int_enum_set {
|
157 158 | ser.write_list(
|
158 159 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM_SET,
|
159 160 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
160 161 | for item in val {
|
161 162 | ser.write_integer(&aws_smithy_schema::prelude::INTEGER, *item)?;
|
162 163 | }
|
163 164 | Ok(())
|
164 165 | },
|
165 166 | )?;
|
166 167 | }
|
167 168 | if let Some(ref val) = self.int_enum_map {
|
168 169 | ser.write_map(
|
169 170 | &XMLINTENUMSINPUT_MEMBER_INT_ENUM_MAP,
|
170 171 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
171 172 | for (key, value) in val {
|
172 173 | ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
|
173 174 | ser.write_integer(&::aws_smithy_schema::prelude::INTEGER, *value)?;
|
174 175 | }
|
175 176 | Ok(())
|
176 177 | },
|
177 178 | )?;
|
178 179 | }
|
179 180 | Ok(())
|
180 181 | }
|
181 182 | }
|
182 183 | impl XmlIntEnumsInput {
|
183 184 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
184 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
185 - | deserializer: &mut D,
|
185 + | pub fn deserialize(
|
186 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
186 187 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
187 188 | #[allow(unused_variables, unused_mut)]
|
188 189 | let mut builder = Self::builder();
|
189 190 | #[allow(
|
190 191 | unused_variables,
|
191 192 | unreachable_code,
|
192 193 | clippy::single_match,
|
193 194 | clippy::match_single_binding,
|
194 195 | clippy::diverging_sub_expression
|
195 196 | )]
|
196 - | deserializer.read_struct(&XMLINTENUMSINPUT_SCHEMA, (), |_, member, deser| {
|
197 + | deserializer.read_struct(&XMLINTENUMSINPUT_SCHEMA, &mut |member, deser| {
|
197 198 | match member.member_index() {
|
198 199 | Some(0) => {
|
199 200 | builder.int_enum1 = Some(deser.read_integer(member)?);
|
200 201 | }
|
201 202 | Some(1) => {
|
202 203 | builder.int_enum2 = Some(deser.read_integer(member)?);
|
203 204 | }
|
204 205 | Some(2) => {
|
205 206 | builder.int_enum3 = Some(deser.read_integer(member)?);
|
206 207 | }
|
207 208 | Some(3) => {
|
208 - | builder.int_enum_list = Some({
|
209 - | let container = if let Some(cap) = deser.container_size() {
|
210 - | Vec::with_capacity(cap)
|
211 - | } else {
|
212 - | Vec::new()
|
213 - | };
|
214 - | deser.read_list(member, container, |mut list, deser| {
|
215 - | list.push(deser.read_integer(member)?);
|
216 - | Ok(list)
|
217 - | })?
|
218 - | });
|
209 + | builder.int_enum_list = Some(deser.read_integer_list(member)?);
|
219 210 | }
|
220 211 | Some(4) => {
|
221 - | builder.int_enum_set = Some({
|
222 - | let container = if let Some(cap) = deser.container_size() {
|
223 - | Vec::with_capacity(cap)
|
224 - | } else {
|
225 - | Vec::new()
|
226 - | };
|
227 - | deser.read_list(member, container, |mut list, deser| {
|
228 - | list.push(deser.read_integer(member)?);
|
229 - | Ok(list)
|
230 - | })?
|
231 - | });
|
212 + | builder.int_enum_set = Some(deser.read_integer_list(member)?);
|
232 213 | }
|
233 214 | Some(5) => {
|
234 215 | builder.int_enum_map = Some({
|
235 - | let container = if let Some(cap) = deser.container_size() {
|
236 - | std::collections::HashMap::with_capacity(cap)
|
237 - | } else {
|
238 - | std::collections::HashMap::new()
|
239 - | };
|
240 - | deser.read_map(member, container, |mut map, key, deser| {
|
241 - | map.insert(key, deser.read_integer(member)?);
|
242 - | Ok(map)
|
243 - | })?
|
216 + | let mut container = std::collections::HashMap::new();
|
217 + | deser.read_map(member, &mut |key, deser| {
|
218 + | container.insert(key, deser.read_integer(member)?);
|
219 + | Ok(())
|
220 + | })?;
|
221 + | container
|
244 222 | });
|
245 223 | }
|
246 224 | _ => {}
|
247 225 | }
|
248 226 | Ok(())
|
249 227 | })?;
|
250 228 | builder
|
251 229 | .build()
|
252 230 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
253 231 | }
|
254 232 | }
|
233 + | impl XmlIntEnumsInput {
|
234 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
235 + | pub fn deserialize_with_response(
|
236 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
237 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
238 + | _status: u16,
|
239 + | _body: &[u8],
|
240 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
241 + | Self::deserialize(deserializer)
|
242 + | }
|
243 + | }
|
255 244 | impl XmlIntEnumsInput {
|
256 245 | /// Creates a new builder-style object to manufacture [`XmlIntEnumsInput`](crate::operation::xml_int_enums::XmlIntEnumsInput).
|
257 246 | pub fn builder() -> crate::operation::xml_int_enums::builders::XmlIntEnumsInputBuilder {
|
258 247 | crate::operation::xml_int_enums::builders::XmlIntEnumsInputBuilder::default()
|
259 248 | }
|
260 249 | }
|
261 250 |
|
262 251 | /// A builder for [`XmlIntEnumsInput`](crate::operation::xml_int_enums::XmlIntEnumsInput).
|
263 252 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
264 253 | #[non_exhaustive]
|