1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeStatementOutput {
    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    pub id: ::std::string::String,
    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database. </p>
    pub secret_arn: ::std::option::Option<::std::string::String>,
    /// <p>The database user name. </p>
    pub db_user: ::std::option::Option<::std::string::String>,
    /// <p>The name of the database. </p>
    pub database: ::std::option::Option<::std::string::String>,
    /// <p>The cluster identifier. </p>
    pub cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The amount of time in nanoseconds that the statement ran. </p>
    pub duration: i64,
    /// <p>The error message from the cluster if the SQL statement encountered an error while running. </p>
    pub error: ::std::option::Option<::std::string::String>,
    /// <p>The status of the SQL statement being described. Status values are defined as follows: </p>
    /// <ul>
    /// <li> <p>ABORTED - The query run was stopped by the user. </p> </li>
    /// <li> <p>ALL - A status value that includes all query statuses. This value can be used to filter results. </p> </li>
    /// <li> <p>FAILED - The query run failed. </p> </li>
    /// <li> <p>FINISHED - The query has finished running. </p> </li>
    /// <li> <p>PICKED - The query has been chosen to be run. </p> </li>
    /// <li> <p>STARTED - The query run has started. </p> </li>
    /// <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li>
    /// </ul>
    pub status: ::std::option::Option<crate::types::StatusString>,
    /// <p>The date and time (UTC) when the SQL statement was submitted to run. </p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <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>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The process identifier from Amazon Redshift. </p>
    pub redshift_pid: i64,
    /// <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>
    pub has_result_set: ::std::option::Option<bool>,
    /// <p>The SQL statement text. </p>
    pub query_string: ::std::option::Option<::std::string::String>,
    /// <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>
    pub result_rows: i64,
    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
    pub result_size: i64,
    /// <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>
    pub redshift_query_id: i64,
    /// <p>The parameters for the SQL statement.</p>
    pub query_parameters: ::std::option::Option<::std::vec::Vec<crate::types::SqlParameter>>,
    /// <p>The SQL statements from a multiple statement run.</p>
    pub sub_statements: ::std::option::Option<::std::vec::Vec<crate::types::SubStatementData>>,
    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
    pub workgroup_name: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeStatementOutput {
    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    pub fn id(&self) -> &str {
        use std::ops::Deref;
        self.id.deref()
    }
    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database. </p>
    pub fn secret_arn(&self) -> ::std::option::Option<&str> {
        self.secret_arn.as_deref()
    }
    /// <p>The database user name. </p>
    pub fn db_user(&self) -> ::std::option::Option<&str> {
        self.db_user.as_deref()
    }
    /// <p>The name of the database. </p>
    pub fn database(&self) -> ::std::option::Option<&str> {
        self.database.as_deref()
    }
    /// <p>The cluster identifier. </p>
    pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.cluster_identifier.as_deref()
    }
    /// <p>The amount of time in nanoseconds that the statement ran. </p>
    pub fn duration(&self) -> i64 {
        self.duration
    }
    /// <p>The error message from the cluster if the SQL statement encountered an error while running. </p>
    pub fn error(&self) -> ::std::option::Option<&str> {
        self.error.as_deref()
    }
    /// <p>The status of the SQL statement being described. Status values are defined as follows: </p>
    /// <ul>
    /// <li> <p>ABORTED - The query run was stopped by the user. </p> </li>
    /// <li> <p>ALL - A status value that includes all query statuses. This value can be used to filter results. </p> </li>
    /// <li> <p>FAILED - The query run failed. </p> </li>
    /// <li> <p>FINISHED - The query has finished running. </p> </li>
    /// <li> <p>PICKED - The query has been chosen to be run. </p> </li>
    /// <li> <p>STARTED - The query run has started. </p> </li>
    /// <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&crate::types::StatusString> {
        self.status.as_ref()
    }
    /// <p>The date and time (UTC) when the SQL statement was submitted to run. </p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <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>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The process identifier from Amazon Redshift. </p>
    pub fn redshift_pid(&self) -> i64 {
        self.redshift_pid
    }
    /// <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>
    pub fn has_result_set(&self) -> ::std::option::Option<bool> {
        self.has_result_set
    }
    /// <p>The SQL statement text. </p>
    pub fn query_string(&self) -> ::std::option::Option<&str> {
        self.query_string.as_deref()
    }
    /// <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>
    pub fn result_rows(&self) -> i64 {
        self.result_rows
    }
    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
    pub fn result_size(&self) -> i64 {
        self.result_size
    }
    /// <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>
    pub fn redshift_query_id(&self) -> i64 {
        self.redshift_query_id
    }
    /// <p>The parameters for the SQL statement.</p>
    ///
    /// 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()`.
    pub fn query_parameters(&self) -> &[crate::types::SqlParameter] {
        self.query_parameters.as_deref().unwrap_or_default()
    }
    /// <p>The SQL statements from a multiple statement run.</p>
    ///
    /// 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()`.
    pub fn sub_statements(&self) -> &[crate::types::SubStatementData] {
        self.sub_statements.as_deref().unwrap_or_default()
    }
    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
    pub fn workgroup_name(&self) -> ::std::option::Option<&str> {
        self.workgroup_name.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeStatementOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeStatementOutput {
    /// Creates a new builder-style object to manufacture [`DescribeStatementOutput`](crate::operation::describe_statement::DescribeStatementOutput).
    pub fn builder() -> crate::operation::describe_statement::builders::DescribeStatementOutputBuilder {
        crate::operation::describe_statement::builders::DescribeStatementOutputBuilder::default()
    }
}

/// A builder for [`DescribeStatementOutput`](crate::operation::describe_statement::DescribeStatementOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeStatementOutputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) secret_arn: ::std::option::Option<::std::string::String>,
    pub(crate) db_user: ::std::option::Option<::std::string::String>,
    pub(crate) database: ::std::option::Option<::std::string::String>,
    pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) duration: ::std::option::Option<i64>,
    pub(crate) error: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::StatusString>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) redshift_pid: ::std::option::Option<i64>,
    pub(crate) has_result_set: ::std::option::Option<bool>,
    pub(crate) query_string: ::std::option::Option<::std::string::String>,
    pub(crate) result_rows: ::std::option::Option<i64>,
    pub(crate) result_size: ::std::option::Option<i64>,
    pub(crate) redshift_query_id: ::std::option::Option<i64>,
    pub(crate) query_parameters: ::std::option::Option<::std::vec::Vec<crate::types::SqlParameter>>,
    pub(crate) sub_statements: ::std::option::Option<::std::vec::Vec<crate::types::SubStatementData>>,
    pub(crate) workgroup_name: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeStatementOutputBuilder {
    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database. </p>
    pub fn secret_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.secret_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database. </p>
    pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.secret_arn = input;
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database. </p>
    pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.secret_arn
    }
    /// <p>The database user name. </p>
    pub fn db_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.db_user = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The database user name. </p>
    pub fn set_db_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.db_user = input;
        self
    }
    /// <p>The database user name. </p>
    pub fn get_db_user(&self) -> &::std::option::Option<::std::string::String> {
        &self.db_user
    }
    /// <p>The name of the database. </p>
    pub fn database(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.database = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the database. </p>
    pub fn set_database(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.database = input;
        self
    }
    /// <p>The name of the database. </p>
    pub fn get_database(&self) -> &::std::option::Option<::std::string::String> {
        &self.database
    }
    /// <p>The cluster identifier. </p>
    pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The cluster identifier. </p>
    pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_identifier = input;
        self
    }
    /// <p>The cluster identifier. </p>
    pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_identifier
    }
    /// <p>The amount of time in nanoseconds that the statement ran. </p>
    pub fn duration(mut self, input: i64) -> Self {
        self.duration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The amount of time in nanoseconds that the statement ran. </p>
    pub fn set_duration(mut self, input: ::std::option::Option<i64>) -> Self {
        self.duration = input;
        self
    }
    /// <p>The amount of time in nanoseconds that the statement ran. </p>
    pub fn get_duration(&self) -> &::std::option::Option<i64> {
        &self.duration
    }
    /// <p>The error message from the cluster if the SQL statement encountered an error while running. </p>
    pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.error = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The error message from the cluster if the SQL statement encountered an error while running. </p>
    pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.error = input;
        self
    }
    /// <p>The error message from the cluster if the SQL statement encountered an error while running. </p>
    pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
        &self.error
    }
    /// <p>The status of the SQL statement being described. Status values are defined as follows: </p>
    /// <ul>
    /// <li> <p>ABORTED - The query run was stopped by the user. </p> </li>
    /// <li> <p>ALL - A status value that includes all query statuses. This value can be used to filter results. </p> </li>
    /// <li> <p>FAILED - The query run failed. </p> </li>
    /// <li> <p>FINISHED - The query has finished running. </p> </li>
    /// <li> <p>PICKED - The query has been chosen to be run. </p> </li>
    /// <li> <p>STARTED - The query run has started. </p> </li>
    /// <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li>
    /// </ul>
    pub fn status(mut self, input: crate::types::StatusString) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the SQL statement being described. Status values are defined as follows: </p>
    /// <ul>
    /// <li> <p>ABORTED - The query run was stopped by the user. </p> </li>
    /// <li> <p>ALL - A status value that includes all query statuses. This value can be used to filter results. </p> </li>
    /// <li> <p>FAILED - The query run failed. </p> </li>
    /// <li> <p>FINISHED - The query has finished running. </p> </li>
    /// <li> <p>PICKED - The query has been chosen to be run. </p> </li>
    /// <li> <p>STARTED - The query run has started. </p> </li>
    /// <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::StatusString>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the SQL statement being described. Status values are defined as follows: </p>
    /// <ul>
    /// <li> <p>ABORTED - The query run was stopped by the user. </p> </li>
    /// <li> <p>ALL - A status value that includes all query statuses. This value can be used to filter results. </p> </li>
    /// <li> <p>FAILED - The query run failed. </p> </li>
    /// <li> <p>FINISHED - The query has finished running. </p> </li>
    /// <li> <p>PICKED - The query has been chosen to be run. </p> </li>
    /// <li> <p>STARTED - The query run has started. </p> </li>
    /// <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::StatusString> {
        &self.status
    }
    /// <p>The date and time (UTC) when the SQL statement was submitted to run. </p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time (UTC) when the SQL statement was submitted to run. </p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time (UTC) when the SQL statement was submitted to run. </p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <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>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <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>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>The process identifier from Amazon Redshift. </p>
    pub fn redshift_pid(mut self, input: i64) -> Self {
        self.redshift_pid = ::std::option::Option::Some(input);
        self
    }
    /// <p>The process identifier from Amazon Redshift. </p>
    pub fn set_redshift_pid(mut self, input: ::std::option::Option<i64>) -> Self {
        self.redshift_pid = input;
        self
    }
    /// <p>The process identifier from Amazon Redshift. </p>
    pub fn get_redshift_pid(&self) -> &::std::option::Option<i64> {
        &self.redshift_pid
    }
    /// <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>
    pub fn has_result_set(mut self, input: bool) -> Self {
        self.has_result_set = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_has_result_set(mut self, input: ::std::option::Option<bool>) -> Self {
        self.has_result_set = input;
        self
    }
    /// <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>
    pub fn get_has_result_set(&self) -> &::std::option::Option<bool> {
        &self.has_result_set
    }
    /// <p>The SQL statement text. </p>
    pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.query_string = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SQL statement text. </p>
    pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.query_string = input;
        self
    }
    /// <p>The SQL statement text. </p>
    pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
        &self.query_string
    }
    /// <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>
    pub fn result_rows(mut self, input: i64) -> Self {
        self.result_rows = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_result_rows(mut self, input: ::std::option::Option<i64>) -> Self {
        self.result_rows = input;
        self
    }
    /// <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>
    pub fn get_result_rows(&self) -> &::std::option::Option<i64> {
        &self.result_rows
    }
    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
    pub fn result_size(mut self, input: i64) -> Self {
        self.result_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
    pub fn set_result_size(mut self, input: ::std::option::Option<i64>) -> Self {
        self.result_size = input;
        self
    }
    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
    pub fn get_result_size(&self) -> &::std::option::Option<i64> {
        &self.result_size
    }
    /// <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>
    pub fn redshift_query_id(mut self, input: i64) -> Self {
        self.redshift_query_id = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_redshift_query_id(mut self, input: ::std::option::Option<i64>) -> Self {
        self.redshift_query_id = input;
        self
    }
    /// <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>
    pub fn get_redshift_query_id(&self) -> &::std::option::Option<i64> {
        &self.redshift_query_id
    }
    /// Appends an item to `query_parameters`.
    ///
    /// To override the contents of this collection use [`set_query_parameters`](Self::set_query_parameters).
    ///
    /// <p>The parameters for the SQL statement.</p>
    pub fn query_parameters(mut self, input: crate::types::SqlParameter) -> Self {
        let mut v = self.query_parameters.unwrap_or_default();
        v.push(input);
        self.query_parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>The parameters for the SQL statement.</p>
    pub fn set_query_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SqlParameter>>) -> Self {
        self.query_parameters = input;
        self
    }
    /// <p>The parameters for the SQL statement.</p>
    pub fn get_query_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SqlParameter>> {
        &self.query_parameters
    }
    /// Appends an item to `sub_statements`.
    ///
    /// To override the contents of this collection use [`set_sub_statements`](Self::set_sub_statements).
    ///
    /// <p>The SQL statements from a multiple statement run.</p>
    pub fn sub_statements(mut self, input: crate::types::SubStatementData) -> Self {
        let mut v = self.sub_statements.unwrap_or_default();
        v.push(input);
        self.sub_statements = ::std::option::Option::Some(v);
        self
    }
    /// <p>The SQL statements from a multiple statement run.</p>
    pub fn set_sub_statements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubStatementData>>) -> Self {
        self.sub_statements = input;
        self
    }
    /// <p>The SQL statements from a multiple statement run.</p>
    pub fn get_sub_statements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubStatementData>> {
        &self.sub_statements
    }
    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
    pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workgroup_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
    pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workgroup_name = input;
        self
    }
    /// <p>The serverless workgroup name or Amazon Resource Name (ARN).</p>
    pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.workgroup_name
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeStatementOutput`](crate::operation::describe_statement::DescribeStatementOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`id`](crate::operation::describe_statement::builders::DescribeStatementOutputBuilder::id)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_statement::DescribeStatementOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_statement::DescribeStatementOutput {
            id: self.id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "id",
                    "id was not specified but it is required when building DescribeStatementOutput",
                )
            })?,
            secret_arn: self.secret_arn,
            db_user: self.db_user,
            database: self.database,
            cluster_identifier: self.cluster_identifier,
            duration: self.duration.unwrap_or_default(),
            error: self.error,
            status: self.status,
            created_at: self.created_at,
            updated_at: self.updated_at,
            redshift_pid: self.redshift_pid.unwrap_or_default(),
            has_result_set: self.has_result_set,
            query_string: self.query_string,
            result_rows: self.result_rows.unwrap_or_default(),
            result_size: self.result_size.unwrap_or_default(),
            redshift_query_id: self.redshift_query_id.unwrap_or_default(),
            query_parameters: self.query_parameters,
            sub_statements: self.sub_statements,
            workgroup_name: self.workgroup_name,
            _request_id: self._request_id,
        })
    }
}