Skip to main content

aws_sdk_redshiftdata/operation/describe_statement/
_describe_statement_output.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 DescribeStatementOutput {
6    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.</p>
7    pub id: ::std::string::String,
8    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database.</p>
9    pub secret_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The database user name.</p>
11    pub db_user: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the database.</p>
13    pub database: ::std::option::Option<::std::string::String>,
14    /// <p>The cluster identifier.</p>
15    pub cluster_identifier: ::std::option::Option<::std::string::String>,
16    /// <p>The amount of time in nanoseconds that the statement ran.</p>
17    pub duration: i64,
18    /// <p>The error message from the cluster if the SQL statement encountered an error while running.</p>
19    pub error: ::std::option::Option<::std::string::String>,
20    /// <p>The status of the SQL statement being described. Status values are defined as follows:</p>
21    /// <ul>
22    /// <li>
23    /// <p>ABORTED - The query run was stopped by the user.</p></li>
24    /// <li>
25    /// <p>ALL - A status value that includes all query statuses. This value can be used to filter results.</p></li>
26    /// <li>
27    /// <p>FAILED - The query run failed.</p></li>
28    /// <li>
29    /// <p>FINISHED - The query has finished running.</p></li>
30    /// <li>
31    /// <p>PICKED - The query has been chosen to be run.</p></li>
32    /// <li>
33    /// <p>STARTED - The query run has started.</p></li>
34    /// <li>
35    /// <p>SUBMITTED - The query was submitted, but not yet processed.</p></li>
36    /// </ul>
37    pub status: ::std::option::Option<crate::types::StatusString>,
38    /// <p>The date and time (UTC) when the SQL statement was submitted to run.</p>
39    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
40    /// <p>The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed.</p>
41    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
42    /// <p>The process identifier from Amazon Redshift.</p>
43    pub redshift_pid: i64,
44    /// <p>A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set.</p>
45    pub has_result_set: ::std::option::Option<bool>,
46    /// <p>The SQL statement text.</p>
47    pub query_string: ::std::option::Option<::std::string::String>,
48    /// <p>Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A <code>-1</code> indicates the value is null.</p>
49    pub result_rows: i64,
50    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
51    pub result_size: i64,
52    /// <p>The identifier of the query generated by Amazon Redshift. These identifiers are also available in the <code>query</code> column of the <code>STL_QUERY</code> system view.</p>
53    pub redshift_query_id: i64,
54    /// <p>The parameters for the SQL statement.</p>
55    pub query_parameters: ::std::option::Option<::std::vec::Vec<crate::types::SqlParameter>>,
56    /// <p>The SQL statements from a multiple statement run.</p>
57    pub sub_statements: ::std::option::Option<::std::vec::Vec<crate::types::SubStatementData>>,
58    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
59    pub workgroup_name: ::std::option::Option<::std::string::String>,
60    /// <p>The data format of the result of the SQL statement.</p>
61    pub result_format: ::std::option::Option<crate::types::ResultFormatString>,
62    /// <p>The session identifier of the query.</p>
63    pub session_id: ::std::option::Option<::std::string::String>,
64    /// <p>The execution mode of the batch request. <code>TRANSACTION</code> indicates all SQL statements are run as a single transaction. <code>AUTO_COMMIT</code> indicates each SQL statement is committed individually.</p>
65    pub execution_mode: ::std::option::Option<crate::types::ExecutionMode>,
66    _request_id: Option<String>,
67}
68impl DescribeStatementOutput {
69    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.</p>
70    pub fn id(&self) -> &str {
71        use std::ops::Deref;
72        self.id.deref()
73    }
74    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database.</p>
75    pub fn secret_arn(&self) -> ::std::option::Option<&str> {
76        self.secret_arn.as_deref()
77    }
78    /// <p>The database user name.</p>
79    pub fn db_user(&self) -> ::std::option::Option<&str> {
80        self.db_user.as_deref()
81    }
82    /// <p>The name of the database.</p>
83    pub fn database(&self) -> ::std::option::Option<&str> {
84        self.database.as_deref()
85    }
86    /// <p>The cluster identifier.</p>
87    pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
88        self.cluster_identifier.as_deref()
89    }
90    /// <p>The amount of time in nanoseconds that the statement ran.</p>
91    pub fn duration(&self) -> i64 {
92        self.duration
93    }
94    /// <p>The error message from the cluster if the SQL statement encountered an error while running.</p>
95    pub fn error(&self) -> ::std::option::Option<&str> {
96        self.error.as_deref()
97    }
98    /// <p>The status of the SQL statement being described. Status values are defined as follows:</p>
99    /// <ul>
100    /// <li>
101    /// <p>ABORTED - The query run was stopped by the user.</p></li>
102    /// <li>
103    /// <p>ALL - A status value that includes all query statuses. This value can be used to filter results.</p></li>
104    /// <li>
105    /// <p>FAILED - The query run failed.</p></li>
106    /// <li>
107    /// <p>FINISHED - The query has finished running.</p></li>
108    /// <li>
109    /// <p>PICKED - The query has been chosen to be run.</p></li>
110    /// <li>
111    /// <p>STARTED - The query run has started.</p></li>
112    /// <li>
113    /// <p>SUBMITTED - The query was submitted, but not yet processed.</p></li>
114    /// </ul>
115    pub fn status(&self) -> ::std::option::Option<&crate::types::StatusString> {
116        self.status.as_ref()
117    }
118    /// <p>The date and time (UTC) when the SQL statement was submitted to run.</p>
119    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
120        self.created_at.as_ref()
121    }
122    /// <p>The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed.</p>
123    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
124        self.updated_at.as_ref()
125    }
126    /// <p>The process identifier from Amazon Redshift.</p>
127    pub fn redshift_pid(&self) -> i64 {
128        self.redshift_pid
129    }
130    /// <p>A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set.</p>
131    pub fn has_result_set(&self) -> ::std::option::Option<bool> {
132        self.has_result_set
133    }
134    /// <p>The SQL statement text.</p>
135    pub fn query_string(&self) -> ::std::option::Option<&str> {
136        self.query_string.as_deref()
137    }
138    /// <p>Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A <code>-1</code> indicates the value is null.</p>
139    pub fn result_rows(&self) -> i64 {
140        self.result_rows
141    }
142    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
143    pub fn result_size(&self) -> i64 {
144        self.result_size
145    }
146    /// <p>The identifier of the query generated by Amazon Redshift. These identifiers are also available in the <code>query</code> column of the <code>STL_QUERY</code> system view.</p>
147    pub fn redshift_query_id(&self) -> i64 {
148        self.redshift_query_id
149    }
150    /// <p>The parameters for the SQL statement.</p>
151    ///
152    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.query_parameters.is_none()`.
153    pub fn query_parameters(&self) -> &[crate::types::SqlParameter] {
154        self.query_parameters.as_deref().unwrap_or_default()
155    }
156    /// <p>The SQL statements from a multiple statement run.</p>
157    ///
158    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sub_statements.is_none()`.
159    pub fn sub_statements(&self) -> &[crate::types::SubStatementData] {
160        self.sub_statements.as_deref().unwrap_or_default()
161    }
162    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
163    pub fn workgroup_name(&self) -> ::std::option::Option<&str> {
164        self.workgroup_name.as_deref()
165    }
166    /// <p>The data format of the result of the SQL statement.</p>
167    pub fn result_format(&self) -> ::std::option::Option<&crate::types::ResultFormatString> {
168        self.result_format.as_ref()
169    }
170    /// <p>The session identifier of the query.</p>
171    pub fn session_id(&self) -> ::std::option::Option<&str> {
172        self.session_id.as_deref()
173    }
174    /// <p>The execution mode of the batch request. <code>TRANSACTION</code> indicates all SQL statements are run as a single transaction. <code>AUTO_COMMIT</code> indicates each SQL statement is committed individually.</p>
175    pub fn execution_mode(&self) -> ::std::option::Option<&crate::types::ExecutionMode> {
176        self.execution_mode.as_ref()
177    }
178}
179impl ::aws_types::request_id::RequestId for DescribeStatementOutput {
180    fn request_id(&self) -> Option<&str> {
181        self._request_id.as_deref()
182    }
183}
184impl DescribeStatementOutput {
185    /// Creates a new builder-style object to manufacture [`DescribeStatementOutput`](crate::operation::describe_statement::DescribeStatementOutput).
186    pub fn builder() -> crate::operation::describe_statement::builders::DescribeStatementOutputBuilder {
187        crate::operation::describe_statement::builders::DescribeStatementOutputBuilder::default()
188    }
189}
190
191/// A builder for [`DescribeStatementOutput`](crate::operation::describe_statement::DescribeStatementOutput).
192#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
193#[non_exhaustive]
194pub struct DescribeStatementOutputBuilder {
195    pub(crate) id: ::std::option::Option<::std::string::String>,
196    pub(crate) secret_arn: ::std::option::Option<::std::string::String>,
197    pub(crate) db_user: ::std::option::Option<::std::string::String>,
198    pub(crate) database: ::std::option::Option<::std::string::String>,
199    pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
200    pub(crate) duration: ::std::option::Option<i64>,
201    pub(crate) error: ::std::option::Option<::std::string::String>,
202    pub(crate) status: ::std::option::Option<crate::types::StatusString>,
203    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
204    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
205    pub(crate) redshift_pid: ::std::option::Option<i64>,
206    pub(crate) has_result_set: ::std::option::Option<bool>,
207    pub(crate) query_string: ::std::option::Option<::std::string::String>,
208    pub(crate) result_rows: ::std::option::Option<i64>,
209    pub(crate) result_size: ::std::option::Option<i64>,
210    pub(crate) redshift_query_id: ::std::option::Option<i64>,
211    pub(crate) query_parameters: ::std::option::Option<::std::vec::Vec<crate::types::SqlParameter>>,
212    pub(crate) sub_statements: ::std::option::Option<::std::vec::Vec<crate::types::SubStatementData>>,
213    pub(crate) workgroup_name: ::std::option::Option<::std::string::String>,
214    pub(crate) result_format: ::std::option::Option<crate::types::ResultFormatString>,
215    pub(crate) session_id: ::std::option::Option<::std::string::String>,
216    pub(crate) execution_mode: ::std::option::Option<crate::types::ExecutionMode>,
217    _request_id: Option<String>,
218}
219impl DescribeStatementOutputBuilder {
220    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.</p>
221    /// This field is required.
222    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.id = ::std::option::Option::Some(input.into());
224        self
225    }
226    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.</p>
227    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.id = input;
229        self
230    }
231    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.</p>
232    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
233        &self.id
234    }
235    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database.</p>
236    pub fn secret_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237        self.secret_arn = ::std::option::Option::Some(input.into());
238        self
239    }
240    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database.</p>
241    pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242        self.secret_arn = input;
243        self
244    }
245    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database.</p>
246    pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
247        &self.secret_arn
248    }
249    /// <p>The database user name.</p>
250    pub fn db_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
251        self.db_user = ::std::option::Option::Some(input.into());
252        self
253    }
254    /// <p>The database user name.</p>
255    pub fn set_db_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
256        self.db_user = input;
257        self
258    }
259    /// <p>The database user name.</p>
260    pub fn get_db_user(&self) -> &::std::option::Option<::std::string::String> {
261        &self.db_user
262    }
263    /// <p>The name of the database.</p>
264    pub fn database(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265        self.database = ::std::option::Option::Some(input.into());
266        self
267    }
268    /// <p>The name of the database.</p>
269    pub fn set_database(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
270        self.database = input;
271        self
272    }
273    /// <p>The name of the database.</p>
274    pub fn get_database(&self) -> &::std::option::Option<::std::string::String> {
275        &self.database
276    }
277    /// <p>The cluster identifier.</p>
278    pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
279        self.cluster_identifier = ::std::option::Option::Some(input.into());
280        self
281    }
282    /// <p>The cluster identifier.</p>
283    pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
284        self.cluster_identifier = input;
285        self
286    }
287    /// <p>The cluster identifier.</p>
288    pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
289        &self.cluster_identifier
290    }
291    /// <p>The amount of time in nanoseconds that the statement ran.</p>
292    pub fn duration(mut self, input: i64) -> Self {
293        self.duration = ::std::option::Option::Some(input);
294        self
295    }
296    /// <p>The amount of time in nanoseconds that the statement ran.</p>
297    pub fn set_duration(mut self, input: ::std::option::Option<i64>) -> Self {
298        self.duration = input;
299        self
300    }
301    /// <p>The amount of time in nanoseconds that the statement ran.</p>
302    pub fn get_duration(&self) -> &::std::option::Option<i64> {
303        &self.duration
304    }
305    /// <p>The error message from the cluster if the SQL statement encountered an error while running.</p>
306    pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
307        self.error = ::std::option::Option::Some(input.into());
308        self
309    }
310    /// <p>The error message from the cluster if the SQL statement encountered an error while running.</p>
311    pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
312        self.error = input;
313        self
314    }
315    /// <p>The error message from the cluster if the SQL statement encountered an error while running.</p>
316    pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
317        &self.error
318    }
319    /// <p>The status of the SQL statement being described. Status values are defined as follows:</p>
320    /// <ul>
321    /// <li>
322    /// <p>ABORTED - The query run was stopped by the user.</p></li>
323    /// <li>
324    /// <p>ALL - A status value that includes all query statuses. This value can be used to filter results.</p></li>
325    /// <li>
326    /// <p>FAILED - The query run failed.</p></li>
327    /// <li>
328    /// <p>FINISHED - The query has finished running.</p></li>
329    /// <li>
330    /// <p>PICKED - The query has been chosen to be run.</p></li>
331    /// <li>
332    /// <p>STARTED - The query run has started.</p></li>
333    /// <li>
334    /// <p>SUBMITTED - The query was submitted, but not yet processed.</p></li>
335    /// </ul>
336    pub fn status(mut self, input: crate::types::StatusString) -> Self {
337        self.status = ::std::option::Option::Some(input);
338        self
339    }
340    /// <p>The status of the SQL statement being described. Status values are defined as follows:</p>
341    /// <ul>
342    /// <li>
343    /// <p>ABORTED - The query run was stopped by the user.</p></li>
344    /// <li>
345    /// <p>ALL - A status value that includes all query statuses. This value can be used to filter results.</p></li>
346    /// <li>
347    /// <p>FAILED - The query run failed.</p></li>
348    /// <li>
349    /// <p>FINISHED - The query has finished running.</p></li>
350    /// <li>
351    /// <p>PICKED - The query has been chosen to be run.</p></li>
352    /// <li>
353    /// <p>STARTED - The query run has started.</p></li>
354    /// <li>
355    /// <p>SUBMITTED - The query was submitted, but not yet processed.</p></li>
356    /// </ul>
357    pub fn set_status(mut self, input: ::std::option::Option<crate::types::StatusString>) -> Self {
358        self.status = input;
359        self
360    }
361    /// <p>The status of the SQL statement being described. Status values are defined as follows:</p>
362    /// <ul>
363    /// <li>
364    /// <p>ABORTED - The query run was stopped by the user.</p></li>
365    /// <li>
366    /// <p>ALL - A status value that includes all query statuses. This value can be used to filter results.</p></li>
367    /// <li>
368    /// <p>FAILED - The query run failed.</p></li>
369    /// <li>
370    /// <p>FINISHED - The query has finished running.</p></li>
371    /// <li>
372    /// <p>PICKED - The query has been chosen to be run.</p></li>
373    /// <li>
374    /// <p>STARTED - The query run has started.</p></li>
375    /// <li>
376    /// <p>SUBMITTED - The query was submitted, but not yet processed.</p></li>
377    /// </ul>
378    pub fn get_status(&self) -> &::std::option::Option<crate::types::StatusString> {
379        &self.status
380    }
381    /// <p>The date and time (UTC) when the SQL statement was submitted to run.</p>
382    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
383        self.created_at = ::std::option::Option::Some(input);
384        self
385    }
386    /// <p>The date and time (UTC) when the SQL statement was submitted to run.</p>
387    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
388        self.created_at = input;
389        self
390    }
391    /// <p>The date and time (UTC) when the SQL statement was submitted to run.</p>
392    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
393        &self.created_at
394    }
395    /// <p>The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed.</p>
396    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
397        self.updated_at = ::std::option::Option::Some(input);
398        self
399    }
400    /// <p>The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed.</p>
401    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
402        self.updated_at = input;
403        self
404    }
405    /// <p>The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed.</p>
406    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
407        &self.updated_at
408    }
409    /// <p>The process identifier from Amazon Redshift.</p>
410    pub fn redshift_pid(mut self, input: i64) -> Self {
411        self.redshift_pid = ::std::option::Option::Some(input);
412        self
413    }
414    /// <p>The process identifier from Amazon Redshift.</p>
415    pub fn set_redshift_pid(mut self, input: ::std::option::Option<i64>) -> Self {
416        self.redshift_pid = input;
417        self
418    }
419    /// <p>The process identifier from Amazon Redshift.</p>
420    pub fn get_redshift_pid(&self) -> &::std::option::Option<i64> {
421        &self.redshift_pid
422    }
423    /// <p>A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set.</p>
424    pub fn has_result_set(mut self, input: bool) -> Self {
425        self.has_result_set = ::std::option::Option::Some(input);
426        self
427    }
428    /// <p>A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set.</p>
429    pub fn set_has_result_set(mut self, input: ::std::option::Option<bool>) -> Self {
430        self.has_result_set = input;
431        self
432    }
433    /// <p>A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set.</p>
434    pub fn get_has_result_set(&self) -> &::std::option::Option<bool> {
435        &self.has_result_set
436    }
437    /// <p>The SQL statement text.</p>
438    pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
439        self.query_string = ::std::option::Option::Some(input.into());
440        self
441    }
442    /// <p>The SQL statement text.</p>
443    pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
444        self.query_string = input;
445        self
446    }
447    /// <p>The SQL statement text.</p>
448    pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
449        &self.query_string
450    }
451    /// <p>Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A <code>-1</code> indicates the value is null.</p>
452    pub fn result_rows(mut self, input: i64) -> Self {
453        self.result_rows = ::std::option::Option::Some(input);
454        self
455    }
456    /// <p>Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A <code>-1</code> indicates the value is null.</p>
457    pub fn set_result_rows(mut self, input: ::std::option::Option<i64>) -> Self {
458        self.result_rows = input;
459        self
460    }
461    /// <p>Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A <code>-1</code> indicates the value is null.</p>
462    pub fn get_result_rows(&self) -> &::std::option::Option<i64> {
463        &self.result_rows
464    }
465    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
466    pub fn result_size(mut self, input: i64) -> Self {
467        self.result_size = ::std::option::Option::Some(input);
468        self
469    }
470    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
471    pub fn set_result_size(mut self, input: ::std::option::Option<i64>) -> Self {
472        self.result_size = input;
473        self
474    }
475    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
476    pub fn get_result_size(&self) -> &::std::option::Option<i64> {
477        &self.result_size
478    }
479    /// <p>The identifier of the query generated by Amazon Redshift. These identifiers are also available in the <code>query</code> column of the <code>STL_QUERY</code> system view.</p>
480    pub fn redshift_query_id(mut self, input: i64) -> Self {
481        self.redshift_query_id = ::std::option::Option::Some(input);
482        self
483    }
484    /// <p>The identifier of the query generated by Amazon Redshift. These identifiers are also available in the <code>query</code> column of the <code>STL_QUERY</code> system view.</p>
485    pub fn set_redshift_query_id(mut self, input: ::std::option::Option<i64>) -> Self {
486        self.redshift_query_id = input;
487        self
488    }
489    /// <p>The identifier of the query generated by Amazon Redshift. These identifiers are also available in the <code>query</code> column of the <code>STL_QUERY</code> system view.</p>
490    pub fn get_redshift_query_id(&self) -> &::std::option::Option<i64> {
491        &self.redshift_query_id
492    }
493    /// Appends an item to `query_parameters`.
494    ///
495    /// To override the contents of this collection use [`set_query_parameters`](Self::set_query_parameters).
496    ///
497    /// <p>The parameters for the SQL statement.</p>
498    pub fn query_parameters(mut self, input: crate::types::SqlParameter) -> Self {
499        let mut v = self.query_parameters.unwrap_or_default();
500        v.push(input);
501        self.query_parameters = ::std::option::Option::Some(v);
502        self
503    }
504    /// <p>The parameters for the SQL statement.</p>
505    pub fn set_query_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SqlParameter>>) -> Self {
506        self.query_parameters = input;
507        self
508    }
509    /// <p>The parameters for the SQL statement.</p>
510    pub fn get_query_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SqlParameter>> {
511        &self.query_parameters
512    }
513    /// Appends an item to `sub_statements`.
514    ///
515    /// To override the contents of this collection use [`set_sub_statements`](Self::set_sub_statements).
516    ///
517    /// <p>The SQL statements from a multiple statement run.</p>
518    pub fn sub_statements(mut self, input: crate::types::SubStatementData) -> Self {
519        let mut v = self.sub_statements.unwrap_or_default();
520        v.push(input);
521        self.sub_statements = ::std::option::Option::Some(v);
522        self
523    }
524    /// <p>The SQL statements from a multiple statement run.</p>
525    pub fn set_sub_statements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubStatementData>>) -> Self {
526        self.sub_statements = input;
527        self
528    }
529    /// <p>The SQL statements from a multiple statement run.</p>
530    pub fn get_sub_statements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubStatementData>> {
531        &self.sub_statements
532    }
533    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
534    pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
535        self.workgroup_name = ::std::option::Option::Some(input.into());
536        self
537    }
538    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
539    pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
540        self.workgroup_name = input;
541        self
542    }
543    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
544    pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
545        &self.workgroup_name
546    }
547    /// <p>The data format of the result of the SQL statement.</p>
548    pub fn result_format(mut self, input: crate::types::ResultFormatString) -> Self {
549        self.result_format = ::std::option::Option::Some(input);
550        self
551    }
552    /// <p>The data format of the result of the SQL statement.</p>
553    pub fn set_result_format(mut self, input: ::std::option::Option<crate::types::ResultFormatString>) -> Self {
554        self.result_format = input;
555        self
556    }
557    /// <p>The data format of the result of the SQL statement.</p>
558    pub fn get_result_format(&self) -> &::std::option::Option<crate::types::ResultFormatString> {
559        &self.result_format
560    }
561    /// <p>The session identifier of the query.</p>
562    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
563        self.session_id = ::std::option::Option::Some(input.into());
564        self
565    }
566    /// <p>The session identifier of the query.</p>
567    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
568        self.session_id = input;
569        self
570    }
571    /// <p>The session identifier of the query.</p>
572    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
573        &self.session_id
574    }
575    /// <p>The execution mode of the batch request. <code>TRANSACTION</code> indicates all SQL statements are run as a single transaction. <code>AUTO_COMMIT</code> indicates each SQL statement is committed individually.</p>
576    pub fn execution_mode(mut self, input: crate::types::ExecutionMode) -> Self {
577        self.execution_mode = ::std::option::Option::Some(input);
578        self
579    }
580    /// <p>The execution mode of the batch request. <code>TRANSACTION</code> indicates all SQL statements are run as a single transaction. <code>AUTO_COMMIT</code> indicates each SQL statement is committed individually.</p>
581    pub fn set_execution_mode(mut self, input: ::std::option::Option<crate::types::ExecutionMode>) -> Self {
582        self.execution_mode = input;
583        self
584    }
585    /// <p>The execution mode of the batch request. <code>TRANSACTION</code> indicates all SQL statements are run as a single transaction. <code>AUTO_COMMIT</code> indicates each SQL statement is committed individually.</p>
586    pub fn get_execution_mode(&self) -> &::std::option::Option<crate::types::ExecutionMode> {
587        &self.execution_mode
588    }
589    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
590        self._request_id = Some(request_id.into());
591        self
592    }
593
594    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
595        self._request_id = request_id;
596        self
597    }
598    /// Consumes the builder and constructs a [`DescribeStatementOutput`](crate::operation::describe_statement::DescribeStatementOutput).
599    /// This method will fail if any of the following fields are not set:
600    /// - [`id`](crate::operation::describe_statement::builders::DescribeStatementOutputBuilder::id)
601    pub fn build(
602        self,
603    ) -> ::std::result::Result<crate::operation::describe_statement::DescribeStatementOutput, ::aws_smithy_types::error::operation::BuildError> {
604        ::std::result::Result::Ok(crate::operation::describe_statement::DescribeStatementOutput {
605            id: self.id.ok_or_else(|| {
606                ::aws_smithy_types::error::operation::BuildError::missing_field(
607                    "id",
608                    "id was not specified but it is required when building DescribeStatementOutput",
609                )
610            })?,
611            secret_arn: self.secret_arn,
612            db_user: self.db_user,
613            database: self.database,
614            cluster_identifier: self.cluster_identifier,
615            duration: self.duration.unwrap_or_default(),
616            error: self.error,
617            status: self.status,
618            created_at: self.created_at,
619            updated_at: self.updated_at,
620            redshift_pid: self.redshift_pid.unwrap_or_default(),
621            has_result_set: self.has_result_set,
622            query_string: self.query_string,
623            result_rows: self.result_rows.unwrap_or_default(),
624            result_size: self.result_size.unwrap_or_default(),
625            redshift_query_id: self.redshift_query_id.unwrap_or_default(),
626            query_parameters: self.query_parameters,
627            sub_statements: self.sub_statements,
628            workgroup_name: self.workgroup_name,
629            result_format: self.result_format,
630            session_id: self.session_id,
631            execution_mode: self.execution_mode,
632            _request_id: self._request_id,
633        })
634    }
635}