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