82 82 | 0,
|
83 83 | )
|
84 84 | .with_http_header("X-Foo");
|
85 85 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_STRING_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
86 86 | ::aws_smithy_schema::ShapeId::from_static(
|
87 87 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$stringValue",
|
88 88 | "aws.protocoltests.restxml.synthetic",
|
89 89 | "SimpleScalarPropertiesInput",
|
90 90 | ),
|
91 91 | ::aws_smithy_schema::ShapeType::String,
|
92 - | "string_value",
|
92 + | "stringValue",
|
93 93 | 1,
|
94 94 | );
|
95 95 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_TRUE_BOOLEAN_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
96 96 | ::aws_smithy_schema::ShapeId::from_static(
|
97 97 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$trueBooleanValue",
|
98 98 | "aws.protocoltests.restxml.synthetic",
|
99 99 | "SimpleScalarPropertiesInput",
|
100 100 | ),
|
101 101 | ::aws_smithy_schema::ShapeType::Boolean,
|
102 - | "true_boolean_value",
|
102 + | "trueBooleanValue",
|
103 103 | 2,
|
104 104 | );
|
105 105 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_FALSE_BOOLEAN_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
106 106 | ::aws_smithy_schema::ShapeId::from_static(
|
107 107 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$falseBooleanValue",
|
108 108 | "aws.protocoltests.restxml.synthetic",
|
109 109 | "SimpleScalarPropertiesInput",
|
110 110 | ),
|
111 111 | ::aws_smithy_schema::ShapeType::Boolean,
|
112 - | "false_boolean_value",
|
112 + | "falseBooleanValue",
|
113 113 | 3,
|
114 114 | );
|
115 115 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_BYTE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
116 116 | ::aws_smithy_schema::ShapeId::from_static(
|
117 117 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$byteValue",
|
118 118 | "aws.protocoltests.restxml.synthetic",
|
119 119 | "SimpleScalarPropertiesInput",
|
120 120 | ),
|
121 121 | ::aws_smithy_schema::ShapeType::Byte,
|
122 - | "byte_value",
|
122 + | "byteValue",
|
123 123 | 4,
|
124 124 | );
|
125 125 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_SHORT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
126 126 | ::aws_smithy_schema::ShapeId::from_static(
|
127 127 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$shortValue",
|
128 128 | "aws.protocoltests.restxml.synthetic",
|
129 129 | "SimpleScalarPropertiesInput",
|
130 130 | ),
|
131 131 | ::aws_smithy_schema::ShapeType::Short,
|
132 - | "short_value",
|
132 + | "shortValue",
|
133 133 | 5,
|
134 134 | );
|
135 135 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_INTEGER_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
136 136 | ::aws_smithy_schema::ShapeId::from_static(
|
137 137 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$integerValue",
|
138 138 | "aws.protocoltests.restxml.synthetic",
|
139 139 | "SimpleScalarPropertiesInput",
|
140 140 | ),
|
141 141 | ::aws_smithy_schema::ShapeType::Integer,
|
142 - | "integer_value",
|
142 + | "integerValue",
|
143 143 | 6,
|
144 144 | );
|
145 145 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_LONG_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
146 146 | ::aws_smithy_schema::ShapeId::from_static(
|
147 147 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$longValue",
|
148 148 | "aws.protocoltests.restxml.synthetic",
|
149 149 | "SimpleScalarPropertiesInput",
|
150 150 | ),
|
151 151 | ::aws_smithy_schema::ShapeType::Long,
|
152 - | "long_value",
|
152 + | "longValue",
|
153 153 | 7,
|
154 154 | );
|
155 155 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
156 156 | ::aws_smithy_schema::ShapeId::from_static(
|
157 157 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$floatValue",
|
158 158 | "aws.protocoltests.restxml.synthetic",
|
159 159 | "SimpleScalarPropertiesInput",
|
160 160 | ),
|
161 161 | ::aws_smithy_schema::ShapeType::Float,
|
162 - | "float_value",
|
162 + | "floatValue",
|
163 163 | 8,
|
164 164 | );
|
165 165 | static SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
166 166 | ::aws_smithy_schema::ShapeId::from_static(
|
167 167 | "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$doubleValue",
|
168 168 | "aws.protocoltests.restxml.synthetic",
|
169 169 | "SimpleScalarPropertiesInput",
|
170 170 | ),
|
171 171 | ::aws_smithy_schema::ShapeType::Double,
|
172 - | "double_value",
|
172 + | "doubleValue",
|
173 173 | 9,
|
174 174 | )
|
175 175 | .with_xml_name("DoubleDribble");
|
176 176 | static SIMPLESCALARPROPERTIESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
177 177 | SIMPLESCALARPROPERTIESINPUT_SCHEMA_ID,
|
178 178 | ::aws_smithy_schema::ShapeType::Structure,
|
179 179 | &[
|
180 180 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_FOO,
|
181 181 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_STRING_VALUE,
|
182 182 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_TRUE_BOOLEAN_VALUE,
|
183 183 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_FALSE_BOOLEAN_VALUE,
|
184 184 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_BYTE_VALUE,
|
185 185 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_SHORT_VALUE,
|
186 186 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_INTEGER_VALUE,
|
187 187 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_LONG_VALUE,
|
188 188 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE,
|
189 189 | &SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE,
|
190 190 | ],
|
191 - | );
|
191 + | )
|
192 + | .with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/SimpleScalarProperties", None));
|
192 193 | impl SimpleScalarPropertiesInput {
|
193 194 | /// The schema for this shape.
|
194 195 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SIMPLESCALARPROPERTIESINPUT_SCHEMA;
|
195 196 | }
|
196 197 | impl ::aws_smithy_schema::serde::SerializableStruct for SimpleScalarPropertiesInput {
|
197 198 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
198 199 | fn serialize_members(
|
199 200 | &self,
|
200 201 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
201 202 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
202 203 | if let Some(ref val) = self.foo {
|
203 204 | ser.write_string(&SIMPLESCALARPROPERTIESINPUT_MEMBER_FOO, val)?;
|
204 205 | }
|
205 206 | if let Some(ref val) = self.string_value {
|
206 207 | ser.write_string(&SIMPLESCALARPROPERTIESINPUT_MEMBER_STRING_VALUE, val)?;
|
207 208 | }
|
208 209 | if let Some(ref val) = self.true_boolean_value {
|
209 210 | ser.write_boolean(&SIMPLESCALARPROPERTIESINPUT_MEMBER_TRUE_BOOLEAN_VALUE, *val)?;
|
210 211 | }
|
211 212 | if let Some(ref val) = self.false_boolean_value {
|
212 213 | ser.write_boolean(&SIMPLESCALARPROPERTIESINPUT_MEMBER_FALSE_BOOLEAN_VALUE, *val)?;
|
213 214 | }
|
214 215 | if let Some(ref val) = self.byte_value {
|
215 216 | ser.write_byte(&SIMPLESCALARPROPERTIESINPUT_MEMBER_BYTE_VALUE, *val)?;
|
216 217 | }
|
217 218 | if let Some(ref val) = self.short_value {
|
218 219 | ser.write_short(&SIMPLESCALARPROPERTIESINPUT_MEMBER_SHORT_VALUE, *val)?;
|
219 220 | }
|
220 221 | if let Some(ref val) = self.integer_value {
|
221 222 | ser.write_integer(&SIMPLESCALARPROPERTIESINPUT_MEMBER_INTEGER_VALUE, *val)?;
|
222 223 | }
|
223 224 | if let Some(ref val) = self.long_value {
|
224 225 | ser.write_long(&SIMPLESCALARPROPERTIESINPUT_MEMBER_LONG_VALUE, *val)?;
|
225 226 | }
|
226 227 | if let Some(ref val) = self.float_value {
|
227 228 | ser.write_float(&SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE, *val)?;
|
228 229 | }
|
229 230 | if let Some(ref val) = self.double_value {
|
230 231 | ser.write_double(&SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE, *val)?;
|
231 232 | }
|
232 233 | Ok(())
|
233 234 | }
|
234 235 | }
|
235 236 | impl SimpleScalarPropertiesInput {
|
236 237 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
237 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
238 - | deserializer: &mut D,
|
238 + | pub fn deserialize(
|
239 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
239 240 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
240 241 | #[allow(unused_variables, unused_mut)]
|
241 242 | let mut builder = Self::builder();
|
242 243 | #[allow(
|
243 244 | unused_variables,
|
244 245 | unreachable_code,
|
245 246 | clippy::single_match,
|
246 247 | clippy::match_single_binding,
|
247 248 | clippy::diverging_sub_expression
|
248 249 | )]
|
249 - | deserializer.read_struct(&SIMPLESCALARPROPERTIESINPUT_SCHEMA, (), |_, member, deser| {
|
250 + | deserializer.read_struct(&SIMPLESCALARPROPERTIESINPUT_SCHEMA, &mut |member, deser| {
|
250 251 | match member.member_index() {
|
251 252 | Some(0) => {
|
252 253 | builder.foo = Some(deser.read_string(member)?);
|
253 254 | }
|
254 255 | Some(1) => {
|
255 256 | builder.string_value = Some(deser.read_string(member)?);
|
256 257 | }
|
257 258 | Some(2) => {
|
258 259 | builder.true_boolean_value = Some(deser.read_boolean(member)?);
|
259 260 | }
|
260 261 | Some(3) => {
|
261 262 | builder.false_boolean_value = Some(deser.read_boolean(member)?);
|
262 263 | }
|
263 264 | Some(4) => {
|
264 265 | builder.byte_value = Some(deser.read_byte(member)?);
|
265 266 | }
|
266 267 | Some(5) => {
|
267 268 | builder.short_value = Some(deser.read_short(member)?);
|
268 269 | }
|
269 270 | Some(6) => {
|
270 271 | builder.integer_value = Some(deser.read_integer(member)?);
|
271 272 | }
|
272 273 | Some(7) => {
|
273 274 | builder.long_value = Some(deser.read_long(member)?);
|
274 275 | }
|
275 276 | Some(8) => {
|
276 277 | builder.float_value = Some(deser.read_float(member)?);
|
277 278 | }
|
278 279 | Some(9) => {
|
279 280 | builder.double_value = Some(deser.read_double(member)?);
|
280 281 | }
|
281 282 | _ => {}
|
282 283 | }
|
283 284 | Ok(())
|
284 285 | })?;
|
285 286 | builder
|
286 287 | .build()
|
287 288 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
288 289 | }
|
289 290 | }
|
291 + | impl SimpleScalarPropertiesInput {
|
292 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
293 + | /// Header-bound members are read directly from headers, avoiding runtime
|
294 + | /// member iteration overhead. Body members are read via the deserializer.
|
295 + | pub fn deserialize_with_response(
|
296 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
297 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
298 + | _status: u16,
|
299 + | _body: &[u8],
|
300 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
301 + | #[allow(unused_variables, unused_mut)]
|
302 + | let mut builder = Self::builder();
|
303 + | if let Some(val) = headers.get("X-Foo") {
|
304 + | builder.foo = Some(val.to_string());
|
305 + | }
|
306 + | #[allow(
|
307 + | unused_variables,
|
308 + | unreachable_code,
|
309 + | clippy::single_match,
|
310 + | clippy::match_single_binding,
|
311 + | clippy::diverging_sub_expression
|
312 + | )]
|
313 + | deserializer.read_struct(&SIMPLESCALARPROPERTIESINPUT_SCHEMA, &mut |member, deser| {
|
314 + | match member.member_index() {
|
315 + | Some(0) => { /* read from headers above */ }
|
316 + | Some(1) => {
|
317 + | builder.string_value = Some(deser.read_string(member)?);
|
318 + | }
|
319 + | Some(2) => {
|
320 + | builder.true_boolean_value = Some(deser.read_boolean(member)?);
|
321 + | }
|
322 + | Some(3) => {
|
323 + | builder.false_boolean_value = Some(deser.read_boolean(member)?);
|
324 + | }
|
325 + | Some(4) => {
|
326 + | builder.byte_value = Some(deser.read_byte(member)?);
|
327 + | }
|
328 + | Some(5) => {
|
329 + | builder.short_value = Some(deser.read_short(member)?);
|
330 + | }
|
331 + | Some(6) => {
|
332 + | builder.integer_value = Some(deser.read_integer(member)?);
|
333 + | }
|
334 + | Some(7) => {
|
335 + | builder.long_value = Some(deser.read_long(member)?);
|
336 + | }
|
337 + | Some(8) => {
|
338 + | builder.float_value = Some(deser.read_float(member)?);
|
339 + | }
|
340 + | Some(9) => {
|
341 + | builder.double_value = Some(deser.read_double(member)?);
|
342 + | }
|
343 + | _ => {}
|
344 + | }
|
345 + | Ok(())
|
346 + | })?;
|
347 + | builder
|
348 + | .build()
|
349 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
350 + | }
|
351 + | }
|
290 352 | impl SimpleScalarPropertiesInput {
|
291 353 | /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
|
292 354 | pub fn builder() -> crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder {
|
293 355 | crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder::default()
|
294 356 | }
|
295 357 | }
|
296 358 |
|
297 359 | /// A builder for [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
|
298 360 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
299 361 | #[non_exhaustive]
|