aws_sdk_glue/schema_serde/
shape_asset_form_entry.rs1static ASSETFORMENTRY_MEMBER_FORM_TYPE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#AssetFormEntry$FormTypeId", "com.amazonaws.glue", "AssetFormEntry"),
4 ::aws_smithy_schema::ShapeType::String,
5 "FormTypeId",
6 0,
7);
8static ASSETFORMENTRY_MEMBER_CONTENT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
9 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#AssetFormEntry$Content", "com.amazonaws.glue", "AssetFormEntry"),
10 ::aws_smithy_schema::ShapeType::String,
11 "Content",
12 1,
13);
14static ASSETFORMENTRY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
15 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#AssetFormEntry", "com.amazonaws.glue", "AssetFormEntry"),
16 ::aws_smithy_schema::ShapeType::Structure,
17 &[&ASSETFORMENTRY_MEMBER_FORM_TYPE_ID, &ASSETFORMENTRY_MEMBER_CONTENT],
18);
19impl crate::types::AssetFormEntry {
20 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ASSETFORMENTRY_SCHEMA;
22}
23impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::AssetFormEntry {
24 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
25 Self::SCHEMA
26 }
27
28 #[allow(unused_variables, clippy::diverging_sub_expression)]
29 fn serialize_members(
30 &self,
31 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
32 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
33 if let Some(ref val) = self.form_type_id {
34 ser.write_string(&ASSETFORMENTRY_MEMBER_FORM_TYPE_ID, val)?;
35 }
36 if let Some(ref val) = self.content {
37 ser.write_string(&ASSETFORMENTRY_MEMBER_CONTENT, val)?;
38 }
39 Ok(())
40 }
41}
42impl crate::types::builders::AssetFormEntryBuilder {
43 #[allow(
44 unused_variables,
45 unreachable_code,
46 clippy::single_match,
47 clippy::match_single_binding,
48 clippy::diverging_sub_expression
49 )]
50 pub(crate) fn deserialize_members(
51 &mut self,
52 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
53 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
54 deserializer.read_struct(&ASSETFORMENTRY_SCHEMA, &mut |member, deser| {
55 match member.member_index() {
56 Some(0) => {
57 if deser.is_null() {
58 deser.read_null()?;
59 } else {
60 self.form_type_id = Some(deser.read_string(member)?);
61 }
62 }
63 Some(1) => {
64 if deser.is_null() {
65 deser.read_null()?;
66 } else {
67 self.content = Some(deser.read_string(member)?);
68 }
69 }
70 _ => {}
71 }
72 Ok(())
73 })
74 }
75}
76
77impl crate::types::AssetFormEntry {
78 pub fn deserialize(
80 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
81 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
82 let mut builder = Self::builder();
83 builder.deserialize_members(deserializer)?;
84 Ok(builder.build())
85 }
86}