aws_sdk_glue/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 ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
7    pub catalog_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
9    pub database_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the table to be deleted. For Hive compatibility, this name is entirely lowercase.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The transaction ID at which to delete the table contents.</p>
13    pub transaction_id: ::std::option::Option<::std::string::String>,
14}
15impl DeleteTableInput {
16    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
17    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
18        self.catalog_id.as_deref()
19    }
20    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
21    pub fn database_name(&self) -> ::std::option::Option<&str> {
22        self.database_name.as_deref()
23    }
24    /// <p>The name of the table to be deleted. For Hive compatibility, this name is entirely lowercase.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The transaction ID at which to delete the table contents.</p>
29    pub fn transaction_id(&self) -> ::std::option::Option<&str> {
30        self.transaction_id.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) catalog_id: ::std::option::Option<::std::string::String>,
45    pub(crate) database_name: ::std::option::Option<::std::string::String>,
46    pub(crate) name: ::std::option::Option<::std::string::String>,
47    pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
48}
49impl DeleteTableInputBuilder {
50    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
51    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.catalog_id = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
56    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.catalog_id = input;
58        self
59    }
60    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
61    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
62        &self.catalog_id
63    }
64    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
65    /// This field is required.
66    pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.database_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
71    pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.database_name = input;
73        self
74    }
75    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
76    pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.database_name
78    }
79    /// <p>The name of the table to be deleted. For Hive compatibility, this name is entirely lowercase.</p>
80    /// This field is required.
81    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.name = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The name of the table to be deleted. For Hive compatibility, this name is entirely lowercase.</p>
86    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.name = input;
88        self
89    }
90    /// <p>The name of the table to be deleted. For Hive compatibility, this name is entirely lowercase.</p>
91    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
92        &self.name
93    }
94    /// <p>The transaction ID at which to delete the table contents.</p>
95    pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.transaction_id = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The transaction ID at which to delete the table contents.</p>
100    pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.transaction_id = input;
102        self
103    }
104    /// <p>The transaction ID at which to delete the table contents.</p>
105    pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
106        &self.transaction_id
107    }
108    /// Consumes the builder and constructs a [`DeleteTableInput`](crate::operation::delete_table::DeleteTableInput).
109    pub fn build(self) -> ::std::result::Result<crate::operation::delete_table::DeleteTableInput, ::aws_smithy_types::error::operation::BuildError> {
110        ::std::result::Result::Ok(crate::operation::delete_table::DeleteTableInput {
111            catalog_id: self.catalog_id,
112            database_name: self.database_name,
113            name: self.name,
114            transaction_id: self.transaction_id,
115        })
116    }
117}