Skip to main content

aws_sdk_glue/schema_serde/
shape_modify_integration_input_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2static MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_IDENTIFIER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3    ::aws_smithy_schema::ShapeId::from_parts(
4        "com.amazonaws.glue.synthetic#ModifyIntegrationInput$IntegrationIdentifier",
5        "com.amazonaws.glue.synthetic",
6        "ModifyIntegrationInput",
7    ),
8    ::aws_smithy_schema::ShapeType::String,
9    "IntegrationIdentifier",
10    0,
11);
12static MODIFYINTEGRATIONINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13    ::aws_smithy_schema::ShapeId::from_parts(
14        "com.amazonaws.glue.synthetic#ModifyIntegrationInput$Description",
15        "com.amazonaws.glue.synthetic",
16        "ModifyIntegrationInput",
17    ),
18    ::aws_smithy_schema::ShapeType::String,
19    "Description",
20    1,
21);
22static MODIFYINTEGRATIONINPUT_MEMBER_DATA_FILTER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
23    ::aws_smithy_schema::ShapeId::from_parts(
24        "com.amazonaws.glue.synthetic#ModifyIntegrationInput$DataFilter",
25        "com.amazonaws.glue.synthetic",
26        "ModifyIntegrationInput",
27    ),
28    ::aws_smithy_schema::ShapeType::String,
29    "DataFilter",
30    2,
31);
32static MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_CONFIG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
33    ::aws_smithy_schema::ShapeId::from_parts(
34        "com.amazonaws.glue.synthetic#ModifyIntegrationInput$IntegrationConfig",
35        "com.amazonaws.glue.synthetic",
36        "ModifyIntegrationInput",
37    ),
38    ::aws_smithy_schema::ShapeType::Structure,
39    "IntegrationConfig",
40    3,
41);
42static MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
43    ::aws_smithy_schema::ShapeId::from_parts(
44        "com.amazonaws.glue.synthetic#ModifyIntegrationInput$IntegrationName",
45        "com.amazonaws.glue.synthetic",
46        "ModifyIntegrationInput",
47    ),
48    ::aws_smithy_schema::ShapeType::String,
49    "IntegrationName",
50    4,
51);
52static MODIFYINTEGRATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
53    ::aws_smithy_schema::ShapeId::from_parts(
54        "com.amazonaws.glue.synthetic#ModifyIntegrationInput",
55        "com.amazonaws.glue.synthetic",
56        "ModifyIntegrationInput",
57    ),
58    ::aws_smithy_schema::ShapeType::Structure,
59    &[
60        &MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_IDENTIFIER,
61        &MODIFYINTEGRATIONINPUT_MEMBER_DESCRIPTION,
62        &MODIFYINTEGRATIONINPUT_MEMBER_DATA_FILTER,
63        &MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_CONFIG,
64        &MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_NAME,
65    ],
66)
67.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
68.with_original_name("ModifyIntegrationRequest");
69impl crate::operation::modify_integration::ModifyIntegrationInput {
70    /// The schema for this shape.
71    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MODIFYINTEGRATIONINPUT_SCHEMA;
72}
73impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::modify_integration::ModifyIntegrationInput {
74    fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
75        Self::SCHEMA
76    }
77
78    #[allow(unused_variables, clippy::diverging_sub_expression)]
79    fn serialize_members(
80        &self,
81        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
82    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
83        if let Some(ref val) = self.integration_identifier {
84            ser.write_string(&MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_IDENTIFIER, val)?;
85        }
86        if let Some(ref val) = self.description {
87            ser.write_string(&MODIFYINTEGRATIONINPUT_MEMBER_DESCRIPTION, val)?;
88        }
89        if let Some(ref val) = self.data_filter {
90            ser.write_string(&MODIFYINTEGRATIONINPUT_MEMBER_DATA_FILTER, val)?;
91        }
92        if let Some(ref val) = self.integration_config {
93            ser.write_struct(&MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_CONFIG, val)?;
94        }
95        if let Some(ref val) = self.integration_name {
96            ser.write_string(&MODIFYINTEGRATIONINPUT_MEMBER_INTEGRATION_NAME, val)?;
97        }
98        Ok(())
99    }
100}
101impl crate::operation::modify_integration::builders::ModifyIntegrationInputBuilder {
102    #[allow(
103        unused_variables,
104        unreachable_code,
105        clippy::single_match,
106        clippy::match_single_binding,
107        clippy::diverging_sub_expression
108    )]
109    pub(crate) fn deserialize_members(
110        &mut self,
111        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
112    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
113        deserializer.read_struct(&MODIFYINTEGRATIONINPUT_SCHEMA, &mut |member, deser| {
114            match member.member_index() {
115                Some(0) => {
116                    if deser.is_null() {
117                        deser.read_null()?;
118                    } else {
119                        self.integration_identifier = Some(deser.read_string(member)?);
120                    }
121                }
122                Some(1) => {
123                    if deser.is_null() {
124                        deser.read_null()?;
125                    } else {
126                        self.description = Some(deser.read_string(member)?);
127                    }
128                }
129                Some(2) => {
130                    if deser.is_null() {
131                        deser.read_null()?;
132                    } else {
133                        self.data_filter = Some(deser.read_string(member)?);
134                    }
135                }
136                Some(3) => {
137                    if deser.is_null() {
138                        deser.read_null()?;
139                    } else {
140                        self.integration_config = Some(crate::types::IntegrationConfig::deserialize(deser)?);
141                    }
142                }
143                Some(4) => {
144                    if deser.is_null() {
145                        deser.read_null()?;
146                    } else {
147                        self.integration_name = Some(deser.read_string(member)?);
148                    }
149                }
150                _ => {}
151            }
152            Ok(())
153        })
154    }
155}
156
157impl crate::operation::modify_integration::ModifyIntegrationInput {
158    /// Deserializes this structure from a [`ShapeDeserializer`].
159    pub fn deserialize(
160        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
161    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
162        let mut builder = Self::builder();
163        builder.deserialize_members(deserializer)?;
164        builder.integration_identifier = builder.integration_identifier.or(Some(String::new()));
165        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
166    }
167}