aws_sdk_glue/schema_serde/
shape_create_security_configuration_input_input.rs1static CREATESECURITYCONFIGURATIONINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue.synthetic#CreateSecurityConfigurationInput$Name",
5 "com.amazonaws.glue.synthetic",
6 "CreateSecurityConfigurationInput",
7 ),
8 ::aws_smithy_schema::ShapeType::String,
9 "Name",
10 0,
11);
12static CREATESECURITYCONFIGURATIONINPUT_MEMBER_ENCRYPTION_CONFIGURATION: ::aws_smithy_schema::Schema<'static> =
13 ::aws_smithy_schema::Schema::new_member(
14 ::aws_smithy_schema::ShapeId::from_parts(
15 "com.amazonaws.glue.synthetic#CreateSecurityConfigurationInput$EncryptionConfiguration",
16 "com.amazonaws.glue.synthetic",
17 "CreateSecurityConfigurationInput",
18 ),
19 ::aws_smithy_schema::ShapeType::Structure,
20 "EncryptionConfiguration",
21 1,
22 );
23static CREATESECURITYCONFIGURATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
24 ::aws_smithy_schema::ShapeId::from_parts(
25 "com.amazonaws.glue.synthetic#CreateSecurityConfigurationInput",
26 "com.amazonaws.glue.synthetic",
27 "CreateSecurityConfigurationInput",
28 ),
29 ::aws_smithy_schema::ShapeType::Structure,
30 &[
31 &CREATESECURITYCONFIGURATIONINPUT_MEMBER_NAME,
32 &CREATESECURITYCONFIGURATIONINPUT_MEMBER_ENCRYPTION_CONFIGURATION,
33 ],
34)
35.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
36.with_original_name("CreateSecurityConfigurationRequest");
37impl crate::operation::create_security_configuration::CreateSecurityConfigurationInput {
38 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATESECURITYCONFIGURATIONINPUT_SCHEMA;
40}
41impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::create_security_configuration::CreateSecurityConfigurationInput {
42 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
43 Self::SCHEMA
44 }
45
46 #[allow(unused_variables, clippy::diverging_sub_expression)]
47 fn serialize_members(
48 &self,
49 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
50 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
51 if let Some(ref val) = self.name {
52 ser.write_string(&CREATESECURITYCONFIGURATIONINPUT_MEMBER_NAME, val)?;
53 }
54 if let Some(ref val) = self.encryption_configuration {
55 ser.write_struct(&CREATESECURITYCONFIGURATIONINPUT_MEMBER_ENCRYPTION_CONFIGURATION, val)?;
56 }
57 Ok(())
58 }
59}
60impl crate::operation::create_security_configuration::builders::CreateSecurityConfigurationInputBuilder {
61 #[allow(
62 unused_variables,
63 unreachable_code,
64 clippy::single_match,
65 clippy::match_single_binding,
66 clippy::diverging_sub_expression
67 )]
68 pub(crate) fn deserialize_members(
69 &mut self,
70 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
71 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
72 deserializer.read_struct(&CREATESECURITYCONFIGURATIONINPUT_SCHEMA, &mut |member, deser| {
73 match member.member_index() {
74 Some(0) => {
75 if deser.is_null() {
76 deser.read_null()?;
77 } else {
78 self.name = Some(deser.read_string(member)?);
79 }
80 }
81 Some(1) => {
82 if deser.is_null() {
83 deser.read_null()?;
84 } else {
85 self.encryption_configuration = Some(crate::types::EncryptionConfiguration::deserialize(deser)?);
86 }
87 }
88 _ => {}
89 }
90 Ok(())
91 })
92 }
93}
94
95impl crate::operation::create_security_configuration::CreateSecurityConfigurationInput {
96 pub fn deserialize(
98 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
99 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
100 let mut builder = Self::builder();
101 builder.deserialize_members(deserializer)?;
102 builder.name = builder.name.or(Some(String::new()));
103 builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
104 }
105}