AWS SDK

AWS SDK

rev. eb19c4c7998eaae1210cb747286b497c3425236c (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ecs/Cargo.toml

@@ -1,1 +90,90 @@
   10     10   
rust-version = "1.88.0"
   11     11   
readme = "README.md"
   12     12   
[package.metadata.smithy]
   13     13   
codegen-version = "ci"
   14     14   
protocol = "aws.protocols#awsJson1_1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20         -
version = "1.2.8"
          20  +
version = "1.2.9"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
version = "1.5.13"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.6"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.62.5"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.61.7"
   37     37   
   38     38   
[dependencies.aws-smithy-runtime]
   39     39   
path = "../aws-smithy-runtime"
   40     40   
features = ["client"]
   41     41   
version = "1.9.4"
   42     42   
   43     43   
[dependencies.aws-smithy-runtime-api]
   44     44   
path = "../aws-smithy-runtime-api"
   45     45   
features = ["client", "http-02x"]
   46     46   
version = "1.9.2"
   47     47   
   48     48   
[dependencies.aws-smithy-types]
   49     49   
path = "../aws-smithy-types"
   50     50   
version = "1.3.4"
   51     51   
   52     52   
[dependencies.aws-types]
   53     53   
path = "../aws-types"
   54     54   
version = "1.3.10"
   55     55   
   56     56   
[dependencies.bytes]
   57     57   
version = "1.4.0"
   58     58   
   59     59   
[dependencies.fastrand]
   60     60   
version = "2.0.0"
   61     61   
   62     62   
[dependencies.http]
   63     63   
version = "0.2.9"
   64     64   
   65     65   
[dependencies.regex-lite]
   66     66   
version = "0.1.5"
   67     67   
   68     68   
[dependencies.tracing]
   69     69   
version = "0.1"
   70     70   
[dev-dependencies.aws-config]
   71     71   
path = "../aws-config"
   72     72   
version = "1.8.10"
   73     73   
   74     74   
[dev-dependencies.aws-credential-types]
   75     75   
path = "../aws-credential-types"
   76     76   
features = ["test-util"]
   77         -
version = "1.2.8"
          77  +
version = "1.2.9"
   78     78   
   79     79   
[dev-dependencies.tokio]
   80     80   
version = "1.23.1"
   81     81   
features = ["macros", "test-util", "rt-multi-thread"]
   82     82   
   83     83   
[features]
   84     84   
behavior-version-latest = []
   85     85   
rustls = ["aws-smithy-runtime/tls-rustls"]
   86     86   
default-https-client = ["aws-smithy-runtime/default-https-client"]
   87     87   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]

tmp-codegen-diff/aws-sdk/sdk/glacier/Cargo.toml

@@ -1,1 +50,50 @@
   10     10   
rust-version = "1.88.0"
   11     11   
readme = "README.md"
   12     12   
[package.metadata.smithy]
   13     13   
codegen-version = "ci"
   14     14   
protocol = "aws.protocols#restJson1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20         -
version = "1.2.8"
          20  +
version = "1.2.9"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
version = "1.5.13"
   25     25   
   26     26   
[dependencies.aws-sigv4]
   27     27   
path = "../aws-sigv4"
   28     28   
version = "1.3.6"
   29     29   
   30     30   
[dependencies.aws-smithy-async]
@@ -61,61 +121,121 @@
   81     81   
   82     82   
[dependencies.tracing]
   83     83   
version = "0.1"
   84     84   
[dev-dependencies.aws-config]
   85     85   
path = "../aws-config"
   86     86   
version = "1.8.10"
   87     87   
   88     88   
[dev-dependencies.aws-credential-types]
   89     89   
path = "../aws-credential-types"
   90     90   
features = ["test-util"]
   91         -
version = "1.2.8"
          91  +
version = "1.2.9"
   92     92   
   93     93   
[dev-dependencies.aws-runtime]
   94     94   
path = "../aws-runtime"
   95     95   
features = ["test-util"]
   96     96   
version = "1.5.13"
   97     97   
   98     98   
[dev-dependencies.aws-smithy-async]
   99     99   
path = "../aws-smithy-async"
  100    100   
features = ["test-util"]
  101    101   
version = "1.2.6"

tmp-codegen-diff/aws-sdk/sdk/iam/Cargo.toml

@@ -1,1 +50,50 @@
   10     10   
rust-version = "1.88.0"
   11     11   
readme = "README.md"
   12     12   
[package.metadata.smithy]
   13     13   
codegen-version = "ci"
   14     14   
protocol = "aws.protocols#awsQuery"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20         -
version = "1.2.8"
          20  +
version = "1.2.9"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
version = "1.5.13"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.6"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
@@ -52,52 +112,112 @@
   72     72   
   73     73   
[dependencies.tracing]
   74     74   
version = "0.1"
   75     75   
[dev-dependencies.aws-config]
   76     76   
path = "../aws-config"
   77     77   
version = "1.8.10"
   78     78   
   79     79   
[dev-dependencies.aws-credential-types]
   80     80   
path = "../aws-credential-types"
   81     81   
features = ["test-util"]
   82         -
version = "1.2.8"
          82  +
version = "1.2.9"
   83     83   
   84     84   
[dev-dependencies.aws-runtime]
   85     85   
path = "../aws-runtime"
   86     86   
features = ["test-util"]
   87     87   
version = "1.5.13"
   88     88   
   89     89   
[dev-dependencies.aws-smithy-async]
   90     90   
path = "../aws-smithy-async"
   91     91   
features = ["test-util"]
   92     92   
version = "1.2.6"

tmp-codegen-diff/aws-sdk/sdk/kms/Cargo.toml

@@ -1,1 +107,107 @@
   10     10   
rust-version = "1.88.0"
   11     11   
readme = "README.md"
   12     12   
[package.metadata.smithy]
   13     13   
codegen-version = "ci"
   14     14   
protocol = "aws.protocols#awsJson1_1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20         -
version = "1.2.8"
          20  +
version = "1.2.9"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
version = "1.5.13"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.6"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.62.5"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.61.7"
   37     37   
   38     38   
[dependencies.aws-smithy-runtime]
   39     39   
path = "../aws-smithy-runtime"
   40     40   
features = ["client"]
   41     41   
version = "1.9.4"
   42     42   
   43     43   
[dependencies.aws-smithy-runtime-api]
   44     44   
path = "../aws-smithy-runtime-api"
   45     45   
features = ["client", "http-02x"]
   46     46   
version = "1.9.2"
   47     47   
   48     48   
[dependencies.aws-smithy-types]
   49     49   
path = "../aws-smithy-types"
   50     50   
version = "1.3.4"
   51     51   
   52     52   
[dependencies.aws-types]
   53     53   
path = "../aws-types"
   54     54   
version = "1.3.10"
   55     55   
   56     56   
[dependencies.bytes]
   57     57   
version = "1.4.0"
   58     58   
   59     59   
[dependencies.fastrand]
   60     60   
version = "2.0.0"
   61     61   
   62     62   
[dependencies.http]
   63     63   
version = "0.2.9"
   64     64   
   65     65   
[dependencies.regex-lite]
   66     66   
version = "0.1.5"
   67     67   
   68     68   
[dependencies.tracing]
   69     69   
version = "0.1"
   70     70   
[dev-dependencies.aws-config]
   71     71   
path = "../aws-config"
   72     72   
version = "1.8.10"
   73     73   
   74     74   
[dev-dependencies.aws-credential-types]
   75     75   
path = "../aws-credential-types"
   76     76   
features = ["test-util"]
   77         -
version = "1.2.8"
          77  +
version = "1.2.9"
   78     78   
   79     79   
[dev-dependencies.aws-runtime]
   80     80   
path = "../aws-runtime"
   81     81   
features = ["test-util"]
   82     82   
version = "1.5.13"
   83     83   
   84     84   
[dev-dependencies.aws-smithy-async]
   85     85   
path = "../aws-smithy-async"
   86     86   
features = ["test-util"]
   87     87   
version = "1.2.6"

tmp-codegen-diff/aws-sdk/sdk/lambda/Cargo.toml

@@ -1,1 +50,50 @@
   10     10   
rust-version = "1.88.0"
   11     11   
readme = "README.md"
   12     12   
[package.metadata.smithy]
   13     13   
codegen-version = "ci"
   14     14   
protocol = "aws.protocols#restJson1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20         -
version = "1.2.8"
          20  +
version = "1.2.9"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
features = ["event-stream"]
   25     25   
version = "1.5.13"
   26     26   
   27     27   
[dependencies.aws-smithy-async]
   28     28   
path = "../aws-smithy-async"
   29     29   
version = "1.2.6"
   30     30   
@@ -53,53 +113,113 @@
   73     73   
   74     74   
[dependencies.tracing]
   75     75   
version = "0.1"
   76     76   
[dev-dependencies.aws-config]
   77     77   
path = "../aws-config"
   78     78   
version = "1.8.10"
   79     79   
   80     80   
[dev-dependencies.aws-credential-types]
   81     81   
path = "../aws-credential-types"
   82     82   
features = ["test-util"]
   83         -
version = "1.2.8"
          83  +
version = "1.2.9"
   84     84   
   85     85   
[dev-dependencies.aws-runtime]
   86     86   
path = "../aws-runtime"
   87     87   
features = ["test-util"]
   88     88   
version = "1.5.13"
   89     89   
   90     90   
[dev-dependencies.aws-smithy-async]
   91     91   
path = "../aws-smithy-async"
   92     92   
features = ["test-util"]
   93     93   
version = "1.2.6"

tmp-codegen-diff/aws-sdk/sdk/polly/Cargo.toml

@@ -1,1 +50,50 @@
   10     10   
rust-version = "1.88.0"
   11     11   
readme = "README.md"
   12     12   
[package.metadata.smithy]
   13     13   
codegen-version = "ci"
   14     14   
protocol = "aws.protocols#restJson1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20         -
version = "1.2.8"
          20  +
version = "1.2.9"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
version = "1.5.13"
   25     25   
   26     26   
[dependencies.aws-sigv4]
   27     27   
path = "../aws-sigv4"
   28     28   
version = "1.3.6"
   29     29   
   30     30   
[dependencies.aws-smithy-async]
@@ -60,60 +120,120 @@
   80     80   
   81     81   
[dependencies.tracing]
   82     82   
version = "0.1"
   83     83   
[dev-dependencies.aws-config]
   84     84   
path = "../aws-config"
   85     85   
version = "1.8.10"
   86     86   
   87     87   
[dev-dependencies.aws-credential-types]
   88     88   
path = "../aws-credential-types"
   89     89   
features = ["test-util"]
   90         -
version = "1.2.8"
          90  +
version = "1.2.9"
   91     91   
   92     92   
[dev-dependencies.aws-runtime]
   93     93   
path = "../aws-runtime"
   94     94   
features = ["test-util"]
   95     95   
version = "1.5.13"
   96     96   
   97     97   
[dev-dependencies.aws-smithy-async]
   98     98   
path = "../aws-smithy-async"
   99     99   
features = ["test-util"]
  100    100   
version = "1.2.6"

tmp-codegen-diff/aws-sdk/sdk/qldbsession/Cargo.toml

@@ -0,1 +0,140 @@
           1  +
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
[package]
           3  +
name = "aws-sdk-qldbsession"
           4  +
version = "0.0.0-local"
           5  +
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
           6  +
description = "AWS SDK for Amazon QLDB Session"
           7  +
edition = "2021"
           8  +
license = "Apache-2.0"
           9  +
repository = "https://github.com/awslabs/aws-sdk-rust"
          10  +
rust-version = "1.88.0"
          11  +
readme = "README.md"
          12  +
[package.metadata.smithy]
          13  +
codegen-version = "ci"
          14  +
protocol = "aws.protocols#awsJson1_0"
          15  +
[package.metadata.docs.rs]
          16  +
all-features = true
          17  +
targets = ["x86_64-unknown-linux-gnu"]
          18  +
[dependencies.aws-credential-types]
          19  +
path = "../aws-credential-types"
          20  +
version = "1.2.9"
          21  +
          22  +
[dependencies.aws-runtime]
          23  +
path = "../aws-runtime"
          24  +
version = "1.5.13"
          25  +
          26  +
[dependencies.aws-smithy-async]
          27  +
path = "../aws-smithy-async"
          28  +
version = "1.2.6"
          29  +
          30  +
[dependencies.aws-smithy-http]
          31  +
path = "../aws-smithy-http"
          32  +
version = "0.62.5"
          33  +
          34  +
[dependencies.aws-smithy-json]
          35  +
path = "../aws-smithy-json"
          36  +
version = "0.61.7"
          37  +
          38  +
[dependencies.aws-smithy-runtime]
          39  +
path = "../aws-smithy-runtime"
          40  +
features = ["client"]
          41  +
version = "1.9.4"
          42  +
          43  +
[dependencies.aws-smithy-runtime-api]
          44  +
path = "../aws-smithy-runtime-api"
          45  +
features = ["client", "http-02x"]
          46  +
version = "1.9.2"
          47  +
          48  +
[dependencies.aws-smithy-types]
          49  +
path = "../aws-smithy-types"
          50  +
version = "1.3.4"
          51  +
          52  +
[dependencies.aws-types]
          53  +
path = "../aws-types"
          54  +
version = "1.3.10"
          55  +
          56  +
[dependencies.bytes]
          57  +
version = "1.4.0"
          58  +
          59  +
[dependencies.fastrand]
          60  +
version = "2.0.0"
          61  +
          62  +
[dependencies.http]
          63  +
version = "0.2.9"
          64  +
          65  +
[dependencies.regex-lite]
          66  +
version = "0.1.5"
          67  +
          68  +
[dependencies.tracing]
          69  +
version = "0.1"
          70  +
[dev-dependencies.aws-config]
          71  +
path = "../aws-config"
          72  +
version = "1.8.10"
          73  +
          74  +
[dev-dependencies.aws-credential-types]
          75  +
path = "../aws-credential-types"
          76  +
features = ["test-util"]
          77  +
version = "1.2.9"
          78  +
          79  +
[dev-dependencies.aws-runtime]
          80  +
path = "../aws-runtime"
          81  +
features = ["test-util"]
          82  +
version = "1.5.13"
          83  +
          84  +
[dev-dependencies.aws-smithy-async]
          85  +
path = "../aws-smithy-async"
          86  +
features = ["test-util"]
          87  +
version = "1.2.6"
          88  +
          89  +
[dev-dependencies.aws-smithy-http-client]
          90  +
path = "../aws-smithy-http-client"
          91  +
features = ["test-util", "wire-mock"]
          92  +
version = "1.1.4"
          93  +
          94  +
[dev-dependencies.aws-smithy-protocol-test]
          95  +
path = "../aws-smithy-protocol-test"
          96  +
version = "0.63.6"
          97  +
          98  +
[dev-dependencies.aws-smithy-runtime]
          99  +
path = "../aws-smithy-runtime"
         100  +
features = ["test-util"]
         101  +
version = "1.9.4"
         102  +
         103  +
[dev-dependencies.aws-smithy-runtime-api]
         104  +
path = "../aws-smithy-runtime-api"
         105  +
features = ["test-util"]
         106  +
version = "1.9.2"
         107  +
         108  +
[dev-dependencies.aws-smithy-types]
         109  +
path = "../aws-smithy-types"
         110  +
features = ["test-util"]
         111  +
