Skip to main content

aws_sdk_athena/operation/get_table_metadata/
_get_table_metadata_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 GetTableMetadataInput {
6    /// <p>The name of the data catalog that contains the database and table metadata to return.</p>
7    pub catalog_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the database that contains the table metadata to return.</p>
9    pub database_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the table for which metadata is returned.</p>
11    pub table_name: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
13    pub work_group: ::std::option::Option<::std::string::String>,
14}
15impl GetTableMetadataInput {
16    /// <p>The name of the data catalog that contains the database and table metadata to return.</p>
17    pub fn catalog_name(&self) -> ::std::option::Option<&str> {
18        self.catalog_name.as_deref()
19    }
20    /// <p>The name of the database that contains the table metadata to return.</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 for which metadata is returned.</p>
25    pub fn table_name(&self) -> ::std::option::Option<&str> {
26        self.table_name.as_deref()
27    }
28    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
29    pub fn work_group(&self) -> ::std::option::Option<&str> {
30        self.work_group.as_deref()
31    }
32}
33impl GetTableMetadataInput {
34    /// Creates a new builder-style object to manufacture [`GetTableMetadataInput`](crate::operation::get_table_metadata::GetTableMetadataInput).
35    pub fn builder() -> crate::operation::get_table_metadata::builders::GetTableMetadataInputBuilder {
36        crate::operation::get_table_metadata::builders::GetTableMetadataInputBuilder::default()
37    }
38}
39
40/// A builder for [`GetTableMetadataInput`](crate::operation::get_table_metadata::GetTableMetadataInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetTableMetadataInputBuilder {
44    pub(crate) catalog_name: ::std::option::Option<::std::string::String>,
45    pub(crate) database_name: ::std::option::Option<::std::string::String>,
46    pub(crate) table_name: ::std::option::Option<::std::string::String>,
47    pub(crate) work_group: ::std::option::Option<::std::string::String>,
48}
49impl GetTableMetadataInputBuilder {
50    /// <p>The name of the data catalog that contains the database and table metadata to return.</p>
51    /// This field is required.
52    pub fn catalog_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.catalog_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the data catalog that contains the database and table metadata to return.</p>
57    pub fn set_catalog_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.catalog_name = input;
59        self
60    }
61    /// <p>The name of the data catalog that contains the database and table metadata to return.</p>
62    pub fn get_catalog_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.catalog_name
64    }
65    /// <p>The name of the database that contains the table metadata to return.</p>
66    /// This field is required.
67    pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.database_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The name of the database that contains the table metadata to return.</p>
72    pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.database_name = input;
74        self
75    }
76    /// <p>The name of the database that contains the table metadata to return.</p>
77    pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.database_name
79    }
80    /// <p>The name of the table for which metadata is returned.</p>
81    /// This field is required.
82    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.table_name = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The name of the table for which metadata is returned.</p>
87    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.table_name = input;
89        self
90    }
91    /// <p>The name of the table for which metadata is returned.</p>
92    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
93        &self.table_name
94    }
95    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
96    pub fn work_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.work_group = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
101    pub fn set_work_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.work_group = input;
103        self
104    }
105    /// <p>The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.</p>
106    pub fn get_work_group(&self) -> &::std::option::Option<::std::string::String> {
107        &self.work_group
108    }
109    /// Consumes the builder and constructs a [`GetTableMetadataInput`](crate::operation::get_table_metadata::GetTableMetadataInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::get_table_metadata::GetTableMetadataInput, ::aws_smithy_types::error::operation::BuildError> {
113        ::std::result::Result::Ok(crate::operation::get_table_metadata::GetTableMetadataInput {
114            catalog_name: self.catalog_name,
115            database_name: self.database_name,
116            table_name: self.table_name,
117            work_group: self.work_group,
118        })
119    }
120}