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
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The properties of a table. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TableMember {
    /// <p>The name of the table. </p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM. </p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
    /// <p>The schema containing the table. </p>
    #[doc(hidden)]
    pub schema: std::option::Option<std::string::String>,
}
impl TableMember {
    /// <p>The name of the table. </p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM. </p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>The schema containing the table. </p>
    pub fn schema(&self) -> std::option::Option<&str> {
        self.schema.as_deref()
    }
}
/// See [`TableMember`](crate::model::TableMember).
pub mod table_member {

    /// A builder for [`TableMember`](crate::model::TableMember).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) schema: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the table. </p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the table. </p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM. </p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM. </p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The schema containing the table. </p>
        pub fn schema(mut self, input: impl Into<std::string::String>) -> Self {
            self.schema = Some(input.into());
            self
        }
        /// <p>The schema containing the table. </p>
        pub fn set_schema(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.schema = input;
            self
        }
        /// Consumes the builder and constructs a [`TableMember`](crate::model::TableMember).
        pub fn build(self) -> crate::model::TableMember {
            crate::model::TableMember {
                name: self.name,
                r#type: self.r#type,
                schema: self.schema,
            }
        }
    }
}
impl TableMember {
    /// Creates a new builder-style object to manufacture [`TableMember`](crate::model::TableMember).
    pub fn builder() -> crate::model::table_member::Builder {
        crate::model::table_member::Builder::default()
    }
}

/// <p>The SQL statement to run.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StatementData {
    /// <p>The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The SQL statement.</p>
    #[doc(hidden)]
    pub query_string: std::option::Option<std::string::String>,
    /// <p>One or more SQL statements. Each query string in the array corresponds to one of the queries in a batch query request.</p>
    #[doc(hidden)]
    pub query_strings: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database. </p>
    #[doc(hidden)]
    pub secret_arn: std::option::Option<std::string::String>,
    /// <p>The status of the SQL statement. An example is the that the SQL statement finished. </p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::StatusString>,
    /// <p>The name of the SQL statement. </p>
    #[doc(hidden)]
    pub statement_name: std::option::Option<std::string::String>,
    /// <p>The date and time (UTC) the statement was created. </p>
    #[doc(hidden)]
    pub created_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The date and time (UTC) that the statement metadata was last updated.</p>
    #[doc(hidden)]
    pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The parameters used in a SQL statement.</p>
    #[doc(hidden)]
    pub query_parameters: std::option::Option<std::vec::Vec<crate::model::SqlParameter>>,
    /// <p>A value that indicates whether the statement is a batch query request.</p>
    #[doc(hidden)]
    pub is_batch_statement: std::option::Option<bool>,
}
impl StatementData {
    /// <p>The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The SQL statement.</p>
    pub fn query_string(&self) -> std::option::Option<&str> {
        self.query_string.as_deref()
    }
    /// <p>One or more SQL statements. Each query string in the array corresponds to one of the queries in a batch query request.</p>
    pub fn query_strings(&self) -> std::option::Option<&[std::string::String]> {
        self.query_strings.as_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 status of the SQL statement. An example is the that the SQL statement finished. </p>
    pub fn status(&self) -> std::option::Option<&crate::model::StatusString> {
        self.status.as_ref()
    }
    /// <p>The name of the SQL statement. </p>
    pub fn statement_name(&self) -> std::option::Option<&str> {
        self.statement_name.as_deref()
    }
    /// <p>The date and time (UTC) the statement was created. </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 statement metadata was last updated.</p>
    pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The parameters used in a SQL statement.</p>
    pub fn query_parameters(&self) -> std::option::Option<&[crate::model::SqlParameter]> {
        self.query_parameters.as_deref()
    }
    /// <p>A value that indicates whether the statement is a batch query request.</p>
    pub fn is_batch_statement(&self) -> std::option::Option<bool> {
        self.is_batch_statement
    }
}
/// See [`StatementData`](crate::model::StatementData).
pub mod statement_data {