version = "1.3.4"
         112  +
         113  +
[dev-dependencies.futures-util]
         114  +
version = "0.3.25"
         115  +
features = ["alloc"]
         116  +
default-features = false
         117  +
         118  +
[dev-dependencies.http-1x]
         119  +
version = "1"
         120  +
package = "http"
         121  +
         122  +
[dev-dependencies.serde_json]
         123  +
version = "1.0.0"
         124  +
         125  +
[dev-dependencies.tokio]
         126  +
version = "1.23.1"
         127  +
features = ["macros", "test-util", "rt-multi-thread"]
         128  +
         129  +
[dev-dependencies.tracing-subscriber]
         130  +
version = "0.3.16"
         131  +
features = ["env-filter", "json"]
         132  +
         133  +
[features]
         134  +
behavior-version-latest = []
         135  +
rustls = ["aws-smithy-runtime/tls-rustls"]
         136  +
default-https-client = ["aws-smithy-runtime/default-https-client"]
         137  +
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
         138  +
test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"]
         139  +
gated-tests = []
         140  +
default = ["rustls", "default-https-client", "rt-tokio"]

tmp-codegen-diff/aws-sdk/sdk/qldbsession/LICENSE

@@ -0,1 +0,202 @@
           1  +
                                Apache License
           2  +
                           Version 2.0, January 2004
           3  +
                        http://www.apache.org/licenses/
           4  +
           5  +
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
           6  +
           7  +
   1. Definitions.
           8  +
           9  +
      "License" shall mean the terms and conditions for use, reproduction,
          10  +
      and distribution as defined by Sections 1 through 9 of this document.
          11  +
          12  +
      "Licensor" shall mean the copyright owner or entity authorized by
          13  +
      the copyright owner that is granting the License.
          14  +
          15  +
      "Legal Entity" shall mean the union of the acting entity and all
          16  +
      other entities that control, are controlled by, or are under common
          17  +
      control with that entity. For the purposes of this definition,
          18  +
      "control" means (i) the power, direct or indirect, to cause the
          19  +
      direction or management of such entity, whether by contract or
          20  +
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
          21  +
      outstanding shares, or (iii) beneficial ownership of such entity.
          22  +
          23  +
      "You" (or "Your") shall mean an individual or Legal Entity
          24  +
      exercising permissions granted by this License.
          25  +
          26  +
      "Source" form shall mean the preferred form for making modifications,
          27  +
      including but not limited to software source code, documentation
          28  +
      source, and configuration files.
          29  +
          30  +
      "Object" form shall mean any form resulting from mechanical
          31  +
      transformation or translation of a Source form, including but
          32  +
      not limited to compiled object code, generated documentation,
          33  +
      and conversions to other media types.
          34  +
          35  +
      "Work" shall mean the work of authorship, whether in Source or
          36  +
      Object form, made available under the License, as indicated by a
          37  +
      copyright notice that is included in or attached to the work
          38  +
      (an example is provided in the Appendix below).
          39  +
          40  +
      "Derivative Works" shall mean any work, whether in Source or Object
          41  +
      form, that is based on (or derived from) the Work and for which the
          42  +
      editorial revisions, annotations, elaborations, or other modifications
          43  +
      represent, as a whole, an original work of authorship. For the purposes
          44  +
      of this License, Derivative Works shall not include works that remain
          45  +
      separable from, or merely link (or bind by name) to the interfaces of,
          46  +
      the Work and Derivative Works thereof.
          47  +
          48  +
      "Contribution" shall mean any work of authorship, including
          49  +
      the original version of the Work and any modifications or additions
          50  +
      to that Work or Derivative Works thereof, that is intentionally
          51  +
      submitted to Licensor for inclusion in the Work by the copyright owner
          52  +
      or by an individual or Legal Entity authorized to submit on behalf of
          53  +
      the copyright owner. For the purposes of this definition, "submitted"
          54  +
      means any form of electronic, verbal, or written communication sent
          55  +
      to the Licensor or its representatives, including but not limited to
          56  +
      communication on electronic mailing lists, source code control systems,
          57  +
      and issue tracking systems that are managed by, or on behalf of, the
          58  +
      Licensor for the purpose of discussing and improving the Work, but
          59  +
      excluding communication that is conspicuously marked or otherwise
          60  +
      designated in writing by the copyright owner as "Not a Contribution."
          61  +
          62  +
      "Contributor" shall mean Licensor and any individual or Legal Entity
          63  +
      on behalf of whom a Contribution has been received by Licensor and
          64  +
      subsequently incorporated within the Work.
          65  +
          66  +
   2. Grant of Copyright License. Subject to the terms and conditions of
          67  +
      this License, each Contributor hereby grants to You a perpetual,
          68  +
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          69  +
      copyright license to reproduce, prepare Derivative Works of,
          70  +
      publicly display, publicly perform, sublicense, and distribute the
          71  +
      Work and such Derivative Works in Source or Object form.
          72  +
          73  +
   3. Grant of Patent License. Subject to the terms and conditions of
          74  +
      this License, each Contributor hereby grants to You a perpetual,
          75  +
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          76  +
      (except as stated in this section) patent license to make, have made,
          77  +
      use, offer to sell, sell, import, and otherwise transfer the Work,
          78  +
      where such license applies only to those patent claims licensable
          79  +
      by such Contributor that are necessarily infringed by their
          80  +
      Contribution(s) alone or by combination of their Contribution(s)
          81  +
      with the Work to which such Contribution(s) was submitted. If You
          82  +
      institute patent litigation against any entity (including a
          83  +
      cross-claim or counterclaim in a lawsuit) alleging that the Work
          84  +
      or a Contribution incorporated within the Work constitutes direct
          85  +
      or contributory patent infringement, then any patent licenses
          86  +
      granted to You under this License for that Work shall terminate
          87  +
      as of the date such litigation is filed.
          88  +
          89  +
   4. Redistribution. You may reproduce and distribute copies of the
          90  +
      Work or Derivative Works thereof in any medium, with or without
          91  +
      modifications, and in Source or Object form, provided that You
          92  +
      meet the following conditions:
          93  +
          94  +
      (a) You must give any other recipients of the Work or
          95  +
          Derivative Works a copy of this License; and
          96  +
          97  +
      (b) You must cause any modified files to carry prominent notices
          98  +
          stating that You changed the files; and
          99  +
         100  +
      (c) You must retain, in the Source form of any Derivative Works
         101  +
          that You distribute, all copyright, patent, trademark, and
         102  +
          attribution notices from the Source form of the Work,
         103  +
          excluding those notices that do not pertain to any part of
         104  +
          the Derivative Works; and
         105  +
         106  +
      (d) If the Work includes a "NOTICE" text file as part of its
         107  +
          distribution, then any Derivative Works that You distribute must
         108  +
          include a readable copy of the attribution notices contained
         109  +
          within such NOTICE file, excluding those notices that do not
         110  +
          pertain to any part of the Derivative Works, in at least one
         111  +
          of the following places: within a NOTICE text file distributed
         112  +
          as part of the Derivative Works; within the Source form or
         113  +
          documentation, if provided along with the Derivative Works; or,
         114  +
          within a display generated by the Derivative Works, if and
         115  +
          wherever such third-party notices normally appear. The contents
         116  +
          of the NOTICE file are for informational purposes only and
         117  +
          do not modify the License. You may add Your own attribution
         118  +
          notices within Derivative Works that You distribute, alongside
         119  +
          or as an addendum to the NOTICE text from the Work, provided
         120  +
          that such additional attribution notices cannot be construed
         121  +
          as modifying the License.
         122  +
         123  +
      You may add Your own copyright statement to Your modifications and
         124  +
      may provide additional or different license terms and conditions
         125  +
      for use, reproduction, or distribution of Your modifications, or
         126  +
      for any such Derivative Works as a whole, provided Your use,
         127  +
      reproduction, and distribution of the Work otherwise complies with
         128  +
      the conditions stated in this License.
         129  +
         130  +
   5. Submission of Contributions. Unless You explicitly state otherwise,
         131  +
      any Contribution intentionally submitted for inclusion in the Work
         132  +
      by You to the Licensor shall be under the terms and conditions of
         133  +
      this License, without any additional terms or conditions.
         134  +
      Notwithstanding the above, nothing herein shall supersede or modify
         135  +
      the terms of any separate license agreement you may have executed
         136  +
      with Licensor regarding such Contributions.
         137  +
         138  +
   6. Trademarks. This License does not grant permission to use the trade
         139  +
      names, trademarks, service marks, or product names of the Licensor,
         140  +
      except as required for reasonable and customary use in describing the
         141  +
      origin of the Work and reproducing the content of the NOTICE file.
         142  +
         143  +
   7. Disclaimer of Warranty. Unless required by applicable law or
         144  +
      agreed to in writing, Licensor provides the Work (and each
         145  +
      Contributor provides its Contributions) on an "AS IS" BASIS,
         146  +
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
         147  +
      implied, including, without limitation, any warranties or conditions
         148  +
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
         149  +
      PARTICULAR PURPOSE. You are solely responsible for determining the
         150  +
      appropriateness of using or redistributing the Work and assume any
         151  +
      risks associated with Your exercise of permissions under this License.
         152  +
         153  +
   8. Limitation of Liability. In no event and under no legal theory,
         154  +
      whether in tort (including negligence), contract, or otherwise,
         155  +
      unless required by applicable law (such as deliberate and grossly
         156  +
      negligent acts) or agreed to in writing, shall any Contributor be
         157  +
      liable to You for damages, including any direct, indirect, special,
         158  +
      incidental, or consequential damages of any character arising as a
         159  +
      result of this License or out of the use or inability to use the
         160  +
      Work (including but not limited to damages for loss of goodwill,
         161  +
      work stoppage, computer failure or malfunction, or any and all
         162  +
      other commercial damages or losses), even if such Contributor
         163  +
      has been advised of the possibility of such damages.
         164  +
         165  +
   9. Accepting Warranty or Additional Liability. While redistributing
         166  +
      the Work or Derivative Works thereof, You may choose to offer,
         167  +
      and charge a fee for, acceptance of support, warranty, indemnity,
         168  +
      or other liability obligations and/or rights consistent with this
         169  +
      License. However, in accepting such obligations, You may act only
         170  +
      on Your own behalf and on Your sole responsibility, not on behalf
         171  +
      of any other Contributor, and only if You agree to indemnify,
         172  +
      defend, and hold each Contributor harmless for any liability
         173  +
      incurred by, or claims asserted against, such Contributor by reason
         174  +
      of your accepting any such warranty or additional liability.
         175  +
         176  +
   END OF TERMS AND CONDITIONS
         177  +
         178  +
   APPENDIX: How to apply the Apache License to your work.
         179  +
         180  +
      To apply the Apache License to your work, attach the following
         181  +
      boilerplate notice, with the fields enclosed by brackets "{}"
         182  +
      replaced with your own identifying information. (Don't include
         183  +
      the brackets!)  The text should be enclosed in the appropriate
         184  +
      comment syntax for the file format. We also recommend that a
         185  +
      file or class name and description of purpose be included on the
         186  +
      same "printed page" as the copyright notice for easier
         187  +
      identification within third-party archives.
         188  +
         189  +
   Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
         190  +
         191  +
   Licensed under the Apache License, Version 2.0 (the "License");
         192  +
   you may not use this file except in compliance with the License.
         193  +
   You may obtain a copy of the License at
         194  +
         195  +
       http://www.apache.org/licenses/LICENSE-2.0
         196  +
         197  +
   Unless required by applicable law or agreed to in writing, software
         198  +
   distributed under the License is distributed on an "AS IS" BASIS,
         199  +
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         200  +
   See the License for the specific language governing permissions and
         201  +
   limitations under the License.
         202  +

tmp-codegen-diff/aws-sdk/sdk/qldbsession/README.md

@@ -0,1 +0,56 @@
           1  +
# aws-sdk-qldbsession
           2  +
           3  +
The transactional data APIs for Amazon QLDB
           4  +
           5  +
## Getting Started
           6  +
           7  +
> Examples are available for many services and operations, check out the
           8  +
> [usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1).
           9  +
          10  +
The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
          11  +
as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-qldbsession` to
          12  +
your project, add the following to your **Cargo.toml** file:
          13  +
          14  +
```toml
          15  +
[dependencies]
          16  +
aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
          17  +
aws-sdk-qldbsession = "0.0.0-local"
          18  +
tokio = { version = "1", features = ["full"] }
          19  +
```
          20  +
          21  +
Then in code, a client can be created with the following:
          22  +
          23  +
```rust,no_run
          24  +
use aws_sdk_qldbsession as qldbsession;
          25  +
          26  +
#[::tokio::main]
          27  +
async fn main() -> Result<(), qldbsession::Error> {
          28  +
    let config = aws_config::load_from_env().await;
          29  +
    let client = aws_sdk_qldbsession::Client::new(&config);
          30  +
          31  +
    // ... make some calls with the client
          32  +
          33  +
    Ok(())
          34  +
}
          35  +
```
          36  +
          37  +
See the [client documentation](https://docs.rs/aws-sdk-qldbsession/latest/aws_sdk_qldbsession/client/struct.Client.html)
          38  +
for information on what calls can be made, and the inputs and outputs for each of those calls.
          39  +
          40  +
## Using the SDK
          41  +
          42  +
Until the SDK is released, we will be adding information about using the SDK to the
          43  +
[Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
          44  +
additional sections for the guide by opening an issue and describing what you are trying to do.
          45  +
          46  +
## Getting Help
          47  +
          48  +
* [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
          49  +
* [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
          50  +
* [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
          51  +
* [Usage examples](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/rustv1)
          52  +
          53  +
## License
          54  +
          55  +
This project is licensed under the Apache-2.0 License.
          56  +

tmp-codegen-diff/aws-sdk/sdk/qldbsession/src/client.rs

@@ -0,1 +0,166 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[derive(Debug)]
           3  +
pub(crate) struct Handle {
           4  +
    pub(crate) conf: crate::Config,
           5  +
    #[allow(dead_code)] // unused when a service does not provide any operations
           6  +
    pub(crate) runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
           7  +
}
           8  +
           9  +
/// Client for Amazon QLDB Session
          10  +
///
          11  +
/// Client for invoking operations on Amazon QLDB Session. Each operation on Amazon QLDB Session is a method on this
          12  +
/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service.
          13  +
/// ## Constructing a `Client`
          14  +
///
          15  +
/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
          16  +
/// crate should be used to automatically resolve this config using
          17  +
/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
          18  +
/// across multiple different AWS SDK clients. This config resolution process can be customized
          19  +
/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
          20  +
/// the [builder pattern] to customize the default config.
          21  +
///
          22  +
/// In the simplest case, creating a client looks as follows:
          23  +
/// ```rust,no_run
          24  +
/// # async fn wrapper() {
          25  +
/// let config = aws_config::load_from_env().await;
          26  +
/// let client = aws_sdk_qldbsession::Client::new(&config);
          27  +
/// # }
          28  +
/// ```
          29  +
///
          30  +
/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that
          31  +
/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
          32  +
/// The [`Builder`](crate::config::Builder) struct implements `From<&SdkConfig>`, so setting these specific settings can be
          33  +
/// done as follows:
          34  +
///
          35  +
/// ```rust,no_run
          36  +
/// # async fn wrapper() {
          37  +
/// let sdk_config = ::aws_config::load_from_env().await;
          38  +
