Skip to main content

aws_sdk_glue/schema_serde/
shape_describe_inbound_integrations_output_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2static DESCRIBEINBOUNDINTEGRATIONSOUTPUT_MEMBER_INBOUND_INTEGRATIONS_MEMBER: ::aws_smithy_schema::Schema<'static> =
3    ::aws_smithy_schema::Schema::new_member(
4        ::aws_smithy_schema::ShapeId::from_parts(
5            "com.amazonaws.glue#InboundIntegrationsList$member",
6            "com.amazonaws.glue",
7            "InboundIntegrationsList",
8        ),
9        ::aws_smithy_schema::ShapeType::Structure,
10        "member",
11        0,
12    );
13static DESCRIBEINBOUNDINTEGRATIONSOUTPUT_MEMBER_INBOUND_INTEGRATIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
14    ::aws_smithy_schema::ShapeId::from_parts(
15        "com.amazonaws.glue.synthetic#DescribeInboundIntegrationsOutput$InboundIntegrations",
16        "com.amazonaws.glue.synthetic",
17        "DescribeInboundIntegrationsOutput",
18    ),
19    ::aws_smithy_schema::ShapeType::List,
20    "InboundIntegrations",
21    0,
22)
23.with_list_member(&DESCRIBEINBOUNDINTEGRATIONSOUTPUT_MEMBER_INBOUND_INTEGRATIONS_MEMBER);
24static DESCRIBEINBOUNDINTEGRATIONSOUTPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
25    ::aws_smithy_schema::ShapeId::from_parts(
26        "com.amazonaws.glue.synthetic#DescribeInboundIntegrationsOutput$Marker",
27        "com.amazonaws.glue.synthetic",
28        "DescribeInboundIntegrationsOutput",
29    ),
30    ::aws_smithy_schema::ShapeType::String,
31    "Marker",
32    1,
33);
34static DESCRIBEINBOUNDINTEGRATIONSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
35    ::aws_smithy_schema::ShapeId::from_parts(
36        "com.amazonaws.glue.synthetic#DescribeInboundIntegrationsOutput",
37        "com.amazonaws.glue.synthetic",
38        "DescribeInboundIntegrationsOutput",
39    ),
40    ::aws_smithy_schema::ShapeType::Structure,
41    &[
42        &DESCRIBEINBOUNDINTEGRATIONSOUTPUT_MEMBER_INBOUND_INTEGRATIONS,
43        &DESCRIBEINBOUNDINTEGRATIONSOUTPUT_MEMBER_MARKER,
44    ],
45)
46.with_original_name("DescribeInboundIntegrationsResponse");
47impl crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsOutput {
48    /// The schema for this shape.
49    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEINBOUNDINTEGRATIONSOUTPUT_SCHEMA;
50}
51impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsOutput {
52    fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
53        Self::SCHEMA
54    }
55
56    #[allow(unused_variables, clippy::diverging_sub_expression)]
57    fn serialize_members(
58        &self,
59        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
60    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
61        if let Some(ref val) = self.inbound_integrations {
62            ser.write_list(
63                &DESCRIBEINBOUNDINTEGRATIONSOUTPUT_MEMBER_INBOUND_INTEGRATIONS,
64                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
65                    for item in val {
66                        ser.write_struct(crate::types::InboundIntegration::SCHEMA, item)?;
67                    }
68                    Ok(())
69                },
70            )?;
71        }
72        if let Some(ref val) = self.marker {
73            ser.write_string(&DESCRIBEINBOUNDINTEGRATIONSOUTPUT_MEMBER_MARKER, val)?;
74        }
75        Ok(())
76    }
77}
78impl crate::operation::describe_inbound_integrations::builders::DescribeInboundIntegrationsOutputBuilder {
79    #[allow(
80        unused_variables,
81        unreachable_code,
82        clippy::single_match,
83        clippy::match_single_binding,
84        clippy::diverging_sub_expression
85    )]
86    pub(crate) fn deserialize_members(
87        &mut self,
88        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
89    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
90        deserializer.read_struct(&DESCRIBEINBOUNDINTEGRATIONSOUTPUT_SCHEMA, &mut |member, deser| {
91            match member.member_index() {
92                Some(0) => {
93                    if deser.is_null() {
94                        deser.read_null()?;
95                    } else {
96                        self.inbound_integrations = Some({
97                            let mut container = Vec::new();
98                            deser.read_list(member, &mut |deser| {
99                                container.push(crate::types::InboundIntegration::deserialize(deser)?);
100                                Ok(())
101                            })?;
102                            container
103                        });
104                    }
105                }
106                Some(1) => {
107                    if deser.is_null() {
108                        deser.read_null()?;
109                    } else {
110                        self.marker = Some(deser.read_string(member)?);
111                    }
112                }
113                _ => {}
114            }
115            Ok(())
116        })
117    }
118}
119
120impl crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsOutput {
121    /// Deserializes this structure from a [`ShapeDeserializer`].
122    pub fn deserialize(
123        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
124    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
125        let mut builder = Self::builder();
126        builder.deserialize_members(deserializer)?;
127        Ok(builder.build())
128    }
129}