    /// A builder for [`StatementData`](crate::model::StatementData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) query_string: std::option::Option<std::string::String>,
        pub(crate) query_strings: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) secret_arn: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::StatusString>,
        pub(crate) statement_name: std::option::Option<std::string::String>,
        pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) query_parameters: std::option::Option<std::vec::Vec<crate::model::SqlParameter>>,
        pub(crate) is_batch_statement: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The SQL statement identifier. 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 SQL statement.</p>
        pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
            self.query_string = Some(input.into());
            self
        }
        /// <p>The SQL statement.</p>
        pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.query_string = input;
            self
        }
        /// Appends an item to `query_strings`.
        ///
        /// To override the contents of this collection use [`set_query_strings`](Self::set_query_strings).
        ///
        /// <p>One or more SQL statements. Each query string in the array corresponds to one of the queries in a batch query request.</p>
        pub fn query_strings(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.query_strings.unwrap_or_default();
            v.push(input.into());
            self.query_strings = Some(v);
            self
        }
        /// <p>One or more SQL statements. Each query string in the array corresponds to one of the queries in a batch query request.</p>
        pub fn set_query_strings(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.query_strings = input;
            self
        }
        /// <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 Into<std::string::String>) -> Self {
            self.secret_arn = 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 status of the SQL statement. An example is the that the SQL statement finished. </p>
        pub fn status(mut self, input: crate::model::StatusString) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the SQL statement. An example is the that the SQL statement finished. </p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::StatusString>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The name of the SQL statement. </p>
        pub fn statement_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.statement_name = Some(input.into());
            self
        }
        /// <p>The name of the SQL statement. </p>
        pub fn set_statement_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.statement_name = input;
            self
        }
        /// <p>The date and time (UTC) the statement was created. </p>
        pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_at = Some(input);
            self
        }
        /// <p>The date and time (UTC) the statement was created. </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) that the statement metadata was last updated.</p>
        pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_at = Some(input);
            self
        }
        /// <p>The date and time (UTC) that the statement metadata was last updated.</p>
        pub fn set_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_at = input;
            self
        }
        /// Appends an item to `query_parameters`.
        ///
        /// To override the contents of this collection use [`set_query_parameters`](Self::set_query_parameters).
        ///
        /// <p>The parameters used in a SQL statement.</p>
        pub fn query_parameters(mut self, input: crate::model::SqlParameter) -> Self {
            let mut v = self.query_parameters.unwrap_or_default();
            v.push(input);
            self.query_parameters = Some(v);
            self
        }
        /// <p>The parameters used in a SQL statement.</p>
        pub fn set_query_parameters(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SqlParameter>>,
        ) -> Self {
            self.query_parameters = input;
            self
        }
        /// <p>A value that indicates whether the statement is a batch query request.</p>
        pub fn is_batch_statement(mut self, input: bool) -> Self {
            self.is_batch_statement = Some(input);
            self
        }
        /// <p>A value that indicates whether the statement is a batch query request.</p>
        pub fn set_is_batch_statement(mut self, input: std::option::Option<bool>) -> Self {
            self.is_batch_statement = input;
            self
        }
        /// Consumes the builder and constructs a [`StatementData`](crate::model::StatementData).
        pub fn build(self) -> crate::model::StatementData {
            crate::model::StatementData {
                id: self.id,
                query_string: self.query_string,
                query_strings: self.query_strings,
                secret_arn: self.secret_arn,
                status: self.status,
                statement_name: self.statement_name,
                created_at: self.created_at,
                updated_at: self.updated_at,
                query_parameters: self.query_parameters,
                is_batch_statement: self.is_batch_statement,
            }
        }
    }
}
impl StatementData {
    /// Creates a new builder-style object to manufacture [`StatementData`](crate::model::StatementData).
    pub fn builder() -> crate::model::statement_data::Builder {
        crate::model::statement_data::Builder::default()
    }
}

/// <p>A parameter used in a SQL statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SqlParameter {
    /// <p>The name of the parameter.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more information, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html">Data types</a> in the <i>Amazon Redshift Database Developer Guide</i>. </p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl SqlParameter {
    /// <p>The name of the parameter.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more information, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html">Data types</a> in the <i>Amazon Redshift Database Developer Guide</i>. </p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`SqlParameter`](crate::model::SqlParameter).
pub mod sql_parameter {