/// let config = aws_sdk_qldbsession::config::Builder::from(&sdk_config)
          39  +
/// # /*
          40  +
///     .some_service_specific_setting("value")
          41  +
/// # */
          42  +
///     .build();
          43  +
/// # }
          44  +
/// ```
          45  +
///
          46  +
/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
          47  +
///
          48  +
/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
          49  +
/// be done once at application start-up.
          50  +
///
          51  +
/// [`Config`]: crate::Config
          52  +
/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
          53  +
/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
          54  +
/// [`aws-config` docs]: https://docs.rs/aws-config/*
          55  +
/// [`aws-config`]: https://crates.io/crates/aws-config
          56  +
/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
          57  +
/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
          58  +
/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
          59  +
/// # Using the `Client`
          60  +
///
          61  +
/// A client has a function for every operation that can be performed by the service.
          62  +
/// For example, the [`SendCommand`](crate::operation::send_command) operation has
          63  +
/// a [`Client::send_command`], function which returns a builder for that operation.
          64  +
/// The fluent builder ultimately has a `send()` function that returns an async future that
          65  +
/// returns a result, as illustrated below:
          66  +
///
          67  +
/// ```rust,ignore
          68  +
/// let result = client.send_command()
          69  +
///     .session_token("example")
          70  +
///     .send()
          71  +
///     .await;
          72  +
/// ```
          73  +
///
          74  +
/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
          75  +
/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
          76  +
/// information.
          77  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          78  +
pub struct Client {
          79  +
    handle: ::std::sync::Arc<Handle>,
          80  +
}
          81  +
          82  +
impl Client {
          83  +
    /// Creates a new client from the service [`Config`](crate::Config).
          84  +
    ///
          85  +
    /// # Panics
          86  +
    ///
          87  +
    /// This method will panic in the following cases:
          88  +
    ///
          89  +
    /// - Retries or timeouts are enabled without a `sleep_impl` configured.
          90  +
    /// - Identity caching is enabled without a `sleep_impl` and `time_source` configured.
          91  +
    /// - No `behavior_version` is provided.
          92  +
    ///
          93  +
    /// The panic message for each of these will have instructions on how to resolve them.
          94  +
    #[track_caller]
          95  +
    pub fn from_conf(conf: crate::Config) -> Self {
          96  +
        let handle = Handle {
          97  +
            conf: conf.clone(),
          98  +
            runtime_plugins: crate::config::base_client_runtime_plugins(conf),
          99  +
        };
         100  +
        if let Err(err) = Self::validate_config(&handle) {
         101  +
            panic!("Invalid client configuration: {err}");
         102  +
        }
         103  +
        Self {
         104  +
            handle: ::std::sync::Arc::new(handle),
         105  +
        }
         106  +
    }
         107  +
         108  +
    /// Returns the client's configuration.
         109  +
    pub fn config(&self) -> &crate::Config {
         110  +
        &self.handle.conf
         111  +
    }
         112  +
         113  +
    fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         114  +
        let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         115  +
        handle
         116  +
            .runtime_plugins
         117  +
            .apply_client_configuration(&mut cfg)?
         118  +
            .validate_base_client_config(&cfg)?;
         119  +
        Ok(())
         120  +
    }
         121  +
}
         122  +
         123  +
impl Client {
         124  +
    /// Creates a new client from an [SDK Config](::aws_types::sdk_config::SdkConfig).
         125  +
    ///
         126  +
    /// # Panics
         127  +
    ///
         128  +
    /// - This method will panic if the `sdk_config` is missing an async sleep implementation. If you experience this panic, set
         129  +
    ///   the `sleep_impl` on the Config passed into this function to fix it.
         130  +
    /// - This method will panic if the `sdk_config` is missing an HTTP connector. If you experience this panic, set the
         131  +
    ///   `http_connector` on the Config passed into this function to fix it.
         132  +
    /// - This method will panic if no `BehaviorVersion` is provided. If you experience this panic, set `behavior_version` on the Config or enable the `behavior-version-latest` Cargo feature.
         133  +
    #[track_caller]
         134  +
    pub fn new(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
         135  +
        Self::from_conf(sdk_config.into())
         136  +
    }
         137  +
}
         138  +
         139  +
/// Operation customization and supporting types.
         140  +
///
         141  +
/// The underlying HTTP requests made during an operation can be customized
         142  +
/// by calling the `customize()` method on the builder returned from a client
         143  +
/// operation call. For example, this can be used to add an additional HTTP header:
         144  +
///
         145  +
/// ```ignore
         146  +
/// # async fn wrapper() -> ::std::result::Result<(), aws_sdk_qldbsession::Error> {
         147  +
/// # let client: aws_sdk_qldbsession::Client = unimplemented!();
         148  +
/// use ::http::header::{HeaderName, HeaderValue};
         149  +
///
         150  +
/// let result = client.send_command()
         151  +
///     .customize()
         152  +
///     .mutate_request(|req| {
         153  +
///         // Add `x-example-header` with value
         154  +
///         req.headers_mut()
         155  +
///             .insert(
         156  +
///                 HeaderName::from_static("x-example-header"),
         157  +
///                 HeaderValue::from_static("1"),
         158  +
///             );
         159  +
///     })
         160  +
///     .send()
         161  +
///     .await;
         162  +
/// # }
         163  +
/// ```
         164  +
pub mod customize;
         165  +
         166  +
mod send_command;

tmp-codegen-diff/aws-sdk/sdk/qldbsession/src/client/customize.rs

@@ -0,1 +0,114 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// `CustomizableOperation` allows for configuring a single operation invocation before it is sent.
           4  +
pub struct CustomizableOperation<T, E, B> {
           5  +
    customizable_send: B,
           6  +
    config_override: ::std::option::Option<crate::config::Builder>,
           7  +
    interceptors: Vec<::aws_smithy_runtime_api::client::interceptors::SharedInterceptor>,
           8  +
    runtime_plugins: Vec<::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin>,
           9  +
    _output: ::std::marker::PhantomData<T>,
          10  +
    _error: ::std::marker::PhantomData<E>,
          11  +
}
          12  +
          13  +
impl<T, E, B> CustomizableOperation<T, E, B> {
          14  +
    /// Creates a new `CustomizableOperation` from `customizable_send`.
          15  +
    #[allow(dead_code)] // unused when a service does not provide any operations
          16  +
    pub(crate) fn new(customizable_send: B) -> Self {
          17  +
        Self {
          18  +
            customizable_send,
          19  +
            config_override: ::std::option::Option::None,
          20  +
            interceptors: vec![],
          21  +
            runtime_plugins: vec![],
          22  +
            _output: ::std::marker::PhantomData,
          23  +
            _error: ::std::marker::PhantomData,
          24  +
        }
          25  +
    }
          26  +
          27  +
    pub(crate) fn execute<U>(self, f: impl ::std::ops::FnOnce(B, crate::config::Builder) -> U) -> U {
          28  +
        let mut config_override = self.config_override.unwrap_or_default();
          29  +
        self.interceptors.into_iter().for_each(|interceptor| {
          30  +
            config_override.push_interceptor(interceptor);
          31  +
        });
          32  +
        self.runtime_plugins.into_iter().for_each(|plugin| {
          33  +
            config_override.push_runtime_plugin(plugin);
          34  +
        });
          35  +
        f(self.customizable_send, config_override)
          36  +
    }
          37  +
          38  +
    /// Adds an [interceptor](::aws_smithy_runtime_api::client::interceptors::Intercept) that runs at specific stages of the request execution pipeline.
          39  +
    ///
          40  +
    /// Note that interceptors can also be added to `CustomizableOperation` by `config_override`,
          41  +
    /// `map_request`, and `mutate_request` (the last two are implemented via interceptors under the hood).
          42  +
    /// The order in which those user-specified operation interceptors are invoked should not be relied upon
          43  +
    /// as it is an implementation detail.
          44  +
    pub fn interceptor(mut self, interceptor: impl ::aws_smithy_runtime_api::client::interceptors::Intercept + 'static) -> Self {
          45  +
        self.interceptors
          46  +
            .push(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::new(interceptor));
          47  +
        self
          48  +
    }
          49  +
          50  +
    /// Adds a runtime plugin.
          51  +
    #[allow(unused)]
          52  +
    pub(crate) fn runtime_plugin(mut self, runtime_plugin: impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin + 'static) -> Self {
          53  +
        self.runtime_plugins
          54  +
            .push(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(runtime_plugin));
          55  +
        self
          56  +
    }
          57  +
          58  +
    /// Allows for customizing the operation's request.
          59  +
    pub fn map_request<F, MapE>(mut self, f: F) -> Self
          60  +
    where
          61  +
        F: ::std::ops::Fn(
          62  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpRequest,
          63  +
            ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, MapE>
          64  +
            + ::std::marker::Send
          65  +
            + ::std::marker::Sync
          66  +
            + 'static,
          67  +
        MapE: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
          68  +
    {
          69  +
        self.interceptors
          70  +
            .push(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::new(
          71  +
                ::aws_smithy_runtime::client::interceptors::MapRequestInterceptor::new(f),
          72  +
            ));
          73  +
        self
          74  +
    }
          75  +
          76  +
    /// Convenience for `map_request` where infallible direct mutation of request is acceptable.
          77  +
    pub fn mutate_request<F>(mut self, f: F) -> Self
          78  +
    where
          79  +
        F: ::std::ops::Fn(&mut ::aws_smithy_runtime_api::client::orchestrator::HttpRequest) + ::std::marker::Send + ::std::marker::Sync + 'static,
          80  +
    {
          81  +
        self.interceptors
          82  +
            .push(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::new(
          83  +
                ::aws_smithy_runtime::client::interceptors::MutateRequestInterceptor::new(f),
          84  +
            ));
          85  +
        self
          86  +
    }
          87  +
          88  +
    /// Overrides config for a single operation invocation.
          89  +
    ///
          90  +
    /// `config_override` is applied to the operation configuration level.
          91  +
    /// The fields in the builder that are `Some` override those applied to the service
          92  +
    /// configuration level. For instance,
          93  +
    ///
          94  +
    /// | Config A           | overridden by Config B | = Config C         |
          95  +
    /// |--------------------|------------------------|--------------------|
          96  +
    /// | field_1: None,     | field_1: Some(v2),     | field_1: Some(v2), |
          97  +
    /// | field_2: Some(v1), | field_2: Some(v2),     | field_2: Some(v2), |
          98  +
    /// | field_3: Some(v1), | field_3: None,         | field_3: Some(v1), |
          99  +
    pub fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         100  +
        self.config_override = Some(config_override.into());
         101  +
        self
         102  +
    }
         103  +
         104  +
    /// Sends the request and returns the response.
         105  +
    pub async fn send(self) -> crate::client::customize::internal::SendResult<T, E>
         106  +
    where
         107  +
        E: std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
         108  +
        B: crate::client::customize::internal::CustomizableSend<T, E>,
         109  +
    {
         110  +
        self.execute(|sender, config| sender.send(config)).await
         111  +
    }
         112  +
}
         113  +
         114  +
pub(crate) mod internal;

tmp-codegen-diff/aws-sdk/sdk/qldbsession/src/client/customize/internal.rs

@@ -0,1 +0,12 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub type BoxFuture<T> = ::std::pin::Pin<::std::boxed::Box<dyn ::std::future::Future<Output = T> + ::std::marker::Send>>;
           3  +
           4  +
pub type SendResult<T, E> =
           5  +
    ::std::result::Result<T, ::aws_smithy_runtime_api::client::result::SdkError<E, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>>;
           6  +
           7  +
pub trait CustomizableSend<T, E>: ::std::marker::Send + ::std::marker::Sync {
           8  +
    // Takes an owned `self` as the implementation will internally call methods that take `self`.
           9  +
    // If it took `&self`, that would make this trait object safe, but some implementing types do not
          10  +
    // derive `Clone`, unable to yield `self` from `&self`.
          11  +
    fn send(self, config_override: crate::config::Builder) -> BoxFuture<SendResult<T, E>>;
          12  +
}

tmp-codegen-diff/aws-sdk/sdk/qldbsession/src/client/send_command.rs

@@ -0,1 +0,26 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`SendCommand`](crate::operation::send_command::builders::SendCommandFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`session_token(impl Into<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::session_token) / [`set_session_token(Option<String>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_session_token):<br>required: **false**<br><p>Specifies the session token for the current command. A session token is constant throughout the life of the session.</p> <p>To obtain a session token, run the <code>StartSession</code> command. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p><br>
           7  +
    ///   - [`start_session(StartSessionRequest)`](crate::operation::send_command::builders::SendCommandFluentBuilder::start_session) / [`set_start_session(Option<StartSessionRequest>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_start_session):<br>required: **false**<br><p>Command to start a new session. A session token is obtained as part of the response.</p><br>
           8  +
    ///   - [`start_transaction(StartTransactionRequest)`](crate::operation::send_command::builders::SendCommandFluentBuilder::start_transaction) / [`set_start_transaction(Option<StartTransactionRequest>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_start_transaction):<br>required: **false**<br><p>Command to start a new transaction.</p><br>
           9  +
    ///   - [`end_session(EndSessionRequest)`](crate::operation::send_command::builders::SendCommandFluentBuilder::end_session) / [`set_end_session(Option<EndSessionRequest>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_end_session):<br>required: **false**<br><p>Command to end the current session.</p><br>
          10  +
    ///   - [`commit_transaction(CommitTransactionRequest)`](crate::operation::send_command::builders::SendCommandFluentBuilder::commit_transaction) / [`set_commit_transaction(Option<CommitTransactionRequest>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_commit_transaction):<br>required: **false**<br><p>Command to commit the specified transaction.</p><br>
          11  +
    ///   - [`abort_transaction(AbortTransactionRequest)`](crate::operation::send_command::builders::SendCommandFluentBuilder::abort_transaction) / [`set_abort_transaction(Option<AbortTransactionRequest>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_abort_transaction):<br>required: **false**<br><p>Command to abort the current transaction.</p><br>
          12  +
    ///   - [`execute_statement(ExecuteStatementRequest)`](crate::operation::send_command::builders::SendCommandFluentBuilder::execute_statement) / [`set_execute_statement(Option<ExecuteStatementRequest>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_execute_statement):<br>required: **false**<br><p>Command to execute a statement in the specified transaction.</p><br>
          13  +
    ///   - [`fetch_page(FetchPageRequest)`](crate::operation::send_command::builders::SendCommandFluentBuilder::fetch_page) / [`set_fetch_page(Option<FetchPageRequest>)`](crate::operation::send_command::builders::SendCommandFluentBuilder::set_fetch_page):<br>required: **false**<br><p>Command to fetch a page.</p><br>
          14  +
    /// - On success, responds with [`SendCommandOutput`](crate::operation::send_command::SendCommandOutput) with field(s):
          15  +
    ///   - [`start_session(Option<StartSessionResult>)`](crate::operation::send_command::SendCommandOutput::start_session): <p>Contains the details of the started session that includes a session token. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>
          16  +
    ///   - [`start_transaction(Option<StartTransactionResult>)`](crate::operation::send_command::SendCommandOutput::start_transaction): <p>Contains the details of the started transaction.</p>
          17  +
    ///   - [`end_session(Option<EndSessionResult>)`](crate::operation::send_command::SendCommandOutput::end_session): <p>Contains the details of the ended session.</p>
          18  +
    ///   - [`commit_transaction(Option<CommitTransactionResult>)`](crate::operation::send_command::SendCommandOutput::commit_transaction): <p>Contains the details of the committed transaction.</p>
          19  +
    ///   - [`abort_transaction(Option<AbortTransactionResult>)`](crate::operation::send_command::SendCommandOutput::abort_transaction): <p>Contains the details of the aborted transaction.</p>
          20  +
    ///   - [`execute_statement(Option<ExecuteStatementResult>)`](crate::operation::send_command::SendCommandOutput::execute_statement): <p>Contains the details of the executed statement.</p>
          21  +
    ///   - [`fetch_page(Option<FetchPageResult>)`](crate::operation::send_command::SendCommandOutput::fetch_page): <p>Contains the details of the fetched page.</p>
          22  +
    /// - On failure, responds with [`SdkError<SendCommandError>`](crate::operation::send_command::SendCommandError)
          23  +
    pub fn send_command(&self) -> crate::operation::send_command::builders::SendCommandFluentBuilder {
          24  +
        crate::operation::send_command::builders::SendCommandFluentBuilder::new(self.handle.clone())
          25  +
    }
          26  +
}

