aws_sdk_glue/schema_serde/
shape_batch_update_partition_output_output.rs1static BATCHUPDATEPARTITIONOUTPUT_MEMBER_ERRORS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue#BatchUpdatePartitionFailureList$member",
5 "com.amazonaws.glue",
6 "BatchUpdatePartitionFailureList",
7 ),
8 ::aws_smithy_schema::ShapeType::Structure,
9 "member",
10 0,
11);
12static BATCHUPDATEPARTITIONOUTPUT_MEMBER_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13 ::aws_smithy_schema::ShapeId::from_parts(
14 "com.amazonaws.glue.synthetic#BatchUpdatePartitionOutput$Errors",
15 "com.amazonaws.glue.synthetic",
16 "BatchUpdatePartitionOutput",
17 ),
18 ::aws_smithy_schema::ShapeType::List,
19 "Errors",
20 0,
21)
22.with_list_member(&BATCHUPDATEPARTITIONOUTPUT_MEMBER_ERRORS_MEMBER);
23static BATCHUPDATEPARTITIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
24 ::aws_smithy_schema::ShapeId::from_parts(
25 "com.amazonaws.glue.synthetic#BatchUpdatePartitionOutput",
26 "com.amazonaws.glue.synthetic",
27 "BatchUpdatePartitionOutput",
28 ),
29 ::aws_smithy_schema::ShapeType::Structure,
30 &[&BATCHUPDATEPARTITIONOUTPUT_MEMBER_ERRORS],
31)
32.with_original_name("BatchUpdatePartitionResponse");
33impl crate::operation::batch_update_partition::BatchUpdatePartitionOutput {
34 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &BATCHUPDATEPARTITIONOUTPUT_SCHEMA;
36}
37impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::batch_update_partition::BatchUpdatePartitionOutput {
38 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
39 Self::SCHEMA
40 }
41
42 #[allow(unused_variables, clippy::diverging_sub_expression)]
43 fn serialize_members(
44 &self,
45 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
46 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
47 if let Some(ref val) = self.errors {
48 ser.write_list(
49 &BATCHUPDATEPARTITIONOUTPUT_MEMBER_ERRORS,
50 &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
51 for item in val {
52 ser.write_struct(crate::types::BatchUpdatePartitionFailureEntry::SCHEMA, item)?;
53 }
54 Ok(())
55 },
56 )?;
57 }
58 Ok(())
59 }
60}
61impl crate::operation::batch_update_partition::builders::BatchUpdatePartitionOutputBuilder {
62 #[allow(
63 unused_variables,
64 unreachable_code,
65 clippy::single_match,
66 clippy::match_single_binding,
67 clippy::diverging_sub_expression
68 )]
69 pub(crate) fn deserialize_members(
70 &mut self,
71 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
72 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
73 deserializer.read_struct(&BATCHUPDATEPARTITIONOUTPUT_SCHEMA, &mut |member, deser| {
74 match member.member_index() {
75 Some(0) => {
76 if deser.is_null() {
77 deser.read_null()?;
78 } else {
79 self.errors = Some({
80 let mut container = Vec::new();
81 deser.read_list(member, &mut |deser| {
82 container.push(crate::types::BatchUpdatePartitionFailureEntry::deserialize(deser)?);
83 Ok(())
84 })?;
85 container
86 });
87 }
88 }
89 _ => {}
90 }
91 Ok(())
92 })
93 }
94}
95
96impl crate::operation::batch_update_partition::BatchUpdatePartitionOutput {
97 pub fn deserialize(
99 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
100 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
101 let mut builder = Self::builder();
102 builder.deserialize_members(deserializer)?;
103 Ok(builder.build())
104 }
105}