    /// A builder for [`SqlParameter`](crate::model::SqlParameter).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the parameter.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the parameter.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more information, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html">Data types</a> in the <i>Amazon Redshift Database Developer Guide</i>. </p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more information, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html">Data types</a> in the <i>Amazon Redshift Database Developer Guide</i>. </p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`SqlParameter`](crate::model::SqlParameter).
        pub fn build(self) -> crate::model::SqlParameter {
            crate::model::SqlParameter {
                name: self.name,
                value: self.value,
            }
        }
    }
}
impl SqlParameter {
    /// Creates a new builder-style object to manufacture [`SqlParameter`](crate::model::SqlParameter).
    pub fn builder() -> crate::model::sql_parameter::Builder {
        crate::model::sql_parameter::Builder::default()
    }
}

/// When writing a match expression against `StatusString`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let statusstring = unimplemented!();
/// match statusstring {
///     StatusString::Aborted => { /* ... */ },
///     StatusString::All => { /* ... */ },
///     StatusString::Failed => { /* ... */ },
///     StatusString::Finished => { /* ... */ },
///     StatusString::Picked => { /* ... */ },
///     StatusString::Started => { /* ... */ },
///     StatusString::Submitted => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `statusstring` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `StatusString::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `StatusString::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `StatusString::NewFeature` is defined.
/// Specifically, when `statusstring` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `StatusString::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum StatusString {
    #[allow(missing_docs)] // documentation missing in model
    Aborted,
    #[allow(missing_docs)] // documentation missing in model
    All,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Finished,
    #[allow(missing_docs)] // documentation missing in model
    Picked,
    #[allow(missing_docs)] // documentation missing in model
    Started,
    #[allow(missing_docs)] // documentation missing in model
    Submitted,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StatusString {
    fn from(s: &str) -> Self {
        match s {
            "ABORTED" => StatusString::Aborted,
            "ALL" => StatusString::All,
            "FAILED" => StatusString::Failed,
            "FINISHED" => StatusString::Finished,
            "PICKED" => StatusString::Picked,
            "STARTED" => StatusString::Started,
            "SUBMITTED" => StatusString::Submitted,
            other => StatusString::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for StatusString {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StatusString::from(s))
    }
}
impl StatusString {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StatusString::Aborted => "ABORTED",
            StatusString::All => "ALL",
            StatusString::Failed => "FAILED",
            StatusString::Finished => "FINISHED",
            StatusString::Picked => "PICKED",
            StatusString::Started => "STARTED",
            StatusString::Submitted => "SUBMITTED",
            StatusString::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "ABORTED",
            "ALL",
            "FAILED",
            "FINISHED",
            "PICKED",
            "STARTED",
            "SUBMITTED",
        ]
    }
}
impl AsRef<str> for StatusString {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The properties (metadata) of a column. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ColumnMetadata {
    /// <p>A value that indicates whether the column is case-sensitive. </p>
    #[doc(hidden)]
    pub is_case_sensitive: bool,
    /// <p>A value that indicates whether the column contains currency values.</p>
    #[doc(hidden)]
    pub is_currency: bool,
    /// <p>A value that indicates whether an integer column is signed.</p>
    #[doc(hidden)]
    pub is_signed: bool,
    /// <p>The label for the column. </p>
    #[doc(hidden)]
    pub label: std::option::Option<std::string::String>,
    /// <p>The name of the column. </p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>A value that indicates whether the column is nullable. </p>
    #[doc(hidden)]
    pub nullable: i32,
    /// <p>The precision value of a decimal number column. </p>
    #[doc(hidden)]
    pub precision: i32,
    /// <p>The scale value of a decimal number column. </p>
    #[doc(hidden)]
    pub scale: i32,
    /// <p>The name of the schema that contains the table that includes the column.</p>
    #[doc(hidden)]
    pub schema_name: std::option::Option<std::string::String>,
    /// <p>The name of the table that includes the column. </p>
    #[doc(hidden)]
    pub table_name: std::option::Option<std::string::String>,
    /// <p>The database-specific data type of the column. </p>
    #[doc(hidden)]
    pub type_name: std::option::Option<std::string::String>,
    /// <p>The length of the column.</p>
    #[doc(hidden)]
    pub length: i32,
    /// <p>The default value of the column. </p>
    #[doc(hidden)]
    pub column_default: std::option::Option<std::string::String>,
}
impl ColumnMetadata {
    /// <p>A value that indicates whether the column is case-sensitive. </p>
    pub fn is_case_sensitive(&self) -> bool {
        self.is_case_sensitive
    }
    /// <p>A value that indicates whether the column contains currency values.</p>
    pub fn is_currency(&self) -> bool {
        self.is_currency
    }
    /// <p>A value that indicates whether an integer column is signed.</p>
    pub fn is_signed(&self) -> bool {
        self.is_signed
    }
    /// <p>The label for the column. </p>
    pub fn label(&self) -> std::option::Option<&str> {
        self.label.as_deref()
    }
    /// <p>The name of the column. </p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A value that indicates whether the column is nullable. </p>
    pub fn nullable(&self) -> i32 {
        self.nullable
    }
    /// <p>The precision value of a decimal number column. </p>
    pub fn precision(&self) -> i32 {
        self.precision
    }
    /// <p>The scale value of a decimal number column. </p>
    pub fn scale(&self) -> i32 {
        self.scale
    }
    /// <p>The name of the schema that contains the table that includes the column.</p>
    pub fn schema_name(&self) -> std::option::Option<&str> {
        self.schema_name.as_deref()
    }
    /// <p>The name of the table that includes the column. </p>
    pub fn table_name(&self) -> std::option::Option<&str> {
        self.table_name.as_deref()
    }
    /// <p>The database-specific data type of the column. </p>
    pub fn type_name(&self) -> std::option::Option<&str> {
        self.type_name.as_deref()
    }
    /// <p>The length of the column.</p>
    pub fn length(&self) -> i32 {
        self.length
    }
    /// <p>The default value of the column. </p>
    pub fn column_default(&self) -> std::option::Option<&str> {
        self.column_default.as_deref()
    }
}
/// See [`ColumnMetadata`](crate::model::ColumnMetadata).
pub mod column_metadata {

