aws_sdk_glue/schema_serde/
shape_connection_properties_configuration.rs1static CONNECTIONPROPERTIESCONFIGURATION_MEMBER_URL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue#ConnectionPropertiesConfiguration$Url",
5 "com.amazonaws.glue",
6 "ConnectionPropertiesConfiguration",
7 ),
8 ::aws_smithy_schema::ShapeType::Structure,
9 "Url",
10 0,
11);
12static CONNECTIONPROPERTIESCONFIGURATION_MEMBER_ADDITIONAL_REQUEST_PARAMETERS_MEMBER: ::aws_smithy_schema::Schema<'static> =
13 ::aws_smithy_schema::Schema::new_member(
14 ::aws_smithy_schema::ShapeId::from_parts(
15 "com.amazonaws.glue#ConnectorPropertyList$member",
16 "com.amazonaws.glue",
17 "ConnectorPropertyList",
18 ),
19 ::aws_smithy_schema::ShapeType::Structure,
20 "member",
21 0,
22 );
23static CONNECTIONPROPERTIESCONFIGURATION_MEMBER_ADDITIONAL_REQUEST_PARAMETERS: ::aws_smithy_schema::Schema<'static> =
24 ::aws_smithy_schema::Schema::new_member(
25 ::aws_smithy_schema::ShapeId::from_parts(
26 "com.amazonaws.glue#ConnectionPropertiesConfiguration$AdditionalRequestParameters",
27 "com.amazonaws.glue",
28 "ConnectionPropertiesConfiguration",
29 ),
30 ::aws_smithy_schema::ShapeType::List,
31 "AdditionalRequestParameters",
32 1,
33 )
34 .with_list_member(&CONNECTIONPROPERTIESCONFIGURATION_MEMBER_ADDITIONAL_REQUEST_PARAMETERS_MEMBER);
35static CONNECTIONPROPERTIESCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
36 ::aws_smithy_schema::ShapeId::from_parts(
37 "com.amazonaws.glue#ConnectionPropertiesConfiguration",
38 "com.amazonaws.glue",
39 "ConnectionPropertiesConfiguration",
40 ),
41 ::aws_smithy_schema::ShapeType::Structure,
42 &[
43 &CONNECTIONPROPERTIESCONFIGURATION_MEMBER_URL,
44 &CONNECTIONPROPERTIESCONFIGURATION_MEMBER_ADDITIONAL_REQUEST_PARAMETERS,
45 ],
46);
47impl crate::types::ConnectionPropertiesConfiguration {
48 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CONNECTIONPROPERTIESCONFIGURATION_SCHEMA;
50}
51impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::ConnectionPropertiesConfiguration {
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.url {
62 ser.write_struct(&CONNECTIONPROPERTIESCONFIGURATION_MEMBER_URL, val)?;
63 }
64 if let Some(ref val) = self.additional_request_parameters {
65 ser.write_list(
66 &CONNECTIONPROPERTIESCONFIGURATION_MEMBER_ADDITIONAL_REQUEST_PARAMETERS,
67 &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
68 for item in val {
69 ser.write_struct(crate::types::ConnectorProperty::SCHEMA, item)?;
70 }
71 Ok(())
72 },
73 )?;
74 }
75 Ok(())
76 }
77}
78impl crate::types::builders::ConnectionPropertiesConfigurationBuilder {
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(&CONNECTIONPROPERTIESCONFIGURATION_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.url = Some(crate::types::ConnectorProperty::deserialize(deser)?);
97 }
98 }
99 Some(1) => {
100 if deser.is_null() {
101 deser.read_null()?;
102 } else {
103 self.additional_request_parameters = Some({
104 let mut container = Vec::new();
105 deser.read_list(member, &mut |deser| {
106 container.push(crate::types::ConnectorProperty::deserialize(deser)?);
107 Ok(())
108 })?;
109 container
110 });
111 }
112 }
113 _ => {}
114 }
115 Ok(())
116 })
117 }
118}
119
120impl crate::types::ConnectionPropertiesConfiguration {
121 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}