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