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