    /// A builder for [`ColumnMetadata`](crate::model::ColumnMetadata).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) is_case_sensitive: std::option::Option<bool>,
        pub(crate) is_currency: std::option::Option<bool>,
        pub(crate) is_signed: std::option::Option<bool>,
        pub(crate) label: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) nullable: std::option::Option<i32>,
        pub(crate) precision: std::option::Option<i32>,
        pub(crate) scale: std::option::Option<i32>,
        pub(crate) schema_name: std::option::Option<std::string::String>,
        pub(crate) table_name: std::option::Option<std::string::String>,
        pub(crate) type_name: std::option::Option<std::string::String>,
        pub(crate) length: std::option::Option<i32>,
        pub(crate) column_default: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>A value that indicates whether the column is case-sensitive. </p>
        pub fn is_case_sensitive(mut self, input: bool) -> Self {
            self.is_case_sensitive = Some(input);
            self
        }
        /// <p>A value that indicates whether the column is case-sensitive. </p>
        pub fn set_is_case_sensitive(mut self, input: std::option::Option<bool>) -> Self {
            self.is_case_sensitive = input;
            self
        }
        /// <p>A value that indicates whether the column contains currency values.</p>
        pub fn is_currency(mut self, input: bool) -> Self {
            self.is_currency = Some(input);
            self
        }
        /// <p>A value that indicates whether the column contains currency values.</p>
        pub fn set_is_currency(mut self, input: std::option::Option<bool>) -> Self {
            self.is_currency = input;
            self
        }
        /// <p>A value that indicates whether an integer column is signed.</p>
        pub fn is_signed(mut self, input: bool) -> Self {
            self.is_signed = Some(input);
            self
        }
        /// <p>A value that indicates whether an integer column is signed.</p>
        pub fn set_is_signed(mut self, input: std::option::Option<bool>) -> Self {
            self.is_signed = input;
            self
        }
        /// <p>The label for the column. </p>
        pub fn label(mut self, input: impl Into<std::string::String>) -> Self {
            self.label = Some(input.into());
            self
        }
        /// <p>The label for the column. </p>
        pub fn set_label(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.label = input;
            self
        }
        /// <p>The name of the column. </p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the column. </p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>A value that indicates whether the column is nullable. </p>
        pub fn nullable(mut self, input: i32) -> Self {
            self.nullable = Some(input);
            self
        }
        /// <p>A value that indicates whether the column is nullable. </p>
        pub fn set_nullable(mut self, input: std::option::Option<i32>) -> Self {
            self.nullable = input;
            self
        }
        /// <p>The precision value of a decimal number column. </p>
        pub fn precision(mut self, input: i32) -> Self {
            self.precision = Some(input);
            self
        }
        /// <p>The precision value of a decimal number column. </p>
        pub fn set_precision(mut self, input: std::option::Option<i32>) -> Self {
            self.precision = input;
            self
        }
        /// <p>The scale value of a decimal number column. </p>
        pub fn scale(mut self, input: i32) -> Self {
            self.scale = Some(input);
            self
        }
        /// <p>The scale value of a decimal number column. </p>
        pub fn set_scale(mut self, input: std::option::Option<i32>) -> Self {
            self.scale = input;
            self
        }
        /// <p>The name of the schema that contains the table that includes the column.</p>
        pub fn schema_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.schema_name = Some(input.into());
            self
        }
        /// <p>The name of the schema that contains the table that includes the column.</p>
        pub fn set_schema_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.schema_name = input;
            self
        }
        /// <p>The name of the table that includes the column. </p>
        pub fn table_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.table_name = Some(input.into());
            self
        }
        /// <p>The name of the table that includes the column. </p>
        pub fn set_table_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.table_name = input;
            self
        }
        /// <p>The database-specific data type of the column. </p>
        pub fn type_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.type_name = Some(input.into());
            self
        }
        /// <p>The database-specific data type of the column. </p>
        pub fn set_type_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.type_name = input;
            self
        }
        /// <p>The length of the column.</p>
        pub fn length(mut self, input: i32) -> Self {
            self.length = Some(input);
            self
        }
        /// <p>The length of the column.</p>
        pub fn set_length(mut self, input: std::option::Option<i32>) -> Self {
            self.length = input;
            self
        }
        /// <p>The default value of the column. </p>
        pub fn column_default(mut self, input: impl Into<std::string::String>) -> Self {
            self.column_default = Some(input.into());
            self
        }
        /// <p>The default value of the column. </p>
        pub fn set_column_default(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.column_default = input;
            self
        }
        /// Consumes the builder and constructs a [`ColumnMetadata`](crate::model::ColumnMetadata).
        pub fn build(self) -> crate::model::ColumnMetadata {
            crate::model::ColumnMetadata {
                is_case_sensitive: self.is_case_sensitive.unwrap_or_default(),
                is_currency: self.is_currency.unwrap_or_default(),
                is_signed: self.is_signed.unwrap_or_default(),
                label: self.label,
                name: self.name,
                nullable: self.nullable.unwrap_or_default(),
                precision: self.precision.unwrap_or_default(),
                scale: self.scale.unwrap_or_default(),
                schema_name: self.schema_name,
                table_name: self.table_name,
                type_name: self.type_name,
                length: self.length.unwrap_or_default(),
                column_default: self.column_default,
            }
        }
    }
}
impl ColumnMetadata {
    /// Creates a new builder-style object to manufacture [`ColumnMetadata`](crate::model::ColumnMetadata).
    pub fn builder() -> crate::model::column_metadata::Builder {
        crate::model::column_metadata::Builder::default()
    }
}

