aws_sdk_glue/operation/get_tables/_get_tables_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 GetTablesInput {
6 /// <p>The ID of the Data Catalog where the tables reside. 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 database in the catalog whose tables to list. For Hive compatibility, this name is entirely lowercase.</p>
9 pub database_name: ::std::option::Option<::std::string::String>,
10 /// <p>A regular expression pattern. If present, only those tables whose names match the pattern are returned.</p>
11 pub expression: ::std::option::Option<::std::string::String>,
12 /// <p>A continuation token, included if this is a continuation call.</p>
13 pub next_token: ::std::option::Option<::std::string::String>,
14 /// <p>The maximum number of tables to return in a single response.</p>
15 pub max_results: ::std::option::Option<i32>,
16 /// <p>The transaction ID at which to read the table contents.</p>
17 pub transaction_id: ::std::option::Option<::std::string::String>,
18 /// <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>
19 pub query_as_of_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
21 pub audit_context: ::std::option::Option<crate::types::AuditContext>,
22 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
23 pub include_status_details: ::std::option::Option<bool>,
24 /// <p>Specifies the table fields returned by the <code>GetTables</code> call. This parameter doesn’t accept an empty list. The request must include <code>NAME</code>.</p>
25 /// <p>The following are the valid combinations of values:</p>
26 /// <ul>
27 /// <li>
28 /// <p><code>NAME</code> - Names of all tables in the database.</p></li>
29 /// <li>
30 /// <p><code>NAME</code>, <code>TABLE_TYPE</code> - Names of all tables and the table types.</p></li>
31 /// </ul>
32 pub attributes_to_get: ::std::option::Option<::std::vec::Vec<crate::types::TableAttributes>>,
33}
34impl GetTablesInput {
35 /// <p>The ID of the Data Catalog where the tables reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
36 pub fn catalog_id(&self) -> ::std::option::Option<&str> {
37 self.catalog_id.as_deref()
38 }
39 /// <p>The database in the catalog whose tables to list. For Hive compatibility, this name is entirely lowercase.</p>
40 pub fn database_name(&self) -> ::std::option::Option<&str> {
41 self.database_name.as_deref()
42 }
43 /// <p>A regular expression pattern. If present, only those tables whose names match the pattern are returned.</p>
44 pub fn expression(&self) -> ::std::option::Option<&str> {
45 self.expression.as_deref()
46 }
47 /// <p>A continuation token, included if this is a continuation call.</p>
48 pub fn next_token(&self) -> ::std::option::Option<&str> {
49 self.next_token.as_deref()
50 }
51 /// <p>The maximum number of tables to return in a single response.</p>
52 pub fn max_results(&self) -> ::std::option::Option<i32> {
53 self.max_results
54 }
55 /// <p>The transaction ID at which to read the table contents.</p>
56 pub fn transaction_id(&self) -> ::std::option::Option<&str> {
57 self.transaction_id.as_deref()
58 }
59 /// <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>
60 pub fn query_as_of_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61 self.query_as_of_time.as_ref()
62 }
63 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
64 pub fn audit_context(&self) -> ::std::option::Option<&crate::types::AuditContext> {
65 self.audit_context.as_ref()
66 }
67 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
68 pub fn include_status_details(&self) -> ::std::option::Option<bool> {
69 self.include_status_details
70 }
71 /// <p>Specifies the table fields returned by the <code>GetTables</code> call. This parameter doesn’t accept an empty list. The request must include <code>NAME</code>.</p>
72 /// <p>The following are the valid combinations of values:</p>
73 /// <ul>
74 /// <li>
75 /// <p><code>NAME</code> - Names of all tables in the database.</p></li>
76 /// <li>
77 /// <p><code>NAME</code>, <code>TABLE_TYPE</code> - Names of all tables and the table types.</p></li>
78 /// </ul>
79 ///
80 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes_to_get.is_none()`.
81 pub fn attributes_to_get(&self) -> &[crate::types::TableAttributes] {
82 self.attributes_to_get.as_deref().unwrap_or_default()
83 }
84}
85impl GetTablesInput {
86 /// Creates a new builder-style object to manufacture [`GetTablesInput`](crate::operation::get_tables::GetTablesInput).
87 pub fn builder() -> crate::operation::get_tables::builders::GetTablesInputBuilder {
88 crate::operation::get_tables::builders::GetTablesInputBuilder::default()
89 }
90}
91
92/// A builder for [`GetTablesInput`](crate::operation::get_tables::GetTablesInput).
93#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
94#[non_exhaustive]
95pub struct GetTablesInputBuilder {
96 pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
97 pub(crate) database_name: ::std::option::Option<::std::string::String>,
98 pub(crate) expression: ::std::option::Option<::std::string::String>,
99 pub(crate) next_token: ::std::option::Option<::std::string::String>,
100 pub(crate) max_results: ::std::option::Option<i32>,
101 pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
102 pub(crate) query_as_of_time: ::std::option::Option<::aws_smithy_types::DateTime>,
103 pub(crate) audit_context: ::std::option::Option<crate::types::AuditContext>,
104 pub(crate) include_status_details: ::std::option::Option<bool>,
105 pub(crate) attributes_to_get: ::std::option::Option<::std::vec::Vec<crate::types::TableAttributes>>,
106}
107impl GetTablesInputBuilder {
108 /// <p>The ID of the Data Catalog where the tables reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
109 pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.catalog_id = ::std::option::Option::Some(input.into());
111 self
112 }
113 /// <p>The ID of the Data Catalog where the tables reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
114 pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.catalog_id = input;
116 self
117 }
118 /// <p>The ID of the Data Catalog where the tables reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
119 pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
120 &self.catalog_id
121 }
122 /// <p>The database in the catalog whose tables to list. For Hive compatibility, this name is entirely lowercase.</p>
123 /// This field is required.
124 pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 self.database_name = ::std::option::Option::Some(input.into());
126 self
127 }
128 /// <p>The database in the catalog whose tables to list. For Hive compatibility, this name is entirely lowercase.</p>
129 pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130 self.database_name = input;
131 self
132 }
133 /// <p>The database in the catalog whose tables to list. For Hive compatibility, this name is entirely lowercase.</p>
134 pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
135 &self.database_name
136 }
137 /// <p>A regular expression pattern. If present, only those tables whose names match the pattern are returned.</p>
138 pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139 self.expression = ::std::option::Option::Some(input.into());
140 self
141 }
142 /// <p>A regular expression pattern. If present, only those tables whose names match the pattern are returned.</p>
143 pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144 self.expression = input;
145 self
146 }
147 /// <p>A regular expression pattern. If present, only those tables whose names match the pattern are returned.</p>
148 pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
149 &self.expression
150 }
151 /// <p>A continuation token, included if this is a continuation call.</p>
152 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.next_token = ::std::option::Option::Some(input.into());
154 self
155 }
156 /// <p>A continuation token, included if this is a continuation call.</p>
157 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158 self.next_token = input;
159 self
160 }
161 /// <p>A continuation token, included if this is a continuation call.</p>
162 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
163 &self.next_token
164 }
165 /// <p>The maximum number of tables to return in a single response.</p>
166 pub fn max_results(mut self, input: i32) -> Self {
167 self.max_results = ::std::option::Option::Some(input);
168 self
169 }
170 /// <p>The maximum number of tables to return in a single response.</p>
171 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
172 self.max_results = input;
173 self
174 }
175 /// <p>The maximum number of tables to return in a single response.</p>
176 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
177 &self.max_results
178 }
179 /// <p>The transaction ID at which to read the table contents.</p>
180 pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181 self.transaction_id = ::std::option::Option::Some(input.into());
182 self
183 }
184 /// <p>The transaction ID at which to read the table contents.</p>
185 pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.transaction_id = input;
187 self
188 }
189 /// <p>The transaction ID at which to read the table contents.</p>
190 pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
191 &self.transaction_id
192 }
193 /// <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>
194 pub fn query_as_of_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
195 self.query_as_of_time = ::std::option::Option::Some(input);
196 self
197 }
198 /// <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>
199 pub fn set_query_as_of_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
200 self.query_as_of_time = input;
201 self
202 }
203 /// <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>
204 pub fn get_query_as_of_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
205 &self.query_as_of_time
206 }
207 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
208 pub fn audit_context(mut self, input: crate::types::AuditContext) -> Self {
209 self.audit_context = ::std::option::Option::Some(input);
210 self
211 }
212 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
213 pub fn set_audit_context(mut self, input: ::std::option::Option<crate::types::AuditContext>) -> Self {
214 self.audit_context = input;
215 self
216 }
217 /// <p>A structure containing the Lake Formation <a href="https://docs.aws.amazon.com/glue/latest/webapi/API_AuditContext.html">audit context</a>.</p>
218 pub fn get_audit_context(&self) -> &::std::option::Option<crate::types::AuditContext> {
219 &self.audit_context
220 }
221 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
222 pub fn include_status_details(mut self, input: bool) -> Self {
223 self.include_status_details = ::std::option::Option::Some(input);
224 self
225 }
226 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
227 pub fn set_include_status_details(mut self, input: ::std::option::Option<bool>) -> Self {
228 self.include_status_details = input;
229 self
230 }
231 /// <p>Specifies whether to include status details related to a request to create or update an Glue Data Catalog view.</p>
232 pub fn get_include_status_details(&self) -> &::std::option::Option<bool> {
233 &self.include_status_details
234 }
235 /// Appends an item to `attributes_to_get`.
236 ///
237 /// To override the contents of this collection use [`set_attributes_to_get`](Self::set_attributes_to_get).
238 ///
239 /// <p>Specifies the table fields returned by the <code>GetTables</code> call. This parameter doesn’t accept an empty list. The request must include <code>NAME</code>.</p>
240 /// <p>The following are the valid combinations of values:</p>
241 /// <ul>
242 /// <li>
243 /// <p><code>NAME</code> - Names of all tables in the database.</p></li>
244 /// <li>
245 /// <p><code>NAME</code>, <code>TABLE_TYPE</code> - Names of all tables and the table types.</p></li>
246 /// </ul>
247 pub fn attributes_to_get(mut self, input: crate::types::TableAttributes) -> Self {
248 let mut v = self.attributes_to_get.unwrap_or_default();
249 v.push(input);
250 self.attributes_to_get = ::std::option::Option::Some(v);
251 self
252 }
253 /// <p>Specifies the table fields returned by the <code>GetTables</code> call. This parameter doesn’t accept an empty list. The request must include <code>NAME</code>.</p>
254 /// <p>The following are the valid combinations of values:</p>
255 /// <ul>
256 /// <li>
257 /// <p><code>NAME</code> - Names of all tables in the database.</p></li>
258 /// <li>
259 /// <p><code>NAME</code>, <code>TABLE_TYPE</code> - Names of all tables and the table types.</p></li>
260 /// </ul>
261 pub fn set_attributes_to_get(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TableAttributes>>) -> Self {
262 self.attributes_to_get = input;
263 self
264 }
265 /// <p>Specifies the table fields returned by the <code>GetTables</code> call. This parameter doesn’t accept an empty list. The request must include <code>NAME</code>.</p>
266 /// <p>The following are the valid combinations of values:</p>
267 /// <ul>
268 /// <li>
269 /// <p><code>NAME</code> - Names of all tables in the database.</p></li>
270 /// <li>
271 /// <p><code>NAME</code>, <code>TABLE_TYPE</code> - Names of all tables and the table types.</p></li>
272 /// </ul>
273 pub fn get_attributes_to_get(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TableAttributes>> {
274 &self.attributes_to_get
275 }
276 /// Consumes the builder and constructs a [`GetTablesInput`](crate::operation::get_tables::GetTablesInput).
277 pub fn build(self) -> ::std::result::Result<crate::operation::get_tables::GetTablesInput, ::aws_smithy_types::error::operation::BuildError> {
278 ::std::result::Result::Ok(crate::operation::get_tables::GetTablesInput {
279 catalog_id: self.catalog_id,
280 database_name: self.database_name,
281 expression: self.expression,
282 next_token: self.next_token,
283 max_results: self.max_results,
284 transaction_id: self.transaction_id,
285 query_as_of_time: self.query_as_of_time,
286 audit_context: self.audit_context,
287 include_status_details: self.include_status_details,
288 attributes_to_get: self.attributes_to_get,
289 })
290 }
291}