aws_sdk_s3tables/operation/delete_table/
_delete_table_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteTableInput {
6    /// <p>The Amazon Resource Name (ARN) of the table bucket that contains the table.</p>
7    pub table_bucket_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The namespace associated with the table.</p>
9    pub namespace: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the table.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The version token of the table.</p>
13    pub version_token: ::std::option::Option<::std::string::String>,
14}
15impl DeleteTableInput {
16    /// <p>The Amazon Resource Name (ARN) of the table bucket that contains the table.</p>
17    pub fn table_bucket_arn(&self) -> ::std::option::Option<&str> {
18        self.table_bucket_arn.as_deref()
19    }
20    /// <p>The namespace associated with the table.</p>
21    pub fn namespace(&self) -> ::std::option::Option<&str> {
22        self.namespace.as_deref()
23    }
24    /// <p>The name of the table.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The version token of the table.</p>
29    pub fn version_token(&self) -> ::std::option::Option<&str> {
30        self.version_token.as_deref()
31    }
32}
33impl DeleteTableInput {
34    /// Creates a new builder-style object to manufacture [`DeleteTableInput`](crate::operation::delete_table::DeleteTableInput).
35    pub fn builder() -> crate::operation::delete_table::builders::DeleteTableInputBuilder {
36        crate::operation::delete_table::builders::DeleteTableInputBuilder::default()
37    }
38}
39
40/// A builder for [`DeleteTableInput`](crate::operation::delete_table::DeleteTableInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteTableInputBuilder {
44    pub(crate) table_bucket_arn: ::std::option::Option<::std::string::String>,
45    pub(crate) namespace: ::std::option::Option<::std::string::String>,
46    pub(crate) name: ::std::option::Option<::std::string::String>,
47    pub(crate) version_token: ::std::option::Option<::std::string::String>,
48}
49impl DeleteTableInputBuilder {
50    /// <p>The Amazon Resource Name (ARN) of the table bucket that contains the table.</p>
51    /// This field is required.
52    pub fn table_bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.table_bucket_arn = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The Amazon Resource Name (ARN) of the table bucket that contains the table.</p>
57    pub fn set_table_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.table_bucket_arn = input;
59        self
60    }
61    /// <p>The Amazon Resource Name (ARN) of the table bucket that contains the table.</p>
62    pub fn get_table_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
63        &self.table_bucket_arn
64    }
65    /// <p>The namespace associated with the table.</p>
66    /// This field is required.
67    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.namespace = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The namespace associated with the table.</p>
72    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.namespace = input;
74        self
75    }
76    /// <p>The namespace associated with the table.</p>
77    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
78        &self.namespace
79    }
80    /// <p>The name of the table.</p>
81    /// This field is required.
82    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.name = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The name of the table.</p>
87    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.name = input;
89        self
90    }
91    /// <p>The name of the table.</p>
92    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
93        &self.name
94    }
95    /// <p>The version token of the table.</p>
96    pub fn version_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.version_token = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The version token of the table.</p>
101    pub fn set_version_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.version_token = input;
103        self
104    }
105    /// <p>The version token of the table.</p>
106    pub fn get_version_token(&self) -> &::std::option::Option<::std::string::String> {
107        &self.version_token
108    }
109    /// Consumes the builder and constructs a [`DeleteTableInput`](crate::operation::delete_table::DeleteTableInput).
110    pub fn build(self) -> ::std::result::Result<crate::operation::delete_table::DeleteTableInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::delete_table::DeleteTableInput {
112            table_bucket_arn: self.table_bucket_arn,
113            namespace: self.namespace,
114            name: self.name,
115            version_token: self.version_token,
116        })
117    }
118}