/// <p>A data value in a column. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum Field {
    /// <p>A value of the BLOB data type. </p>
    BlobValue(aws_smithy_types::Blob),
    /// <p>A value of the Boolean data type. </p>
    BooleanValue(bool),
    /// <p>A value of the double data type. </p>
    DoubleValue(f64),
    /// <p>A value that indicates whether the data is NULL. </p>
    IsNull(bool),
    /// <p>A value of the long data type. </p>
    LongValue(i64),
    /// <p>A value of the string data type. </p>
    StringValue(std::string::String),
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
    /// An unknown enum variant
    ///
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
    #[non_exhaustive]
    Unknown,
}
impl Field {
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::Field::BlobValue), extracting the inner [`Blob`](aws_smithy_types::Blob).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_blob_value(&self) -> std::result::Result<&aws_smithy_types::Blob, &Self> {
        if let Field::BlobValue(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`BlobValue`](crate::model::Field::BlobValue).
    pub fn is_blob_value(&self) -> bool {
        self.as_blob_value().is_ok()
    }
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::Field::BooleanValue), extracting the inner [`bool`](bool).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_boolean_value(&self) -> std::result::Result<&bool, &Self> {
        if let Field::BooleanValue(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`BooleanValue`](crate::model::Field::BooleanValue).
    pub fn is_boolean_value(&self) -> bool {
        self.as_boolean_value().is_ok()
    }
    /// Tries to convert the enum instance into [`DoubleValue`](crate::model::Field::DoubleValue), extracting the inner [`f64`](f64).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_double_value(&self) -> std::result::Result<&f64, &Self> {
        if let Field::DoubleValue(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`DoubleValue`](crate::model::Field::DoubleValue).
    pub fn is_double_value(&self) -> bool {
        self.as_double_value().is_ok()
    }
    /// Tries to convert the enum instance into [`IsNull`](crate::model::Field::IsNull), extracting the inner [`bool`](bool).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_is_null(&self) -> std::result::Result<&bool, &Self> {
        if let Field::IsNull(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`IsNull`](crate::model::Field::IsNull).
    pub fn is_is_null(&self) -> bool {
        self.as_is_null().is_ok()
    }
    /// Tries to convert the enum instance into [`LongValue`](crate::model::Field::LongValue), extracting the inner [`i64`](i64).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_long_value(&self) -> std::result::Result<&i64, &Self> {
        if let Field::LongValue(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`LongValue`](crate::model::Field::LongValue).
    pub fn is_long_value(&self) -> bool {
        self.as_long_value().is_ok()
    }
    /// Tries to convert the enum instance into [`StringValue`](crate::model::Field::StringValue), extracting the inner [`String`](std::string::String).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_string_value(&self) -> std::result::Result<&std::string::String, &Self> {
        if let Field::StringValue(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`StringValue`](crate::model::Field::StringValue).
    pub fn is_string_value(&self) -> bool {
        self.as_string_value().is_ok()
    }
    /// Returns true if the enum instance is the `Unknown` variant.
    pub fn is_unknown(&self) -> bool {
        matches!(self, Self::Unknown)
    }
}

