aws-sdk-rdsdata 0.0.24-alpha

AWS SDK for AWS RDS DataService
Documentation
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle<
    C = aws_smithy_client::erase::DynConnector,
    M = aws_hyper::AwsMiddleware,
    R = aws_smithy_client::retry::Standard,
> {
    client: aws_smithy_client::Client<C, M, R>,
    conf: crate::Config,
}

/// An ergonomic service client for `RdsDataService`.
///
/// This client allows ergonomic access to a `RdsDataService`-shaped service.
/// Each method corresponds to an endpoint defined in the service's Smithy model,
/// and the request and response shapes are auto-generated from that same model.
///
/// # Using a Client
///
/// Once you have a client set up, you can access the service's endpoints
/// by calling the appropriate method on [`Client`]. Each such method
/// returns a request builder for that endpoint, with methods for setting
/// the various fields of the request. Once your request is complete, use
/// the `send` method to send the request. `send` returns a future, which
/// you then have to `.await` to get the service's response.
///
/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#c-builder
/// [SigV4-signed requests]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
#[derive(std::fmt::Debug)]
pub struct Client<
    C = aws_smithy_client::erase::DynConnector,
    M = aws_hyper::AwsMiddleware,
    R = aws_smithy_client::retry::Standard,
> {
    handle: std::sync::Arc<Handle<C, M, R>>,
}

impl<C, M, R> std::clone::Clone for Client<C, M, R> {
    fn clone(&self) -> Self {
        Self {
            handle: self.handle.clone(),
        }
    }
}

#[doc(inline)]
pub use aws_smithy_client::Builder;

impl<C, M, R> From<aws_smithy_client::Client<C, M, R>> for Client<C, M, R> {
    fn from(client: aws_smithy_client::Client<C, M, R>) -> Self {
        Self::with_config(client, crate::Config::builder().build())
    }
}

impl<C, M, R> Client<C, M, R> {
    /// Creates a client with the given service configuration.
    pub fn with_config(client: aws_smithy_client::Client<C, M, R>, conf: crate::Config) -> Self {
        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }

    /// Returns the client's configuration.
    pub fn conf(&self) -> &crate::Config {
        &self.handle.conf
    }
}
impl<C, M, R> Client<C, M, R>
where
    C: aws_smithy_client::bounds::SmithyConnector,
    M: aws_smithy_client::bounds::SmithyMiddleware<C>,
    R: aws_smithy_client::retry::NewRequestPolicy,
{
    /// Constructs a fluent builder for the `BatchExecuteStatement` operation.
    ///
    /// See [`BatchExecuteStatement`](crate::client::fluent_builders::BatchExecuteStatement) for more information about the
    /// operation and its arguments.
    pub fn batch_execute_statement(&self) -> fluent_builders::BatchExecuteStatement<C, M, R> {
        fluent_builders::BatchExecuteStatement::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the `BeginTransaction` operation.
    ///
    /// See [`BeginTransaction`](crate::client::fluent_builders::BeginTransaction) for more information about the
    /// operation and its arguments.
    pub fn begin_transaction(&self) -> fluent_builders::BeginTransaction<C, M, R> {
        fluent_builders::BeginTransaction::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the `CommitTransaction` operation.
    ///
    /// See [`CommitTransaction`](crate::client::fluent_builders::CommitTransaction) for more information about the
    /// operation and its arguments.
    pub fn commit_transaction(&self) -> fluent_builders::CommitTransaction<C, M, R> {
        fluent_builders::CommitTransaction::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the `ExecuteSql` operation.
    ///
    /// See [`ExecuteSql`](crate::client::fluent_builders::ExecuteSql) for more information about the
    /// operation and its arguments.
    pub fn execute_sql(&self) -> fluent_builders::ExecuteSql<C, M, R> {
        fluent_builders::ExecuteSql::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the `ExecuteStatement` operation.
    ///
    /// See [`ExecuteStatement`](crate::client::fluent_builders::ExecuteStatement) for more information about the
    /// operation and its arguments.
    pub fn execute_statement(&self) -> fluent_builders::ExecuteStatement<C, M, R> {
        fluent_builders::ExecuteStatement::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the `RollbackTransaction` operation.
    ///
    /// See [`RollbackTransaction`](crate::client::fluent_builders::RollbackTransaction) for more information about the
    /// operation and its arguments.
    pub fn rollback_transaction(&self) -> fluent_builders::RollbackTransaction<C, M, R> {
        fluent_builders::RollbackTransaction::new(self.handle.clone())
    }
}
pub mod fluent_builders {
    //!
    //! Utilities to ergonomically construct a request to the service.
    //!
    //! Fluent builders are created through the [`Client`](crate::client::Client) by calling
    //! one if its operation methods. After parameters are set using the builder methods,
    //! the `send` method can be called to initiate the request.
    //!
    /// Fluent builder constructing a request to `BatchExecuteStatement`.
    ///
    /// <p>Runs a batch SQL statement over an array of data.</p>
    /// <p>You can run bulk update and insert operations for multiple records using a DML
    /// statement with different parameter sets. Bulk operations can provide a significant
    /// performance improvement over individual insert and update operations.</p>
    /// <important>    
    /// <p>If a call isn't part of a transaction because it doesn't include the
    /// <code>transactionID</code> parameter, changes that result from the call are
    /// committed automatically.</p>    
    /// </important>
    #[derive(std::fmt::Debug)]
    pub struct BatchExecuteStatement<
        C = aws_smithy_client::erase::DynConnector,
        M = aws_hyper::AwsMiddleware,
        R = aws_smithy_client::retry::Standard,
    > {
        handle: std::sync::Arc<super::Handle<C, M, R>>,
        inner: crate::input::batch_execute_statement_input::Builder,
    }
    impl<C, M, R> BatchExecuteStatement<C, M, R>
    where
        C: aws_smithy_client::bounds::SmithyConnector,
        M: aws_smithy_client::bounds::SmithyMiddleware<C>,
        R: aws_smithy_client::retry::NewRequestPolicy,
    {
        /// Creates a new `BatchExecuteStatement`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::BatchExecuteStatementOutput,
            aws_smithy_http::result::SdkError<crate::error::BatchExecuteStatementError>,
        >
        where
            R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
                crate::input::BatchExecuteStatementInputOperationOutputAlias,
                crate::output::BatchExecuteStatementOutput,
                crate::error::BatchExecuteStatementError,
                crate::input::BatchExecuteStatementInputOperationRetryAlias,
            >,
        {
            let input = self.inner.build().map_err(|err| {
                aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
            })?;
            let op = input
                .make_operation(&self.handle.conf)
                .await
                .map_err(|err| {
                    aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
                })?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn resource_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(inp);
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn secret_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.secret_arn(inp);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn set_secret_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_secret_arn(input);
            self
        }
        /// <p>The SQL statement to run.</p>
        pub fn sql(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sql(inp);
            self
        }
        /// <p>The SQL statement to run.</p>
        pub fn set_sql(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_sql(input);
            self
        }
        /// <p>The name of the database.</p>
        pub fn database(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.database(inp);
            self
        }
        /// <p>The name of the database.</p>
        pub fn set_database(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_database(input);
            self
        }
        /// <p>The name of the database schema.</p>
        pub fn schema(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.schema(inp);
            self
        }
        /// <p>The name of the database schema.</p>
        pub fn set_schema(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_schema(input);
            self
        }
        /// Appends an item to `parameterSets`.
        ///
        /// To override the contents of this collection use [`set_parameter_sets`](Self::set_parameter_sets).
        ///
        /// <p>The parameter set for the batch operation.</p>
        /// <p>The SQL statement is executed as many times as the number of parameter sets provided.
        /// To execute a SQL statement with no parameters, use one of the following options:</p>
        /// <ul>
        /// <li>
        /// <p>Specify one or more empty parameter sets.</p>
        /// </li>
        /// <li>
        /// <p>Use the <code>ExecuteStatement</code> operation instead of the <code>BatchExecuteStatement</code> operation.</p>
        /// </li>
        /// </ul>
        /// <note>
        /// <p>Array parameters are not supported.</p>
        /// </note>
        pub fn parameter_sets(
            mut self,
            inp: impl Into<std::vec::Vec<crate::model::SqlParameter>>,
        ) -> Self {
            self.inner = self.inner.parameter_sets(inp);
            self
        }
        /// <p>The parameter set for the batch operation.</p>
        /// <p>The SQL statement is executed as many times as the number of parameter sets provided.
        /// To execute a SQL statement with no parameters, use one of the following options:</p>
        /// <ul>
        /// <li>
        /// <p>Specify one or more empty parameter sets.</p>
        /// </li>
        /// <li>
        /// <p>Use the <code>ExecuteStatement</code> operation instead of the <code>BatchExecuteStatement</code> operation.</p>
        /// </li>
        /// </ul>
        /// <note>
        /// <p>Array parameters are not supported.</p>
        /// </note>
        pub fn set_parameter_sets(
            mut self,
            input: std::option::Option<std::vec::Vec<std::vec::Vec<crate::model::SqlParameter>>>,
        ) -> Self {
            self.inner = self.inner.set_parameter_sets(input);
            self
        }
        /// <p>The identifier of a transaction that was started by using the
        /// <code>BeginTransaction</code> operation. Specify the transaction ID of the
        /// transaction that you want to include the SQL statement in.</p>
        /// <p>If the SQL statement is not part of a transaction, don't set this
        /// parameter.</p>
        pub fn transaction_id(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.transaction_id(inp);
            self
        }
        /// <p>The identifier of a transaction that was started by using the
        /// <code>BeginTransaction</code> operation. Specify the transaction ID of the
        /// transaction that you want to include the SQL statement in.</p>
        /// <p>If the SQL statement is not part of a transaction, don't set this
        /// parameter.</p>
        pub fn set_transaction_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_transaction_id(input);
            self
        }
    }
    /// Fluent builder constructing a request to `BeginTransaction`.
    ///
    /// <p>Starts a SQL transaction.</p>
    ///
    /// <important>
    /// <p>A transaction can run for a maximum of 24 hours. A transaction is terminated and
    /// rolled back automatically after 24 hours.</p>
    /// <p>A transaction times out if no calls use its transaction ID in three minutes.
    /// If a transaction times out before it's committed, it's rolled back
    /// automatically.</p>
    /// <p>DDL statements inside a transaction cause an implicit commit. We recommend
    /// that you run each DDL statement in a separate <code>ExecuteStatement</code> call with
    /// <code>continueAfterTimeout</code> enabled.</p>
    /// </important>
    #[derive(std::fmt::Debug)]
    pub struct BeginTransaction<
        C = aws_smithy_client::erase::DynConnector,
        M = aws_hyper::AwsMiddleware,
        R = aws_smithy_client::retry::Standard,
    > {
        handle: std::sync::Arc<super::Handle<C, M, R>>,
        inner: crate::input::begin_transaction_input::Builder,
    }
    impl<C, M, R> BeginTransaction<C, M, R>
    where
        C: aws_smithy_client::bounds::SmithyConnector,
        M: aws_smithy_client::bounds::SmithyMiddleware<C>,
        R: aws_smithy_client::retry::NewRequestPolicy,
    {
        /// Creates a new `BeginTransaction`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::BeginTransactionOutput,
            aws_smithy_http::result::SdkError<crate::error::BeginTransactionError>,
        >
        where
            R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
                crate::input::BeginTransactionInputOperationOutputAlias,
                crate::output::BeginTransactionOutput,
                crate::error::BeginTransactionError,
                crate::input::BeginTransactionInputOperationRetryAlias,
            >,
        {
            let input = self.inner.build().map_err(|err| {
                aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
            })?;
            let op = input
                .make_operation(&self.handle.conf)
                .await
                .map_err(|err| {
                    aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
                })?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn resource_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(inp);
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn secret_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.secret_arn(inp);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn set_secret_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_secret_arn(input);
            self
        }
        /// <p>The name of the database.</p>
        pub fn database(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.database(inp);
            self
        }
        /// <p>The name of the database.</p>
        pub fn set_database(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_database(input);
            self
        }
        /// <p>The name of the database schema.</p>
        pub fn schema(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.schema(inp);
            self
        }
        /// <p>The name of the database schema.</p>
        pub fn set_schema(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_schema(input);
            self
        }
    }
    /// Fluent builder constructing a request to `CommitTransaction`.
    ///
    /// <p>Ends a SQL transaction started with the <code>BeginTransaction</code> operation and
    /// commits the changes.</p>
    #[derive(std::fmt::Debug)]
    pub struct CommitTransaction<
        C = aws_smithy_client::erase::DynConnector,
        M = aws_hyper::AwsMiddleware,
        R = aws_smithy_client::retry::Standard,
    > {
        handle: std::sync::Arc<super::Handle<C, M, R>>,
        inner: crate::input::commit_transaction_input::Builder,
    }
    impl<C, M, R> CommitTransaction<C, M, R>
    where
        C: aws_smithy_client::bounds::SmithyConnector,
        M: aws_smithy_client::bounds::SmithyMiddleware<C>,
        R: aws_smithy_client::retry::NewRequestPolicy,
    {
        /// Creates a new `CommitTransaction`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CommitTransactionOutput,
            aws_smithy_http::result::SdkError<crate::error::CommitTransactionError>,
        >
        where
            R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
                crate::input::CommitTransactionInputOperationOutputAlias,
                crate::output::CommitTransactionOutput,
                crate::error::CommitTransactionError,
                crate::input::CommitTransactionInputOperationRetryAlias,
            >,
        {
            let input = self.inner.build().map_err(|err| {
                aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
            })?;
            let op = input
                .make_operation(&self.handle.conf)
                .await
                .map_err(|err| {
                    aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
                })?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn resource_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(inp);
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn secret_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.secret_arn(inp);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn set_secret_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_secret_arn(input);
            self
        }
        /// <p>The identifier of the transaction to end and commit.</p>
        pub fn transaction_id(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.transaction_id(inp);
            self
        }
        /// <p>The identifier of the transaction to end and commit.</p>
        pub fn set_transaction_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_transaction_id(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ExecuteSql`.
    ///
    /// <p>Runs one or more SQL statements.</p>
    /// <important>
    /// <p>This operation is deprecated. Use the <code>BatchExecuteStatement</code> or
    /// <code>ExecuteStatement</code> operation.</p>
    /// </important>
    #[derive(std::fmt::Debug)]
    pub struct ExecuteSql<
        C = aws_smithy_client::erase::DynConnector,
        M = aws_hyper::AwsMiddleware,
        R = aws_smithy_client::retry::Standard,
    > {
        handle: std::sync::Arc<super::Handle<C, M, R>>,
        inner: crate::input::execute_sql_input::Builder,
    }
    impl<C, M, R> ExecuteSql<C, M, R>
    where
        C: aws_smithy_client::bounds::SmithyConnector,
        M: aws_smithy_client::bounds::SmithyMiddleware<C>,
        R: aws_smithy_client::retry::NewRequestPolicy,
    {
        /// Creates a new `ExecuteSql`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ExecuteSqlOutput,
            aws_smithy_http::result::SdkError<crate::error::ExecuteSqlError>,
        >
        where
            R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
                crate::input::ExecuteSqlInputOperationOutputAlias,
                crate::output::ExecuteSqlOutput,
                crate::error::ExecuteSqlError,
                crate::input::ExecuteSqlInputOperationRetryAlias,
            >,
        {
            let input = self.inner.build().map_err(|err| {
                aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
            })?;
            let op = input
                .make_operation(&self.handle.conf)
                .await
                .map_err(|err| {
                    aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
                })?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the Aurora Serverless DB cluster.</p>
        pub fn db_cluster_or_instance_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.db_cluster_or_instance_arn(inp);
            self
        }
        /// <p>The ARN of the Aurora Serverless DB cluster.</p>
        pub fn set_db_cluster_or_instance_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_db_cluster_or_instance_arn(input);
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster.</p>
        pub fn aws_secret_store_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.aws_secret_store_arn(inp);
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster.</p>
        pub fn set_aws_secret_store_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_aws_secret_store_arn(input);
            self
        }
        /// <p>One or more SQL statements to run on the DB cluster.</p>
        /// <p>You can separate SQL statements from each other with a semicolon (;). Any valid SQL
        /// statement is permitted, including data definition, data manipulation, and commit
        /// statements. </p>
        pub fn sql_statements(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sql_statements(inp);
            self
        }
        /// <p>One or more SQL statements to run on the DB cluster.</p>
        /// <p>You can separate SQL statements from each other with a semicolon (;). Any valid SQL
        /// statement is permitted, including data definition, data manipulation, and commit
        /// statements. </p>
        pub fn set_sql_statements(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sql_statements(input);
            self
        }
        /// <p>The name of the database.</p>
        pub fn database(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.database(inp);
            self
        }
        /// <p>The name of the database.</p>
        pub fn set_database(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_database(input);
            self
        }
        /// <p>The name of the database schema.</p>
        pub fn schema(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.schema(inp);
            self
        }
        /// <p>The name of the database schema.</p>
        pub fn set_schema(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_schema(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ExecuteStatement`.
    ///
    /// <p>Runs a SQL statement against a database.</p>
    /// <important>    
    /// <p>If a call isn't part of a transaction because it doesn't include the
    /// <code>transactionID</code> parameter, changes that result from the call are
    /// committed automatically.</p>    
    /// </important>
    /// <p>The response size limit is 1 MB. If the call returns more than 1 MB of response data, the call is terminated.</p>
    #[derive(std::fmt::Debug)]
    pub struct ExecuteStatement<
        C = aws_smithy_client::erase::DynConnector,
        M = aws_hyper::AwsMiddleware,
        R = aws_smithy_client::retry::Standard,
    > {
        handle: std::sync::Arc<super::Handle<C, M, R>>,
        inner: crate::input::execute_statement_input::Builder,
    }
    impl<C, M, R> ExecuteStatement<C, M, R>
    where
        C: aws_smithy_client::bounds::SmithyConnector,
        M: aws_smithy_client::bounds::SmithyMiddleware<C>,
        R: aws_smithy_client::retry::NewRequestPolicy,
    {
        /// Creates a new `ExecuteStatement`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ExecuteStatementOutput,
            aws_smithy_http::result::SdkError<crate::error::ExecuteStatementError>,
        >
        where
            R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
                crate::input::ExecuteStatementInputOperationOutputAlias,
                crate::output::ExecuteStatementOutput,
                crate::error::ExecuteStatementError,
                crate::input::ExecuteStatementInputOperationRetryAlias,
            >,
        {
            let input = self.inner.build().map_err(|err| {
                aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
            })?;
            let op = input
                .make_operation(&self.handle.conf)
                .await
                .map_err(|err| {
                    aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
                })?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn resource_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(inp);
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn secret_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.secret_arn(inp);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn set_secret_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_secret_arn(input);
            self
        }
        /// <p>The SQL statement to run.</p>
        pub fn sql(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.sql(inp);
            self
        }
        /// <p>The SQL statement to run.</p>
        pub fn set_sql(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_sql(input);
            self
        }
        /// <p>The name of the database.</p>
        pub fn database(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.database(inp);
            self
        }
        /// <p>The name of the database.</p>
        pub fn set_database(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_database(input);
            self
        }
        /// <p>The name of the database schema.</p>
        /// <note>
        /// <p>Currently, the <code>schema</code> parameter isn't supported.</p>
        /// </note>
        pub fn schema(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.schema(inp);
            self
        }
        /// <p>The name of the database schema.</p>
        /// <note>
        /// <p>Currently, the <code>schema</code> parameter isn't supported.</p>
        /// </note>
        pub fn set_schema(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_schema(input);
            self
        }
        /// Appends an item to `parameters`.
        ///
        /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
        ///
        /// <p>The parameters for the SQL statement.</p>
        /// <note>
        /// <p>Array parameters are not supported.</p>
        /// </note>
        pub fn parameters(mut self, inp: impl Into<crate::model::SqlParameter>) -> Self {
            self.inner = self.inner.parameters(inp);
            self
        }
        /// <p>The parameters for the SQL statement.</p>
        /// <note>
        /// <p>Array parameters are not supported.</p>
        /// </note>
        pub fn set_parameters(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SqlParameter>>,
        ) -> Self {
            self.inner = self.inner.set_parameters(input);
            self
        }
        /// <p>The identifier of a transaction that was started by using the
        /// <code>BeginTransaction</code> operation. Specify the transaction ID of the
        /// transaction that you want to include the SQL statement in.</p>
        /// <p>If the SQL statement is not part of a transaction, don't set this parameter.</p>
        pub fn transaction_id(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.transaction_id(inp);
            self
        }
        /// <p>The identifier of a transaction that was started by using the
        /// <code>BeginTransaction</code> operation. Specify the transaction ID of the
        /// transaction that you want to include the SQL statement in.</p>
        /// <p>If the SQL statement is not part of a transaction, don't set this parameter.</p>
        pub fn set_transaction_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_transaction_id(input);
            self
        }
        /// <p>A value that indicates whether to include metadata in the results.</p>
        pub fn include_result_metadata(mut self, inp: bool) -> Self {
            self.inner = self.inner.include_result_metadata(inp);
            self
        }
        /// <p>A value that indicates whether to include metadata in the results.</p>
        pub fn set_include_result_metadata(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_include_result_metadata(input);
            self
        }
        /// <p>A value that indicates whether to continue running the statement after
        /// the call times out. By default, the statement stops running when the call
        /// times out.</p>
        /// <important>
        /// <p>For DDL statements, we recommend continuing to run the statement after
        /// the call times out. When a DDL statement terminates before it is finished
        /// running, it can result in errors and possibly corrupted data structures.</p>
        /// </important>
        pub fn continue_after_timeout(mut self, inp: bool) -> Self {
            self.inner = self.inner.continue_after_timeout(inp);
            self
        }
        /// <p>A value that indicates whether to continue running the statement after
        /// the call times out. By default, the statement stops running when the call
        /// times out.</p>
        /// <important>
        /// <p>For DDL statements, we recommend continuing to run the statement after
        /// the call times out. When a DDL statement terminates before it is finished
        /// running, it can result in errors and possibly corrupted data structures.</p>
        /// </important>
        pub fn set_continue_after_timeout(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_continue_after_timeout(input);
            self
        }
        /// <p>Options that control how the result set is returned.</p>
        pub fn result_set_options(mut self, inp: crate::model::ResultSetOptions) -> Self {
            self.inner = self.inner.result_set_options(inp);
            self
        }
        /// <p>Options that control how the result set is returned.</p>
        pub fn set_result_set_options(
            mut self,
            input: std::option::Option<crate::model::ResultSetOptions>,
        ) -> Self {
            self.inner = self.inner.set_result_set_options(input);
            self
        }
    }
    /// Fluent builder constructing a request to `RollbackTransaction`.
    ///
    /// <p>Performs a rollback of a transaction. Rolling back a transaction cancels its changes.</p>
    #[derive(std::fmt::Debug)]
    pub struct RollbackTransaction<
        C = aws_smithy_client::erase::DynConnector,
        M = aws_hyper::AwsMiddleware,
        R = aws_smithy_client::retry::Standard,
    > {
        handle: std::sync::Arc<super::Handle<C, M, R>>,
        inner: crate::input::rollback_transaction_input::Builder,
    }
    impl<C, M, R> RollbackTransaction<C, M, R>
    where
        C: aws_smithy_client::bounds::SmithyConnector,
        M: aws_smithy_client::bounds::SmithyMiddleware<C>,
        R: aws_smithy_client::retry::NewRequestPolicy,
    {
        /// Creates a new `RollbackTransaction`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::RollbackTransactionOutput,
            aws_smithy_http::result::SdkError<crate::error::RollbackTransactionError>,
        >
        where
            R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
                crate::input::RollbackTransactionInputOperationOutputAlias,
                crate::output::RollbackTransactionOutput,
                crate::error::RollbackTransactionError,
                crate::input::RollbackTransactionInputOperationRetryAlias,
            >,
        {
            let input = self.inner.build().map_err(|err| {
                aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
            })?;
            let op = input
                .make_operation(&self.handle.conf)
                .await
                .map_err(|err| {
                    aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
                })?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn resource_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(inp);
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn secret_arn(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.secret_arn(inp);
            self
        }
        /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
        pub fn set_secret_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_secret_arn(input);
            self
        }
        /// <p>The identifier of the transaction to roll back.</p>
        pub fn transaction_id(mut self, inp: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.transaction_id(inp);
            self
        }
        /// <p>The identifier of the transaction to roll back.</p>
        pub fn set_transaction_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_transaction_id(input);
            self
        }
    }
}
impl<C> Client<C, aws_hyper::AwsMiddleware, aws_smithy_client::retry::Standard> {
    /// Creates a client with the given service config and connector override.
    pub fn from_conf_conn(conf: crate::Config, conn: C) -> Self {
        let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default();
        let client = aws_hyper::Client::new(conn).with_retry_config(retry_config.into());
        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }
}
impl
    Client<
        aws_smithy_client::erase::DynConnector,
        aws_hyper::AwsMiddleware,
        aws_smithy_client::retry::Standard,
    >
{
    /// Creates a new client from a shared config.
    #[cfg(any(feature = "rustls", feature = "native-tls"))]
    pub fn new(config: &aws_types::config::Config) -> Self {
        Self::from_conf(config.into())
    }

    /// Creates a new client from the service [`Config`](crate::Config).
    #[cfg(any(feature = "rustls", feature = "native-tls"))]
    pub fn from_conf(conf: crate::Config) -> Self {
        let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default();
        let client = aws_hyper::Client::https().with_retry_config(retry_config.into());
        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }
}