tmp-codegen-diff/aws-sdk/sdk/qldbsession/src/config.rs

@@ -0,1 +0,1553 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#![allow(clippy::empty_line_after_doc_comments)]
           3  +
/// Configuration for a aws_sdk_qldbsession service client.
           4  +
///
           5  +
/// Service configuration allows for customization of endpoints, region, credentials providers,
           6  +
/// and retry configuration. Generally, it is constructed automatically for you from a shared
           7  +
/// configuration loaded by the `aws-config` crate. For example:
           8  +
///
           9  +
/// ```ignore
          10  +
/// // Load a shared config from the environment
          11  +
/// let shared_config = aws_config::from_env().load().await;
          12  +
/// // The client constructor automatically converts the shared config into the service config
          13  +
/// let client = Client::new(&shared_config);
          14  +
/// ```
          15  +
///
          16  +
/// The service config can also be constructed manually using its builder.
          17  +
///
          18  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          19  +
pub struct Config {
          20  +
    // Both `config` and `cloneable` are the same config, but the cloneable one
          21  +
    // is kept around so that it is possible to convert back into a builder. This can be
          22  +
    // optimized in the future.
          23  +
    pub(crate) config: crate::config::FrozenLayer,
          24  +
    cloneable: ::aws_smithy_types::config_bag::CloneableLayer,
          25  +
    pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder,
          26  +
    pub(crate) runtime_plugins: ::std::vec::Vec<crate::config::SharedRuntimePlugin>,
          27  +
    pub(crate) behavior_version: ::std::option::Option<crate::config::BehaviorVersion>,
          28  +
}
          29  +
impl Config {
          30  +
    ///
          31  +
    /// Constructs a config builder.
          32  +
    /// <div class="warning">
          33  +
    /// Note that a config created from this builder will not have the same safe defaults as one created by
          34  +
    /// the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
          35  +
    /// </div>
          36  +
    ///
          37  +
    pub fn builder() -> Builder {
          38  +
        Builder::default()
          39  +
    }
          40  +
    /// Converts this config back into a builder so that it can be tweaked.
          41  +
    pub fn to_builder(&self) -> Builder {
          42  +
        Builder {
          43  +
            config: self.cloneable.clone(),
          44  +
            runtime_components: self.runtime_components.clone(),
          45  +
            runtime_plugins: self.runtime_plugins.clone(),
          46  +
            behavior_version: self.behavior_version,
          47  +
        }
          48  +
    }
          49  +
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
          50  +
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
          51  +
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
          52  +
    }
          53  +
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
          54  +
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
          55  +
        self.runtime_components.http_client()
          56  +
    }
          57  +
    /// Return the auth schemes configured on this service config
          58  +
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
          59  +
        self.runtime_components.auth_schemes()
          60  +
    }
          61  +
          62  +
    /// Return the auth scheme resolver configured on this service config
          63  +
    pub fn auth_scheme_resolver(&self) -> ::std::option::Option<::aws_smithy_runtime_api::client::auth::SharedAuthSchemeOptionResolver> {
          64  +
        self.runtime_components.auth_scheme_option_resolver()
          65  +
    }
          66  +
    /// Returns the configured auth scheme preference
          67  +
    pub fn auth_scheme_preference(&self) -> ::std::option::Option<&::aws_smithy_runtime_api::client::auth::AuthSchemePreference> {
          68  +
        self.config.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>()
          69  +
    }
          70  +
    /// Returns the endpoint resolver.
          71  +
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
          72  +
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
          73  +
    }
          74  +
    /// Return a reference to the retry configuration contained in this config, if any.
          75  +
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
          76  +
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
          77  +
    }
          78  +
          79  +
    /// Return a cloned shared async sleep implementation from this config, if any.
          80  +
    pub fn sleep_impl(&self) -> ::std::option::Option<crate::config::SharedAsyncSleep> {
          81  +
        self.runtime_components.sleep_impl()
          82  +
    }
          83  +
          84  +
    /// Return a reference to the timeout configuration contained in this config, if any.
          85  +
    pub fn timeout_config(&self) -> ::std::option::Option<&::aws_smithy_types::timeout::TimeoutConfig> {
          86  +
        self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>()
          87  +
    }
          88  +
          89  +
    /// Returns a reference to the retry partition contained in this config, if any.
          90  +
    ///
          91  +
    /// WARNING: This method is unstable and may be removed at any time. Do not rely on this
          92  +
    /// method for anything!
          93  +
    pub fn retry_partition(&self) -> ::std::option::Option<&::aws_smithy_runtime::client::retries::RetryPartition> {
          94  +
        self.config.load::<::aws_smithy_runtime::client::retries::RetryPartition>()
          95  +
    }
          96  +
    /// Returns the configured identity cache for auth.
          97  +
    pub fn identity_cache(&self) -> ::std::option::Option<crate::config::SharedIdentityCache> {
          98  +
        self.runtime_components.identity_cache()
          99  +
    }
         100  +
    /// Returns interceptors currently registered by the user.
         101  +
    pub fn interceptors(&self) -> impl Iterator<Item = crate::config::SharedInterceptor> + '_ {
         102  +
        self.runtime_components.interceptors()
         103  +
    }
         104  +
    /// Return time source used for this service.
         105  +
    pub fn time_source(&self) -> ::std::option::Option<::aws_smithy_async::time::SharedTimeSource> {
         106  +
        self.runtime_components.time_source()
         107  +
    }
         108  +
    /// Returns retry classifiers currently registered by the user.
         109  +
    pub fn retry_classifiers(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier> + '_ {
         110  +
        self.runtime_components.retry_classifiers()
         111  +
    }
         112  +
    /// Returns the name of the app that is using the client, if it was provided.
         113  +
    ///
         114  +
    /// This _optional_ name is used to identify the application in the user agent that
         115  +
    /// gets sent along with requests.
         116  +
    pub fn app_name(&self) -> ::std::option::Option<&::aws_types::app_name::AppName> {
         117  +
        self.config.load::<::aws_types::app_name::AppName>()
         118  +
    }
         119  +
    /// Returns the invocation ID generator if one was given in config.
         120  +
    ///
         121  +
    /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic.
         122  +
    pub fn invocation_id_generator(&self) -> ::std::option::Option<::aws_runtime::invocation_id::SharedInvocationIdGenerator> {
         123  +
        self.config.load::<::aws_runtime::invocation_id::SharedInvocationIdGenerator>().cloned()
         124  +
    }
         125  +
    /// Creates a new [service config](crate::Config) from a [shared `config`](::aws_types::sdk_config::SdkConfig).
         126  +
    pub fn new(config: &::aws_types::sdk_config::SdkConfig) -> Self {
         127  +
        Builder::from(config).build()
         128  +
    }
         129  +
    /// The signature version 4 service signing name to use in the credential scope when signing requests.
         130  +
    ///
         131  +
    /// The signing service may be overridden by the `Endpoint`, or by specifying a custom
         132  +
    /// [`SigningName`](aws_types::SigningName) during operation construction
         133  +
    pub fn signing_name(&self) -> &'static str {
         134  +
        "qldb"
         135  +
    }
         136  +
    /// Returns the AWS region, if it was provided.
         137  +
    pub fn region(&self) -> ::std::option::Option<&crate::config::Region> {
         138  +
        self.config.load::<crate::config::Region>()
         139  +
    }
         140  +
    /// This function was intended to be removed, and has been broken since release-2023-11-15 as it always returns a `None`. Do not use.
         141  +
    #[deprecated(
         142  +
        note = "This function was intended to be removed, and has been broken since release-2023-11-15 as it always returns a `None`. Do not use."
         143  +
    )]
         144  +
    pub fn credentials_provider(&self) -> Option<crate::config::SharedCredentialsProvider> {
         145  +
        ::std::option::Option::None
         146  +
    }
         147  +
}
         148  +
/// Builder for creating a `Config`.
         149  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
         150  +
pub struct Builder {
         151  +
    pub(crate) config: ::aws_smithy_types::config_bag::CloneableLayer,
         152  +
    pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder,
         153  +
    pub(crate) runtime_plugins: ::std::vec::Vec<crate::config::SharedRuntimePlugin>,
         154  +
    pub(crate) behavior_version: ::std::option::Option<crate::config::BehaviorVersion>,
         155  +
}
         156  +
impl ::std::default::Default for Builder {
         157  +
    fn default() -> Self {
         158  +
        Self {
         159  +
            config: ::std::default::Default::default(),
         160  +
            runtime_components: crate::config::RuntimeComponentsBuilder::new("service config"),
         161  +
            runtime_plugins: ::std::default::Default::default(),
         162  +
            behavior_version: ::std::default::Default::default(),
         163  +
        }
         164  +
    }
         165  +
}
         166  +
