Skip to main content

aws_sdk_glue/schema_serde/
shape_create_integration_output_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2static CREATEINTEGRATIONOUTPUT_MEMBER_SOURCE_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3    ::aws_smithy_schema::ShapeId::from_parts(
4        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$SourceArn",
5        "com.amazonaws.glue.synthetic",
6        "CreateIntegrationOutput",
7    ),
8    ::aws_smithy_schema::ShapeType::String,
9    "SourceArn",
10    0,
11);
12static CREATEINTEGRATIONOUTPUT_MEMBER_TARGET_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13    ::aws_smithy_schema::ShapeId::from_parts(
14        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$TargetArn",
15        "com.amazonaws.glue.synthetic",
16        "CreateIntegrationOutput",
17    ),
18    ::aws_smithy_schema::ShapeType::String,
19    "TargetArn",
20    1,
21);
22static CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
23    ::aws_smithy_schema::ShapeId::from_parts(
24        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$IntegrationName",
25        "com.amazonaws.glue.synthetic",
26        "CreateIntegrationOutput",
27    ),
28    ::aws_smithy_schema::ShapeType::String,
29    "IntegrationName",
30    2,
31);
32static CREATEINTEGRATIONOUTPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
33    ::aws_smithy_schema::ShapeId::from_parts(
34        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$Description",
35        "com.amazonaws.glue.synthetic",
36        "CreateIntegrationOutput",
37    ),
38    ::aws_smithy_schema::ShapeType::String,
39    "Description",
40    3,
41);
42static CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
43    ::aws_smithy_schema::ShapeId::from_parts(
44        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$IntegrationArn",
45        "com.amazonaws.glue.synthetic",
46        "CreateIntegrationOutput",
47    ),
48    ::aws_smithy_schema::ShapeType::String,
49    "IntegrationArn",
50    4,
51);
52static CREATEINTEGRATIONOUTPUT_MEMBER_KMS_KEY_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
53    ::aws_smithy_schema::ShapeId::from_parts(
54        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$KmsKeyId",
55        "com.amazonaws.glue.synthetic",
56        "CreateIntegrationOutput",
57    ),
58    ::aws_smithy_schema::ShapeType::String,
59    "KmsKeyId",
60    5,
61);
62static CREATEINTEGRATIONOUTPUT_MEMBER_ADDITIONAL_ENCRYPTION_CONTEXT_KEY: ::aws_smithy_schema::Schema<'static> =
63    ::aws_smithy_schema::Schema::new_member(
64        ::aws_smithy_schema::ShapeId::from_parts(
65            "com.amazonaws.glue#IntegrationAdditionalEncryptionContextMap$key",
66            "com.amazonaws.glue",
67            "IntegrationAdditionalEncryptionContextMap",
68        ),
69        ::aws_smithy_schema::ShapeType::String,
70        "key",
71        0,
72    );
73static CREATEINTEGRATIONOUTPUT_MEMBER_ADDITIONAL_ENCRYPTION_CONTEXT_VALUE: ::aws_smithy_schema::Schema<'static> =
74    ::aws_smithy_schema::Schema::new_member(
75        ::aws_smithy_schema::ShapeId::from_parts(
76            "com.amazonaws.glue#IntegrationAdditionalEncryptionContextMap$value",
77            "com.amazonaws.glue",
78            "IntegrationAdditionalEncryptionContextMap",
79        ),
80        ::aws_smithy_schema::ShapeType::String,
81        "value",
82        1,
83    );
84static CREATEINTEGRATIONOUTPUT_MEMBER_ADDITIONAL_ENCRYPTION_CONTEXT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
85    ::aws_smithy_schema::ShapeId::from_parts(
86        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$AdditionalEncryptionContext",
87        "com.amazonaws.glue.synthetic",
88        "CreateIntegrationOutput",
89    ),
90    ::aws_smithy_schema::ShapeType::Map,
91    "AdditionalEncryptionContext",
92    6,
93)
94.with_map_members(
95    &CREATEINTEGRATIONOUTPUT_MEMBER_ADDITIONAL_ENCRYPTION_CONTEXT_KEY,
96    &CREATEINTEGRATIONOUTPUT_MEMBER_ADDITIONAL_ENCRYPTION_CONTEXT_VALUE,
97);
98static CREATEINTEGRATIONOUTPUT_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
99    ::aws_smithy_schema::ShapeId::from_parts(
100        "com.amazonaws.glue#IntegrationTagsList$member",
101        "com.amazonaws.glue",
102        "IntegrationTagsList",
103    ),
104    ::aws_smithy_schema::ShapeType::Structure,
105    "member",
106    0,
107);
108static CREATEINTEGRATIONOUTPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
109    ::aws_smithy_schema::ShapeId::from_parts(
110        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$Tags",
111        "com.amazonaws.glue.synthetic",
112        "CreateIntegrationOutput",
113    ),
114    ::aws_smithy_schema::ShapeType::List,
115    "Tags",
116    7,
117)
118.with_list_member(&CREATEINTEGRATIONOUTPUT_MEMBER_TAGS_MEMBER);
119static CREATEINTEGRATIONOUTPUT_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
120    ::aws_smithy_schema::ShapeId::from_parts(
121        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$Status",
122        "com.amazonaws.glue.synthetic",
123        "CreateIntegrationOutput",
124    ),
125    ::aws_smithy_schema::ShapeType::String,
126    "Status",
127    8,
128);
129static CREATEINTEGRATIONOUTPUT_MEMBER_CREATE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
130    ::aws_smithy_schema::ShapeId::from_parts(
131        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$CreateTime",
132        "com.amazonaws.glue.synthetic",
133        "CreateIntegrationOutput",
134    ),
135    ::aws_smithy_schema::ShapeType::Timestamp,
136    "CreateTime",
137    9,
138);
139static CREATEINTEGRATIONOUTPUT_MEMBER_ERRORS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
140    ::aws_smithy_schema::ShapeId::from_parts(
141        "com.amazonaws.glue#IntegrationErrorList$member",
142        "com.amazonaws.glue",
143        "IntegrationErrorList",
144    ),
145    ::aws_smithy_schema::ShapeType::Structure,
146    "member",
147    0,
148);
149static CREATEINTEGRATIONOUTPUT_MEMBER_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
150    ::aws_smithy_schema::ShapeId::from_parts(
151        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$Errors",
152        "com.amazonaws.glue.synthetic",
153        "CreateIntegrationOutput",
154    ),
155    ::aws_smithy_schema::ShapeType::List,
156    "Errors",
157    10,
158)
159.with_list_member(&CREATEINTEGRATIONOUTPUT_MEMBER_ERRORS_MEMBER);
160static CREATEINTEGRATIONOUTPUT_MEMBER_DATA_FILTER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
161    ::aws_smithy_schema::ShapeId::from_parts(
162        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$DataFilter",
163        "com.amazonaws.glue.synthetic",
164        "CreateIntegrationOutput",
165    ),
166    ::aws_smithy_schema::ShapeType::String,
167    "DataFilter",
168    11,
169);
170static CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_CONFIG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
171    ::aws_smithy_schema::ShapeId::from_parts(
172        "com.amazonaws.glue.synthetic#CreateIntegrationOutput$IntegrationConfig",
173        "com.amazonaws.glue.synthetic",
174        "CreateIntegrationOutput",
175    ),
176    ::aws_smithy_schema::ShapeType::Structure,
177    "IntegrationConfig",
178    12,
179);
180static CREATEINTEGRATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
181    ::aws_smithy_schema::ShapeId::from_parts(
182        "com.amazonaws.glue.synthetic#CreateIntegrationOutput",
183        "com.amazonaws.glue.synthetic",
184        "CreateIntegrationOutput",
185    ),
186    ::aws_smithy_schema::ShapeType::Structure,
187    &[
188        &CREATEINTEGRATIONOUTPUT_MEMBER_SOURCE_ARN,
189        &CREATEINTEGRATIONOUTPUT_MEMBER_TARGET_ARN,
190        &CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_NAME,
191        &CREATEINTEGRATIONOUTPUT_MEMBER_DESCRIPTION,
192        &CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_ARN,
193        &CREATEINTEGRATIONOUTPUT_MEMBER_KMS_KEY_ID,
194        &CREATEINTEGRATIONOUTPUT_MEMBER_ADDITIONAL_ENCRYPTION_CONTEXT,
195        &CREATEINTEGRATIONOUTPUT_MEMBER_TAGS,
196        &CREATEINTEGRATIONOUTPUT_MEMBER_STATUS,
197        &CREATEINTEGRATIONOUTPUT_MEMBER_CREATE_TIME,
198        &CREATEINTEGRATIONOUTPUT_MEMBER_ERRORS,
199        &CREATEINTEGRATIONOUTPUT_MEMBER_DATA_FILTER,
200        &CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_CONFIG,
201    ],
202)
203.with_original_name("CreateIntegrationResponse");
204impl crate::operation::create_integration::CreateIntegrationOutput {
205    /// The schema for this shape.
206    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEINTEGRATIONOUTPUT_SCHEMA;
207}
208impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::create_integration::CreateIntegrationOutput {
209    fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
210        Self::SCHEMA
211    }
212
213    #[allow(unused_variables, clippy::diverging_sub_expression)]
214    fn serialize_members(
215        &self,
216        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
217    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
218        {
219            let val = &self.source_arn;
220            ser.write_string(&CREATEINTEGRATIONOUTPUT_MEMBER_SOURCE_ARN, val)?;
221        }
222        {
223            let val = &self.target_arn;
224            ser.write_string(&CREATEINTEGRATIONOUTPUT_MEMBER_TARGET_ARN, val)?;
225        }
226        {
227            let val = &self.integration_name;
228            ser.write_string(&CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_NAME, val)?;
229        }
230        if let Some(ref val) = self.description {
231            ser.write_string(&CREATEINTEGRATIONOUTPUT_MEMBER_DESCRIPTION, val)?;
232        }
233        {
234            let val = &self.integration_arn;
235            ser.write_string(&CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_ARN, val)?;
236        }
237        if let Some(ref val) = self.kms_key_id {
238            ser.write_string(&CREATEINTEGRATIONOUTPUT_MEMBER_KMS_KEY_ID, val)?;
239        }
240        if let Some(ref val) = self.additional_encryption_context {
241            ser.write_map(
242                &CREATEINTEGRATIONOUTPUT_MEMBER_ADDITIONAL_ENCRYPTION_CONTEXT,
243                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
244                    for (key, value) in val {
245                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
246                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
247                    }
248                    Ok(())
249                },
250            )?;
251        }
252        if let Some(ref val) = self.tags {
253            ser.write_list(
254                &CREATEINTEGRATIONOUTPUT_MEMBER_TAGS,
255                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
256                    for item in val {
257                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
258                    }
259                    Ok(())
260                },
261            )?;
262        }
263        {
264            let val = &self.status;
265            ser.write_string(&CREATEINTEGRATIONOUTPUT_MEMBER_STATUS, val.as_str())?;
266        }
267        {
268            let val = &self.create_time;
269            ser.write_timestamp(&CREATEINTEGRATIONOUTPUT_MEMBER_CREATE_TIME, val)?;
270        }
271        if let Some(ref val) = self.errors {
272            ser.write_list(
273                &CREATEINTEGRATIONOUTPUT_MEMBER_ERRORS,
274                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
275                    for item in val {
276                        ser.write_struct(crate::types::IntegrationError::SCHEMA, item)?;
277                    }
278                    Ok(())
279                },
280            )?;
281        }
282        if let Some(ref val) = self.data_filter {
283            ser.write_string(&CREATEINTEGRATIONOUTPUT_MEMBER_DATA_FILTER, val)?;
284        }
285        if let Some(ref val) = self.integration_config {
286            ser.write_struct(&CREATEINTEGRATIONOUTPUT_MEMBER_INTEGRATION_CONFIG, val)?;
287        }
288        Ok(())
289    }
290}
291impl crate::operation::create_integration::builders::CreateIntegrationOutputBuilder {
292    #[allow(
293        unused_variables,
294        unreachable_code,
295        clippy::single_match,
296        clippy::match_single_binding,
297        clippy::diverging_sub_expression
298    )]
299    pub(crate) fn deserialize_members(
300        &mut self,
301        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
302    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
303        deserializer.read_struct(&CREATEINTEGRATIONOUTPUT_SCHEMA, &mut |member, deser| {
304            match member.member_index() {
305                Some(0) => {
306                    self.source_arn = Some(deser.read_string(member)?);
307                }
308                Some(1) => {
309                    self.target_arn = Some(deser.read_string(member)?);
310                }
311                Some(2) => {
312                    self.integration_name = Some(deser.read_string(member)?);
313                }
314                Some(3) => {
315                    if deser.is_null() {
316                        deser.read_null()?;
317                    } else {
318                        self.description = Some(deser.read_string(member)?);
319                    }
320                }
321                Some(4) => {
322                    self.integration_arn = Some(deser.read_string(member)?);
323                }
324                Some(5) => {
325                    if deser.is_null() {
326                        deser.read_null()?;
327                    } else {
328                        self.kms_key_id = Some(deser.read_string(member)?);
329                    }
330                }
331                Some(6) => {
332                    if deser.is_null() {
333                        deser.read_null()?;
334                    } else {
335                        self.additional_encryption_context = Some(deser.read_string_string_map(member)?);
336                    }
337                }
338                Some(7) => {
339                    if deser.is_null() {
340                        deser.read_null()?;
341                    } else {
342                        self.tags = Some({
343                            let mut container = Vec::new();
344                            deser.read_list(member, &mut |deser| {
345                                container.push(crate::types::Tag::deserialize(deser)?);
346                                Ok(())
347                            })?;
348                            container
349                        });
350                    }
351                }
352                Some(8) => {
353                    self.status = Some(crate::types::IntegrationStatus::from(deser.read_string(member)?.as_str()));
354                }
355                Some(9) => {
356                    self.create_time = Some(deser.read_timestamp(member)?);
357                }
358                Some(10) => {
359                    if deser.is_null() {
360                        deser.read_null()?;
361                    } else {
362                        self.errors = Some({
363                            let mut container = Vec::new();
364                            deser.read_list(member, &mut |deser| {
365                                container.push(crate::types::IntegrationError::deserialize(deser)?);
366                                Ok(())
367                            })?;
368                            container
369                        });
370                    }
371                }
372                Some(11) => {
373                    if deser.is_null() {
374                        deser.read_null()?;
375                    } else {
376                        self.data_filter = Some(deser.read_string(member)?);
377                    }
378                }
379                Some(12) => {
380                    if deser.is_null() {
381                        deser.read_null()?;
382                    } else {
383                        self.integration_config = Some(crate::types::IntegrationConfig::deserialize(deser)?);
384                    }
385                }
386                _ => {}
387            }
388            Ok(())
389        })
390    }
391}
392
393impl crate::operation::create_integration::CreateIntegrationOutput {
394    /// Deserializes this structure from a [`ShapeDeserializer`].
395    pub fn deserialize(
396        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
397    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
398        let mut builder = Self::builder();
399        builder.deserialize_members(deserializer)?;
400        builder.source_arn = builder.source_arn.or(Some(String::new()));
401        builder.target_arn = builder.target_arn.or(Some(String::new()));
402        builder.integration_name = builder.integration_name.or(Some(String::new()));
403        builder.integration_arn = builder.integration_arn.or(Some(String::new()));
404        builder.create_time = builder.create_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
405        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
406    }
407}