aws_sdk_dynamodb/operation/delete_table/
_delete_table_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteTableInput {
7 pub table_name: ::std::option::Option<::std::string::String>,
9}
10impl DeleteTableInput {
11 pub fn table_name(&self) -> ::std::option::Option<&str> {
13 self.table_name.as_deref()
14 }
15}
16static DELETETABLEINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.dynamodb.synthetic#DeleteTableInput", "com.amazonaws.dynamodb.synthetic", "DeleteTableInput");
17static DELETETABLEINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
18 ::aws_smithy_schema::ShapeId::from_static(
19 "com.amazonaws.dynamodb.synthetic#DeleteTableInput$TableName",
20 "com.amazonaws.dynamodb.synthetic",
21 "DeleteTableInput",
22 ),
23 ::aws_smithy_schema::ShapeType::String,
24 "TableName",
25 0,
26 );
27static DELETETABLEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
28 DELETETABLEINPUT_SCHEMA_ID,
29 ::aws_smithy_schema::ShapeType::Structure,
30 &[&DELETETABLEINPUT_MEMBER_TABLE_NAME],
31 );
32impl DeleteTableInput {
33 pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETETABLEINPUT_SCHEMA;
35 }
36impl ::aws_smithy_schema::serde::SerializableStruct for DeleteTableInput {
37 #[allow(unused_variables, clippy::diverging_sub_expression)]
38 fn serialize_members(&self, ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
39 if let Some(ref val) = self.table_name {
40 ser.write_string(&DELETETABLEINPUT_MEMBER_TABLE_NAME, val)?;
41 }
42 Ok(())
43 }
44 }
45impl DeleteTableInput {
46 pub fn deserialize(deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
48 #[allow(unused_variables, unused_mut)]
49 let mut builder = Self::builder();
50 #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding, clippy::diverging_sub_expression)]
51 deserializer.read_struct(&DELETETABLEINPUT_SCHEMA, &mut |member, deser| {
52 match member.member_index() {
53 Some(0) => {
54 builder.table_name = Some(deser.read_string(member)?);
55 }
56 _ => {}
57 }
58 Ok(())
59 })?;
60 builder.table_name = builder.table_name.or(Some(String::new()));
61builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
62 }
63 }
64impl DeleteTableInput {
65 pub fn deserialize_with_response(
67 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
68 _headers: &::aws_smithy_runtime_api::http::Headers,
69 _status: u16,
70 _body: &[u8],
71 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
72 Self::deserialize(deserializer)
73 }
74 }
75impl DeleteTableInput {
76 pub fn builder() -> crate::operation::delete_table::builders::DeleteTableInputBuilder {
78 crate::operation::delete_table::builders::DeleteTableInputBuilder::default()
79 }
80}
81
82#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct DeleteTableInputBuilder {
86 pub(crate) table_name: ::std::option::Option<::std::string::String>,
87}
88impl DeleteTableInputBuilder {
89 pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.table_name = ::std::option::Option::Some(input.into());
93 self
94 }
95 pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.table_name = input; self
98 }
99 pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
101 &self.table_name
102 }
103 pub fn build(self) -> ::std::result::Result<crate::operation::delete_table::DeleteTableInput, ::aws_smithy_types::error::operation::BuildError> {
105 ::std::result::Result::Ok(
106 crate::operation::delete_table::DeleteTableInput {
107 table_name: self.table_name
108 ,
109 }
110 )
111 }
112}
113