impl Builder {
         167  +
    ///
         168  +
    /// Constructs a config builder.
         169  +
    /// <div class="warning">
         170  +
    /// Note that a config created from this builder will not have the same safe defaults as one created by
         171  +
    /// the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
         172  +
    /// </div>
         173  +
    ///
         174  +
    pub fn new() -> Self {
         175  +
        Self::default()
         176  +
    }
         177  +
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
         178  +
    /// but not those in runtime components.
         179  +
    #[allow(unused)]
         180  +
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
         181  +
        let mut builder = Self::new();
         182  +
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         183  +
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
         184  +
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
         185  +
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
         186  +
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
         187  +
        builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
         188  +
        builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
         189  +
        builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
         190  +
        builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
         191  +
        builder.set_region(config_bag.load::<crate::config::Region>().cloned());
         192  +
        builder
         193  +
    }
         194  +
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
         195  +
    /// to configure protection for stalled streams.
         196  +
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
         197  +
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
         198  +
        self
         199  +
    }
         200  +
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
         201  +
    /// to configure protection for stalled streams.
         202  +
    pub fn set_stalled_stream_protection(
         203  +
        &mut self,
         204  +
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
         205  +
    ) -> &mut Self {
         206  +
        self.config.store_or_unset(stalled_stream_protection_config);
         207  +
        self
         208  +
    }
         209  +
    /// Sets the HTTP client to use when making requests.
         210  +
    ///
         211  +
    /// # Examples
         212  +
    /// ```no_run
         213  +
    /// # #[cfg(test)]
         214  +
    /// # mod tests {
         215  +
    /// # #[test]
         216  +
    /// # fn example() {
         217  +
    /// use std::time::Duration;
         218  +
    /// use aws_sdk_qldbsession::config::Config;
         219  +
    /// use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder;
         220  +
    ///
         221  +
    /// let https_connector = hyper_rustls::HttpsConnectorBuilder::new()
         222  +
    ///     .with_webpki_roots()
         223  +
    ///     .https_only()
         224  +
    ///     .enable_http1()
         225  +
    ///     .enable_http2()
         226  +
    ///     .build();
         227  +
    /// let hyper_client = HyperClientBuilder::new().build(https_connector);
         228  +
    ///
         229  +
    /// // This connector can then be given to a generated service Config
         230  +
    /// let config = my_service_client::Config::builder()
         231  +
    ///     .endpoint_url("https://example.com")
         232  +
    ///     .http_client(hyper_client)
         233  +
    ///     .build();
         234  +
    /// let client = my_service_client::Client::from_conf(config);
         235  +
    /// # }
         236  +
    /// # }
         237  +
    /// ```
         238  +
    pub fn http_client(mut self, http_client: impl crate::config::HttpClient + 'static) -> Self {
         239  +
        self.set_http_client(::std::option::Option::Some(crate::config::IntoShared::into_shared(http_client)));
         240  +
        self
         241  +
    }
         242  +
         243  +
    /// Sets the HTTP client to use when making requests.
         244  +
    ///
         245  +
    /// # Examples
         246  +
    /// ```no_run
         247  +
    /// # #[cfg(test)]
         248  +
    /// # mod tests {
         249  +
    /// # #[test]
         250  +
    /// # fn example() {
         251  +
    /// use std::time::Duration;
         252  +
    /// use aws_sdk_qldbsession::config::{Builder, Config};
         253  +
    /// use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder;
         254  +
    ///
         255  +
    /// fn override_http_client(builder: &mut Builder) {
         256  +
    ///     let https_connector = hyper_rustls::HttpsConnectorBuilder::new()
         257  +
    ///         .with_webpki_roots()
         258  +
    ///         .https_only()
         259  +
    ///         .enable_http1()
         260  +
    ///         .enable_http2()
         261  +
    ///         .build();
         262  +
    ///     let hyper_client = HyperClientBuilder::new().build(https_connector);
         263  +
    ///     builder.set_http_client(Some(hyper_client));
         264  +
    /// }
         265  +
    ///
         266  +
    /// let mut builder = aws_sdk_qldbsession::Config::builder();
         267  +
    /// override_http_client(&mut builder);
         268  +
    /// let config = builder.build();
         269  +
    /// # }
         270  +
    /// # }
         271  +
    /// ```
         272  +
    pub fn set_http_client(&mut self, http_client: Option<crate::config::SharedHttpClient>) -> &mut Self {
         273  +
        self.runtime_components.set_http_client(http_client);
         274  +
        self
         275  +
    }
         276  +
    /// Adds an auth scheme to the builder
         277  +
    ///
         278  +
    /// If `auth_scheme` has an existing [AuthSchemeId](aws_smithy_runtime_api::client::auth::AuthSchemeId) in the runtime, the current identity
         279  +
    /// resolver and signer for that scheme will be replaced by those from `auth_scheme`.
         280  +
    ///
         281  +
    /// _Important:_ When introducing a custom auth scheme, ensure you override either
         282  +
    /// [`Self::auth_scheme_resolver`] or [`Self::set_auth_scheme_resolver`]
         283  +
    /// so that the custom auth scheme is included in the list of resolved auth scheme options.
         284  +
    /// [The default auth scheme resolver](crate::config::auth::DefaultAuthSchemeResolver) will not recognize your custom auth scheme.
         285  +
    ///
         286  +
    /// # Examples
         287  +
    /// ```no_run
         288  +
    /// # use aws_smithy_runtime_api::{
         289  +
    /// #     box_error::BoxError,
         290  +
    /// #     client::{
         291  +
    /// #         auth::{
         292  +
    /// #             AuthScheme, AuthSchemeEndpointConfig, AuthSchemeId, AuthSchemeOption,
         293  +
    /// #             AuthSchemeOptionsFuture, Sign,
         294  +
    /// #         },
         295  +
    /// #         identity::{Identity, IdentityFuture, ResolveIdentity, SharedIdentityResolver},
         296  +
    /// #         orchestrator::HttpRequest,
         297  +
    /// #         runtime_components::{GetIdentityResolver, RuntimeComponents},
         298  +
    /// #   },
         299  +
    /// #   shared::IntoShared,
         300  +
    /// # };
         301  +
    /// # use aws_smithy_types::config_bag::ConfigBag;
         302  +
    /// // Auth scheme with customer identity resolver and signer
         303  +
    /// #[derive(Debug)]
         304  +
    /// struct CustomAuthScheme {
         305  +
    ///     id: AuthSchemeId,
         306  +
    ///     identity_resolver: SharedIdentityResolver,
         307  +
    ///     signer: CustomSigner,
         308  +
    /// }
         309  +
    /// impl Default for CustomAuthScheme {
         310  +
    ///     fn default() -> Self {
         311  +
    ///         Self {
         312  +
    ///             id: AuthSchemeId::new("custom"),
         313  +
    ///             identity_resolver: CustomIdentityResolver.into_shared(),
         314  +
    ///             signer: CustomSigner,
         315  +
    ///         }
         316  +
    ///     }
         317  +
    /// }
         318  +
    /// impl AuthScheme for CustomAuthScheme {
         319  +
    ///     fn scheme_id(&self) -> AuthSchemeId {
         320  +
    ///         self.id.clone()
         321  +
    ///     }
         322  +
    ///     fn identity_resolver(
         323  +
    ///         &self,
         324  +
    ///         _identity_resolvers: &dyn GetIdentityResolver,
         325  +
    ///     ) -> Option<SharedIdentityResolver> {
         326  +
    ///         Some(self.identity_resolver.clone())
         327  +
    ///     }
         328  +
    ///     fn signer(&self) -> &dyn Sign {
         329  +
    ///         &self.signer
         330  +
    ///     }
         331  +
    /// }
         332  +
    ///
         333  +
    /// #[derive(Debug, Default)]
         334  +
    /// struct CustomSigner;
         335  +
    /// impl Sign for CustomSigner {
         336  +
    ///     fn sign_http_request(
         337  +
    ///         &self,
         338  +
    ///         _request: &mut HttpRequest,
         339  +
    ///         _identity: &Identity,
         340  +
    ///         _auth_scheme_endpoint_config: AuthSchemeEndpointConfig<'_>,
         341  +
    ///         _runtime_components: &RuntimeComponents,
         342  +
    ///         _config_bag: &ConfigBag,
         343  +
    ///     ) -> Result<(), BoxError> {
         344  +
    ///         // --snip--
         345  +
    /// #      todo!()
         346  +
    ///     }
         347  +
    /// }
         348  +
    ///
         349  +
    /// #[derive(Debug)]
         350  +
    /// struct CustomIdentityResolver;
         351  +
    /// impl ResolveIdentity for CustomIdentityResolver {
         352  +
    ///     fn resolve_identity<'a>(
         353  +
    ///         &'a self,
         354  +
    ///         _runtime_components: &'a RuntimeComponents,
         355  +
    ///         _config_bag: &'a ConfigBag,
         356  +
    ///     ) -> IdentityFuture<'a> {
         357  +
    ///         // --snip--
         358  +
    /// #      todo!()
         359  +
    ///     }
         360  +
    /// }
         361  +
    ///
         362  +
    /// // Auth scheme resolver that favors `CustomAuthScheme`
         363  +
    /// #[derive(Debug)]
         364  +
    /// struct CustomAuthSchemeResolver;
         365  +
    /// impl aws_sdk_qldbsession::config::auth::ResolveAuthScheme for CustomAuthSchemeResolver {
         366  +
    ///     fn resolve_auth_scheme<'a>(
         367  +
    ///         &'a self,
         368  +
    ///         _params: &'a aws_sdk_qldbsession::config::auth::Params,
         369  +
    ///         _cfg: &'a ConfigBag,
         370  +
    ///         _runtime_components: &'a RuntimeComponents,
         371  +
    ///     ) -> AuthSchemeOptionsFuture<'a> {
         372  +
    ///         AuthSchemeOptionsFuture::ready(Ok(vec![AuthSchemeOption::from(AuthSchemeId::new(
         373  +
    ///             "custom",
         374  +
    ///         ))]))
         375  +
    ///     }
         376  +
    /// }
         377  +
    ///
         378  +
    /// let config = aws_sdk_qldbsession::Config::builder()
         379  +
    ///     .push_auth_scheme(CustomAuthScheme::default())
         380  +
    ///     .auth_scheme_resolver(CustomAuthSchemeResolver)
         381  +
    ///     // other configurations
         382  +
    ///     .build();
         383  +
    /// ```
         384  +
    pub fn push_auth_scheme(mut self, auth_scheme: impl ::aws_smithy_runtime_api::client::auth::AuthScheme + 'static) -> Self {
         385  +
        self.runtime_components.push_auth_scheme(auth_scheme);
         386  +
        self
         387  +
    }
         388  +
         389  +
    /// Set the auth scheme resolver for the builder
         390  +
    ///
         391  +
    /// # Examples
         392  +
    /// ```no_run
         393  +
    /// # use aws_smithy_runtime_api::{
         394  +
    /// #     client::{
         395  +
    /// #         auth::AuthSchemeOptionsFuture,
         396  +
    /// #         runtime_components::RuntimeComponents,
         397  +
    /// #   },
         398  +
    /// # };
         399  +
    /// # use aws_smithy_types::config_bag::ConfigBag;
         400  +
    /// #[derive(Debug)]
         401  +
    /// struct CustomAuthSchemeResolver;
         402  +
    /// impl aws_sdk_qldbsession::config::auth::ResolveAuthScheme for CustomAuthSchemeResolver {
         403  +
    ///     fn resolve_auth_scheme<'a>(
         404  +
    ///         &'a self,
         405  +
    ///         _params: &'a aws_sdk_qldbsession::config::auth::Params,
         406  +
    ///         _cfg: &'a ConfigBag,
         407  +
    ///         _runtime_components: &'a RuntimeComponents,
         408  +
    ///     ) -> AuthSchemeOptionsFuture<'a> {
         409  +
    ///         // --snip--
         410  +
    /// #      todo!()
         411  +
    ///     }
         412  +
    /// }
         413  +
    ///
         414  +
    /// let config = aws_sdk_qldbsession::Config::builder()
         415  +
    ///     .auth_scheme_resolver(CustomAuthSchemeResolver)
         416  +
    ///     // other configurations
         417  +
    ///     .build();
         418  +
    /// ```
         419  +
    pub fn auth_scheme_resolver(mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> Self {
         420  +
        self.set_auth_scheme_resolver(auth_scheme_resolver);
         421  +
        self
         422  +
    }
         423  +
         424  +
    /// Set the auth scheme resolver for the builder
         425  +
    ///
         426  +
    /// # Examples
         427  +
    /// See an example for [`Self::auth_scheme_resolver`].
         428  +
    pub fn set_auth_scheme_resolver(&mut self, auth_scheme_resolver: impl crate::config::auth::ResolveAuthScheme + 'static) -> &mut Self {
         429  +
        self.runtime_components
         430  +
            .set_auth_scheme_option_resolver(::std::option::Option::Some(auth_scheme_resolver.into_shared_resolver()));
         431  +
        self
         432  +
    }
         433  +
    /// Set the auth scheme preference for an auth scheme resolver
         434  +
    /// (typically the default auth scheme resolver).
         435  +
    ///
         436  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         437  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         438  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         439  +
    ///
         440  +
    /// The preference list is intended as a hint rather than a strict override.
         441  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         442  +
    ///
         443  +
    /// # Examples
         444  +
    ///
         445  +
    /// ```no_run
         446  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         447  +
    /// let config = aws_sdk_qldbsession::Config::builder()
         448  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         449  +
    ///     // ...
         450  +
    ///     .build();
         451  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
         452  +
    /// ```
         453  +
         454  +
    pub fn auth_scheme_preference(
         455  +
        mut self,
         456  +
        preference: impl ::std::convert::Into<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         457  +
    ) -> Self {
         458  +
        self.set_auth_scheme_preference(::std::option::Option::Some(preference.into()));
         459  +
        self
         460  +
    }
         461  +
         462  +
    /// Set the auth scheme preference for an auth scheme resolver
         463  +
    /// (typically the default auth scheme resolver).
         464  +
    ///
         465  +
    /// Each operation has a predefined order of auth schemes, as determined by the service,
         466  +
    /// for auth scheme resolution. By using the auth scheme preference, customers
         467  +
    /// can reorder the schemes resolved by the auth scheme resolver.
         468  +
    ///
         469  +
    /// The preference list is intended as a hint rather than a strict override.
         470  +
    /// Any schemes not present in the originally resolved auth schemes will be ignored.
         471  +
    ///
         472  +
    /// # Examples
         473  +
    ///
         474  +
    /// ```no_run
         475  +
    /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         476  +
    /// let config = aws_sdk_qldbsession::Config::builder()
         477  +
    ///     .auth_scheme_preference([AuthSchemeId::from("scheme1"), AuthSchemeId::from("scheme2")])
         478  +
    ///     // ...
         479  +
    ///     .build();
         480  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
         481  +
    /// ```
         482  +
         483  +
    pub fn set_auth_scheme_preference(
         484  +
        &mut self,
         485  +
        preference: ::std::option::Option<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>,
         486  +
    ) -> &mut Self {
         487  +
        self.config.store_or_unset(preference);
         488  +
        self
         489  +
    }
         490  +
    /// Sets the endpoint resolver to use when making requests.
         491  +
    ///
         492  +
    ///
         493  +
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
         494  +
    /// rules for `aws_sdk_qldbsession`.
         495  +
    ///
         496  +
    ///
         497  +
    /// Note: setting an endpoint resolver will replace any endpoint URL that has been set.
         498  +
    /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to
         499  +
    /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`].
         500  +
    ///
         501  +
    /// # Examples
         502  +
    /// Create a custom endpoint resolver that resolves a different endpoing per-stage, e.g. staging vs. production.
         503  +
    /// ```no_run
         504  +
    /// use aws_sdk_qldbsession::config::endpoint::{ResolveEndpoint, EndpointFuture, Params, Endpoint};
         505  +
    /// #[derive(Debug)]
         506  +
    /// struct StageResolver { stage: String }
         507  +
    /// impl ResolveEndpoint for StageResolver {
         508  +
    ///     fn resolve_endpoint(&self, params: &Params) -> EndpointFuture<'_> {
         509  +
    ///         let stage = &self.stage;
         510  +
    ///         EndpointFuture::ready(Ok(Endpoint::builder().url(format!("{stage}.myservice.com")).build()))
         511  +
    ///     }
         512  +
    /// }
         513  +
    /// let resolver = StageResolver { stage: std::env::var("STAGE").unwrap() };
         514  +
    /// let config = aws_sdk_qldbsession::Config::builder().endpoint_resolver(resolver).build();
         515  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
         516  +
    /// ```
         517  +
    pub fn endpoint_resolver(mut self, endpoint_resolver: impl crate::config::endpoint::ResolveEndpoint + 'static) -> Self {
         518  +
        self.set_endpoint_resolver(::std::option::Option::Some(endpoint_resolver.into_shared_resolver()));
         519  +
        self
         520  +
    }
         521  +
         522  +
    /// Sets the endpoint resolver to use when making requests.
         523  +
    ///
         524  +
    ///
         525  +
    /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution
         526  +
    /// rules for `aws_sdk_qldbsession`.
         527  +
    ///
         528  +
    pub fn set_endpoint_resolver(
         529  +
        &mut self,
         530  +
        endpoint_resolver: ::std::option::Option<::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver>,
         531  +
    ) -> &mut Self {
         532  +
        self.runtime_components.set_endpoint_resolver(endpoint_resolver);
         533  +
        self
         534  +
    }
         535  +
    /// Set the retry_config for the builder
         536  +
    ///
         537  +
    /// # Examples
         538  +
    /// ```no_run
         539  +
    /// use aws_sdk_qldbsession::config::Config;
         540  +
    /// use aws_sdk_qldbsession::config::retry::RetryConfig;
         541  +
    ///
         542  +
    /// let retry_config = RetryConfig::standard().with_max_attempts(5);
         543  +
    /// let config = Config::builder().retry_config(retry_config).build();
         544  +
    /// ```
         545  +
    pub fn retry_config(mut self, retry_config: ::aws_smithy_types::retry::RetryConfig) -> Self {
         546  +
        self.set_retry_config(Some(retry_config));
         547  +
        self
         548  +
    }
         549  +
         550  +
    /// Set the retry_config for the builder
         551  +
    ///
         552  +
    /// # Examples
         553  +
    /// ```no_run
         554  +
    /// use aws_sdk_qldbsession::config::{Builder, Config};
         555  +
    /// use aws_sdk_qldbsession::config::retry::RetryConfig;
         556  +
    ///
         557  +
    /// fn disable_retries(builder: &mut Builder) {
         558  +
    ///     let retry_config = RetryConfig::standard().with_max_attempts(1);
         559  +
    ///     builder.set_retry_config(Some(retry_config));
         560  +
    /// }
         561  +
    ///
         562  +
    /// let mut builder = Config::builder();
         563  +
    /// disable_retries(&mut builder);
         564  +
    /// let config = builder.build();
         565  +
    /// ```
         566  +
    pub fn set_retry_config(&mut self, retry_config: ::std::option::Option<::aws_smithy_types::retry::RetryConfig>) -> &mut Self {
         567  +
        retry_config.map(|r| self.config.store_put(r));
         568  +
        self
         569  +
    }
         570  +
    /// Set the sleep_impl for the builder
         571  +
    ///
         572  +
    /// # Examples
         573  +
    ///
         574  +
    /// ```no_run
         575  +
    /// use aws_sdk_qldbsession::config::{AsyncSleep, Config, SharedAsyncSleep, Sleep};
         576  +
    ///
         577  +
    /// #[derive(Debug)]
         578  +
    /// pub struct ForeverSleep;
         579  +
    ///
         580  +
    /// impl AsyncSleep for ForeverSleep {
         581  +
    ///     fn sleep(&self, duration: std::time::Duration) -> Sleep {
         582  +
    ///         Sleep::new(std::future::pending())
         583  +
    ///     }
         584  +
    /// }
         585  +
    ///
         586  +
    /// let sleep_impl = SharedAsyncSleep::new(ForeverSleep);
         587  +
    /// let config = Config::builder().sleep_impl(sleep_impl).build();
         588  +
    /// ```
         589  +
    pub fn sleep_impl(mut self, sleep_impl: impl crate::config::AsyncSleep + 'static) -> Self {
         590  +
        self.set_sleep_impl(Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(sleep_impl)));
         591  +
        self
         592  +
    }
         593  +
         594  +
    /// Set the sleep_impl for the builder
         595  +
    ///
         596  +
    /// # Examples
         597  +
    ///
         598  +
    /// ```no_run
         599  +
    /// use aws_sdk_qldbsession::config::{AsyncSleep, Builder, Config, SharedAsyncSleep, Sleep};
         600  +
    ///
         601  +
    /// #[derive(Debug)]
         602  +
    /// pub struct ForeverSleep;
         603  +
    ///
         604  +
    /// impl AsyncSleep for ForeverSleep {
         605  +
    ///     fn sleep(&self, duration: std::time::Duration) -> Sleep {
         606  +
    ///         Sleep::new(std::future::pending())
         607  +
    ///     }
         608  +
    /// }
         609  +
    ///
         610  +
    /// fn set_never_ending_sleep_impl(builder: &mut Builder) {
         611  +
    ///     let sleep_impl = SharedAsyncSleep::new(ForeverSleep);
         612  +
    ///     builder.set_sleep_impl(Some(sleep_impl));
         613  +
    /// }
         614  +
    ///
         615  +
    /// let mut builder = Config::builder();
         616  +
    /// set_never_ending_sleep_impl(&mut builder);
         617  +
    /// let config = builder.build();
         618  +
    /// ```
         619  +
    pub fn set_sleep_impl(&mut self, sleep_impl: ::std::option::Option<crate::config::SharedAsyncSleep>) -> &mut Self {
         620  +
        self.runtime_components.set_sleep_impl(sleep_impl);
         621  +
        self
         622  +
    }
         623  +
    /// Set the timeout_config for the builder
         624  +
    ///
         625  +
    /// # Examples
         626  +
    ///
         627  +
    /// ```no_run
         628  +
    /// # use std::time::Duration;
         629  +
    /// use aws_sdk_qldbsession::config::Config;
         630  +
    /// use aws_sdk_qldbsession::config::timeout::TimeoutConfig;
         631  +
    ///
         632  +
    /// let timeout_config = TimeoutConfig::builder()
         633  +
    ///     .operation_attempt_timeout(Duration::from_secs(1))
         634  +
    ///     .build();
         635  +
    /// let config = Config::builder().timeout_config(timeout_config).build();
         636  +
    /// ```
         637  +
    pub fn timeout_config(mut self, timeout_config: ::aws_smithy_types::timeout::TimeoutConfig) -> Self {
         638  +
        self.set_timeout_config(Some(timeout_config));
         639  +
        self
         640  +
    }
         641  +
         642  +
    /// Set the timeout_config for the builder.
         643  +
    ///
         644  +
    /// Setting this to `None` has no effect if another source of configuration has set timeouts. If you
         645  +
    /// are attempting to disable timeouts, use [`TimeoutConfig::disabled`](::aws_smithy_types::timeout::TimeoutConfig::disabled)
         646  +
    ///
         647  +
    ///
         648  +
    /// # Examples
         649  +
    ///
         650  +
    /// ```no_run
         651  +
    /// # use std::time::Duration;
         652  +
    /// use aws_sdk_qldbsession::config::{Builder, Config};
         653  +
    /// use aws_sdk_qldbsession::config::timeout::TimeoutConfig;
         654  +
    ///
         655  +
    /// fn set_request_timeout(builder: &mut Builder) {
         656  +
    ///     let timeout_config = TimeoutConfig::builder()
         657  +
    ///         .operation_attempt_timeout(Duration::from_secs(1))
         658  +
    ///         .build();
         659  +
    ///     builder.set_timeout_config(Some(timeout_config));
         660  +
    /// }
         661  +
    ///
         662  +
    /// let mut builder = Config::builder();
         663  +
    /// set_request_timeout(&mut builder);
         664  +
    /// let config = builder.build();
         665  +
    /// ```
         666  +
    pub fn set_timeout_config(&mut self, timeout_config: ::std::option::Option<::aws_smithy_types::timeout::TimeoutConfig>) -> &mut Self {
         667  +
        // passing None has no impact.
         668  +
        let Some(mut timeout_config) = timeout_config else { return self };
         669  +
         670  +
        if let Some(base) = self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>() {
         671  +
            timeout_config.take_defaults_from(base);
         672  +
        }
         673  +
        self.config.store_put(timeout_config);
         674  +
        self
         675  +
    }
         676  +
    /// Set the partition for retry-related state. When clients share a retry partition, they will
         677  +
    /// also share components such as token buckets and client rate limiters.
         678  +
    /// See the [`RetryPartition`](::aws_smithy_runtime::client::retries::RetryPartition) documentation for more details.
         679  +
    ///
         680  +
    /// # Default Behavior
         681  +
    ///
         682  +
    /// When no retry partition is explicitly set, the SDK automatically creates a default retry partition named `qldbsession`
         683  +
    /// (or `qldbsession-<region>` if a region is configured).
         684  +
    /// All QLDB Session clients without an explicit retry partition will share this default partition.
         685  +
    ///
         686  +
    /// # Notes
         687  +
    ///
         688  +
    /// - This is an advanced setting — most users won't need to modify it.
         689  +
    /// - A configured client rate limiter has no effect unless [`RetryConfig::adaptive`](::aws_smithy_types::retry::RetryConfig::adaptive) is used.
         690  +
    ///
         691  +
    /// # Examples
         692  +
    ///
         693  +
    /// Creating a custom retry partition with a token bucket:
         694  +
    /// ```no_run
         695  +
    /// use aws_sdk_qldbsession::config::Config;
         696  +
    /// use aws_sdk_qldbsession::config::retry::{RetryPartition, TokenBucket};
         697  +
    ///
         698  +
    /// let token_bucket = TokenBucket::new(10);
         699  +
    /// let config = Config::builder()
         700  +
    ///     .retry_partition(RetryPartition::custom("custom")
         701  +
    ///         .token_bucket(token_bucket)
         702  +
    ///         .build()
         703  +
    ///     )
         704  +
    ///     .build();
         705  +
    /// ```
         706  +
    ///
         707  +
    /// Configuring a client rate limiter with adaptive retry mode:
         708  +
    /// ```no_run
         709  +
    /// use aws_sdk_qldbsession::config::Config;
         710  +
    /// use aws_sdk_qldbsession::config::retry::{ClientRateLimiter, RetryConfig, RetryPartition};
         711  +
    ///
         712  +
    /// let client_rate_limiter = ClientRateLimiter::new(10.0);
         713  +
    /// let config = Config::builder()
         714  +
    ///     .retry_partition(RetryPartition::custom("custom")
         715  +
    ///         .client_rate_limiter(client_rate_limiter)
         716  +
    ///         .build()
         717  +
    ///     )
         718  +
    ///     .retry_config(RetryConfig::adaptive())
         719  +
    ///     .build();
         720  +
    /// ```
         721  +
    pub fn retry_partition(mut self, retry_partition: ::aws_smithy_runtime::client::retries::RetryPartition) -> Self {
         722  +
        self.set_retry_partition(Some(retry_partition));
         723  +
        self
         724  +
    }
         725  +
    /// Like [`Self::retry_partition`], but takes a mutable reference to the builder and an optional `RetryPartition`
         726  +
    pub fn set_retry_partition(
         727  +
        &mut self,
         728  +
        retry_partition: ::std::option::Option<::aws_smithy_runtime::client::retries::RetryPartition>,
         729  +
    ) -> &mut Self {
         730  +
        retry_partition.map(|r| self.config.store_put(r));
         731  +
        self
         732  +
    }
         733  +
    /// Set the identity cache for auth.
         734  +
    ///
         735  +
    /// The identity cache defaults to a lazy caching implementation that will resolve
         736  +
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
         737  +
    /// requests will take the value from the cache while it is still valid. Once it expires,
         738  +
    /// the next request will result in refreshing the identity.
         739  +
    ///
         740  +
    /// This configuration allows you to disable or change the default caching mechanism.
         741  +
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
         742  +
    /// trait and pass that implementation into this function.
         743  +
    ///
         744  +
    /// # Examples
         745  +
    ///
         746  +
    /// Disabling identity caching:
         747  +
    /// ```no_run
         748  +
    /// use aws_sdk_qldbsession::config::IdentityCache;
         749  +
    ///
         750  +
    /// let config = aws_sdk_qldbsession::Config::builder()
         751  +
    ///     .identity_cache(IdentityCache::no_cache())
         752  +
    ///     // ...
         753  +
    ///     .build();
         754  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
         755  +
    /// ```
         756  +
    ///
         757  +
    /// Customizing lazy caching:
         758  +
    /// ```no_run
         759  +
    /// use aws_sdk_qldbsession::config::IdentityCache;
         760  +
    /// use std::time::Duration;
         761  +
    ///
         762  +
    /// let config = aws_sdk_qldbsession::Config::builder()
         763  +
    ///     .identity_cache(
         764  +
    ///         IdentityCache::lazy()
         765  +
    ///             // change the load timeout to 10 seconds
         766  +
    ///             .load_timeout(Duration::from_secs(10))
         767  +
    ///             .build()
         768  +
    ///     )
         769  +
    ///     // ...
         770  +
    ///     .build();
         771  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
         772  +
    /// ```
         773  +
    ///
         774  +
    pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self {
         775  +
        self.set_identity_cache(identity_cache);
         776  +
        self
         777  +
    }
         778  +
         779  +
    /// Set the identity cache for auth.
         780  +
    ///
         781  +
    /// The identity cache defaults to a lazy caching implementation that will resolve
         782  +
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
         783  +
    /// requests will take the value from the cache while it is still valid. Once it expires,
         784  +
    /// the next request will result in refreshing the identity.
         785  +
    ///
         786  +
    /// This configuration allows you to disable or change the default caching mechanism.
         787  +
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
         788  +
    /// trait and pass that implementation into this function.
         789  +
    ///
         790  +
    /// # Examples
         791  +
    ///
         792  +
    /// Disabling identity caching:
         793  +
    /// ```no_run
         794  +
    /// use aws_sdk_qldbsession::config::IdentityCache;
         795  +
    ///
         796  +
    /// let config = aws_sdk_qldbsession::Config::builder()
         797  +
    ///     .identity_cache(IdentityCache::no_cache())
         798  +
    ///     // ...
         799  +
    ///     .build();
         800  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
         801  +
    /// ```
         802  +
    ///
         803  +
    /// Customizing lazy caching:
         804  +
    /// ```no_run
         805  +
    /// use aws_sdk_qldbsession::config::IdentityCache;
         806  +
    /// use std::time::Duration;
         807  +
    ///
         808  +
    /// let config = aws_sdk_qldbsession::Config::builder()
         809  +
    ///     .identity_cache(
         810  +
    ///         IdentityCache::lazy()
         811  +
    ///             // change the load timeout to 10 seconds
         812  +
    ///             .load_timeout(Duration::from_secs(10))
         813  +
    ///             .build()
         814  +
    ///     )
         815  +
    ///     // ...
         816  +
    ///     .build();
         817  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
         818  +
    /// ```
         819  +
    ///
         820  +
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
         821  +
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
         822  +
        self
         823  +
    }
         824  +
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
         825  +
    ///
         826  +
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
         827  +
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
         828  +
    /// will run after those default interceptors.
         829  +
    ///
         830  +
    /// # Examples
         831  +
    /// ```no_run
         832  +
    /// # fn example() {
         833  +
    /// use aws_smithy_runtime_api::box_error::BoxError;
         834  +
    /// use aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextMut;
         835  +
    /// use aws_smithy_runtime_api::client::interceptors::Intercept;
         836  +
    /// use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
         837  +
    /// use aws_smithy_types::config_bag::ConfigBag;
         838  +
    /// use aws_sdk_qldbsession::config::Config;
         839  +
    /// use ::http::uri::Uri;
         840  +
    ///
         841  +
    /// fn base_url() -> String {
         842  +
    ///     // ...
         843  +
    ///     # String::new()
         844  +
    /// }
         845  +
    ///
         846  +
    /// #[derive(Debug)]
         847  +
    /// pub struct UriModifierInterceptor;
         848  +
    /// impl Intercept for UriModifierInterceptor {
         849  +
    ///     fn name(&self) -> &'static str {
         850  +
    ///         "UriModifierInterceptor"
         851  +
    ///     }
         852  +
    ///     fn modify_before_signing(
         853  +
    ///         &self,
         854  +
    ///         context: &mut BeforeTransmitInterceptorContextMut<'_>,
         855  +
    ///         _runtime_components: &RuntimeComponents,
         856  +
    ///         _cfg: &mut ConfigBag,
         857  +
    ///     ) -> Result<(), BoxError> {
         858  +
    ///         let request = context.request_mut();
         859  +
    ///         let uri = format!("{}{}", base_url(), request.uri());
         860  +
    ///         *request.uri_mut() = uri.parse::<Uri>()?.into();
         861  +
    ///
         862  +
    ///         Ok(())
         863  +
    ///     }
         864  +
    /// }
         865  +
    ///
         866  +
    /// let config = Config::builder()
         867  +
    ///     .interceptor(UriModifierInterceptor)
         868  +
    ///     .build();
         869  +
    /// # }
         870  +
    /// ```
         871  +
    pub fn interceptor(mut self, interceptor: impl crate::config::Intercept + 'static) -> Self {
         872  +
        self.push_interceptor(crate::config::SharedInterceptor::new(interceptor));
         873  +
        self
         874  +
    }
         875  +
         876  +
    /// Like [`Self::interceptor`], but takes a [`SharedInterceptor`](crate::config::SharedInterceptor).
         877  +
    pub fn push_interceptor(&mut self, interceptor: crate::config::SharedInterceptor) -> &mut Self {
         878  +
        self.runtime_components.push_interceptor(interceptor);
         879  +
        self
         880  +
    }
         881  +
         882  +
    /// Set [`SharedInterceptor`](crate::config::SharedInterceptor)s for the builder.
         883  +
    pub fn set_interceptors(&mut self, interceptors: impl IntoIterator<Item = crate::config::SharedInterceptor>) -> &mut Self {
         884  +
        self.runtime_components.set_interceptors(interceptors.into_iter());
         885  +
        self
         886  +
    }
         887  +
    /// Sets the time source used for this service
         888  +
    pub fn time_source(mut self, time_source: impl ::aws_smithy_async::time::TimeSource + 'static) -> Self {
         889  +
        self.set_time_source(::std::option::Option::Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(
         890  +
            time_source,
         891  +
        )));
         892  +
        self
         893  +
    }
         894  +
    /// Sets the time source used for this service
         895  +
    pub fn set_time_source(&mut self, time_source: ::std::option::Option<::aws_smithy_async::time::SharedTimeSource>) -> &mut Self {
         896  +
        self.runtime_components.set_time_source(time_source);
         897  +
        self
         898  +
    }
         899  +
    /// Add type implementing [`ClassifyRetry`](::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry) that will be used by the
         900  +
    /// [`RetryStrategy`](::aws_smithy_runtime_api::client::retries::RetryStrategy) to determine what responses should be retried.
         901  +
    ///
         902  +
    /// A retry classifier configured by this method will run according to its [priority](::aws_smithy_runtime_api::client::retries::classifiers::RetryClassifierPriority).
         903  +
    ///
         904  +
    /// # Examples
         905  +
    /// ```no_run
         906  +
    /// # fn example() {
         907  +
    /// use aws_smithy_runtime_api::client::interceptors::context::InterceptorContext;
         908  +
    /// use aws_smithy_runtime_api::client::orchestrator::OrchestratorError;
         909  +
    /// use aws_smithy_runtime_api::client::retries::classifiers::{
         910  +
    ///     ClassifyRetry, RetryAction, RetryClassifierPriority,
         911  +
    /// };
         912  +
    /// use aws_smithy_types::error::metadata::ProvideErrorMetadata;
         913  +
    /// use aws_smithy_types::retry::ErrorKind;
         914  +
    /// use std::error::Error as StdError;
         915  +
    /// use std::marker::PhantomData;
         916  +
    /// use std::fmt;
         917  +
    /// use aws_sdk_qldbsession::config::Config;
         918  +
    /// # #[derive(Debug)]
         919  +
    /// # struct SomeOperationError {}
         920  +
    /// # impl StdError for SomeOperationError {}
         921  +
    /// # impl fmt::Display for SomeOperationError {
         922  +
    /// #    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { todo!() }
         923  +
    /// # }
         924  +
    /// # impl ProvideErrorMetadata for SomeOperationError {
         925  +
    /// #    fn meta(&self) -> &aws_sdk_qldbsession::error::ErrorMetadata { todo!() }
         926  +
    /// # }
         927  +
    ///
         928  +
    /// const RETRYABLE_ERROR_CODES: &[&str] = &[
         929  +
    ///     // List error codes to be retried here...
         930  +
    /// ];
         931  +
    ///
         932  +
    /// // When classifying at an operation's error type, classifiers require a generic parameter.
         933  +
    /// // When classifying the HTTP response alone, no generic is needed.
         934  +
    /// #[derive(Debug, Default)]
         935  +
    /// pub struct ExampleErrorCodeClassifier<E> {
         936  +
    ///     _inner: PhantomData<E>,
         937  +
    /// }
         938  +
    ///
         939  +
    /// impl<E> ExampleErrorCodeClassifier<E> {
         940  +
    ///     pub fn new() -> Self {
         941  +
    ///         Self {
         942  +
    ///             _inner: PhantomData,
         943  +
    ///         }
         944  +
    ///     }
         945  +
    /// }
         946  +
    ///
         947  +
    /// impl<E> ClassifyRetry for ExampleErrorCodeClassifier<E>
         948  +
    /// where
         949  +
    ///     // Adding a trait bound for ProvideErrorMetadata allows us to inspect the error code.
         950  +
    ///     E: StdError + ProvideErrorMetadata + Send + Sync + 'static,
         951  +
    /// {
         952  +
    ///     fn classify_retry(&self, ctx: &InterceptorContext) -> RetryAction {
         953  +
    ///         // Check for a result
         954  +
    ///         let output_or_error = ctx.output_or_error();
         955  +
    ///         // Check for an error
         956  +
    ///         let error = match output_or_error {
         957  +
    ///             Some(Ok(_)) | None => return RetryAction::NoActionIndicated,
         958  +
    ///               Some(Err(err)) => err,
         959  +
    ///         };
         960  +
    ///
         961  +
    ///         // Downcast the generic error and extract the code
         962  +
    ///         let error_code = OrchestratorError::as_operation_error(error)
         963  +
    ///             .and_then(|err| err.downcast_ref::<E>())
         964  +
    ///             .and_then(|err| err.code());
         965  +
    ///
         966  +
    ///         // If this error's code is in our list, return an action that tells the RetryStrategy to retry this request.
         967  +
    ///         if let Some(error_code) = error_code {
         968  +
    ///             if RETRYABLE_ERROR_CODES.contains(&error_code) {
         969  +
    ///                 return RetryAction::transient_error();
         970  +
    ///             }
         971  +
    ///         }
         972  +
    ///
         973  +
    ///         // Otherwise, return that no action is indicated i.e. that this classifier doesn't require a retry.
         974  +
    ///         // Another classifier may still classify this response as retryable.
         975  +
    ///         RetryAction::NoActionIndicated
         976  +
    ///     }
         977  +
    ///
         978  +
    ///     fn name(&self) -> &'static str { "Example Error Code Classifier" }
         979  +
    /// }
         980  +
    ///
         981  +
    /// let config = Config::builder()
         982  +
    ///     .retry_classifier(ExampleErrorCodeClassifier::<SomeOperationError>::new())
         983  +
    ///     .build();
         984  +
    /// # }
         985  +
    /// ```
         986  +
    pub fn retry_classifier(
         987  +
        mut self,
         988  +
        retry_classifier: impl ::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry + 'static,
         989  +
    ) -> Self {
         990  +
        self.push_retry_classifier(::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier::new(
         991  +
            retry_classifier,
         992  +
        ));
         993  +
        self
         994  +
    }
         995  +
         996  +
    /// Like [`Self::retry_classifier`], but takes a [`SharedRetryClassifier`](::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier).
         997  +
    pub fn push_retry_classifier(
         998  +
        &mut self,
         999  +
        retry_classifier: ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier,
        1000  +
    ) -> &mut Self {
        1001  +
        self.runtime_components.push_retry_classifier(retry_classifier);
        1002  +
        self
        1003  +
    }
        1004  +
        1005  +
    /// Set [`SharedRetryClassifier`](::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier)s for the builder, replacing any that
        1006  +
    /// were previously set.
        1007  +
    pub fn set_retry_classifiers(
        1008  +
        &mut self,
        1009  +
        retry_classifiers: impl IntoIterator<Item = ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier>,
        1010  +
    ) -> &mut Self {
        1011  +
        self.runtime_components.set_retry_classifiers(retry_classifiers.into_iter());
        1012  +
        self
        1013  +
    }
        1014  +
    /// Sets the name of the app that is using the client.
        1015  +
    ///
        1016  +
    /// This _optional_ name is used to identify the application in the user agent that
        1017  +
    /// gets sent along with requests.
        1018  +
    pub fn app_name(mut self, app_name: ::aws_types::app_name::AppName) -> Self {
        1019  +
        self.set_app_name(Some(app_name));
        1020  +
        self
        1021  +
    }
        1022  +
    /// Sets the name of the app that is using the client.
        1023  +
    ///
        1024  +
    /// This _optional_ name is used to identify the application in the user agent that
        1025  +
    /// gets sent along with requests.
        1026  +
    pub fn set_app_name(&mut self, app_name: ::std::option::Option<::aws_types::app_name::AppName>) -> &mut Self {
        1027  +
        self.config.store_or_unset(app_name);
        1028  +
        self
        1029  +
    }
        1030  +
    /// Overrides the default invocation ID generator.
        1031  +
    ///
        1032  +
    /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic.
        1033  +
    pub fn invocation_id_generator(mut self, gen: impl ::aws_runtime::invocation_id::InvocationIdGenerator + 'static) -> Self {
        1034  +
        self.set_invocation_id_generator(::std::option::Option::Some(
        1035  +
            ::aws_runtime::invocation_id::SharedInvocationIdGenerator::new(gen),
        1036  +
        ));
        1037  +
        self
        1038  +
    }
        1039  +
    /// Overrides the default invocation ID generator.
        1040  +
    ///
        1041  +
    /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic.
        1042  +
    pub fn set_invocation_id_generator(
        1043  +
        &mut self,
        1044  +
        gen: ::std::option::Option<::aws_runtime::invocation_id::SharedInvocationIdGenerator>,
        1045  +
    ) -> &mut Self {
        1046  +
        self.config.store_or_unset(gen);
        1047  +
        self
        1048  +
    }
        1049  +
    /// Sets the endpoint URL used to communicate with this service.
        1050  +
    ///
        1051  +
    /// Note: this is used in combination with other endpoint rules, e.g. an API that applies a host-label prefix
        1052  +
    /// will be prefixed onto this URL. To fully override the endpoint resolver, use
        1053  +
    /// [`Builder::endpoint_resolver`].
        1054  +
    pub fn endpoint_url(mut self, endpoint_url: impl Into<::std::string::String>) -> Self {
        1055  +
        self.set_endpoint_url(Some(endpoint_url.into()));
        1056  +
        self
        1057  +
    }
        1058  +
    /// Sets the endpoint URL used to communicate with this service.
        1059  +
    ///
        1060  +
    /// Note: this is used in combination with other endpoint rules, e.g. an API that applies a host-label prefix
        1061  +
    /// will be prefixed onto this URL. To fully override the endpoint resolver, use
        1062  +
    /// [`Builder::endpoint_resolver`].
        1063  +
    pub fn set_endpoint_url(&mut self, endpoint_url: Option<::std::string::String>) -> &mut Self {
        1064  +
        self.config.store_or_unset(endpoint_url.map(::aws_types::endpoint_config::EndpointUrl));
        1065  +
        self
        1066  +
    }
        1067  +
    /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
        1068  +
    pub fn use_dual_stack(mut self, use_dual_stack: impl Into<bool>) -> Self {
        1069  +
        self.set_use_dual_stack(Some(use_dual_stack.into()));
        1070  +
        self
        1071  +
    }
        1072  +
    /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
        1073  +
    pub fn set_use_dual_stack(&mut self, use_dual_stack: Option<bool>) -> &mut Self {
        1074  +
        self.config.store_or_unset(use_dual_stack.map(::aws_types::endpoint_config::UseDualStack));
        1075  +
        self
        1076  +
    }
        1077  +
    /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
        1078  +
    pub fn use_fips(mut self, use_fips: impl Into<bool>) -> Self {
        1079  +
        self.set_use_fips(Some(use_fips.into()));
        1080  +
        self
        1081  +
    }
        1082  +
    /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
        1083  +
    pub fn set_use_fips(&mut self, use_fips: Option<bool>) -> &mut Self {
        1084  +
        self.config.store_or_unset(use_fips.map(::aws_types::endpoint_config::UseFips));
        1085  +
        self
        1086  +
    }
        1087  +
    /// Sets the AWS region to use when making requests.
        1088  +
    ///
        1089  +
    /// # Examples
        1090  +
    /// ```no_run
        1091  +
    /// use aws_types::region::Region;
        1092  +
    /// use aws_sdk_qldbsession::config::{Builder, Config};
        1093  +
    ///
        1094  +
    /// let config = aws_sdk_qldbsession::Config::builder()
        1095  +
    ///     .region(Region::new("us-east-1"))
        1096  +
    ///     .build();
        1097  +
    /// ```
        1098  +
    pub fn region(mut self, region: impl ::std::convert::Into<::std::option::Option<crate::config::Region>>) -> Self {
        1099  +
        self.set_region(region.into());
        1100  +
        self
        1101  +
    }
        1102  +
    /// Sets the AWS region to use when making requests.
        1103  +
    pub fn set_region(&mut self, region: ::std::option::Option<crate::config::Region>) -> &mut Self {
        1104  +
        self.config.store_or_unset(region);
        1105  +
        self
        1106  +
    }
        1107  +
    /// Sets the credentials provider for this service
        1108  +
    pub fn credentials_provider(mut self, credentials_provider: impl crate::config::ProvideCredentials + 'static) -> Self {
        1109  +
        self.set_credentials_provider(::std::option::Option::Some(crate::config::SharedCredentialsProvider::new(
        1110  +
            credentials_provider,
        1111  +
        )));
        1112  +
        self
        1113  +
    }
        1114  +
    /// Sets the credentials provider for this service
        1115  +
    pub fn set_credentials_provider(&mut self, credentials_provider: ::std::option::Option<crate::config::SharedCredentialsProvider>) -> &mut Self {
        1116  +
        if let Some(credentials_provider) = credentials_provider {
        1117  +
            self.runtime_components
        1118  +
                .set_identity_resolver(::aws_runtime::auth::sigv4::SCHEME_ID, credentials_provider);
        1119  +
        }
        1120  +
        self
        1121  +
    }
        1122  +
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
        1123  +
    ///
        1124  +
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
        1125  +
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
        1126  +
    /// all operations might be the ideal behavior but could break existing applications.
        1127  +
    ///
        1128  +
    /// # Examples
        1129  +
    ///
        1130  +
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
        1131  +
    /// ```no_run
        1132  +
    /// use aws_sdk_qldbsession::config::BehaviorVersion;
        1133  +
    ///
        1134  +
    /// let config = aws_sdk_qldbsession::Config::builder()
        1135  +
    ///     .behavior_version(BehaviorVersion::latest())
        1136  +
    ///     // ...
        1137  +
    ///     .build();
        1138  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
        1139  +
    /// ```
        1140  +
    ///
        1141  +
    /// Customizing behavior major version:
        1142  +
    /// ```no_run
        1143  +
    /// use aws_sdk_qldbsession::config::BehaviorVersion;
        1144  +
    ///
        1145  +
    /// let config = aws_sdk_qldbsession::Config::builder()
        1146  +
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
        1147  +
    ///     // ...
        1148  +
    ///     .build();
        1149  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
        1150  +
    /// ```
        1151  +
    ///
        1152  +
    pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self {
        1153  +
        self.set_behavior_version(Some(behavior_version));
        1154  +
        self
        1155  +
    }
        1156  +
        1157  +
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
        1158  +
    ///
        1159  +
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
        1160  +
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
        1161  +
    /// all operations might be the ideal behavior but could break existing applications.
        1162  +
    ///
        1163  +
    /// # Examples
        1164  +
    ///
        1165  +
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
        1166  +
    /// ```no_run
        1167  +
    /// use aws_sdk_qldbsession::config::BehaviorVersion;
        1168  +
    ///
        1169  +
    /// let config = aws_sdk_qldbsession::Config::builder()
        1170  +
    ///     .behavior_version(BehaviorVersion::latest())
        1171  +
    ///     // ...
        1172  +
    ///     .build();
        1173  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
        1174  +
    /// ```
        1175  +
    ///
        1176  +
    /// Customizing behavior major version:
        1177  +
    /// ```no_run
        1178  +
    /// use aws_sdk_qldbsession::config::BehaviorVersion;
        1179  +
    ///
        1180  +
    /// let config = aws_sdk_qldbsession::Config::builder()
        1181  +
    ///     .behavior_version(BehaviorVersion::v2023_11_09())
        1182  +
    ///     // ...
        1183  +
    ///     .build();
        1184  +
    /// let client = aws_sdk_qldbsession::Client::from_conf(config);
        1185  +
    /// ```
        1186  +
    ///
        1187  +
    pub fn set_behavior_version(&mut self, behavior_version: Option<crate::config::BehaviorVersion>) -> &mut Self {
        1188  +
        self.behavior_version = behavior_version;
        1189  +
        self
        1190  +
    }
        1191  +
        1192  +
    /// Convenience method to set the latest behavior major version
        1193  +
    ///
        1194  +
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
        1195  +
    pub fn behavior_version_latest(mut self) -> Self {
        1196  +
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
        1197  +
        self
        1198  +
    }
        1199  +
    /// Adds a runtime plugin to the config.
        1200  +
    #[allow(unused)]
        1201  +
    pub(crate) fn runtime_plugin(mut self, plugin: impl crate::config::RuntimePlugin + 'static) -> Self {
        1202  +
        self.push_runtime_plugin(crate::config::SharedRuntimePlugin::new(plugin));
        1203  +
        self
        1204  +
    }
        1205  +
    /// Adds a runtime plugin to the config.
        1206  +
    #[allow(unused)]
        1207  +
    pub(crate) fn push_runtime_plugin(&mut self, plugin: crate::config::SharedRuntimePlugin) -> &mut Self {
        1208  +
        self.runtime_plugins.push(plugin);
        1209  +
        self
        1210  +
    }
        1211  +
    #[cfg(any(feature = "test-util", test))]
        1212  +
    #[allow(unused_mut)]
        1213  +
    /// Apply test defaults to the builder. NOTE: Consider migrating to use `apply_test_defaults_v2` instead.
        1214  +
    pub fn apply_test_defaults(&mut self) -> &mut Self {
        1215  +
        self.set_time_source(::std::option::Option::Some(::aws_smithy_async::time::SharedTimeSource::new(
        1216  +
            ::aws_smithy_async::time::StaticTimeSource::new(::std::time::UNIX_EPOCH + ::std::time::Duration::from_secs(1234567890)),
        1217  +
        )));
        1218  +
        self.config.store_put(::aws_runtime::user_agent::AwsUserAgent::for_tests());
        1219  +
        self.set_credentials_provider(Some(crate::config::SharedCredentialsProvider::new(
        1220  +
            ::aws_credential_types::Credentials::for_tests(),
        1221  +
        )));
        1222  +
        self.behavior_version = ::std::option::Option::Some(crate::config::BehaviorVersion::latest());
        1223  +
        self
        1224  +
    }
        1225  +
    #[cfg(any(feature = "test-util", test))]
        1226  +
    #[allow(unused_mut)]
        1227  +
    /// Apply test defaults to the builder. NOTE: Consider migrating to use `with_test_defaults_v2` instead.
        1228  +
    pub fn with_test_defaults(mut self) -> Self {
        1229  +
        self.apply_test_defaults();
        1230  +
        self
        1231  +
    }
        1232  +
    #[cfg(any(feature = "test-util", test))]
        1233  +
    #[allow(unused_mut)]
        1234  +
    /// Apply test defaults to the builder. V2 of this function sets additional test defaults such as region configuration (if applicable).
        1235  +
    pub fn apply_test_defaults_v2(&mut self) -> &mut Self {
        1236  +
        self.apply_test_defaults();
        1237  +
        if self.config.load::<crate::config::Region>().is_none() {
        1238  +
            self.set_region(::std::option::Option::Some(crate::config::Region::new("us-east-1")));
        1239  +
        }
        1240  +
        self
        1241  +
    }
        1242  +
    #[cfg(any(feature = "test-util", test))]
        1243  +
    #[allow(unused_mut)]
        1244  +
    /// Apply test defaults to the builder. V2 of this function sets additional test defaults such as region configuration (if applicable).
        1245  +
    pub fn with_test_defaults_v2(mut self) -> Self {
        1246  +
        self.apply_test_defaults_v2();
        1247  +
        self
        1248  +
    }
        1249  +
    /// Builds a [`Config`].
        1250  +
    #[allow(unused_mut)]
        1251  +
    pub fn build(mut self) -> Config {
        1252  +
        let mut layer = self.config;
        1253  +
        if self.runtime_components.time_source().is_none() {
        1254  +
            self.runtime_components
        1255  +
                .set_time_source(::std::option::Option::Some(::std::default::Default::default()));
        1256  +
        }
        1257  +
        layer.store_put(crate::meta::API_METADATA.clone());
        1258  +
        layer.store_put(::aws_types::SigningName::from_static("qldb"));
        1259  +
        layer
        1260  +
            .load::<::aws_types::region::Region>()
        1261  +
            .cloned()
        1262  +
            .map(|r| layer.store_put(::aws_types::region::SigningRegion::from(r)));
        1263  +
        Config {
        1264  +
            config: crate::config::Layer::from(layer.clone())
        1265  +
                .with_name("aws_sdk_qldbsession::config::Config")
        1266  +
                .freeze(),
        1267  +
            cloneable: layer,
        1268  +
            runtime_components: self.runtime_components,
        1269  +
            runtime_plugins: self.runtime_plugins,
        1270  +
            behavior_version: self.behavior_version,
        1271  +
        }
        1272  +
    }
        1273  +
}
        1274  +