/// <p>Information about an SQL statement.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubStatementData {
    /// <p>The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The amount of time in nanoseconds that the statement ran.</p>
    #[doc(hidden)]
    pub duration: i64,
    /// <p>The error message from the cluster if the SQL statement encountered an error while running.</p>
    #[doc(hidden)]
    pub error: std::option::Option<std::string::String>,
    /// <p>The status of the SQL statement. An example is the that the SQL statement finished. </p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::model::StatementStatusString>,
    /// <p>The date and time (UTC) the statement was created. </p>
    #[doc(hidden)]
    pub created_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The date and time (UTC) that the statement metadata was last updated.</p>
    #[doc(hidden)]
    pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The SQL statement text.</p>
    #[doc(hidden)]
    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>
    #[doc(hidden)]
    pub result_rows: i64,
    /// <p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>
    #[doc(hidden)]
    pub result_size: i64,
    /// <p>The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    #[doc(hidden)]
    pub redshift_query_id: 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.</p>
    #[doc(hidden)]
    pub has_result_set: std::option::Option<bool>,
}
impl SubStatementData {
    /// <p>The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.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. An example is the that the SQL statement finished. </p>
    pub fn status(&self) -> std::option::Option<&crate::model::StatementStatusString> {
        self.status.as_ref()
    }
    /// <p>The date and time (UTC) the statement was created. </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 statement metadata was last updated.</p>
    pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <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 SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
    pub fn redshift_query_id(&self) -> i64 {
        self.redshift_query_id
    }
    /// <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.</p>
    pub fn has_result_set(&self) -> std::option::Option<bool> {
        self.has_result_set
    }
}
/// See [`SubStatementData`](crate::model::SubStatementData).
pub mod sub_statement_data {

