aws_sdk_glue/schema_serde/
shape_security_configuration.rs1static SECURITYCONFIGURATION_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue#SecurityConfiguration$Name",
5 "com.amazonaws.glue",
6 "SecurityConfiguration",
7 ),
8 ::aws_smithy_schema::ShapeType::String,
9 "Name",
10 0,
11);
12static SECURITYCONFIGURATION_MEMBER_CREATED_TIME_STAMP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13 ::aws_smithy_schema::ShapeId::from_parts(
14 "com.amazonaws.glue#SecurityConfiguration$CreatedTimeStamp",
15 "com.amazonaws.glue",
16 "SecurityConfiguration",
17 ),
18 ::aws_smithy_schema::ShapeType::Timestamp,
19 "CreatedTimeStamp",
20 1,
21);
22static SECURITYCONFIGURATION_MEMBER_ENCRYPTION_CONFIGURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
23 ::aws_smithy_schema::ShapeId::from_parts(
24 "com.amazonaws.glue#SecurityConfiguration$EncryptionConfiguration",
25 "com.amazonaws.glue",
26 "SecurityConfiguration",
27 ),
28 ::aws_smithy_schema::ShapeType::Structure,
29 "EncryptionConfiguration",
30 2,
31);
32static SECURITYCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
33 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#SecurityConfiguration", "com.amazonaws.glue", "SecurityConfiguration"),
34 ::aws_smithy_schema::ShapeType::Structure,
35 &[
36 &SECURITYCONFIGURATION_MEMBER_NAME,
37 &SECURITYCONFIGURATION_MEMBER_CREATED_TIME_STAMP,
38 &SECURITYCONFIGURATION_MEMBER_ENCRYPTION_CONFIGURATION,
39 ],
40);
41impl crate::types::SecurityConfiguration {
42 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &SECURITYCONFIGURATION_SCHEMA;
44}
45impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::SecurityConfiguration {
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.name {
56 ser.write_string(&SECURITYCONFIGURATION_MEMBER_NAME, val)?;
57 }
58 if let Some(ref val) = self.created_time_stamp {
59 ser.write_timestamp(&SECURITYCONFIGURATION_MEMBER_CREATED_TIME_STAMP, val)?;
60 }
61 if let Some(ref val) = self.encryption_configuration {
62 ser.write_struct(&SECURITYCONFIGURATION_MEMBER_ENCRYPTION_CONFIGURATION, val)?;
63 }
64 Ok(())
65 }
66}
67impl crate::types::builders::SecurityConfigurationBuilder {
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(&SECURITYCONFIGURATION_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.name = Some(deser.read_string(member)?);
86 }
87 }
88 Some(1) => {
89 if deser.is_null() {
90 deser.read_null()?;
91 } else {
92 self.created_time_stamp = Some(deser.read_timestamp(member)?);
93 }
94 }
95 Some(2) => {
96 if deser.is_null() {
97 deser.read_null()?;
98 } else {
99 self.encryption_configuration = Some(crate::types::EncryptionConfiguration::deserialize(deser)?);
100 }
101 }
102 _ => {}
103 }
104 Ok(())
105 })
106 }
107}
108
109impl crate::types::SecurityConfiguration {
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}