#[derive(::std::fmt::Debug)]
        1275  +
pub(crate) struct ServiceRuntimePlugin {
        1276  +
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
        1277  +
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
        1278  +
}
        1279  +
        1280  +
impl ServiceRuntimePlugin {
        1281  +
    pub fn new(_service_config: crate::config::Config) -> Self {
        1282  +
        let config = {
        1283  +
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("QLDBSession");
        1284  +
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
        1285  +
            ::std::option::Option::Some(cfg.freeze())
        1286  +
        };
        1287  +
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
        1288  +
        runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
        1289  +
            use crate::config::auth::ResolveAuthScheme;
        1290  +
            crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
        1291  +
        }));
        1292  +
        runtime_components.set_endpoint_resolver(::std::option::Option::Some({
        1293  +
            use crate::config::endpoint::ResolveEndpoint;
        1294  +
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
        1295  +
        }));
        1296  +
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
        1297  +
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
        1298  +
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
        1299  +
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
        1300  +
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
        1301  +
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
        1302  +
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
        1303  +
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
        1304  +
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
        1305  +
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
        1306  +
        ));
        1307  +
        Self { config, runtime_components }
        1308  +
    }
        1309  +
}
        1310  +
        1311  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
        1312  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
        1313  +
        self.config.clone()
        1314  +
    }
        1315  +
        1316  +
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {
        1317  +
        ::aws_smithy_runtime_api::client::runtime_plugin::Order::Defaults
        1318  +
    }
        1319  +
        1320  +
    fn runtime_components(
        1321  +
        &self,
        1322  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
        1323  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
        1324  +
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
        1325  +
    }
        1326  +
}
        1327  +
        1328  +
