aws_sdk_dynamodb/operation/delete_table/
_delete_table_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the output of a <code>DeleteTable</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteTableOutput  {
7    /// <p>Represents the properties of a table.</p>
8    pub table_description: ::std::option::Option<crate::types::TableDescription>,
9    _request_id: Option<String>,
10}
11impl  DeleteTableOutput  {
12    /// <p>Represents the properties of a table.</p>
13    pub fn table_description(&self) -> ::std::option::Option<&crate::types::TableDescription> {
14        self.table_description.as_ref()
15    }
16}
17static DELETETABLEOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.dynamodb.synthetic#DeleteTableOutput", "com.amazonaws.dynamodb.synthetic", "DeleteTableOutput");
18static DELETETABLEOUTPUT_MEMBER_TABLE_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
19                            ::aws_smithy_schema::ShapeId::from_static(
20                                "com.amazonaws.dynamodb.synthetic#DeleteTableOutput$TableDescription",
21                                "com.amazonaws.dynamodb.synthetic",
22                                "DeleteTableOutput",
23                            ),
24                            ::aws_smithy_schema::ShapeType::Structure,
25                            "TableDescription",
26                            0,
27                        );
28static DELETETABLEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
29                            ::aws_smithy_schema::ShapeId::from_static(
30                                "synthetic#request_id",
31                                "synthetic",
32                                "request_id",
33                            ),
34                            ::aws_smithy_schema::ShapeType::String,
35                            "request_id",
36                            1,
37                        ).with_http_header("x-amzn-requestid");
38static DELETETABLEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
39                            DELETETABLEOUTPUT_SCHEMA_ID,
40                            ::aws_smithy_schema::ShapeType::Structure,
41                            &[&DELETETABLEOUTPUT_MEMBER_TABLE_DESCRIPTION, &DELETETABLEOUTPUT_MEMBER__REQUEST_ID],
42                        );
43impl DeleteTableOutput {
44                /// The schema for this shape.
45                pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETETABLEOUTPUT_SCHEMA;
46            }
47impl ::aws_smithy_schema::serde::SerializableStruct for DeleteTableOutput {
48                #[allow(unused_variables, clippy::diverging_sub_expression)]
49                fn serialize_members(&self, ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
50                    if let Some(ref val) = self.table_description {
51                                ser.write_struct(&DELETETABLEOUTPUT_MEMBER_TABLE_DESCRIPTION, val)?;
52                            }
53                    Ok(())
54                }
55            }
56impl DeleteTableOutput {
57                /// Deserializes this structure from a [`ShapeDeserializer`].
58                pub fn deserialize(deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
59                    #[allow(unused_variables, unused_mut)]
60                    let mut builder = Self::builder();
61                    #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding, clippy::diverging_sub_expression)]
62                    deserializer.read_struct(&DELETETABLEOUTPUT_SCHEMA, &mut |member, deser| {
63                        match member.member_index() {
64                            Some(0) => {
65                                    builder.table_description = Some(crate::types::TableDescription::deserialize(deser)?);
66                                }
67Some(1) => {
68                                builder._request_id = Some(deser.read_string(member)?);
69                            }
70                            _ => {}
71                        }
72                        Ok(())
73                    })?;
74                    Ok(builder.build())
75                }
76            }
77impl DeleteTableOutput {
78                /// Deserializes this structure from a body deserializer and HTTP response headers.
79                /// Header-bound members are read directly from headers, avoiding runtime
80                /// member iteration overhead. Body members are read via the deserializer.
81                pub fn deserialize_with_response(
82                    deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
83                    headers: &::aws_smithy_runtime_api::http::Headers,
84                    _status: u16,
85                    _body: &[u8],
86                ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
87                    #[allow(unused_variables, unused_mut)]
88                    let mut builder = Self::builder();
89if let Some(val) = headers.get("x-amzn-requestid") {
90                    builder._request_id = Some(val.to_string());
91                }
92#[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding, clippy::diverging_sub_expression)]
93                    deserializer.read_struct(&DELETETABLEOUTPUT_SCHEMA, &mut |member, deser| {
94                        match member.member_index() {
95                            Some(0) => { builder.table_description = Some(crate::types::TableDescription::deserialize(deser)?); }
96                            _ => {}
97                        }
98                        Ok(())
99                    })?;
100                    Ok(builder.build())
101                    }
102                    }
103impl ::aws_types::request_id::RequestId for DeleteTableOutput {
104                                    fn request_id(&self) -> Option<&str> {
105                                        self._request_id.as_deref()
106                                    }
107                                }
108impl DeleteTableOutput {
109    /// Creates a new builder-style object to manufacture [`DeleteTableOutput`](crate::operation::delete_table::DeleteTableOutput).
110    pub fn builder() -> crate::operation::delete_table::builders::DeleteTableOutputBuilder {
111        crate::operation::delete_table::builders::DeleteTableOutputBuilder::default()
112    }
113}
114
115/// A builder for [`DeleteTableOutput`](crate::operation::delete_table::DeleteTableOutput).
116#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
117#[non_exhaustive]
118pub struct DeleteTableOutputBuilder {
119    pub(crate) table_description: ::std::option::Option<crate::types::TableDescription>,
120    _request_id: Option<String>,
121}
122impl DeleteTableOutputBuilder {
123    /// <p>Represents the properties of a table.</p>
124    pub fn table_description(mut self, input: crate::types::TableDescription) -> Self {
125        self.table_description = ::std::option::Option::Some(input);
126        self
127    }
128    /// <p>Represents the properties of a table.</p>
129    pub fn set_table_description(mut self, input: ::std::option::Option<crate::types::TableDescription>) -> Self {
130        self.table_description = input; self
131    }
132    /// <p>Represents the properties of a table.</p>
133    pub fn get_table_description(&self) -> &::std::option::Option<crate::types::TableDescription> {
134        &self.table_description
135    }
136    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
137                                        self._request_id = Some(request_id.into());
138                                        self
139                                    }
140    
141                                    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
142                                        self._request_id = request_id;
143                                        self
144                                    }
145    /// Consumes the builder and constructs a [`DeleteTableOutput`](crate::operation::delete_table::DeleteTableOutput).
146    pub fn build(self) -> crate::operation::delete_table::DeleteTableOutput {
147        crate::operation::delete_table::DeleteTableOutput {
148            table_description: self.table_description
149            ,
150            _request_id: self._request_id,
151        }
152    }
153}
154