aws_sdk_glue/schema_serde/
shape_authentication_configuration_input.rs1static AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_AUTHENTICATION_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue#AuthenticationConfigurationInput$AuthenticationType",
5 "com.amazonaws.glue",
6 "AuthenticationConfigurationInput",
7 ),
8 ::aws_smithy_schema::ShapeType::String,
9 "AuthenticationType",
10 0,
11);
12static AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_O_AUTH2_PROPERTIES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13 ::aws_smithy_schema::ShapeId::from_parts(
14 "com.amazonaws.glue#AuthenticationConfigurationInput$OAuth2Properties",
15 "com.amazonaws.glue",
16 "AuthenticationConfigurationInput",
17 ),
18 ::aws_smithy_schema::ShapeType::Structure,
19 "OAuth2Properties",
20 1,
21);
22static AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_SECRET_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
23 ::aws_smithy_schema::ShapeId::from_parts(
24 "com.amazonaws.glue#AuthenticationConfigurationInput$SecretArn",
25 "com.amazonaws.glue",
26 "AuthenticationConfigurationInput",
27 ),
28 ::aws_smithy_schema::ShapeType::String,
29 "SecretArn",
30 2,
31);
32static AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_KMS_KEY_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
33 ::aws_smithy_schema::ShapeId::from_parts(
34 "com.amazonaws.glue#AuthenticationConfigurationInput$KmsKeyArn",
35 "com.amazonaws.glue",
36 "AuthenticationConfigurationInput",
37 ),
38 ::aws_smithy_schema::ShapeType::String,
39 "KmsKeyArn",
40 3,
41);
42static AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_BASIC_AUTHENTICATION_CREDENTIALS: ::aws_smithy_schema::Schema<'static> =
43 ::aws_smithy_schema::Schema::new_member(
44 ::aws_smithy_schema::ShapeId::from_parts(
45 "com.amazonaws.glue#AuthenticationConfigurationInput$BasicAuthenticationCredentials",
46 "com.amazonaws.glue",
47 "AuthenticationConfigurationInput",
48 ),
49 ::aws_smithy_schema::ShapeType::Structure,
50 "BasicAuthenticationCredentials",
51 4,
52 );
53static AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_CUSTOM_AUTHENTICATION_CREDENTIALS_KEY: ::aws_smithy_schema::Schema<'static> =
54 ::aws_smithy_schema::Schema::new_member(
55 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#CredentialMap$key", "com.amazonaws.glue", "CredentialMap"),
56 ::aws_smithy_schema::ShapeType::String,
57 "key",
58 0,
59 );
60static AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_CUSTOM_AUTHENTICATION_CREDENTIALS_VALUE: ::aws_smithy_schema::Schema<'static> =
61 ::aws_smithy_schema::Schema::new_member(
62 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#CredentialMap$value", "com.amazonaws.glue", "CredentialMap"),
63 ::aws_smithy_schema::ShapeType::String,
64 "value",
65 1,
66 );
67static AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_CUSTOM_AUTHENTICATION_CREDENTIALS: ::aws_smithy_schema::Schema<'static> =
68 ::aws_smithy_schema::Schema::new_member(
69 ::aws_smithy_schema::ShapeId::from_parts(
70 "com.amazonaws.glue#AuthenticationConfigurationInput$CustomAuthenticationCredentials",
71 "com.amazonaws.glue",
72 "AuthenticationConfigurationInput",
73 ),
74 ::aws_smithy_schema::ShapeType::Map,
75 "CustomAuthenticationCredentials",
76 5,
77 )
78 .with_map_members(
79 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_CUSTOM_AUTHENTICATION_CREDENTIALS_KEY,
80 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_CUSTOM_AUTHENTICATION_CREDENTIALS_VALUE,
81 );
82static AUTHENTICATIONCONFIGURATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
83 ::aws_smithy_schema::ShapeId::from_parts(
84 "com.amazonaws.glue#AuthenticationConfigurationInput",
85 "com.amazonaws.glue",
86 "AuthenticationConfigurationInput",
87 ),
88 ::aws_smithy_schema::ShapeType::Structure,
89 &[
90 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_AUTHENTICATION_TYPE,
91 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_O_AUTH2_PROPERTIES,
92 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_SECRET_ARN,
93 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_KMS_KEY_ARN,
94 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_BASIC_AUTHENTICATION_CREDENTIALS,
95 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_CUSTOM_AUTHENTICATION_CREDENTIALS,
96 ],
97);
98impl crate::types::AuthenticationConfigurationInput {
99 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &AUTHENTICATIONCONFIGURATIONINPUT_SCHEMA;
101}
102impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::AuthenticationConfigurationInput {
103 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
104 Self::SCHEMA
105 }
106
107 #[allow(unused_variables, clippy::diverging_sub_expression)]
108 fn serialize_members(
109 &self,
110 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
111 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
112 if let Some(ref val) = self.authentication_type {
113 ser.write_string(&AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_AUTHENTICATION_TYPE, val.as_str())?;
114 }
115 if let Some(ref val) = self.o_auth2_properties {
116 ser.write_struct(&AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_O_AUTH2_PROPERTIES, val)?;
117 }
118 if let Some(ref val) = self.secret_arn {
119 ser.write_string(&AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_SECRET_ARN, val)?;
120 }
121 if let Some(ref val) = self.kms_key_arn {
122 ser.write_string(&AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_KMS_KEY_ARN, val)?;
123 }
124 if let Some(ref val) = self.basic_authentication_credentials {
125 ser.write_struct(&AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_BASIC_AUTHENTICATION_CREDENTIALS, val)?;
126 }
127 if let Some(ref val) = self.custom_authentication_credentials {
128 ser.write_map(
129 &AUTHENTICATIONCONFIGURATIONINPUT_MEMBER_CUSTOM_AUTHENTICATION_CREDENTIALS,
130 &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
131 for (key, value) in val {
132 ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
133 ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
134 }
135 Ok(())
136 },
137 )?;
138 }
139 Ok(())
140 }
141}
142impl crate::types::builders::AuthenticationConfigurationInputBuilder {
143 #[allow(
144 unused_variables,
145 unreachable_code,
146 clippy::single_match,
147 clippy::match_single_binding,
148 clippy::diverging_sub_expression
149 )]
150 pub(crate) fn deserialize_members(
151 &mut self,
152 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
153 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
154 deserializer.read_struct(&AUTHENTICATIONCONFIGURATIONINPUT_SCHEMA, &mut |member, deser| {
155 match member.member_index() {
156 Some(0) => {
157 if deser.is_null() {
158 deser.read_null()?;
159 } else {
160 self.authentication_type = Some(crate::types::AuthenticationType::from(deser.read_string(member)?.as_str()));
161 }
162 }
163 Some(1) => {
164 if deser.is_null() {
165 deser.read_null()?;
166 } else {
167 self.o_auth2_properties = Some(crate::types::OAuth2PropertiesInput::deserialize(deser)?);
168 }
169 }
170 Some(2) => {
171 if deser.is_null() {
172 deser.read_null()?;
173 } else {
174 self.secret_arn = Some(deser.read_string(member)?);
175 }
176 }
177 Some(3) => {
178 if deser.is_null() {
179 deser.read_null()?;
180 } else {
181 self.kms_key_arn = Some(deser.read_string(member)?);
182 }
183 }
184 Some(4) => {
185 if deser.is_null() {
186 deser.read_null()?;
187 } else {
188 self.basic_authentication_credentials = Some(crate::types::BasicAuthenticationCredentials::deserialize(deser)?);
189 }
190 }
191 Some(5) => {
192 if deser.is_null() {
193 deser.read_null()?;
194 } else {
195 self.custom_authentication_credentials = Some(deser.read_string_string_map(member)?);
196 }
197 }
198 _ => {}
199 }
200 Ok(())
201 })
202 }
203}
204
205impl crate::types::AuthenticationConfigurationInput {
206 pub fn deserialize(
208 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
209 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
210 let mut builder = Self::builder();
211 builder.deserialize_members(deserializer)?;
212 Ok(builder.build())
213 }
214}