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