aws_sdk_glue/schema_serde/
shape_integration_partition.rs1static INTEGRATIONPARTITION_MEMBER_FIELD_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue#IntegrationPartition$FieldName",
5 "com.amazonaws.glue",
6 "IntegrationPartition",
7 ),
8 ::aws_smithy_schema::ShapeType::String,
9 "FieldName",
10 0,
11);
12static INTEGRATIONPARTITION_MEMBER_FUNCTION_SPEC: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13 ::aws_smithy_schema::ShapeId::from_parts(
14 "com.amazonaws.glue#IntegrationPartition$FunctionSpec",
15 "com.amazonaws.glue",
16 "IntegrationPartition",
17 ),
18 ::aws_smithy_schema::ShapeType::String,
19 "FunctionSpec",
20 1,
21);
22static INTEGRATIONPARTITION_MEMBER_CONVERSION_SPEC: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
23 ::aws_smithy_schema::ShapeId::from_parts(
24 "com.amazonaws.glue#IntegrationPartition$ConversionSpec",
25 "com.amazonaws.glue",
26 "IntegrationPartition",
27 ),
28 ::aws_smithy_schema::ShapeType::String,
29 "ConversionSpec",
30 2,
31);
32static INTEGRATIONPARTITION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
33 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#IntegrationPartition", "com.amazonaws.glue", "IntegrationPartition"),
34 ::aws_smithy_schema::ShapeType::Structure,
35 &[
36 &INTEGRATIONPARTITION_MEMBER_FIELD_NAME,
37 &INTEGRATIONPARTITION_MEMBER_FUNCTION_SPEC,
38 &INTEGRATIONPARTITION_MEMBER_CONVERSION_SPEC,
39 ],
40);
41impl crate::types::IntegrationPartition {
42 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &INTEGRATIONPARTITION_SCHEMA;
44}
45impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::IntegrationPartition {
46 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
47 Self::SCHEMA
48 }
49
50 #[allow(unused_variables, clippy::diverging_sub_expression)]
51 fn serialize_members(
52 &self,
53 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
54 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
55 if let Some(ref val) = self.field_name {
56 ser.write_string(&INTEGRATIONPARTITION_MEMBER_FIELD_NAME, val)?;
57 }
58 if let Some(ref val) = self.function_spec {
59 ser.write_string(&INTEGRATIONPARTITION_MEMBER_FUNCTION_SPEC, val)?;
60 }
61 if let Some(ref val) = self.conversion_spec {
62 ser.write_string(&INTEGRATIONPARTITION_MEMBER_CONVERSION_SPEC, val)?;
63 }
64 Ok(())
65 }
66}
67impl crate::types::builders::IntegrationPartitionBuilder {
68 #[allow(
69 unused_variables,
70 unreachable_code,
71 clippy::single_match,
72 clippy::match_single_binding,
73 clippy::diverging_sub_expression
74 )]
75 pub(crate) fn deserialize_members(
76 &mut self,
77 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
78 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
79 deserializer.read_struct(&INTEGRATIONPARTITION_SCHEMA, &mut |member, deser| {
80 match member.member_index() {
81 Some(0) => {
82 if deser.is_null() {
83 deser.read_null()?;
84 } else {
85 self.field_name = Some(deser.read_string(member)?);
86 }
87 }
88 Some(1) => {
89 if deser.is_null() {
90 deser.read_null()?;
91 } else {
92 self.function_spec = Some(deser.read_string(member)?);
93 }
94 }
95 Some(2) => {
96 if deser.is_null() {
97 deser.read_null()?;
98 } else {
99 self.conversion_spec = Some(deser.read_string(member)?);
100 }
101 }
102 _ => {}
103 }
104 Ok(())
105 })
106 }
107}
108
109impl crate::types::IntegrationPartition {
110 pub fn deserialize(
112 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
113 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
114 let mut builder = Self::builder();
115 builder.deserialize_members(deserializer)?;
116 Ok(builder.build())
117 }
118}