Skip to main content

aws_sdk_glue/schema_serde/
shape_create_security_configuration_output_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2static CREATESECURITYCONFIGURATIONOUTPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3    ::aws_smithy_schema::ShapeId::from_parts(
4        "com.amazonaws.glue.synthetic#CreateSecurityConfigurationOutput$Name",
5        "com.amazonaws.glue.synthetic",
6        "CreateSecurityConfigurationOutput",
7    ),
8    ::aws_smithy_schema::ShapeType::String,
9    "Name",
10    0,
11);
12static CREATESECURITYCONFIGURATIONOUTPUT_MEMBER_CREATED_TIMESTAMP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13    ::aws_smithy_schema::ShapeId::from_parts(
14        "com.amazonaws.glue.synthetic#CreateSecurityConfigurationOutput$CreatedTimestamp",
15        "com.amazonaws.glue.synthetic",
16        "CreateSecurityConfigurationOutput",
17    ),
18    ::aws_smithy_schema::ShapeType::Timestamp,
19    "CreatedTimestamp",
20    1,
21);
22static CREATESECURITYCONFIGURATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
23    ::aws_smithy_schema::ShapeId::from_parts(
24        "com.amazonaws.glue.synthetic#CreateSecurityConfigurationOutput",
25        "com.amazonaws.glue.synthetic",
26        "CreateSecurityConfigurationOutput",
27    ),
28    ::aws_smithy_schema::ShapeType::Structure,
29    &[
30        &CREATESECURITYCONFIGURATIONOUTPUT_MEMBER_NAME,
31        &CREATESECURITYCONFIGURATIONOUTPUT_MEMBER_CREATED_TIMESTAMP,
32    ],
33)
34.with_original_name("CreateSecurityConfigurationResponse");
35impl crate::operation::create_security_configuration::CreateSecurityConfigurationOutput {
36    /// The schema for this shape.
37    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATESECURITYCONFIGURATIONOUTPUT_SCHEMA;
38}
39impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::create_security_configuration::CreateSecurityConfigurationOutput {
40    fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
41        Self::SCHEMA
42    }
43
44    #[allow(unused_variables, clippy::diverging_sub_expression)]
45    fn serialize_members(
46        &self,
47        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
48    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
49        if let Some(ref val) = self.name {
50            ser.write_string(&CREATESECURITYCONFIGURATIONOUTPUT_MEMBER_NAME, val)?;
51        }
52        if let Some(ref val) = self.created_timestamp {
53            ser.write_timestamp(&CREATESECURITYCONFIGURATIONOUTPUT_MEMBER_CREATED_TIMESTAMP, val)?;
54        }
55        Ok(())
56    }
57}
58impl crate::operation::create_security_configuration::builders::CreateSecurityConfigurationOutputBuilder {
59    #[allow(
60        unused_variables,
61        unreachable_code,
62        clippy::single_match,
63        clippy::match_single_binding,
64        clippy::diverging_sub_expression
65    )]
66    pub(crate) fn deserialize_members(
67        &mut self,
68        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
69    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
70        deserializer.read_struct(&CREATESECURITYCONFIGURATIONOUTPUT_SCHEMA, &mut |member, deser| {
71            match member.member_index() {
72                Some(0) => {
73                    if deser.is_null() {
74                        deser.read_null()?;
75                    } else {
76                        self.name = Some(deser.read_string(member)?);
77                    }
78                }
79                Some(1) => {
80                    if deser.is_null() {
81                        deser.read_null()?;
82                    } else {
83                        self.created_timestamp = Some(deser.read_timestamp(member)?);
84                    }
85                }
86                _ => {}
87            }
88            Ok(())
89        })
90    }
91}
92
93impl crate::operation::create_security_configuration::CreateSecurityConfigurationOutput {
94    /// Deserializes this structure from a [`ShapeDeserializer`].
95    pub fn deserialize(
96        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
97    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
98        let mut builder = Self::builder();
99        builder.deserialize_members(deserializer)?;
100        Ok(builder.build())
101    }
102}