aws_sdk_glue/schema_serde/
shape_profiling_results_options.rs1static PROFILINGRESULTSOPTIONS_MEMBER_WRITE_PROFILING_RESULTS_ENABLED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue#ProfilingResultsOptions$WriteProfilingResultsEnabled",
5 "com.amazonaws.glue",
6 "ProfilingResultsOptions",
7 ),
8 ::aws_smithy_schema::ShapeType::Boolean,
9 "WriteProfilingResultsEnabled",
10 0,
11);
12static PROFILINGRESULTSOPTIONS_MEMBER_CATALOG_TABLE_CONFIG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13 ::aws_smithy_schema::ShapeId::from_parts(
14 "com.amazonaws.glue#ProfilingResultsOptions$CatalogTableConfig",
15 "com.amazonaws.glue",
16 "ProfilingResultsOptions",
17 ),
18 ::aws_smithy_schema::ShapeType::Structure,
19 "CatalogTableConfig",
20 1,
21);
22static PROFILINGRESULTSOPTIONS_MEMBER_DISTRIBUTION_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
23 ::aws_smithy_schema::ShapeId::from_parts(
24 "com.amazonaws.glue#ProfilingResultsOptions$DistributionResults",
25 "com.amazonaws.glue",
26 "ProfilingResultsOptions",
27 ),
28 ::aws_smithy_schema::ShapeType::Structure,
29 "DistributionResults",
30 2,
31);
32static PROFILINGRESULTSOPTIONS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
33 ::aws_smithy_schema::ShapeId::from_parts(
34 "com.amazonaws.glue#ProfilingResultsOptions",
35 "com.amazonaws.glue",
36 "ProfilingResultsOptions",
37 ),
38 ::aws_smithy_schema::ShapeType::Structure,
39 &[
40 &PROFILINGRESULTSOPTIONS_MEMBER_WRITE_PROFILING_RESULTS_ENABLED,
41 &PROFILINGRESULTSOPTIONS_MEMBER_CATALOG_TABLE_CONFIG,
42 &PROFILINGRESULTSOPTIONS_MEMBER_DISTRIBUTION_RESULTS,
43 ],
44);
45impl crate::types::ProfilingResultsOptions {
46 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PROFILINGRESULTSOPTIONS_SCHEMA;
48}
49impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::ProfilingResultsOptions {
50 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
51 Self::SCHEMA
52 }
53
54 #[allow(unused_variables, clippy::diverging_sub_expression)]
55 fn serialize_members(
56 &self,
57 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
58 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
59 if let Some(ref val) = self.write_profiling_results_enabled {
60 ser.write_boolean(&PROFILINGRESULTSOPTIONS_MEMBER_WRITE_PROFILING_RESULTS_ENABLED, *val)?;
61 }
62 if let Some(ref val) = self.catalog_table_config {
63 ser.write_struct(&PROFILINGRESULTSOPTIONS_MEMBER_CATALOG_TABLE_CONFIG, val)?;
64 }
65 if let Some(ref val) = self.distribution_results {
66 ser.write_struct(&PROFILINGRESULTSOPTIONS_MEMBER_DISTRIBUTION_RESULTS, val)?;
67 }
68 Ok(())
69 }
70}
71impl crate::types::builders::ProfilingResultsOptionsBuilder {
72 #[allow(
73 unused_variables,
74 unreachable_code,
75 clippy::single_match,
76 clippy::match_single_binding,
77 clippy::diverging_sub_expression
78 )]
79 pub(crate) fn deserialize_members(
80 &mut self,
81 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
82 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
83 deserializer.read_struct(&PROFILINGRESULTSOPTIONS_SCHEMA, &mut |member, deser| {
84 match member.member_index() {
85 Some(0) => {
86 if deser.is_null() {
87 deser.read_null()?;
88 } else {
89 self.write_profiling_results_enabled = Some(deser.read_boolean(member)?);
90 }
91 }
92 Some(1) => {
93 if deser.is_null() {
94 deser.read_null()?;
95 } else {
96 self.catalog_table_config = Some(crate::types::CatalogTableConfigOptions::deserialize(deser)?);
97 }
98 }
99 Some(2) => {
100 if deser.is_null() {
101 deser.read_null()?;
102 } else {
103 self.distribution_results = Some(crate::types::DistributionResultsOptions::deserialize(deser)?);
104 }
105 }
106 _ => {}
107 }
108 Ok(())
109 })
110 }
111}
112
113impl crate::types::ProfilingResultsOptions {
114 pub fn deserialize(
116 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
117 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
118 let mut builder = Self::builder();
119 builder.deserialize_members(deserializer)?;
120 Ok(builder.build())
121 }
122}