aws_sdk_redshiftdata/operation/describe_table/
_describe_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 DescribeTableInput {
6    /// <p>The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.</p>
7    pub cluster_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.</p>
9    pub secret_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.</p>
11    pub db_user: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the database that contains the tables to be described. If <code>ConnectedDatabase</code> is not specified, this is also the database to connect to with your authentication credentials.</p>
13    pub database: ::std::option::Option<::std::string::String>,
14    /// <p>A database name. The connected database is specified when you connect with your authentication credentials.</p>
15    pub connected_database: ::std::option::Option<::std::string::String>,
16    /// <p>The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.</p>
17    pub schema: ::std::option::Option<::std::string::String>,
18    /// <p>The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned</p>
19    pub table: ::std::option::Option<::std::string::String>,
20    /// <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>
21    pub next_token: ::std::option::Option<::std::string::String>,
22    /// <p>The maximum number of tables to return in the response. If more tables exist than fit in one response, then <code>NextToken</code> is returned to page through the results.</p>
23    pub max_results: ::std::option::Option<i32>,
24    /// <p>The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.</p>
25    pub workgroup_name: ::std::option::Option<::std::string::String>,
26}
27impl DescribeTableInput {
28    /// <p>The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.</p>
29    pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
30        self.cluster_identifier.as_deref()
31    }
32    /// <p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.</p>
33    pub fn secret_arn(&self) -> ::std::option::Option<&str> {
34        self.secret_arn.as_deref()
35    }
36    /// <p>The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.</p>
37    pub fn db_user(&self) -> ::std::option::Option<&str> {
38        self.db_user.as_deref()
39    }
40    /// <p>The name of the database that contains the tables to be described. If <code>ConnectedDatabase</code> is not specified, this is also the database to connect to with your authentication credentials.</p>
41    pub fn database(&self) -> ::std::option::Option<&str> {
42        self.database.as_deref()
43    }
44    /// <p>A database name. The connected database is specified when you connect with your authentication credentials.</p>
45    pub fn connected_database(&self) -> ::std::option::Option<&str> {
46        self.connected_database.as_deref()
47    }
48    /// <p>The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.</p>
49    pub fn schema(&self) -> ::std::option::Option<&str> {
50        self.schema.as_deref()
51    }
52    /// <p>The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned</p>
53    pub fn table(&self) -> ::std::option::Option<&str> {
54        self.table.as_deref()
55    }
56    /// <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>
57    pub fn next_token(&self) -> ::std::option::Option<&str> {
58        self.next_token.as_deref()
59    }
60    /// <p>The maximum number of tables to return in the response. If more tables exist than fit in one response, then <code>NextToken</code> is returned to page through the results.</p>
61    pub fn max_results(&self) -> ::std::option::Option<i32> {
62        self.max_results
63    }
64    /// <p>The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.</p>
65    pub fn workgroup_name(&self) -> ::std::option::Option<&str> {
66        self.workgroup_name.as_deref()
67    }
68}
69impl DescribeTableInput {
70    /// Creates a new builder-style object to manufacture [`DescribeTableInput`](crate::operation::describe_table::DescribeTableInput).
71    pub fn builder() -> crate::operation::describe_table::builders::DescribeTableInputBuilder {
72        crate::operation::describe_table::builders::DescribeTableInputBuilder::default()
73    }
74}
75
76/// A builder for [`DescribeTableInput`](crate::operation::describe_table::DescribeTableInput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct DescribeTableInputBuilder {
80    pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
81    pub(crate) secret_arn: ::std::option::Option<::std::string::String>,
82    pub(crate) db_user: ::std::option::Option<::std::string::String>,
83    pub(crate) database: ::std::option::Option<::std::string::String>,
84    pub(crate) connected_database: ::std::option::Option<::std::string::String>,
85    pub(crate) schema: ::std::option::Option<::std::string::String>,
86    pub(crate) table: ::std::option::Option<::std::string::String>,
87    pub(crate) next_token: ::std::option::Option<::std::string::String>,
88    pub(crate) max_results: ::std::option::Option<i32>,
89    pub(crate) workgroup_name: ::std::option::Option<::std::string::String>,
90}
91impl DescribeTableInputBuilder {
92    /// <p>The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.</p>
93    pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.cluster_identifier = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.</p>
98    pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.cluster_identifier = input;
100        self
101    }
102    /// <p>The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.</p>
103    pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
104        &self.cluster_identifier
105    }
106    /// <p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.</p>
107    pub fn secret_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.secret_arn = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.</p>
112    pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.secret_arn = input;
114        self
115    }
116    /// <p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.</p>
117    pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
118        &self.secret_arn
119    }
120    /// <p>The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.</p>
121    pub fn db_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.db_user = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.</p>
126    pub fn set_db_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.db_user = input;
128        self
129    }
130    /// <p>The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.</p>
131    pub fn get_db_user(&self) -> &::std::option::Option<::std::string::String> {
132        &self.db_user
133    }
134    /// <p>The name of the database that contains the tables to be described. If <code>ConnectedDatabase</code> is not specified, this is also the database to connect to with your authentication credentials.</p>
135    /// This field is required.
136    pub fn database(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.database = ::std::option::Option::Some(input.into());
138        self
139    }
140    /// <p>The name of the database that contains the tables to be described. If <code>ConnectedDatabase</code> is not specified, this is also the database to connect to with your authentication credentials.</p>
141    pub fn set_database(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.database = input;
143        self
144    }
145    /// <p>The name of the database that contains the tables to be described. If <code>ConnectedDatabase</code> is not specified, this is also the database to connect to with your authentication credentials.</p>
146    pub fn get_database(&self) -> &::std::option::Option<::std::string::String> {
147        &self.database
148    }
149    /// <p>A database name. The connected database is specified when you connect with your authentication credentials.</p>
150    pub fn connected_database(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.connected_database = ::std::option::Option::Some(input.into());
152        self
153    }
154    /// <p>A database name. The connected database is specified when you connect with your authentication credentials.</p>
155    pub fn set_connected_database(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.connected_database = input;
157        self
158    }
159    /// <p>A database name. The connected database is specified when you connect with your authentication credentials.</p>
160    pub fn get_connected_database(&self) -> &::std::option::Option<::std::string::String> {
161        &self.connected_database
162    }
163    /// <p>The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.</p>
164    pub fn schema(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.schema = ::std::option::Option::Some(input.into());
166        self
167    }
168    /// <p>The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.</p>
169    pub fn set_schema(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.schema = input;
171        self
172    }
173    /// <p>The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.</p>
174    pub fn get_schema(&self) -> &::std::option::Option<::std::string::String> {
175        &self.schema
176    }
177    /// <p>The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned</p>
178    pub fn table(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.table = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned</p>
183    pub fn set_table(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.table = input;
185        self
186    }
187    /// <p>The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned</p>
188    pub fn get_table(&self) -> &::std::option::Option<::std::string::String> {
189        &self.table
190    }
191    /// <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>
192    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.next_token = ::std::option::Option::Some(input.into());
194        self
195    }
196    /// <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>
197    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198        self.next_token = input;
199        self
200    }
201    /// <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>
202    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
203        &self.next_token
204    }
205    /// <p>The maximum number of tables to return in the response. If more tables exist than fit in one response, then <code>NextToken</code> is returned to page through the results.</p>
206    pub fn max_results(mut self, input: i32) -> Self {
207        self.max_results = ::std::option::Option::Some(input);
208        self
209    }
210    /// <p>The maximum number of tables to return in the response. If more tables exist than fit in one response, then <code>NextToken</code> is returned to page through the results.</p>
211    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
212        self.max_results = input;
213        self
214    }
215    /// <p>The maximum number of tables to return in the response. If more tables exist than fit in one response, then <code>NextToken</code> is returned to page through the results.</p>
216    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
217        &self.max_results
218    }
219    /// <p>The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.</p>
220    pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221        self.workgroup_name = ::std::option::Option::Some(input.into());
222        self
223    }
224    /// <p>The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.</p>
225    pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226        self.workgroup_name = input;
227        self
228    }
229    /// <p>The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.</p>
230    pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
231        &self.workgroup_name
232    }
233    /// Consumes the builder and constructs a [`DescribeTableInput`](crate::operation::describe_table::DescribeTableInput).
234    pub fn build(
235        self,
236    ) -> ::std::result::Result<crate::operation::describe_table::DescribeTableInput, ::aws_smithy_types::error::operation::BuildError> {
237        ::std::result::Result::Ok(crate::operation::describe_table::DescribeTableInput {
238            cluster_identifier: self.cluster_identifier,
239            secret_arn: self.secret_arn,
240            db_user: self.db_user,
241            database: self.database,
242            connected_database: self.connected_database,
243            schema: self.schema,
244            table: self.table,
245            next_token: self.next_token,
246            max_results: self.max_results,
247            workgroup_name: self.workgroup_name,
248        })
249    }
250}