aws_sdk_glue/schema_serde/
shape_execution_attempt.rs1static EXECUTIONATTEMPT_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#ExecutionAttempt$Status", "com.amazonaws.glue", "ExecutionAttempt"),
4 ::aws_smithy_schema::ShapeType::String,
5 "Status",
6 0,
7);
8static EXECUTIONATTEMPT_MEMBER_COLUMN_STATISTICS_TASK_RUN_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
9 ::aws_smithy_schema::ShapeId::from_parts(
10 "com.amazonaws.glue#ExecutionAttempt$ColumnStatisticsTaskRunId",
11 "com.amazonaws.glue",
12 "ExecutionAttempt",
13 ),
14 ::aws_smithy_schema::ShapeType::String,
15 "ColumnStatisticsTaskRunId",
16 1,
17);
18static EXECUTIONATTEMPT_MEMBER_EXECUTION_TIMESTAMP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
19 ::aws_smithy_schema::ShapeId::from_parts(
20 "com.amazonaws.glue#ExecutionAttempt$ExecutionTimestamp",
21 "com.amazonaws.glue",
22 "ExecutionAttempt",
23 ),
24 ::aws_smithy_schema::ShapeType::Timestamp,
25 "ExecutionTimestamp",
26 2,
27);
28static EXECUTIONATTEMPT_MEMBER_ERROR_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
29 ::aws_smithy_schema::ShapeId::from_parts(
30 "com.amazonaws.glue#ExecutionAttempt$ErrorMessage",
31 "com.amazonaws.glue",
32 "ExecutionAttempt",
33 ),
34 ::aws_smithy_schema::ShapeType::String,
35 "ErrorMessage",
36 3,
37);
38static EXECUTIONATTEMPT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
39 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#ExecutionAttempt", "com.amazonaws.glue", "ExecutionAttempt"),
40 ::aws_smithy_schema::ShapeType::Structure,
41 &[
42 &EXECUTIONATTEMPT_MEMBER_STATUS,
43 &EXECUTIONATTEMPT_MEMBER_COLUMN_STATISTICS_TASK_RUN_ID,
44 &EXECUTIONATTEMPT_MEMBER_EXECUTION_TIMESTAMP,
45 &EXECUTIONATTEMPT_MEMBER_ERROR_MESSAGE,
46 ],
47);
48impl crate::types::ExecutionAttempt {
49 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &EXECUTIONATTEMPT_SCHEMA;
51}
52impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::ExecutionAttempt {
53 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
54 Self::SCHEMA
55 }
56
57 #[allow(unused_variables, clippy::diverging_sub_expression)]
58 fn serialize_members(
59 &self,
60 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
61 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
62 if let Some(ref val) = self.status {
63 ser.write_string(&EXECUTIONATTEMPT_MEMBER_STATUS, val.as_str())?;
64 }
65 if let Some(ref val) = self.column_statistics_task_run_id {
66 ser.write_string(&EXECUTIONATTEMPT_MEMBER_COLUMN_STATISTICS_TASK_RUN_ID, val)?;
67 }
68 if let Some(ref val) = self.execution_timestamp {
69 ser.write_timestamp(&EXECUTIONATTEMPT_MEMBER_EXECUTION_TIMESTAMP, val)?;
70 }
71 if let Some(ref val) = self.error_message {
72 ser.write_string(&EXECUTIONATTEMPT_MEMBER_ERROR_MESSAGE, val)?;
73 }
74 Ok(())
75 }
76}
77impl crate::types::builders::ExecutionAttemptBuilder {
78 #[allow(
79 unused_variables,
80 unreachable_code,
81 clippy::single_match,
82 clippy::match_single_binding,
83 clippy::diverging_sub_expression
84 )]
85 pub(crate) fn deserialize_members(
86 &mut self,
87 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
88 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
89 deserializer.read_struct(&EXECUTIONATTEMPT_SCHEMA, &mut |member, deser| {
90 match member.member_index() {
91 Some(0) => {
92 if deser.is_null() {
93 deser.read_null()?;
94 } else {
95 self.status = Some(crate::types::ExecutionStatus::from(deser.read_string(member)?.as_str()));
96 }
97 }
98 Some(1) => {
99 if deser.is_null() {
100 deser.read_null()?;
101 } else {
102 self.column_statistics_task_run_id = Some(deser.read_string(member)?);
103 }
104 }
105 Some(2) => {
106 if deser.is_null() {
107 deser.read_null()?;
108 } else {
109 self.execution_timestamp = Some(deser.read_timestamp(member)?);
110 }
111 }
112 Some(3) => {
113 if deser.is_null() {
114 deser.read_null()?;
115 } else {
116 self.error_message = Some(deser.read_string(member)?);
117 }
118 }
119 _ => {}
120 }
121 Ok(())
122 })
123 }
124}
125
126impl crate::types::ExecutionAttempt {
127 pub fn deserialize(
129 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
130 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
131 let mut builder = Self::builder();
132 builder.deserialize_members(deserializer)?;
133 Ok(builder.build())
134 }
135}