    /// A builder for [`SubStatementData`](crate::model::SubStatementData).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: 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::model::StatementStatusString>,
        pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
        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) has_result_set: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The amount of time in nanoseconds that the statement ran.</p>
        pub fn duration(mut self, input: i64) -> Self {
            self.duration = 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 error message from the cluster if the SQL statement encountered an error while running.</p>
        pub fn error(mut self, input: impl Into<std::string::String>) -> Self {
            self.error = 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 status of the SQL statement. An example is the that the SQL statement finished. </p>
        pub fn status(mut self, input: crate::model::StatementStatusString) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the SQL statement. An example is the that the SQL statement finished. </p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::StatementStatusString>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The date and time (UTC) the statement was created. </p>
        pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_at = Some(input);
            self
        }
        /// <p>The date and time (UTC) the statement was created. </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) that the statement metadata was last updated.</p>
        pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_at = Some(input);
            self
        }
        /// <p>The date and time (UTC) that the statement metadata was last updated.</p>
        pub fn set_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_at = input;
            self
        }
        /// <p>The SQL statement text.</p>
        pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
            self.query_string = 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>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 = 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>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 = 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 SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
        pub fn redshift_query_id(mut self, input: i64) -> Self {
            self.redshift_query_id = Some(input);
            self
        }
        /// <p>The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>
        pub fn set_redshift_query_id(mut self, input: std::option::Option<i64>) -> Self {
            self.redshift_query_id = 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.</p>
        pub fn has_result_set(mut self, input: bool) -> Self {
            self.has_result_set = 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.</p>
        pub fn set_has_result_set(mut self, input: std::option::Option<bool>) -> Self {
            self.has_result_set = input;
            self
        }
        /// Consumes the builder and constructs a [`SubStatementData`](crate::model::SubStatementData).
        pub fn build(self) -> crate::model::SubStatementData {
            crate::model::SubStatementData {
                id: self.id,
                duration: self.duration.unwrap_or_default(),
                error: self.error,
                status: self.status,
                created_at: self.created_at,
                updated_at: self.updated_at,
                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(),
                has_result_set: self.has_result_set,
            }
        }
    }
}
impl SubStatementData {
    /// Creates a new builder-style object to manufacture [`SubStatementData`](crate::model::SubStatementData).
    pub fn builder() -> crate::model::sub_statement_data::Builder {
        crate::model::sub_statement_data::Builder::default()
    }
}

/// When writing a match expression against `StatementStatusString`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let statementstatusstring = unimplemented!();
/// match statementstatusstring {
///     StatementStatusString::Aborted => { /* ... */ },
///     StatementStatusString::Failed => { /* ... */ },
///     StatementStatusString::Finished => { /* ... */ },
///     StatementStatusString::Picked => { /* ... */ },
///     StatementStatusString::Started => { /* ... */ },
///     StatementStatusString::Submitted => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `statementstatusstring` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `StatementStatusString::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `StatementStatusString::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `StatementStatusString::NewFeature` is defined.
/// Specifically, when `statementstatusstring` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `StatementStatusString::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum StatementStatusString {
    #[allow(missing_docs)] // documentation missing in model
    Aborted,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Finished,
    #[allow(missing_docs)] // documentation missing in model
    Picked,
    #[allow(missing_docs)] // documentation missing in model
    Started,
    #[allow(missing_docs)] // documentation missing in model
    Submitted,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StatementStatusString {
    fn from(s: &str) -> Self {
        match s {
            "ABORTED" => StatementStatusString::Aborted,
            "FAILED" => StatementStatusString::Failed,
            "FINISHED" => StatementStatusString::Finished,
            "PICKED" => StatementStatusString::Picked,
            "STARTED" => StatementStatusString::Started,
            "SUBMITTED" => StatementStatusString::Submitted,
            other => {
                StatementStatusString::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for StatementStatusString {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StatementStatusString::from(s))
    }
}
impl StatementStatusString {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StatementStatusString::Aborted => "ABORTED",
            StatementStatusString::Failed => "FAILED",
            StatementStatusString::Finished => "FINISHED",
            StatementStatusString::Picked => "PICKED",
            StatementStatusString::Started => "STARTED",
            StatementStatusString::Submitted => "SUBMITTED",
            StatementStatusString::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "ABORTED",
            "FAILED",
            "FINISHED",
            "PICKED",
            "STARTED",
            "SUBMITTED",
        ]
    }
}
impl AsRef<str> for StatementStatusString {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}