aws_sdk_glue/schema_serde/
shape_batch_get_partition_output_output.rs1static BATCHGETPARTITIONOUTPUT_MEMBER_PARTITIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#PartitionList$member", "com.amazonaws.glue", "PartitionList"),
4 ::aws_smithy_schema::ShapeType::Structure,
5 "member",
6 0,
7);
8static BATCHGETPARTITIONOUTPUT_MEMBER_PARTITIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
9 ::aws_smithy_schema::ShapeId::from_parts(
10 "com.amazonaws.glue.synthetic#BatchGetPartitionOutput$Partitions",
11 "com.amazonaws.glue.synthetic",
12 "BatchGetPartitionOutput",
13 ),
14 ::aws_smithy_schema::ShapeType::List,
15 "Partitions",
16 0,
17)
18.with_list_member(&BATCHGETPARTITIONOUTPUT_MEMBER_PARTITIONS_MEMBER);
19static BATCHGETPARTITIONOUTPUT_MEMBER_UNPROCESSED_KEYS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
20 ::aws_smithy_schema::ShapeId::from_parts(
21 "com.amazonaws.glue#BatchGetPartitionValueList$member",
22 "com.amazonaws.glue",
23 "BatchGetPartitionValueList",
24 ),
25 ::aws_smithy_schema::ShapeType::Structure,
26 "member",
27 0,
28);
29static BATCHGETPARTITIONOUTPUT_MEMBER_UNPROCESSED_KEYS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
30 ::aws_smithy_schema::ShapeId::from_parts(
31 "com.amazonaws.glue.synthetic#BatchGetPartitionOutput$UnprocessedKeys",
32 "com.amazonaws.glue.synthetic",
33 "BatchGetPartitionOutput",
34 ),
35 ::aws_smithy_schema::ShapeType::List,
36 "UnprocessedKeys",
37 1,
38)
39.with_list_member(&BATCHGETPARTITIONOUTPUT_MEMBER_UNPROCESSED_KEYS_MEMBER);
40static BATCHGETPARTITIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
41 ::aws_smithy_schema::ShapeId::from_parts(
42 "com.amazonaws.glue.synthetic#BatchGetPartitionOutput",
43 "com.amazonaws.glue.synthetic",
44 "BatchGetPartitionOutput",
45 ),
46 ::aws_smithy_schema::ShapeType::Structure,
47 &[
48 &BATCHGETPARTITIONOUTPUT_MEMBER_PARTITIONS,
49 &BATCHGETPARTITIONOUTPUT_MEMBER_UNPROCESSED_KEYS,
50 ],
51)
52.with_original_name("BatchGetPartitionResponse");
53impl crate::operation::batch_get_partition::BatchGetPartitionOutput {
54 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &BATCHGETPARTITIONOUTPUT_SCHEMA;
56}
57impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::batch_get_partition::BatchGetPartitionOutput {
58 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
59 Self::SCHEMA
60 }
61
62 #[allow(unused_variables, clippy::diverging_sub_expression)]
63 fn serialize_members(
64 &self,
65 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
66 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
67 if let Some(ref val) = self.partitions {
68 ser.write_list(
69 &BATCHGETPARTITIONOUTPUT_MEMBER_PARTITIONS,
70 &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
71 for item in val {
72 ser.write_struct(crate::types::Partition::SCHEMA, item)?;
73 }
74 Ok(())
75 },
76 )?;
77 }
78 if let Some(ref val) = self.unprocessed_keys {
79 ser.write_list(
80 &BATCHGETPARTITIONOUTPUT_MEMBER_UNPROCESSED_KEYS,
81 &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
82 for item in val {
83 ser.write_struct(crate::types::PartitionValueList::SCHEMA, item)?;
84 }
85 Ok(())
86 },
87 )?;
88 }
89 Ok(())
90 }
91}
92impl crate::operation::batch_get_partition::builders::BatchGetPartitionOutputBuilder {
93 #[allow(
94 unused_variables,
95 unreachable_code,
96 clippy::single_match,
97 clippy::match_single_binding,
98 clippy::diverging_sub_expression
99 )]
100 pub(crate) fn deserialize_members(
101 &mut self,
102 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
103 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
104 deserializer.read_struct(&BATCHGETPARTITIONOUTPUT_SCHEMA, &mut |member, deser| {
105 match member.member_index() {
106 Some(0) => {
107 if deser.is_null() {
108 deser.read_null()?;
109 } else {
110 self.partitions = Some({
111 let mut container = Vec::new();
112 deser.read_list(member, &mut |deser| {
113 container.push(crate::types::Partition::deserialize(deser)?);
114 Ok(())
115 })?;
116 container
117 });
118 }
119 }
120 Some(1) => {
121 if deser.is_null() {
122 deser.read_null()?;
123 } else {
124 self.unprocessed_keys = Some({
125 let mut container = Vec::new();
126 deser.read_list(member, &mut |deser| {
127 container.push(crate::types::PartitionValueList::deserialize(deser)?);
128 Ok(())
129 })?;
130 container
131 });
132 }
133 }
134 _ => {}
135 }
136 Ok(())
137 })
138 }
139}
140
141impl crate::operation::batch_get_partition::BatchGetPartitionOutput {
142 pub fn deserialize(
144 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
145 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
146 let mut builder = Self::builder();
147 builder.deserialize_members(deserializer)?;
148 Ok(builder.build())
149 }
150}