// Cross-operation shared-state singletons
        1329  +
        1330  +
/// A plugin that enables configuration for a single operation invocation
        1331  +
///
        1332  +
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
        1333  +
/// In the case of default values requested, they will be obtained from `client_config`.
        1334  +
#[derive(Debug)]
        1335  +
pub(crate) struct ConfigOverrideRuntimePlugin {
        1336  +
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
        1337  +
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
        1338  +
}
        1339  +
        1340  +
impl ConfigOverrideRuntimePlugin {
        1341  +
    #[allow(dead_code)] // unused when a service does not provide any operations
        1342  +
    pub(crate) fn new(
        1343  +
        config_override: Builder,
        1344  +
        initial_config: ::aws_smithy_types::config_bag::FrozenLayer,
        1345  +
        initial_components: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
        1346  +
    ) -> Self {
        1347  +
        let mut layer = config_override.config;
        1348  +
        let mut components = config_override.runtime_components;
        1349  +
        #[allow(unused_mut)]
        1350  +
        let mut resolver =
        1351  +
            ::aws_smithy_runtime::client::config_override::Resolver::overrid(initial_config, initial_components, &mut layer, &mut components);
        1352  +
        1353  +
        resolver
        1354  +
            .config_mut()
        1355  +
            .load::<::aws_types::region::Region>()
        1356  +
            .cloned()
        1357  +
            .map(|r| resolver.config_mut().store_put(::aws_types::region::SigningRegion::from(r)));
        1358  +
        1359  +
        let _ = resolver;
        1360  +
        Self {
        1361  +
            config: ::aws_smithy_types::config_bag::Layer::from(layer)
        1362  +
                .with_name("aws_sdk_qldbsession::config::ConfigOverrideRuntimePlugin")
        1363  +
                .freeze(),
        1364  +
            components,
        1365  +
        }
        1366  +
    }
        1367  +
}
        1368  +
        1369  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ConfigOverrideRuntimePlugin {
        1370  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
        1371  +
        Some(self.config.clone())
        1372  +
    }
        1373  +
        1374  +
    fn runtime_components(
        1375  +
        &self,
        1376  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
        1377  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
        1378  +
        ::std::borrow::Cow::Borrowed(&self.components)
        1379  +
    }
        1380  +
}
        1381  +
        1382  +
