aws_sdk_glue/operation/get_table/_get_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 GetTableInput {
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 database in the catalog 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 for which to retrieve the definition. 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 read the table contents.</p>
13 pub transaction_id: ::std::option::Option<::std::string::String>,
14 /// <p>The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with <code>TransactionId</code>.</p>
15 pub query_as_of_time: ::std::option::Option<::aws_smithy_types::DateTime>,
16 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
17 pub audit_context: ::std::option::Option<crate::types::AuditContext>,
18 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
19 pub include_status_details: ::std::option::Option<bool>,
20}
21impl GetTableInput {
22 /// <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>
23 pub fn catalog_id(&self) -> ::std::option::Option<&str> {
24 self.catalog_id.as_deref()
25 }
26 /// <p>The name of the database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
27 pub fn database_name(&self) -> ::std::option::Option<&str> {
28 self.database_name.as_deref()
29 }
30 /// <p>The name of the table for which to retrieve the definition. For Hive compatibility, this name is entirely lowercase.</p>
31 pub fn name(&self) -> ::std::option::Option<&str> {
32 self.name.as_deref()
33 }
34 /// <p>The transaction ID at which to read the table contents.</p>
35 pub fn transaction_id(&self) -> ::std::option::Option<&str> {
36 self.transaction_id.as_deref()
37 }
38 /// <p>The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with <code>TransactionId</code>.</p>
39 pub fn query_as_of_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
40 self.query_as_of_time.as_ref()
41 }
42 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
43 pub fn audit_context(&self) -> ::std::option::Option<&crate::types::AuditContext> {
44 self.audit_context.as_ref()
45 }
46 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
47 pub fn include_status_details(&self) -> ::std::option::Option<bool> {
48 self.include_status_details
49 }
50}
51impl GetTableInput {
52 /// Creates a new builder-style object to manufacture [`GetTableInput`](crate::operation::get_table::GetTableInput).
53 pub fn builder() -> crate::operation::get_table::builders::GetTableInputBuilder {
54 crate::operation::get_table::builders::GetTableInputBuilder::default()
55 }
56}
57
58/// A builder for [`GetTableInput`](crate::operation::get_table::GetTableInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct GetTableInputBuilder {
62 pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
63 pub(crate) database_name: ::std::option::Option<::std::string::String>,
64 pub(crate) name: ::std::option::Option<::std::string::String>,
65 pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
66 pub(crate) query_as_of_time: ::std::option::Option<::aws_smithy_types::DateTime>,
67 pub(crate) audit_context: ::std::option::Option<crate::types::AuditContext>,
68 pub(crate) include_status_details: ::std::option::Option<bool>,
69}
70impl GetTableInputBuilder {
71 /// <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>
72 pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73 self.catalog_id = ::std::option::Option::Some(input.into());
74 self
75 }
76 /// <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>
77 pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78 self.catalog_id = input;
79 self
80 }
81 /// <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>
82 pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
83 &self.catalog_id
84 }
85 /// <p>The name of the database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
86 /// This field is required.
87 pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.database_name = ::std::option::Option::Some(input.into());
89 self
90 }
91 /// <p>The name of the database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
92 pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.database_name = input;
94 self
95 }
96 /// <p>The name of the database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
97 pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
98 &self.database_name
99 }
100 /// <p>The name of the table for which to retrieve the definition. For Hive compatibility, this name is entirely lowercase.</p>
101 /// This field is required.
102 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.name = ::std::option::Option::Some(input.into());
104 self
105 }
106 /// <p>The name of the table for which to retrieve the definition. For Hive compatibility, this name is entirely lowercase.</p>
107 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.name = input;
109 self
110 }
111 /// <p>The name of the table for which to retrieve the definition. For Hive compatibility, this name is entirely lowercase.</p>
112 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
113 &self.name
114 }
115 /// <p>The transaction ID at which to read the table contents.</p>
116 pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.transaction_id = ::std::option::Option::Some(input.into());
118 self
119 }
120 /// <p>The transaction ID at which to read the table contents.</p>
121 pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.transaction_id = input;
123 self
124 }
125 /// <p>The transaction ID at which to read the table contents.</p>
126 pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
127 &self.transaction_id
128 }
129 /// <p>The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with <code>TransactionId</code>.</p>
130 pub fn query_as_of_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
131 self.query_as_of_time = ::std::option::Option::Some(input);
132 self
133 }
134 /// <p>The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with <code>TransactionId</code>.</p>
135 pub fn set_query_as_of_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
136 self.query_as_of_time = input;
137 self
138 }
139 /// <p>The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with <code>TransactionId</code>.</p>
140 pub fn get_query_as_of_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
141 &self.query_as_of_time
142 }
143 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
144 pub fn audit_context(mut self, input: crate::types::AuditContext) -> Self {
145 self.audit_context = ::std::option::Option::Some(input);
146 self
147 }
148 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
149 pub fn set_audit_context(mut self, input: ::std::option::Option<crate::types::AuditContext>) -> Self {
150 self.audit_context = input;
151 self
152 }
153 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
154 pub fn get_audit_context(&self) -> &::std::option::Option<crate::types::AuditContext> {
155 &self.audit_context
156 }
157 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
158 pub fn include_status_details(mut self, input: bool) -> Self {
159 self.include_status_details = ::std::option::Option::Some(input);
160 self
161 }
162 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
163 pub fn set_include_status_details(mut self, input: ::std::option::Option<bool>) -> Self {
164 self.include_status_details = input;
165 self
166 }
167 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
168 pub fn get_include_status_details(&self) -> &::std::option::Option<bool> {
169 &self.include_status_details
170 }
171 /// Consumes the builder and constructs a [`GetTableInput`](crate::operation::get_table::GetTableInput).
172 pub fn build(self) -> ::std::result::Result<crate::operation::get_table::GetTableInput, ::aws_smithy_types::error::operation::BuildError> {
173 ::std::result::Result::Ok(crate::operation::get_table::GetTableInput {
174 catalog_id: self.catalog_id,
175 database_name: self.database_name,
176 name: self.name,
177 transaction_id: self.transaction_id,
178 query_as_of_time: self.query_as_of_time,
179 audit_context: self.audit_context,
180 include_status_details: self.include_status_details,
181 })
182 }
183}