aws_sdk_glue/schema_serde/
shape_notification_property.rs1static NOTIFICATIONPROPERTY_MEMBER_NOTIFY_DELAY_AFTER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue#NotificationProperty$NotifyDelayAfter",
5 "com.amazonaws.glue",
6 "NotificationProperty",
7 ),
8 ::aws_smithy_schema::ShapeType::Integer,
9 "NotifyDelayAfter",
10 0,
11);
12static NOTIFICATIONPROPERTY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
13 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#NotificationProperty", "com.amazonaws.glue", "NotificationProperty"),
14 ::aws_smithy_schema::ShapeType::Structure,
15 &[&NOTIFICATIONPROPERTY_MEMBER_NOTIFY_DELAY_AFTER],
16);
17impl crate::types::NotificationProperty {
18 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &NOTIFICATIONPROPERTY_SCHEMA;
20}
21impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::NotificationProperty {
22 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
23 Self::SCHEMA
24 }
25
26 #[allow(unused_variables, clippy::diverging_sub_expression)]
27 fn serialize_members(
28 &self,
29 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
30 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
31 if let Some(ref val) = self.notify_delay_after {
32 ser.write_integer(&NOTIFICATIONPROPERTY_MEMBER_NOTIFY_DELAY_AFTER, *val)?;
33 }
34 Ok(())
35 }
36}
37impl crate::types::builders::NotificationPropertyBuilder {
38 #[allow(
39 unused_variables,
40 unreachable_code,
41 clippy::single_match,
42 clippy::match_single_binding,
43 clippy::diverging_sub_expression
44 )]
45 pub(crate) fn deserialize_members(
46 &mut self,
47 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
48 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
49 deserializer.read_struct(&NOTIFICATIONPROPERTY_SCHEMA, &mut |member, deser| {
50 match member.member_index() {
51 Some(0) => {
52 if deser.is_null() {
53 deser.read_null()?;
54 } else {
55 self.notify_delay_after = Some(deser.read_integer(member)?);
56 }
57 }
58 _ => {}
59 }
60 Ok(())
61 })
62 }
63}
64
65impl crate::types::NotificationProperty {
66 pub fn deserialize(
68 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
69 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
70 let mut builder = Self::builder();
71 builder.deserialize_members(deserializer)?;
72 Ok(builder.build())
73 }
74}