pub use ::aws_smithy_runtime::client::identity::IdentityCache;
        1383  +
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
        1384  +
pub use ::aws_smithy_types::config_bag::ConfigBag;
        1385  +
        1386  +
pub use ::aws_credential_types::Credentials;
        1387  +
        1388  +
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
        1389  +
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
        1390  +
        let mut builder = Builder::default();
        1391  +
        builder.set_credentials_provider(input.credentials_provider());
        1392  +
        builder = builder.region(input.region().cloned());
        1393  +
        builder.set_use_fips(input.use_fips());
        1394  +
        builder.set_use_dual_stack(input.use_dual_stack());
        1395  +
        if input.get_origin("endpoint_url").is_client_config() {
        1396  +
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
        1397  +
        } else {
        1398  +
            builder.set_endpoint_url(
        1399  +
                input
        1400  +
                    .service_config()
        1401  +
                    .and_then(|conf| {
        1402  +
                        conf.load_config(service_config_key("QLDB Session", "AWS_ENDPOINT_URL", "endpoint_url"))
        1403  +
                            .map(|it| it.parse().unwrap())
        1404  +
                    })
        1405  +
                    .or_else(|| input.endpoint_url().map(|s| s.to_string())),
        1406  +
            );
        1407  +
        }
        1408  +
        // resiliency
        1409  +
        builder.set_retry_config(input.retry_config().cloned());
        1410  +
        builder.set_timeout_config(input.timeout_config().cloned());
        1411  +
        builder.set_sleep_impl(input.sleep_impl());
        1412  +
        1413  +
        builder.set_http_client(input.http_client());
        1414  +
        builder.set_time_source(input.time_source());
        1415  +
        builder.set_behavior_version(input.behavior_version());
        1416  +
        builder.set_auth_scheme_preference(input.auth_scheme_preference().cloned());
        1417  +
        // setting `None` here removes the default
        1418  +
        if let Some(config) = input.stalled_stream_protection() {
        1419  +
            builder.set_stalled_stream_protection(Some(config));
        1420  +
        }
        1421  +
        1422  +
        if let Some(cache) = input.identity_cache() {
        1423  +
            builder.set_identity_cache(cache);
        1424  +
        }
        1425  +
        builder.set_app_name(input.app_name().cloned());
        1426  +
        1427  +
        builder
        1428  +
    }
        1429  +
}
        1430  +
        1431  +
impl From<&::aws_types::sdk_config::SdkConfig> for Config {
        1432  +
    fn from(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
        1433  +
        Builder::from(sdk_config).build()
        1434  +
    }
        1435  +
}
        1436  +
        1437  +
pub use ::aws_types::app_name::AppName;
        1438  +
        1439  +
#[allow(dead_code)]
        1440  +
fn service_config_key<'a>(service_id: &'a str, env: &'a str, profile: &'a str) -> aws_types::service_config::ServiceConfigKey<'a> {
        1441  +
    ::aws_types::service_config::ServiceConfigKey::builder()
        1442  +
        .service_id(service_id)
        1443  +
        .env(env)
        1444  +
        .profile(profile)
        1445  +
        .build()
        1446  +
        .expect("all field sets explicitly, can't fail")
        1447  +
}
        1448  +
        1449  +
pub use ::aws_smithy_async::rt::sleep::Sleep;
        1450  +
        1451  +
pub(crate) fn base_client_runtime_plugins(mut config: crate::Config) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
        1452  +
    let mut configured_plugins = ::std::vec::Vec::new();
        1453  +
    ::std::mem::swap(&mut config.runtime_plugins, &mut configured_plugins);
        1454  +
    #[cfg(feature = "behavior-version-latest")]
        1455  +
    {
        1456  +
        if config.behavior_version.is_none() {
        1457  +
            config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
        1458  +
        }
        1459  +
    }
        1460  +
        1461  +
    let default_retry_partition = "qldbsession";
        1462  +
    let default_retry_partition = match config.region() {
        1463  +
        Some(region) => ::std::borrow::Cow::from(format!("{default_retry_partition}-{region}")),
        1464  +
        None => ::std::borrow::Cow::from(default_retry_partition),
        1465  +
    };
        1466  +
        1467  +
    let scope = "aws-sdk-qldbsession";
        1468  +
        1469  +
    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
        1470  +
                        // defaults
        1471  +
                        .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
        1472  +
                            ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
        1473  +
                                .with_retry_partition_name(default_retry_partition)
        1474  +
                                .with_behavior_version(config.behavior_version.expect("Invalid client configuration: A behavior major version must be set when sending a request or constructing a client. You must set it during client construction or by enabling the `behavior-version-latest` cargo feature."))
        1475  +
                        ))
        1476  +
                        // user config
        1477  +
                        .with_client_plugin(
        1478  +
                            ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new()
        1479  +
                                .with_config(config.config.clone())
        1480  +
                                .with_runtime_components(config.runtime_components.clone())
        1481  +
                        )
        1482  +
                        // codegen config
        1483  +
                        .with_client_plugin(crate::config::ServiceRuntimePlugin::new(config.clone()))
        1484  +
                        .with_client_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePlugin::new())
        1485  +
                        .with_client_plugin(
        1486  +
                            ::aws_smithy_runtime::client::metrics::MetricsRuntimePlugin::builder()
        1487  +
                                .with_scope(scope)
        1488  +
                                .with_time_source(config.runtime_components.time_source().unwrap_or_default())
        1489  +
                                .build()
        1490  +
                                .expect("All required fields have been set")
        1491  +
                        );
        1492  +
        1493  +
    for plugin in configured_plugins {
        1494  +
        plugins = plugins.with_client_plugin(plugin);
        1495  +
    }
        1496  +
    plugins
        1497  +
}
        1498  +
        1499  +
pub use ::aws_smithy_types::config_bag::FrozenLayer;
        1500  +
        1501  +
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder;
        1502  +
        1503  +
pub use ::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin;
        1504  +
        1505  +
pub use ::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion;
        1506  +
        1507  +
pub use ::aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig;
        1508  +
        1509  +
pub use ::aws_smithy_runtime_api::client::http::SharedHttpClient;
        1510  +
        1511  +
pub use ::aws_smithy_async::rt::sleep::SharedAsyncSleep;
        1512  +
        1513  +
pub use ::aws_smithy_runtime_api::client::identity::SharedIdentityCache;
        1514  +
        1515  +
pub use ::aws_smithy_runtime_api::client::interceptors::SharedInterceptor;
        1516  +
        1517  +
pub use ::aws_types::region::Region;
        1518  +
        1519  +
pub use ::aws_credential_types::provider::SharedCredentialsProvider;
        1520  +
        1521  +
pub use ::aws_smithy_runtime_api::client::http::HttpClient;
        1522  +
        1523  +
pub use ::aws_smithy_runtime_api::shared::IntoShared;
        1524  +
        1525  +
pub use ::aws_smithy_async::rt::sleep::AsyncSleep;
        1526  +
        1527  +
pub use ::aws_smithy_runtime_api::client::identity::ResolveCachedIdentity;
        1528  +
        1529  +
pub use ::aws_smithy_runtime_api::client::interceptors::Intercept;
        1530  +
        1531  +
pub use ::aws_credential_types::provider::ProvideCredentials;
        1532  +
        1533  +
pub use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
        1534  +
        1535  +
pub use ::aws_smithy_types::config_bag::Layer;
        1536  +
        1537  +
/// Types needed to configure endpoint resolution.
        1538  +
pub mod endpoint;
        1539  +
        1540  +
/// HTTP request and response types.
        1541  +
pub mod http;
        1542  +
        1543  +
/// Types needed to implement [`Intercept`](crate::config::Intercept).
        1544  +
pub mod interceptors;
        1545  +
        1546  +
/// Retry configuration.
        1547  +
pub mod retry;
        1548  +
        1549  +
/// Timeout configuration.
        1550  +
pub mod timeout;
        1551  +
        1552  +
/// Types needed to configure auth scheme resolution.
        1553  +
pub mod auth;